Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
ir.c File Reference
#include <stdarg.h>
#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 ir.c:

Go to the source code of this file.

Defines

#define MAX_LIST_ARGS   40

Functions

static boolean compare_il (int, int, int, int)
static boolean compare_ir (int, int)
static boolean il_is_symbolic_constant (int)
static boolean ir_is_symbolic_constant (int)
void gen_sh (sh_position_type position, stmt_type_type stmt_type, int line_num, int col_num, boolean err_flag, boolean labeled, boolean compiler_gen)
void gen_gl_sh (sh_position_type position, stmt_type_type stmt_type, int line_num, int col_num, boolean err_flag, boolean labeled, boolean compiler_gen)
void free_ir_stream (int ir_idx)
void free_ir_list (int il_idx)
void copy_subtree (opnd_type *old_opnd, opnd_type *new_opnd)
int copy_to_gl_subtree (int idx, fld_type fld)
int copy_from_gl_subtree (int idx, fld_type fld)
void insert_sh_chain_after_entries (int head_idx, int tail_idx)
void insert_sh_chain (int start_idx, int end_idx, sh_position_type position)
boolean compare_opnds (opnd_type *opnd1, opnd_type *opnd2)
void insert_sh_chain_before (int sh_idx)
boolean find_attr_in_ir (int attr_idx, int ir_idx, opnd_type *opnd)
boolean find_attr_in_il (int attr_idx, int il_idx, opnd_type *opnd)
boolean expr_is_symbolic_constant (opnd_type *opnd)
void copy_entry_exit_sh_list (int start_sh_idx, int end_sh_idx, int *new_start_sh_idx, int *new_end_sh_idx)
int gen_stmt_expansion_opr (int line, int col)
void free_stmt_expansion_opr (int ir_idx)
int gen_ir (fld_type l_fld, int l_idx, operator_type opr, int type_idx, int line, int col, fld_type r_fld, int r_idx)
void gen_opnd (opnd_type *opnd, int idx, fld_type fld, int line, int col)
void stmt_expansion_control_start (void)
void stmt_expansion_control_end (opnd_type *opnd)
void remove_sh (int sh_idx)
int gen_il (int count, boolean arg_desc, int line, int col,...)

Variables

static char USMID [] = "\n@(#)5.0_pl/sources/ir.c 5.6 10/05/99 14:45:20\n"
static int label_copy_al_idx = NULL_IDX
static boolean gen_lbl_copy = FALSE

Define Documentation

#define MAX_LIST_ARGS   40

Referenced by gen_il().


Function Documentation

static boolean compare_il ( int  il_idx1,
int  il_idx2,
int  list_cnt1,
int  list_cnt2 
) [static]

Definition at line 365 of file ir.c.

References compare_ir(), FALSE, Func_Entry, Func_Exit, IL_FLD, IL_IDX, IL_LIST_CNT, IL_NEXT_LIST_IDX, IL_Tbl_Idx, IR_Tbl_Idx, NULL, NULL_IDX, TRACE, and TRUE.

Referenced by compare_ir(), and compare_opnds().

Here is the call graph for this function:

static boolean compare_ir ( int  ir_idx1,
int  ir_idx2 
) [static]

Definition at line 275 of file ir.c.

References compare_il(), FALSE, Func_Entry, Func_Exit, IL_Tbl_Idx, IR_FLD_L, IR_FLD_R, IR_IDX_L, IR_IDX_R, IR_LIST_CNT_L, IR_LIST_CNT_R, IR_OPR, IR_Tbl_Idx, IR_TYPE_IDX, NULL, TRACE, and TRUE.

Referenced by compare_il(), and compare_opnds().

Here is the call graph for this function:

boolean compare_opnds ( opnd_type opnd1,
opnd_type opnd2 
)

Definition at line 1042 of file ir.c.

References compare_il(), compare_ir(), FALSE, Func_Entry, Func_Exit, IL_Tbl_Idx, IR_Tbl_Idx, NULL, OPND_FLD, OPND_IDX, OPND_LIST_CNT, and TRACE.

Referenced by ntr_bnds_sh_tmp_list(), ntr_bnds_tmp_list(), and wait_send_semantics().

Here is the call graph for this function:

void copy_subtree ( opnd_type old_opnd,
opnd_type new_opnd 
)

Definition at line 520 of file ir.c.

References AL_ATTR_IDX, AL_NEXT_IDX, AT_DEF_LINE, AT_OBJ_CLASS, AT_Tbl_Idx, ATL_CLASS, ATL_NEW_LBL_IDX, CN_Tbl_Idx, COPY_OPND, copy_subtree(), COPY_TBL_NTRY, Func_Entry, Func_Exit, gen_internal_lbl(), gen_lbl_copy, idx, IL_ARG_DESC_VARIANT, IL_NEXT_LIST_IDX, IL_OPND, IL_PREV_LIST_IDX, IL_Tbl_Idx, ir_list_tbl, IR_OPND_L, IR_OPND_R, IR_OPR, ir_tbl, IR_Tbl_Idx, Label, label_copy_al_idx, Lbl_Internal, NO_Tbl_Idx, NTR_ATTR_LIST_TBL, NTR_IR_LIST_TBL, NTR_IR_TBL, ntr_sh_tbl(), NULL, NULL_IDX, OPND_FLD, OPND_IDX, SH_IR_IDX, sh_tbl, SH_Tbl_Idx, Stmt_Expansion_Opr, and TRACE.

Referenced by add_substring_length(), adjust_char_value_len(), assignment_stmt_semantics(), bound_semantics(), call_list_semantics(), change_section_to_this_element(), copy_and_replace_tmps(), copy_entry_exit_sh_list(), copy_subtree(), copy_text_for_expansion(), create_constructor_constant(), create_runtime_array_constructor(), create_tmp_asg(), create_tmp_from_stmt_func(), discombobulate_structure_ref(), do_loop_expr_semantics(), do_stmt_semantics(), expand_io_list(), expr_is_symbolic_constant(), forall_mask_needs_tmp(), gen_assumed_shape_copy(), gen_forall_if_mask(), gen_init_stmt(), gen_rbounds_condition(), gen_runtime_bounds(), gen_section_ref(), gen_whole_subscript(), ibset_intrinsic(), init_whole_array(), interpret_repeat_intrinsic(), interpret_trim_intrinsic(), ishft_intrinsic(), ishftc_intrinsic(), make_triplet_extent_tree(), num_images_intrinsic(), process_char_len(), repeat_intrinsic(), reshape_intrinsic(), reshape_reference_subscripts(), set_shape_for_deferred_funcs(), srch_for_calls(), stmt_func_call_opr_handler(), stmt_func_semantics(), subscript_opr_handler(), translate_distant_ref2(), translate_dv_component(), and trim_intrinsic().

Here is the call graph for this function:

boolean find_attr_in_il ( int  attr_idx,
int  il_idx,
opnd_type opnd 
)

Definition at line 1228 of file ir.c.

References AT_Tbl_Idx, CN_Tbl_Idx, COPY_OPND, FALSE, find_attr_in_il(), find_attr_in_ir(), Func_Entry, Func_Exit, IL_FLD, IL_IDX, IL_NEXT_LIST_IDX, IL_OPND, IL_Tbl_Idx, IR_Tbl_Idx, NO_Tbl_Idx, NULL, NULL_IDX, SH_Tbl_Idx, TRACE, and TRUE.

Referenced by find_attr_in_il(), and find_attr_in_ir().

Here is the call graph for this function:

void free_ir_list ( int  il_idx)

Definition at line 476 of file ir.c.

References free_ir_list(), FREE_IR_LIST_NODE, free_ir_stream(), Func_Entry, Func_Exit, IL_FLD, IL_IDX, IL_NEXT_LIST_IDX, IL_Tbl_Idx, IR_Tbl_Idx, NULL, NULL_IDX, and TRACE.

Referenced by expr_is_symbolic_constant(), free_ir_list(), and free_ir_stream().

Here is the call graph for this function:

void free_ir_stream ( int  ir_idx)
void free_stmt_expansion_opr ( int  ir_idx)

Definition at line 1723 of file ir.c.

References FREE_IR_LIST_NODE, FREE_IR_NODE, Func_Entry, Func_Exit, IL_NEXT_LIST_IDX, IR_IDX_R, NULL, and TRACE.

void gen_gl_sh ( sh_position_type  position,
stmt_type_type  stmt_type,
int  line_num,
int  col_num,
boolean  err_flag,
boolean  labeled,
boolean  compiler_gen 
)
int gen_ir ( fld_type  l_fld,
int  l_idx,
operator_type  opr,
int  type_idx,
int  line,
int  col,
fld_type  r_fld,
int  r_idx 
)

Definition at line 1763 of file ir.c.

References Aloc_Opr, CN_Tbl_Idx, Dv_Deref_Opr, FALSE, Func_Entry, Func_Exit, IL_FLD, IL_IDX, IL_NEXT_LIST_IDX, IL_Tbl_Idx, Internal, IR_ARRAY_SYNTAX, 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_LIST_CNT_R, IR_OPR, IR_RANK, IR_Tbl_Idx, IR_TYPE_IDX, Loc_Opr, NO_Tbl_Idx, NTR_IR_TBL, NULL, PRINTMSG(), SB_Tbl_Idx, Section_Subscript_Opr, SH_Tbl_Idx, Struct_Opr, Subscript_Opr, Substring_Opr, TRACE, TRUE, Whole_Subscript_Opr, and Whole_Substring_Opr.

Referenced by adjustl_intrinsic(), allocate_stmt_semantics(), allocated_intrinsic(), analyse_loops(), assignment_stmt_semantics(), associated_intrinsic(), btest_intrinsic(), change_section_to_this_element(), create_loop_stmts(), create_namelist_descriptor(), create_scalar_type_tbl(), create_strct_tbl(), cvmgp_intrinsic(), deallocate_local_allocatables(), determine_lb_ub(), dim_intrinsic(), dope_vector_setup(), dshiftl_intrinsic(), dsm_numthreads_intrinsic(), else_stmt_semantics(), final_arg_work(), forall_semantics(), gen_array_element_init(), gen_assumed_shape_copy(), gen_bounds_check_call(), gen_conform_check_call(), gen_copyin_bounds_stmt(), gen_dv_access_low_bound(), gen_dv_stride_mult(), gen_dv_whole_def(), gen_forall_branch_around(), gen_forall_max_expr(), gen_forall_tmp(), gen_forall_tmp_bd_entry(), gen_if_stmt(), gen_ptr_chk_call(), gen_rbounds_check_call(), gen_rbounds_condition(), gen_runtime_bounds(), gen_sbounds_check_call(), gen_temp_init(), get_ieee_status_intrinsic(), iand_intrinsic(), ibits_intrinsic(), ibset_intrinsic(), ishft_intrinsic(), ishftc_intrinsic(), lbound_intrinsic(), max_intrinsic(), mvbits_intrinsic(), namelist_static_dv_whole_def(), not_intrinsic(), null_intrinsic(), num_images_intrinsic(), optimize_reshape(), outer_imp_do_count(), random_number_intrinsic(), random_seed_intrinsic(), repeat_intrinsic(), selected_int_kind_intrinsic(), shape_intrinsic(), spread_intrinsic(), struct_construct_opr_handler(), subscript_opr_handler(), transfer_intrinsic(), trim_intrinsic(), ubound_intrinsic(), and where_stmt_semantics().

Here is the call graph for this function:

void gen_sh ( sh_position_type  position,
stmt_type_type  stmt_type,
int  line_num,
int  col_num,
boolean  err_flag,
boolean  labeled,
boolean  compiler_gen 
)

Definition at line 90 of file ir.c.

References Before, Construct_Def, curr_scp_idx, curr_stmt_sh_idx, defer_stmt_expansion, Func_Entry, Func_Exit, Internal, ntr_sh_tbl(), NULL, NULL_IDX, prev_idx, PRINTMSG(), SCP_FIRST_SH_IDX, SH_COL_NUM, SH_COMPILER_GEN, SH_ERR_FLG, SH_GLB_LINE, SH_LABELED, SH_NEXT_IDX, SH_P2_SKIP_ME, SH_PREV_IDX, SH_STMT_TYPE, stmt_type, TRACE, and TRUE.

Referenced by adjust_char_value_len(), array_element_to_scalar(), asg_opnd_to_tmp(), assignment_stmt_semantics(), attr_semantics(), backspace_stmt_semantics(), call_list_semantics(), char_len_resolution(), character_to_character(), check_multiple_entry_func(), check_stat_variable(), cif_stmt_type_rec(), ck_lbl_construct_name(), close_stmt_semantics(), copy_and_replace_tmps(), create_alloc_descriptor(), create_argchck_descriptor(), create_array_constructor_asg(), create_constructor_constant(), create_format_tmp(), create_interp_stmts(), create_io_call_descriptor(), create_loop_stmts(), create_namelist_descriptor(), create_runtime_array_constructor(), create_strct_tbl(), create_struct_argchck_tbl(), create_struct_constructor_asg(), create_tmp_asg(), create_tmp_DV_asg(), create_tmp_from_stmt_func(), data_stmt_semantics(), deallocate_local_allocatables(), default_init_semantics(), determine_lb_ub(), do_loop_expr_semantics(), do_single_asg(), do_stmt_semantics(), dope_vector_setup(), else_stmt_semantics(), end_blockdata(), end_function(), end_if_blk(), end_internal_proc(), end_module(), end_module_proc(), end_program_unit(), end_select_blk(), end_subroutine(), end_task_do_blk(), endfile_stmt_semantics(), expand_imp_do(), expand_io_list(), final_arg_work(), find_attrs_used_in_bound(), finish_cdir_id(), flatten_function_call(), fold_aggragate_expression(), forall_semantics(), gen_arg_type_descriptor(), gen_array_element_init(), gen_assumed_shape_copy(), gen_attr_and_IR_for_lbl(), gen_bd_entry(), gen_bounds_check_call(), gen_branch_around_ir(), gen_call_type_descriptor(), gen_common_dv_init(), gen_conform_check_call(), gen_copyin_bounds_stmt(), gen_dbg_write_stmt(), gen_debug_lbl_stmt(), gen_Dv_Set_stmt(), gen_dv_whole_def(), gen_dv_whole_def_init(), gen_end_prologue_debug_label(), gen_forall_branch_around(), gen_forall_tmp(), gen_forall_tmp_bd_entry(), gen_if_ir(), gen_if_stmt(), gen_init_stmt(), gen_initialized_tmp(), gen_internal_call_stmt(), gen_loop_end_ir(), gen_present_ir(), gen_ptr_chk_call(), gen_rbounds_check_call(), gen_sbounds_check_call(), gen_sf_dv_whole_def(), gen_single_automatic_allocate(), gen_split_alloc(), gen_static_dv_whole_def(), gen_temp_init(), gen_user_code_start_opr(), increment_subscript(), inquire_stmt_semantics(), insert_argchck_calls(), insert_init_stmt_for_tmp(), insert_sh_after_entries(), io_ctl_list_semantics(), lbound_intrinsic(), loop_end_processing(), nullify_stmt_semantics(), open_stmt_semantics(), optimize_reshape(), outmoded_if_stmt_semantics(), parse_case_stmt(), parse_data_stmt(), parse_else_stmt(), parse_entry_stmt(), parse_forall(), parse_id_directive(), parse_if_stmt(), parse_stop_pause_stmt(), parse_type_dcl_stmt(), parse_where_stmt(), print_stmt_semantics(), process_all_initialized_cpnts(), process_cpnt_inits(), process_deferred_io_list(), ptr_assign_from_ptr(), put_string_in_tmp(), read_stmt_semantics(), rewind_stmt_semantics(), save_array_syntax_subscripts(), scalar_dope_to_scalar(), select_stmt_semantics(), set_up_which_entry_tmp(), shape_intrinsic(), short_circuit_branch(), short_circuit_high_level_if(), srch_for_calls(), start_new_prog_unit(), stmt_expansion_control_start(), stmt_func_call_opr_handler(), test_size_stmts(), transfer_intrinsic(), transform_cri_ch_ptr(), translate_distant_dv_ref(), translate_distant_ref1(), translate_dv_component(), ubound_intrinsic(), use_stmt_semantics(), validate_char_len(), and write_stmt_semantics().

Here is the call graph for this function:

void insert_sh_chain ( int  start_idx,
int  end_idx,
sh_position_type  position 
)
void insert_sh_chain_after_entries ( int  head_idx,
int  tail_idx 
)
void insert_sh_chain_before ( int  sh_idx)

Variable Documentation

Definition at line 70 of file ir.c.

Referenced by copy_entry_exit_sh_list(), and copy_subtree().

int label_copy_al_idx = NULL_IDX [static]

Definition at line 69 of file ir.c.

Referenced by copy_entry_exit_sh_list(), and copy_subtree().

char USMID[] = "\n@(#)5.0_pl/sources/ir.c 5.6 10/05/99 14:45:20\n" [static]

Definition at line 37 of file ir.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines