Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wn2c_pragma.cxx File Reference
#include "alloca.h"
#include "whirl2c_common.h"
#include "w2cf_parentize.h"
#include "pf_cg.h"
#include "region_util.h"
#include "PUinfo.h"
#include "wn2c.h"
#include "st2c.h"
#include "ty2c.h"
#include "tcon2c.h"
#include "wn2c_pragma.h"
Include dependency graph for wn2c_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

static void WN2C_Stmt_Newline (TOKEN_BUFFER tokens, SRCPOS srcpos)
BOOL WN2C_is_omp (const WN *pragma)
static void WN2C_Append_Prompf_Flag_Newline (TOKEN_BUFFER tokens)
static void WN2C_Start_Prompf_Construct (TOKEN_BUFFER tokens, const WN *pragma)
static void WN2C_End_Prompf_Construct (TOKEN_BUFFER tokens, const WN *pragma)
static void WN2C_Append_Pragma_Newline (TOKEN_BUFFER tokens, SRCPOS srcpos)
void Append_Clause_Newline (TOKEN_BUFFER tokens, CONTEXT context)
static void Append_Reduction_Operator (TOKEN_BUFFER tokens, OPERATOR op)
static BOOL Preg_Is_In_Clause_List (const WN *clause_list, const 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, CONTEXT context)
static void WN2C_Value_Reference (TOKEN_BUFFER tokens, const WN *expression, BOOL prepend)
static void WN2C_Append_Value_Reference (TOKEN_BUFFER tokens, const WN *expression, BOOL prepend=FALSE)
static void WN2C_Prepend_Value_Reference (TOKEN_BUFFER tokens, const WN *expression, BOOL prepend=FALSE)
static void Append_MP_Schedtype (TOKEN_BUFFER tokens, WN_PRAGMA_SCHEDTYPE_KIND kind)
static void Append_Arg_Numbers (TOKEN_BUFFER tokens, INT32 val1, INT32 val2)
static void Append_Prefetch_Attributes (TOKEN_BUFFER tokens, const WN *prefetch, INT32 size)
static void Append_Distribution (TOKEN_BUFFER tokens, const WN **apragma, WN_PRAGMA_ID id)
static void Append_A_Clause_Symbol (TOKEN_BUFFER tokens, const WN *clause, WN_OFFSET ofst)
static void Append_Clause_Symbols (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, const WN **next)
static void Append_Reduction_Clause (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, const WN **next)
static void Append_Clause_Expressions (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, const WN **next, BOOL reverse_order=FALSE)
static void Append_Array_Segment (TOKEN_BUFFER tokens, WN_PRAGMA_ID id, const WN **next)
static void Append_Nest_Clauses (TOKEN_BUFFER tokens, const WN *nest_region, INT nest_levels, CONTEXT context)
static void Skip_Pragma_Clauses (const WN **clause_list, CONTEXT context)
static void Skip_Ignored_Clauses (const WN *following_clauses, const WN **next_clause)
static void Append_Pragma_Clauses (TOKEN_BUFFER tokens, const WN **clause_list, CONTEXT context)
static void Emit_To_PUinfo_Pragmas (const WN **next, CONTEXT context)
static const WNGet_Enclosing_Parallel_Region (const WN *construct)
static void WN2C_process_pragma (TOKEN_BUFFER tokens, const WN **next, CONTEXT context)
BOOL WN2C_Skip_Pragma_Stmt (const WN *wn)
STATUS WN2C_pragma (TOKEN_BUFFER tokens, const WN *wn, CONTEXT context)
STATUS WN2C_pragma_list_begin (TOKEN_BUFFER tokens, const WN *first_pragma, CONTEXT context)
STATUS WN2C_pragma_list_end (TOKEN_BUFFER tokens, const WN *first_pragma, CONTEXT context)
BOOL Ignore_Synchronized_Construct (const WN *construct_pragma, CONTEXT context)

Variables

BOOL Run_w2fc_early
BOOL W2C_Emit_Omp
static struct
Set_Of_Pragmas_To_Skip 
Pragmas_To_Skip
static const WNWN2C_Prompf_Subsection = NULL

Define Documentation

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

Definition at line 77 of file wn2c_pragma.cxx.

Referenced by Append_Array_Segment(), and WN2C_process_pragma().

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

Definition at line 80 of file wn2c_pragma.cxx.

#define MAX_PRAGMAS_TO_SKIP   50

Definition at line 103 of file wn2c_pragma.cxx.

Referenced by Append_Distribution(), and WN2C_pragma().

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

Definition at line 83 of file wn2c_pragma.cxx.

Referenced by Append_Distribution(), and WN2C_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 88 of file wn2c_pragma.cxx.

Referenced by WN2C_process_pragma().

#define WN_max_nest_level (   wn)    WN_pragma_arg2(wn)

Definition at line 74 of file wn2c_pragma.cxx.

Referenced by WN2C_process_pragma().

Definition at line 75 of file wn2c_pragma.cxx.

Referenced by Append_Pragma_Clauses(), and WN2C_process_pragma().

#define WN_pragma_nest (   wn)    WN_pragma_arg1(wn)

Definition at line 73 of file wn2c_pragma.cxx.

Referenced by WN2C_pragma_list_end(), and WN2C_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 557 of file wn2c_pragma.cxx.

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

Here is the call graph for this function:

static void Append_Array_Segment ( TOKEN_BUFFER  tokens,
WN_PRAGMA_ID  id,
const WN **  next 
) [static]
void Append_Clause_Newline ( TOKEN_BUFFER  tokens,
CONTEXT  context 
) [inline]

Definition at line 205 of file wn2c_pragma.cxx.

References CONTEXT_omp, CONTEXT_srcpos, and WN2C_Append_Pragma_Newline().

Referenced by Append_Implicit_Locals(), Append_Nest_Clauses(), Append_Pragma_Clauses(), and WN2C_process_pragma().

Here is the call graph for this function:

static void Append_Clause_Symbols ( TOKEN_BUFFER  tokens,
WN_PRAGMA_ID  id,
const WN **  next 
) [static]

Definition at line 752 of file wn2c_pragma.cxx.

References Append_A_Clause_Symbol(), Append_Token_Special(), Is_True, NULL, OPR_PRAGMA, WN_next(), WN_operator(), and WN_pragma().

Referenced by Append_Pragma_Clauses(), and WN2C_process_pragma().

Here is the call graph for this function:

static void Append_Implicit_Locals ( TOKEN_BUFFER  tokens,
WN_PRAGMA_ID  region_kind,
const WN region_body,
const WN region_clauses,
CONTEXT  context 
) [static]

Definition at line 429 of file wn2c_pragma.cxx.

References Append_Clause_Newline(), Append_Token_Special(), Append_Token_String(), CONTEXT_omp, FREE, Get_Implicit_Locals(), NULL, ST2C_Use_Preg(), and ST_type().

Referenced by WN2C_process_pragma().

Here is the call graph for this function:

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

Definition at line 213 of file wn2c_pragma.cxx.

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

Referenced by Append_Reduction_Clause().

Here is the call graph for this function:

static const WN* Get_Enclosing_Parallel_Region ( const WN construct) [static]

Definition at line 1331 of file wn2c_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 Preg_Is_In_Clause_List ( const WN clause_list,
const ST preg_st,
PREG_IDX  preg_idx 
) [static]
static void Skip_Ignored_Clauses ( const WN following_clauses,
const WN **  next_clause 
) [static]

Definition at line 1076 of file wn2c_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 WN2C_Append_Pragma_Newline ( TOKEN_BUFFER  tokens,
SRCPOS  srcpos 
) [static]

Definition at line 193 of file wn2c_pragma.cxx.

References Append_Token_String(), Current_Indentation(), Set_Current_Indentation(), and WN2C_Stmt_Newline().

Referenced by Append_Clause_Newline(), Emit_To_PUinfo_Pragmas(), and WN2C_process_pragma().

Here is the call graph for this function:

static void WN2C_Append_Prompf_Flag_Newline ( TOKEN_BUFFER  tokens) [static]

Definition at line 140 of file wn2c_pragma.cxx.

References Append_Indented_Newline(), Current_Indentation(), and Set_Current_Indentation().

Referenced by WN2C_End_Prompf_Construct(), and WN2C_Start_Prompf_Construct().

Here is the call graph for this function:

static void WN2C_Append_Value_Reference ( TOKEN_BUFFER  tokens,
const WN expression,
BOOL  prepend = FALSE 
) [static]

Definition at line 508 of file wn2c_pragma.cxx.

References FALSE, and WN2C_Value_Reference().

Referenced by Append_Array_Segment(), Append_Clause_Expressions(), Append_Pragma_Clauses(), Append_Prefetch_Attributes(), and WN2C_process_pragma().

Here is the call graph for this function:

static void WN2C_End_Prompf_Construct ( TOKEN_BUFFER  tokens,
const WN pragma 
) [static]

Definition at line 164 of file wn2c_pragma.cxx.

References Append_Token_String(), Number_as_String(), W2C_Construct_Map, WN2C_Append_Prompf_Flag_Newline(), and WN_MAP32_Get.

Referenced by WN2C_pragma_list_end(), and WN2C_process_pragma().

Here is the call graph for this function:

STATUS WN2C_pragma_list_begin ( TOKEN_BUFFER  tokens,
const WN first_pragma,
CONTEXT  context 
)

Definition at line 2004 of file wn2c_pragma.cxx.

References EMPTY_STATUS, NULL, OPR_PRAGMA, OPR_XPRAGMA, WN2C_process_pragma(), WN_next(), and WN_operator().

Referenced by WN2C_func_entry(), and WN2C_region().

Here is the call graph for this function:

static void WN2C_Prepend_Value_Reference ( TOKEN_BUFFER  tokens,
const WN expression,
BOOL  prepend = FALSE 
) [static]

Definition at line 516 of file wn2c_pragma.cxx.

References TRUE, and WN2C_Value_Reference().

Referenced by Append_Clause_Expressions().

Here is the call graph for this function:

static void WN2C_process_pragma ( TOKEN_BUFFER  tokens,
const WN **  next,
CONTEXT  context 
) [static]

Definition at line 1351 of file wn2c_pragma.cxx.

References Append_A_Clause_Symbol(), Append_Clause_Expressions(), Append_Clause_Newline(), Append_Clause_Symbols(), Append_Distribution(), Append_Implicit_Locals(), Append_MP_Schedtype(), Append_Nest_Clauses(), Append_Pragma_Clauses(), Append_Prefetch_Attributes(), Append_Token_Special(), Append_Token_String(), CONTEXT_omp, CONTEXT_set_omp, CONTEXT_srcpos, Decrement_Indentation(), EMIT_ARG_NUMBERS1, Emit_To_PUinfo_Pragmas(), Ignore_Synchronized_Construct(), Increment_Indentation(), Is_True, next, NULL, OPR_PRAGMA, OPR_PREFETCH, OPR_XPRAGMA, PARENTHESIZE_ARG_NUMBERS1, PARENTHESIZE_ARG_NUMBERS2, Skip_Pragma_Clauses(), ST2C_use_translate(), W2C_Prompf_Emission, W2CF_Get_Parent(), WN2C_Append_Pragma_Newline(), WN2C_Append_Value_Reference(), WN2C_End_Prompf_Construct(), WN2C_is_omp(), WN2C_Start_Prompf_Construct(), WN2C_Stmt_Newline(), WN_kid0(), WN_max_nest_level, WN_mp_schedtype, 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_CRITICAL_SECTION_BEGIN, WN_PRAGMA_CRITICAL_SECTION_END, WN_PRAGMA_DISTRIBUTE, WN_PRAGMA_DISTRIBUTE_RESHAPE, WN_PRAGMA_DOACROSS, WN_PRAGMA_DYNAMIC, WN_PRAGMA_ENTER_GATE, WN_PRAGMA_EXIT_GATE, WN_PRAGMA_FISSION, WN_PRAGMA_FISSIONABLE, WN_PRAGMA_FUSE, WN_PRAGMA_FUSEABLE, WN_PRAGMA_INDEPENDENT_BEGIN, WN_PRAGMA_INDEPENDENT_END, WN_PRAGMA_INLINE_DEPTH, WN_PRAGMA_INTERCHANGE, WN_PRAGMA_IVDEP, 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_ORDERED_BEGIN, WN_PRAGMA_ORDERED_END, WN_PRAGMA_PAGE_PLACE, WN_PRAGMA_PARALLEL_BEGIN, WN_PRAGMA_PARALLEL_DO, WN_PRAGMA_PARALLEL_SECTIONS, 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_region_body, and WN_st().

Referenced by WN2C_pragma(), and WN2C_pragma_list_begin().

Here is the call graph for this function:

static void WN2C_Start_Prompf_Construct ( TOKEN_BUFFER  tokens,
const WN pragma 
) [static]

Definition at line 151 of file wn2c_pragma.cxx.

References Append_Token_String(), Number_as_String(), W2C_Construct_Map, WN2C_Append_Prompf_Flag_Newline(), and WN_MAP32_Get.

Referenced by WN2C_process_pragma().

Here is the call graph for this function:

static void WN2C_Stmt_Newline ( TOKEN_BUFFER  tokens,
SRCPOS  srcpos 
) [static]
static void WN2C_Value_Reference ( TOKEN_BUFFER  tokens,
const WN expression,
BOOL  prepend 
) [static]

Variable Documentation

Definition at line 164 of file w2c_driver.cxx.

Referenced by W2C_Process_Command_Line(), and WN2C_is_omp().

Definition at line 123 of file wn2c_pragma.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines