Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
s_directiv.c File Reference
#include "defines.h"
#include "host.m"
#include "host.h"
#include "target.m"
#include "target.h"
#include "globals.m"
#include "tokens.m"
#include "sytb.m"
#include "s_globals.m"
#include "debug.m"
#include "globals.h"
#include "tokens.h"
#include "sytb.h"
#include "s_globals.h"
Include dependency graph for s_directiv.c:

Go to the source code of this file.

Functions

static void add_common_blk_objects_to_list (int, int)
static boolean assert_semantics (void)
static boolean attr_is_in_list (int, int)
static void doall_cmic_semantics (void)
static void doparallel_cmic_semantics (void)
static void end_blk_mp_semantics (boolean)
static void set_mp_task_flags (int, boolean)
static void endparallel_cmic_semantics (void)
static boolean has_been_reprivatized (int)
static void mp_directive_semantics (mp_directive_type)
static boolean multiple_clause_err (int, int)
static void open_mp_directive_semantics (open_mp_directive_type)
static void parallel_cmic_semantics (void)
static int pop_task_blk (void)
static boolean power_o_two (int)
static void prefetch_ref_semantics (void)
static void push_task_blk (int)
static void set_open_mp_task_flags (int, boolean)
static void wait_send_semantics (void)
void directive_stmt_semantics (void)
void doall_end_semantics (void)
void bounds_cdir_handler (int ir_idx)

Variables

static char USMID [] = "\n@(#)5.0_pl/sources/s_directiv.c 5.12 10/28/99 10:03:56\n"

Function Documentation

static boolean attr_is_in_list ( int  list_idx,
int  attr_idx 
) [static]
void directive_stmt_semantics ( void  )

Definition at line 98 of file s_directiv.c.

References After, cdir_switch_entry::aggressiveinnerloopfission, Aggressiveinnerloopfission_Opr, cdir_switch_entry::align, Align_Cdir_Opr, Align_Symbol_Star_Opr, assert_semantics(), Assert_Star_Opr, AT_ATTR_LINK, AT_DCL_ERR, AT_IS_INTRIN, AT_LOCKED_IN, AT_NAME_LEN, AT_OBJ_CLASS, AT_OBJ_NAME_PTR, AT_Tbl_Idx, ATD_ARRAY_IDX, ATD_CACHE_ALIGN, ATD_CACHE_BYPASS_ARRAY, ATD_CLASS, ATD_IN_COMMON, ATD_STOR_BLK_IDX, ATD_TYPE_IDX, ATI_FIRST_SPECIFIC_IDX, ATI_PROC_IDX, Atomic_Open_Mp_Opr, ATP_PGM_UNIT, ATP_RSLT_IDX, ATP_RSLT_NAME, ATP_SGI_GLOBAL_INLINE, ATP_SGI_GLOBAL_NOINLINE, ATP_SGI_LOCAL_INLINE, ATP_SGI_LOCAL_NOINLINE, ATP_SGI_ROUTINE_INLINE, ATP_SGI_ROUTINE_NOINLINE, Barrier_Open_Mp_Opr, Barrier_Par_Opr, cdir_switch_entry::bl, Bl_Cdir_Opr, cdir_switch_entry::blockable_count, Blockable_Dir_Opr, cdir_switch_entry::blockable_group, cdir_switch_entry::blockable_sh_idx, Blockingsize_Dir_Opr, bounds_cdir_handler(), Bounds_Cdir_Opr, C_INT_TO_CN, Cache_Bypass_Cdir_Opr, cdir_switch_entry::cache_bypass_ir_idx, Cachealign_Cdir_Opr, cdir_switches, CG_INTEGER_DEFAULT_TYPE, CIF_Symbol_Reference, CN_INT_TO_C, CN_INTEGER_NEG_ONE_IDX, CN_INTEGER_ONE_IDX, CN_INTEGER_ZERO_IDX, CN_Tbl_Idx, CN_TYPE_IDX, cdir_switch_entry::cncall, Cncall_Cmic_Opr, compare_cn_and_value(), Complex_8, cdir_switch_entry::concurrent, Concurrent_Cdir_Opr, cdir_switch_entry::concurrent_idx, Concurrentize_Star_Opr, const_safevl_idx, COPY_OPND, copy_to_gl_subtree(), Copyin_Dollar_Opr, create_tmp_asg(), Critical_Open_Mp_Opr, Critical_Section_Par_Opr, curr_gl_stmt_sh_idx, curr_scp_idx, curr_stmt_sh_idx, Data_Obj, Dependent_OpenAD_Opr, Directive_Stmt, cdir_switch_entry::do_inline, Do_Omp, Do_Open_Mp_Opr, Doacross, Doacross_Dollar_Opr, cdir_switch_entry::doacross_sh_idx, Doall_Cmic_Opr, doall_cmic_semantics(), cdir_switch_entry::doall_sh_idx, Doparallel_Cmic_Opr, doparallel_cmic_semantics(), Dv_Deref_Opr, Dynamic_Dollar_Opr, end_blk_mp_semantics(), End_Critical_Section_Par_Opr, End_Inline_Here_Star_Opr, End_Parallel_Par_Opr, End_Pdo_Par_Opr, End_Psection_Par_Opr, End_Singleprocess_Par_Opr, Endcritical_Open_Mp_Opr, Enddo_Cmic_Opr, Enddo_Open_Mp_Opr, Endguard_Cmic_Opr, Endmaster_Open_Mp_Opr, Endordered_Open_Mp_Opr, Endparallel_Cmic_Opr, endparallel_cmic_semantics(), Endparallel_Open_Mp_Opr, Endparalleldo_Open_Mp_Opr, Endparallelsections_Open_Mp_Opr, Endparallelworkshare_Open_Mp_Opr, Endsections_Open_Mp_Opr, EndSimple_OpenAD_Opr, Endsingle_Open_Mp_Opr, Endworkshare_Open_Mp_Opr, Eq_Opr, Error, expr_mode, expr_semantics(), FALSE, Fill_Symbol_Star_Opr, find_left_attr(), find_opnd_line_and_column(), Fission_Star_Opr, cdir_switch_entry::fissionable, Fissionable_Star_Opr, Flush_Open_Mp_Opr, Flush_Star_Opr, fold_relationals(), Func_Entry, Func_Exit, Function, cdir_switch_entry::fusable, Fusable_Star_Opr, Fuse_Star_Opr, GA_OBJ_CLASS, GAP_GLOBAL_DIR, GAP_INLINE_STATE, gen_gl_sh(), GL_SH_IR_IDX, GN_ATTR_IDX, Gt_Opr, Guard_Cmic_Opr, cdir_switch_entry::guard_in_par_reg, idx, IL_COL_NUM, IL_FLD, IL_IDX, IL_LINE_NUM, IL_NEXT_LIST_IDX, IL_OPND, IL_PE_SUBSCRIPT, IL_Tbl_Idx, in_call_list, Independent_OpenAD_Opr, Initialization_Expr, Inline_Cdir_Opr, inline_global_sgi, Inline_Global_Star_Opr, cdir_switch_entry::inline_here_list_idx, cdir_switch_entry::inline_here_sgi, Inline_Here_Star_Opr, Inline_Routine_Star_Opr, Inline_Sgi, Integer, Integer_8, Intent_In, cdir_switch_entry::interchange_count, Interchange_Dir_Opr, cdir_switch_entry::interchange_group, cdir_switch_entry::interchange_sh_idx, Interface, Internal, IR_COL_NUM, IR_COL_NUM_L, IR_COL_NUM_R, IR_FLD_L, IR_FLD_R, IR_IDX_L, IR_IDX_R, IR_LINE_NUM, IR_LINE_NUM_L, IR_LINE_NUM_R, IR_LIST_CNT_L, IR_OPND_L, IR_OPND_R, IR_OPR, IR_Tbl_Idx, cdir_switch_entry::ivdep, Ivdep_Cdir_Opr, Logical, Logical_8, Lt_Opr, cdir_switch_entry::mark, Mark_Cdir_Opr, cdir_switch_entry::mark_dir_idx, Master_Open_Mp_Opr, Module, mp_directive_semantics(), Ne_Opr, cdir_switch_entry::nextscalar, Nextscalar_Cdir_Opr, NO_Tbl_Idx, Nobl_Cdir_Opr, cdir_switch_entry::noblocking, Noblocking_Dir_Opr, Nobounds_Cdir_Opr, Noconcurrentize_Star_Opr, cdir_switch_entry::nofission, Nofission_Star_Opr, cdir_switch_entry::nofusion, Nofusion_Star_Opr, Noinline_Cdir_Opr, noinline_global_sgi, Noinline_Global_Star_Opr, cdir_switch_entry::noinline_here_list_idx, cdir_switch_entry::noinline_here_sgi, Noinline_Here_Star_Opr, Noinline_Routine_Star_Opr, Noinline_Sgi, cdir_switch_entry::nointerchange, Nointerchange_Dir_Opr, Nomark_Cdir_Opr, Nopattern_Cdir_Opr, Norecurrence_Cdir_Opr, Nosplit_Cdir_Opr, Nostream_Dir_Opr, Notask_Cdir_Opr, cdir_switch_entry::notask_region, Nounroll_Cdir_Opr, Novector_Cdir_Opr, Novsearch_Cdir_Opr, ntr_global_name_tbl(), NTR_IR_LIST_TBL, NULL, NULL_IDX, Numcpus_Cmic_Opr, cdir_switch_entry::opaque, Opaque_Star_Opr, open_mp_directive_semantics(), OPND_FLD, OPND_IDX, Ordered_Open_Mp_Opr, Page_Place_Dollar_Opr, Parallel, Parallel_Cmic_Opr, parallel_cmic_semantics(), Parallel_Do, Parallel_Do_Omp, Parallel_Do_Par_Opr, Parallel_Omp, Parallel_Open_Mp_Opr, Parallel_Par_Opr, cdir_switch_entry::parallel_region, Parallel_Sections_Omp, Parallel_Workshare_Omp, Paralleldo_Open_Mp_Opr, Parallelsections_Open_Mp_Opr, Parallelworkshare_Open_Mp_Opr, cdir_switch_entry::pattern, Pattern_Cdir_Opr, Pdo, Pdo_Par_Opr, cdir_switch_entry::permutation, Permutation_Cmic_Opr, Pgm_Unit, power_o_two(), cdir_switch_entry::preferstream, Preferstream_Dir_Opr, cdir_switch_entry::preferstream_nocinv, Preferstream_Nocinv_Dir_Opr, cdir_switch_entry::prefertask, Prefertask_Cdir_Opr, cdir_switch_entry::prefervector, Prefervector_Cdir_Opr, Prefetch_Manual_Star_Opr, Prefetch_Ref_Disable_Star_Opr, prefetch_ref_semantics(), Prefetch_Ref_Star_Opr, Prefetch_Star_Opr, prev_idx, PRINTMSG(), Psection, Psection_Par_Opr, cdir_switch_entry::purpleconditional, Purpleconditional_Star_Opr, cdir_switch_entry::purpleunconditional, Purpleunconditional_Star_Opr, expr_semantics_args::rank, Real_8, cdir_switch_entry::recurrence, Recurrence_Cdir_Opr, Redistribute_Dollar_Opr, expr_semantics_args::reference, Regionbegin_Star_Opr, Regionend_Star_Opr, cdir_switch_entry::safevl_idx, SB_BLANK_COMMON, SB_BLK_TYPE, SB_NAME_PTR, SB_Tbl_Idx, SCP_ATTR_IDX, SCP_INLINE_SGI, SCP_NOINLINE_SGI, Section_Gp_Star_Opr, Section_Nongp_Star_Opr, Section_Open_Mp_Opr, Section_Par_Opr, Sections_Omp, Sections_Open_Mp_Opr, Send_Cmic_Opr, cdir_switch_entry::send_list_idx, SH_COMPILER_GEN, SH_IR_IDX, SH_NEXT_IDX, cdir_switch_entry::shortloop, cdir_switch_entry::shortloop128, Shortloop128_Cdir_Opr, Shortloop_Cdir_Opr, Simple_OpenAD_Opr, Single_Omp, Single_Open_Mp_Opr, Singleprocess, Singleprocess_Par_Opr, SN_ATTR_IDX, SN_SIBLING_LINK, cdir_switch_entry::split, Split_Cdir_Opr, srch_global_name_tbl(), Static, Static_Local, Static_Named, stmt_start_col, stmt_start_line, cdir_switch_entry::stream, Stream_Dir_Opr, Subscript_Opr, Suppress_Opr, cdir_switch_entry::task, Task_Cdir_Opr, Threadprivate, TRACE, TRUE, TYP_LINEAR, TYP_TYPE, expr_semantics_args::type, Unroll_Cdir_Opr, cdir_switch_entry::unroll_count_idx, cdir_switch_entry::unroll_dir, Unroll_Star_Opr, Variable, cdir_switch_entry::vector, Vector_Cdir_Opr, cdir_switch_entry::vsearch, Vsearch_Cdir_Opr, Wait_Cmic_Opr, cdir_switch_entry::wait_list_idx, wait_send_semantics(), Warning, Whole_Subscript_Opr, Whole_Substring_Opr, Workshare_Open_Mp_Opr, xref_state, and XXX_OpenAD_Opr.

Here is the call graph for this function:

static void doall_cmic_semantics ( void  ) [static]

Definition at line 2125 of file s_directiv.c.

References AT_ATTR_LINK, AT_LOCKED_IN, AT_OBJ_CLASS, AT_OBJ_NAME_PTR, AT_Tbl_Idx, ATD_ALLOCATABLE, ATD_AUTO_BASE_IDX, ATD_AUTOMATIC, ATD_CLASS, ATD_POINTER, ATD_TASK_GETFIRST, ATD_TASK_PRIVATE, ATD_TASK_SHARED, ATD_WAS_SCOPED, ATP_PROC, ATP_TASK_SHARED, cdir_switch_entry::autoscope, cast_opnd_to_type_idx(), Caution, cdir_switches, CIF_Symbol_Reference, CMIC_WORK_DIST_CHUNKSIZE, CMIC_WORK_DIST_NUMCHUNKS, CN_INT_TO_C, CN_INTEGER_ONE_IDX, CN_Tbl_Idx, compare_cn_and_value(), Constant, COPY_OPND, create_tmp_asg(), CRI__Pointee, curr_stmt_sh_idx, Data_Obj, cdir_switch_entry::doacross_sh_idx, cdir_switch_entry::doall_sh_idx, Dummy_Proc, Error, expr_semantics(), FALSE, find_opnd_line_and_column(), Func_Entry, Func_Exit, cdir_switch_entry::getfirst_list_idx, cdir_switch_entry::guard_in_par_reg, idx, IL_COL_NUM, IL_FLD, IL_IDX, IL_LINE_NUM, IL_LIST_CNT, IL_NEXT_LIST_IDX, IL_OPND, IL_PREV_LIST_IDX, IL_Tbl_Idx, Integer, Intent_In, IR_COL_NUM, IR_FLD_L, IR_IDX_L, IR_LINE_NUM, IR_LIST_CNT_L, IR_OPR, IR_Tbl_Idx, IR_TYPE_IDX, Le_Opr, Logical, Max_Opr, cdir_switch_entry::maxcpus, cdir_switch_entry::maxcpus_opnd, NO_Tbl_Idx, NTR_IR_LIST_TBL, NTR_IR_TBL, NULL, NULL_IDX, OPND_COL_NUM, OPND_FLD, OPND_IDX, OPND_LINE_NUM, cdir_switch_entry::parallel_region, Pgm_Unit, PRINTMSG(), cdir_switch_entry::private_list_idx, expr_semantics_args::rank, remove_sh(), SH_IR_IDX, SH_NEXT_IDX, SH_PREV_IDX, cdir_switch_entry::shared_list_idx, strcpy, TRACE, TRUE, expr_semantics_args::type, expr_semantics_args::type_idx, Variable, and xref_state.

Referenced by directive_stmt_semantics().

Here is the call graph for this function:

static void mp_directive_semantics ( mp_directive_type  directive) [static]

Definition at line 3566 of file s_directiv.c.

References Affinity_Clause, expr_semantics_args::array_elt, AT_ATTR_LINK, AT_LOCKED_IN, AT_OBJ_CLASS, AT_OBJ_NAME_PTR, AT_Tbl_Idx, ATD_ALLOCATABLE, ATD_AUTO_BASE_IDX, ATD_AUTOMATIC, ATD_CLASS, ATD_POINTER, ATD_TASK_LASTLOCAL, ATD_TASK_LASTTHREAD, ATD_TASK_PRIVATE, ATD_TASK_REDUCTION, ATD_TASK_SHARED, ATD_WAS_SCOPED, ATP_PROC, ATP_TASK_SHARED, Caution, cdir_switches, Chunk_Clause, CIF_Symbol_Reference, clause_allowed, CN_Tbl_Idx, compare_cn_and_value(), Constant, COPY_OPND, create_tmp_asg(), CRI__Pointee, curr_stmt_sh_idx, Data_Obj, Doacross, cdir_switch_entry::doacross_sh_idx, Dummy_Proc, Eq_Opr, Error, expr_semantics(), FALSE, find_left_attr(), find_opnd_line_and_column(), Func_Entry, Func_Exit, idx, If_Clause, IL_COL_NUM, IL_FLD, IL_IDX, IL_LINE_NUM, IL_LIST_CNT, IL_NEXT_LIST_IDX, IL_OPND, IL_PREV_LIST_IDX, IL_Tbl_Idx, Integer, Intent_In, Internal, IR_IDX_L, Lastlocal_Clause, cdir_switch_entry::lastlocal_list_idx, Lastthread_Clause, cdir_switch_entry::lastthread_list_idx, Local_Clause, Logical, Lt_Opr, MP_DIR_AFFINITY_IDX, MP_DIR_CHUNK_IDX, MP_DIR_IF_IDX, MP_DIR_IS_THREAD_IDX, MP_DIR_LASTLOCAL_IDX, MP_DIR_LASTTHREAD_IDX, MP_DIR_LIST_CNT, MP_DIR_LOCAL_IDX, MP_DIR_NEST_IDX, MP_DIR_ONTO_IDX, MP_DIR_REDUCTION_IDX, MP_DIR_SHARE_IDX, mp_dir_str, MP_DIR_THREAD_DATA_IDX, Nest_Clause, NO_Tbl_Idx, NTR_IR_LIST_TBL, NULL, NULL_IDX, Onto_Clause, OPND_FLD, OPND_IDX, orig_sh_idx, Parallel_Do, cdir_switch_entry::parallel_region, cdir_switch_entry::paralleldo_sh_idx, Pdo, cdir_switch_entry::pdo_sh_idx, Pgm_Unit, PRINTMSG(), cdir_switch_entry::private_list_idx, push_task_blk(), expr_semantics_args::rank, Reduction_Clause, cdir_switch_entry::reduction_list_idx, remove_sh(), SH_ERR_FLG, SH_IR_IDX, SH_NEXT_IDX, SH_PREV_IDX, Share_Clause, cdir_switch_entry::shared_list_idx, stmt_start_col, stmt_start_line, strcpy, TRACE, TRUE, expr_semantics_args::type, Variable, and xref_state.

Referenced by directive_stmt_semantics().

Here is the call graph for this function:

static void open_mp_directive_semantics ( open_mp_directive_type  directive) [static]

Definition at line 4976 of file s_directiv.c.

References add_common_blk_objects_to_list(), Affinity_Omp_Clause, expr_semantics_args::array_elt, Assumed_Shape, Assumed_Size, AT_ATTR_LINK, AT_LOCKED_IN, AT_OBJ_CLASS, AT_OBJ_NAME_PTR, AT_Tbl_Idx, ATD_ALLOCATABLE, ATD_ARRAY_IDX, ATD_AUTO_BASE_IDX, ATD_AUTOMATIC, ATD_CLASS, ATD_INTENT, ATD_POINTER, ATD_PURE, ATD_TASK_COPYIN, ATD_TASK_COPYPRIVATE, ATD_TASK_FIRSTPRIVATE, ATD_TASK_FLUSH, ATD_TASK_LASTPRIVATE, ATD_TASK_PRIVATE, ATD_TASK_REDUCTION, ATD_TASK_SHARED, ATD_TYPE_IDX, ATD_WAS_SCOPED, ATP_PROC, ATP_TASK_SHARED, BD_ARRAY_CLASS, cdir_switches, CIF_Symbol_Reference, CN_INT_TO_C, CN_INTEGER_ONE_IDX, CN_Tbl_Idx, compare_cn_and_value(), Constant, COPY_OPND, cdir_switch_entry::copyin_list_idx, Copyin_Omp_Clause, cdir_switch_entry::copyprivate_list_idx, Copyprivate_Omp_Clause, create_tmp_asg(), CRI__Pointee, CRI_Ch_Ptr, CRI_Ptr, curr_stmt_sh_idx, Data_Obj, Default_Omp_Clause, cdir_switch_entry::default_scope_list_idx, Do_Omp, cdir_switch_entry::do_omp_sh_idx, Dummy_Argument, Dummy_Proc, Eq_Opr, Error, expr_semantics(), FALSE, find_opnd_line_and_column(), cdir_switch_entry::firstprivate_list_idx, Firstprivate_Omp_Clause, cdir_switch_entry::flush_list_idx, Flush_Omp_Clause, Func_Entry, Func_Exit, has_been_reprivatized(), idx, If_Omp_Clause, IL_COL_NUM, IL_FLD, IL_IDX, IL_LINE_NUM, IL_LIST_CNT, IL_NEXT_LIST_IDX, IL_OPND, IL_PREV_LIST_IDX, IL_Tbl_Idx, Integer, Intent_In, Internal, IR_IDX_L, cdir_switch_entry::lastprivate_list_idx, Lastprivate_Omp_Clause, Le_Opr, Logical, Lt_Opr, multiple_clause_err(), Nest_Omp_Clause, NO_Tbl_Idx, NTR_IR_LIST_TBL, NULL, NULL_IDX, Onto_Omp_Clause, OPEN_MP_AFFINITY_IDX, open_mp_clause_allowed, OPEN_MP_COPYIN_IDX, OPEN_MP_COPYPRIVATE_IDX, OPEN_MP_DEFAULT_IDX, open_mp_dir_str, OPEN_MP_FIRSTPRIVATE_IDX, OPEN_MP_FLUSH_IDX, OPEN_MP_IF_IDX, OPEN_MP_IS_THREAD_IDX, OPEN_MP_LASTPRIVATE_IDX, OPEN_MP_LIST_CNT, OPEN_MP_NEST_IDX, OPEN_MP_ONTO_IDX, OPEN_MP_PRIVATE_IDX, OPEN_MP_REDUCTION_LIST_IDX, OPEN_MP_SCHEDULE_CHUNK_IDX, OPEN_MP_SCHEDULE_DYNAMIC, OPEN_MP_SCHEDULE_GUIDED, OPEN_MP_SCHEDULE_RUNTIME, OPEN_MP_SCHEDULE_STATIC, OPEN_MP_SCHEDULE_TYPE_IDX, OPEN_MP_SHARED_IDX, OPEN_MP_THREAD_DATA_IDX, OPND_FLD, OPND_IDX, orig_sh_idx, Parallel_Do_Omp, cdir_switch_entry::parallel_region, cdir_switch_entry::paralleldo_omp_sh_idx, Pgm_Unit, PRINTMSG(), cdir_switch_entry::private_list_idx, Private_Omp_Clause, push_task_blk(), expr_semantics_args::rank, cdir_switch_entry::reduction_list_idx, Reduction_Omp_Clause, remove_sh(), Schedule_Omp_Clause, Sections_Omp, SH_ERR_FLG, SH_IR_IDX, SH_NEXT_IDX, SH_PREV_IDX, cdir_switch_entry::shared_list_idx, Shared_Omp_Clause, Single_Omp, stmt_start_col, stmt_start_line, TRACE, TRUE, TYP_TYPE, expr_semantics_args::type, Variable, and xref_state.

Referenced by directive_stmt_semantics().

Here is the call graph for this function:

static boolean power_o_two ( int  idx) [static]

Definition at line 4797 of file s_directiv.c.

References CN_POOL_IDX, CN_TYPE_IDX, CP_CONSTANT, Func_Entry, Func_Exit, Integer, Internal, NULL, num_host_wds, PRINTMSG(), stmt_start_col, stmt_start_line, TRACE, TYP_LINEAR, and TYP_TYPE.

Referenced by directive_stmt_semantics().

Here is the call graph for this function:

static void set_open_mp_task_flags ( int  ir_idx,
boolean  flag 
) [static]

Variable Documentation

char USMID[] = "\n@(#)5.0_pl/sources/s_directiv.c 5.12 10/28/99 10:03:56\n" [static]

Definition at line 37 of file s_directiv.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines