Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wn2f_pragma.cxx File Reference
#include <cctype>
#include <algorithm>
#include "alloca.h"
#include "whirl2f_common.h"
#include "w2cf_parentize.h"
#include "const.h"
#include "pf_cg.h"
#include "PUinfo.h"
#include "wn2f.h"
#include "st2f.h"
#include "ty2f.h"
#include "tcon2f.h"
#include "wn2f_pragma.h"
#include "wn2f_stmt.h"
Include dependency graph for wn2f_pragma.cxx:

Go to the source code of this file.

Classes

struct  Array_Distribution
struct  Set_Of_Pragmas_To_Skip
struct  Local_Preg

Defines

#define WN_pragma_nest(wn)   WN_pragma_arg1(wn)
#define WN_max_nest_level(wn)   WN_pragma_arg2(wn)
#define WN_mp_schedtype(wn)   (WN_PRAGMA_SCHEDTYPE_KIND)WN_pragma_arg1(wn)
#define EMIT_ARG_NUMBERS1(tokens, val1)   Append_Arg_Numbers((tokens), (val1), -1)
#define EMIT_ARG_NUMBERS2(tokens, val1, val2)   Append_Arg_Numbers((tokens), (val1), (val2))
#define PARENTHESIZE_ARG_NUMBERS1(tokens, val1)
#define PARENTHESIZE_ARG_NUMBERS2(tokens, val1, val2)
#define MAX_PRAGMAS_TO_SKIP   50

Typedefs

typedef struct Array_Distribution ARRAY_DISTRIBUTION
typedef struct Local_Preg LOCAL_PREG

Functions

const std::string filePragma ("file_start")
void WN2F_Append_Purple_Funcinfo (TOKEN_BUFFER tokens)
BOOL WN2F_is_omp (const WN *pragma)
static void WN2F_Start_Prompf_Construct (TOKEN_BUFFER tokens, WN *pragma)
static void WN2F_End_Prompf_Construct (TOKEN_BUFFER tokens, WN *pragma)
static void WN2F_Directive_Newline (TOKEN_BUFFER tokens, const char *directive_prefix, SRCPOS srcpos)
static void WN2F_Append_Pragma_Preamble (TOKEN_BUFFER tokens, WN *apragma)
static void WN2F_OMP_or_PAR_Directive_Newline (TOKEN_BUFFER tokens, WN *apragma)
static void Append_Reduction_Operator (TOKEN_BUFFER tokens, OPERATOR op)
static BOOL Is_Valid_Doacross (WN *doacross)
static void Put_Pragma_Start_With_Caveats (TOKEN_BUFFER tokens, WN *apragma, BOOL warn)
static BOOL Preg_Is_In_Clause_List (const WN *clause_list, ST *preg_st, PREG_IDX preg_idx)
static void Get_Implicit_Locals (WN_PRAGMA_ID kind, const WN *wn, const WN *clauses, LOCAL_PREG **ptr_to_local_list, UINT *next_local, UINT *max_locals)
static void Append_Implicit_Locals (TOKEN_BUFFER tokens, WN_PRAGMA_ID region_kind, const WN *region_body, const WN *region_clauses)
static BOOL WN2F_pragma_list_nowait (WN *first_pragma)
static void WN2F_Append_Value_Reference (TOKEN_BUFFER tokens, WN *expression)
static void WN2F_Prepend_Value_Reference (TOKEN_BUFFER tokens, WN *expression)
static void Append_MP_Schedtype (TOKEN_BUFFER tokens, WN *clause)
static void Append_Arg_Numbers (TOKEN_BUFFER tokens, INT32 val1, INT32 val2)
static void Append_Prefetch_Attributes (TOKEN_BUFFER tokens, WN *prefetch, INT32 size)
static void Append_Distribution (TOKEN_BUFFER tokens, WN **apragma, WN_PRAGMA_ID id)
static void Append_A_Clause_Symbol (TOKEN_BUFFER tokens, WN *clause, WN_OFFSET ofst)
static void Append_Clause_Symbols (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, WN **next)
static void Append_Reduction_Clause (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, WN **next)
static void Append_Clause_Expressions (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, WN **next, BOOL reverse_order=FALSE)
static void Append_Array_Segment (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, WN **next)
static void Append_Nest_Clauses (TOKEN_BUFFER tokens, const WN *nest_region, INT nest_levels, WN2F_CONTEXT context)
void Append_ST_String (TOKEN_BUFFER tokens, WN *pragma)
static void Skip_Pragma_Clauses (WN **clause_list, WN2F_CONTEXT context)
static void Skip_Ignored_Clauses (WN *following_clauses, WN **next_clause)
static void Append_Pragma_Clauses (TOKEN_BUFFER tokens, WN **clause_list, WN2F_CONTEXT context)
static void Emit_To_PUinfo_Pragmas (WN **next, WN2F_CONTEXT context)
static WNGet_Enclosing_Parallel_Region (const WN *construct)
static void WN2F_process_pragma (TOKEN_BUFFER tokens, WN **next, WN2F_CONTEXT context)
BOOL WN2F_Skip_Pragma_Stmt (WN *wn)
WN2F_STATUS WN2F_pragma (TOKEN_BUFFER tokens, WN *wn, WN2F_CONTEXT context)
WN2F_STATUS WN2F_pragma_list_begin (TOKEN_BUFFER tokens, WN *first_pragma, WN2F_CONTEXT context)
WN2F_STATUS WN2F_pragma_list_end (TOKEN_BUFFER tokens, WN *first_pragma, WN2F_CONTEXT context)
BOOL Ignore_Synchronized_Construct (WN *construct_pragma, WN2F_CONTEXT context)

Variables

BOOL Run_w2fc_early
WN_MAPW2F_Construct_Map
BOOL W2F_Prompf_Emission
BOOL W2F_Emit_Omp
static struct
Set_Of_Pragmas_To_Skip 
Pragmas_To_Skip
static WNWN2F_Prompf_Subsection = NULL

Define Documentation

#define EMIT_ARG_NUMBERS1 (   tokens,
  val1 
)    Append_Arg_Numbers((tokens), (val1), -1)

Definition at line 86 of file wn2f_pragma.cxx.

Referenced by Append_Array_Segment(), and WN2F_process_pragma().

#define EMIT_ARG_NUMBERS2 (   tokens,
  val1,
  val2 
)    Append_Arg_Numbers((tokens), (val1), (val2))

Definition at line 89 of file wn2f_pragma.cxx.

#define MAX_PRAGMAS_TO_SKIP   50

Definition at line 112 of file wn2f_pragma.cxx.

Referenced by Append_Distribution(), and WN2F_pragma().

#define PARENTHESIZE_ARG_NUMBERS1 (   tokens,
  val1 
)
Value:
Append_Token_Special((tokens), '('); \
   EMIT_ARG_NUMBERS1((tokens), (val1)); \
   Append_Token_Special((tokens), ')')

Definition at line 92 of file wn2f_pragma.cxx.

Referenced by Append_Distribution(), and WN2F_process_pragma().

#define PARENTHESIZE_ARG_NUMBERS2 (   tokens,
  val1,
  val2 
)
Value:
Append_Token_Special((tokens), '('); \
   EMIT_ARG_NUMBERS2((tokens), (val1), (val2)); \
   Append_Token_Special((tokens), ')')

Definition at line 97 of file wn2f_pragma.cxx.

Referenced by WN2F_process_pragma().

#define WN_max_nest_level (   wn)    WN_pragma_arg2(wn)

Definition at line 83 of file wn2f_pragma.cxx.

Referenced by WN2F_process_pragma().

Definition at line 84 of file wn2f_pragma.cxx.

Referenced by Append_MP_Schedtype().

#define WN_pragma_nest (   wn)    WN_pragma_arg1(wn)

Definition at line 82 of file wn2f_pragma.cxx.

Referenced by WN2F_pragma_list_end(), and WN2F_process_pragma().


Typedef Documentation

typedef struct Local_Preg LOCAL_PREG

Function Documentation

static void Append_Arg_Numbers ( TOKEN_BUFFER  tokens,
INT32  val1,
INT32  val2 
) [static]

Definition at line 625 of file wn2f_pragma.cxx.

References Append_Token_Special(), Append_Token_String(), and WHIRL2F_number_as_name.

Here is the call graph for this function:

static void Append_Array_Segment ( TOKEN_BUFFER  tokens,
WN_PRAGMA_ID  id,
WN **  next 
) [static]
static void Append_Clause_Symbols ( TOKEN_BUFFER  tokens,
WN_PRAGMA_ID  id,
WN **  next 
) [static]
static void Append_Implicit_Locals ( TOKEN_BUFFER  tokens,
WN_PRAGMA_ID  region_kind,
const WN region_body,
const WN region_clauses 
) [static]

Definition at line 498 of file wn2f_pragma.cxx.

References Append_Token_Special(), Append_Token_String(), FREE, Get_Implicit_Locals(), NULL, ST2F_Use_Preg(), ST_type(), and WN2F_is_omp().

Referenced by WN2F_process_pragma().

Here is the call graph for this function:

static void Append_Prefetch_Attributes ( TOKEN_BUFFER  tokens,
WN prefetch,
INT32  size 
) [static]
static void Append_Reduction_Operator ( TOKEN_BUFFER  tokens,
OPERATOR  op 
) [static]

Definition at line 215 of file wn2f_pragma.cxx.

References Append_Token_Special(), Append_Token_String(), OPR_ADD, OPR_BAND, OPR_BIOR, OPR_BXOR, OPR_EQ, OPR_LAND, OPR_LIOR, OPR_MAX, OPR_MIN, OPR_MPY, OPR_NE, and OPR_SUB.

Referenced by Append_Reduction_Clause().

Here is the call graph for this function:

void Append_ST_String ( TOKEN_BUFFER  tokens,
WN pragma 
)

Definition at line 1079 of file wn2f_pragma.cxx.

References Append_Token_String(), NULL, Targ_Print(), val, and WN_val().

Referenced by W2F_Outfile_Translate_Pu(), and WN2F_process_pragma().

Here is the call graph for this function:

const std::string filePragma ( "file_start"  )
static WN* Get_Enclosing_Parallel_Region ( const WN construct) [static]

Definition at line 1399 of file wn2f_pragma.cxx.

References NULL, OPR_REGION, W2CF_Get_Parent(), WN_first(), WN_operator(), WN_pragma(), WN_PRAGMA_PARALLEL_BEGIN, and WN_region_pragmas.

Referenced by Ignore_Synchronized_Construct().

Here is the call graph for this function:

static void Get_Implicit_Locals ( WN_PRAGMA_ID  kind,
const WN wn,
const WN clauses,
LOCAL_PREG **  ptr_to_local_list,
UINT next_local,
UINT max_locals 
) [static]
static BOOL Is_Valid_Doacross ( WN doacross) [static]

Definition at line 281 of file wn2f_pragma.cxx.

References ASSERT_DBG_FATAL, DIAG_W2F_UNEXPECTED_OPC, OPR_DO_LOOP, OPR_REGION, W2CF_Get_Parent(), WN_first(), WN_last(), WN_operator(), and WN_region_body.

Referenced by Put_Pragma_Start_With_Caveats().

Here is the call graph for this function:

static BOOL Preg_Is_In_Clause_List ( const WN clause_list,
ST preg_st,
PREG_IDX  preg_idx 
) [static]
static void Put_Pragma_Start_With_Caveats ( TOKEN_BUFFER  tokens,
WN apragma,
BOOL  warn 
) [static]
static void Skip_Ignored_Clauses ( WN following_clauses,
WN **  next_clause 
) [static]

Definition at line 1154 of file wn2f_pragma.cxx.

References FALSE, TRUE, WN_next(), WN_pragma(), WN_PRAGMA_DATA_AFFINITY, WN_PRAGMA_MPNUM, WN_PRAGMA_SYNC_DOACROSS, and WN_PRAGMA_THREAD_AFFINITY.

Referenced by Append_Pragma_Clauses().

Here is the call graph for this function:

static void WN2F_Append_Pragma_Preamble ( TOKEN_BUFFER  tokens,
WN apragma 
) [static]

Definition at line 183 of file wn2f_pragma.cxx.

References Append_Token_String(), and WN2F_is_omp().

Here is the call graph for this function:

static void WN2F_Append_Value_Reference ( TOKEN_BUFFER  tokens,
WN expression 
) [static]
static void WN2F_Directive_Newline ( TOKEN_BUFFER  tokens,
const char *  directive_prefix,
SRCPOS  srcpos 
) [static]
static void WN2F_End_Prompf_Construct ( TOKEN_BUFFER  tokens,
WN pragma 
) [static]

Definition at line 157 of file wn2f_pragma.cxx.

References Append_F77_Directive_Newline(), Append_Token_String(), Number_as_String(), sgi_comment_str, W2F_Construct_Map, and WN_MAP32_Get.

Referenced by WN2F_pragma_list_end(), and WN2F_process_pragma().

Here is the call graph for this function:

static void WN2F_OMP_or_PAR_Directive_Newline ( TOKEN_BUFFER  tokens,
WN apragma 
) [static]

Definition at line 202 of file wn2f_pragma.cxx.

References WN2F_Directive_Newline(), WN2F_is_omp(), and WN_Get_Linenum().

Referenced by WN2F_pragma_list_end(), and WN2F_process_pragma().

Here is the call graph for this function:

WN2F_STATUS WN2F_pragma_list_begin ( TOKEN_BUFFER  tokens,
WN first_pragma,
WN2F_CONTEXT  context 
)

Definition at line 2126 of file wn2f_pragma.cxx.

References EMPTY_WN2F_STATUS, NULL, OPR_INTERFACE, OPR_PRAGMA, OPR_XPRAGMA, WN2F_interface_blk(), WN2F_process_pragma(), WN_next(), and WN_operator().

Referenced by WN2F_func_entry().

Here is the call graph for this function:

static BOOL WN2F_pragma_list_nowait ( WN first_pragma) [static]

Definition at line 544 of file wn2f_pragma.cxx.

References FALSE, NULL, OPR_PRAGMA, OPR_XPRAGMA, TRUE, wn, WN_next(), WN_operator(), WN_pragma(), and WN_PRAGMA_NOWAIT.

Referenced by WN2F_pragma_list_end().

Here is the call graph for this function:

static void WN2F_Prepend_Value_Reference ( TOKEN_BUFFER  tokens,
WN expression 
) [static]
static void WN2F_process_pragma ( TOKEN_BUFFER  tokens,
WN **  next,
WN2F_CONTEXT  context 
) [static]

Definition at line 1419 of file wn2f_pragma.cxx.

References Append_A_Clause_Symbol(), Append_Clause_Expressions(), Append_Clause_Symbols(), Append_Distribution(), Append_Implicit_Locals(), Append_MP_Schedtype(), Append_Nest_Clauses(), Append_Pragma_Clauses(), Append_Prefetch_Attributes(), Append_ST_String(), Append_Token_Special(), Append_Token_String(), ASSERT_DBG_FATAL, ASSERT_DO_CONCURRENT, DIAG_W2F_UNEXPECTED_OPC, EMIT_ARG_NUMBERS1, Emit_To_PUinfo_Pragmas(), filePragma, Ignore_Synchronized_Construct(), name, next, NULL, OPR_PRAGMA, OPR_PREFETCH, OPR_XPRAGMA, PARENTHESIZE_ARG_NUMBERS1, PARENTHESIZE_ARG_NUMBERS2, Put_Pragma_Start_With_Caveats(), Skip_Pragma_Clauses(), ST2F_use_translate(), ST_name(), Targ_Print(), TRUE, W2CF_Get_Parent(), W2F_Prompf_Emission, WN2F_Append_Value_Reference(), WN2F_Directive_Newline(), WN2F_End_Prompf_Construct(), WN2F_is_omp(), WN2F_OMP_or_PAR_Directive_Newline(), WN2F_Start_Prompf_Construct(), WN_Get_Linenum(), WN_has_sym, WN_kid0(), WN_max_nest_level, WN_next(), WN_operator(), WN_pragma(), WN_PRAGMA_AGGRESSIVE_INNER_LOOP_FISSION, WN_pragma_arg1(), WN_pragma_arg2(), WN_PRAGMA_ATOMIC, WN_PRAGMA_BARRIER, WN_PRAGMA_BLOCKABLE, WN_PRAGMA_BLOCKING_SIZE, WN_PRAGMA_CHUNKSIZE, WN_PRAGMA_COPYIN, WN_PRAGMA_CRI_CNCALL, WN_PRAGMA_CRITICAL_SECTION_BEGIN, WN_PRAGMA_CRITICAL_SECTION_END, WN_PRAGMA_DISTRIBUTE, WN_PRAGMA_DISTRIBUTE_RESHAPE, WN_PRAGMA_DOACROSS, WN_PRAGMA_DYNAMIC, WN_PRAGMA_FISSION, WN_PRAGMA_FISSIONABLE, WN_PRAGMA_FLUSH, WN_PRAGMA_FUSE, WN_PRAGMA_FUSEABLE, WN_PRAGMA_INLINE_DEPTH, WN_PRAGMA_INTERCHANGE, WN_PRAGMA_IVDEP, WN_PRAGMA_KAP_ASSERT_CONCURRENT_CALL, WN_PRAGMA_KAP_ASSERT_DO, WN_PRAGMA_KAP_ASSERT_DOPREFER, WN_PRAGMA_KAP_ASSERT_PERMUTATION, WN_PRAGMA_KAP_CONCURRENTIZE, WN_PRAGMA_KAP_NOCONCURRENTIZE, WN_PRAGMA_MASTER_BEGIN, WN_PRAGMA_MPSCHEDTYPE, WN_pragma_nest, WN_PRAGMA_NEXT_SCALAR, WN_PRAGMA_NO_BLOCKING, WN_PRAGMA_NO_FISSION, WN_PRAGMA_NO_FUSION, WN_PRAGMA_NO_INTERCHANGE, WN_PRAGMA_NORECURRENCE, WN_PRAGMA_NUMTHREADS, WN_PRAGMA_OPENAD_DEPENDENT, WN_PRAGMA_OPENAD_INDEPENDENT, WN_PRAGMA_OPENAD_XXX, WN_PRAGMA_ORDERED_BEGIN, WN_PRAGMA_ORDERED_END, WN_PRAGMA_PAGE_PLACE, WN_PRAGMA_PARALLEL_BEGIN, WN_PRAGMA_PARALLEL_DO, WN_PRAGMA_PARALLEL_SECTIONS, WN_PRAGMA_PARALLEL_WORKSHARE, WN_PRAGMA_PDO_BEGIN, WN_PRAGMA_PREFETCH, WN_PRAGMA_PREFETCH_MANUAL, WN_PRAGMA_PREFETCH_REF, WN_PRAGMA_PREFETCH_REF_DISABLE, WN_PRAGMA_PSECTION_BEGIN, WN_PRAGMA_REDISTRIBUTE, WN_PRAGMA_SECTION, WN_PRAGMA_SINGLE_PROCESS_BEGIN, WN_PRAGMA_UNROLL, WN_PRAGMA_WORKSHARE, WN_region_body, WN_st(), and WN_val().

Referenced by WN2F_pragma(), and WN2F_pragma_list_begin().

Here is the call graph for this function:

static void WN2F_Start_Prompf_Construct ( TOKEN_BUFFER  tokens,
WN pragma 
) [static]

Definition at line 146 of file wn2f_pragma.cxx.

References Append_F77_Directive_Newline(), Append_Token_String(), Number_as_String(), sgi_comment_str, W2F_Construct_Map, and WN_MAP32_Get.

Referenced by WN2F_process_pragma().

Here is the call graph for this function:


Variable Documentation

Definition at line 758 of file config.cxx.

Definition at line 172 of file w2f_driver.cxx.

Definition at line 161 of file w2f_driver.cxx.

Definition at line 171 of file w2f_driver.cxx.

Definition at line 132 of file wn2f_pragma.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines