Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#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 "fold_drive.m"
#include "globals.h"
#include "tokens.h"
#include "sytb.h"
#include "s_globals.h"
#include "fmath.h"
#include "arith.h"
#include "fold_drive.h"
Go to the source code of this file.
Defines | |
#define | FOLD_OPERATION fold_operation_ |
Functions | |
boolean | compare_cn_and_value (int cn_idx, long value, int opr) |
static void | f90_character_compare (char *ch_ptr1, long64 len1, char *ch_ptr2, long64 len2, int opr, long_type *result, int type_idx) |
boolean | folder_driver (char *l_value_ptr, int l_type_idx, char *r_value_ptr, int r_type_idx, long_type *result, int *res_type_idx, int line, int col, int num_args, int opr,...) |
boolean | size_offset_binary_calc (size_offset_type *op1, size_offset_type *op2, operator_type opr, size_offset_type *result) |
boolean | size_offset_logical_calc (size_offset_type *op1, size_offset_type *op2, operator_type opr, size_offset_type *result) |
boolean | size_offset_min_max_calc (size_offset_type *op1, size_offset_type *op2, operator_type operator, size_offset_type *result) |
long64 | f_int_to_cval (long_type *the_constant, int lin_type) |
int | cval_to_f_int (long_type *result, long64 *the_constant, int type_idx) |
int | ntr_int_const_tbl (int type_idx, long64 constant) |
long_type | mpp_cn_int_to_c (int cn_idx) |
boolean | compare_target_consts (long_type *const1, int type1, long_type *const2, int type2, int opr) |
void | kludge_input_conversion (char *str, int type_idx) |
void | kludge_output_conversion (long_type *the_constant, int type_idx, char *str) |
Variables | |
static char | USMID [] = "\n@(#)5.0_pl/sources/fold_drive.c 5.19 10/14/99 14:09:57\n" |
#define FOLD_OPERATION fold_operation_ |
Definition at line 64 of file fold_drive.c.
Referenced by folder_driver().
boolean compare_cn_and_value | ( | int | cn_idx, |
long | value, | ||
int | opr | ||
) |
Definition at line 86 of file fold_drive.c.
References C_TO_F_INT, CG_INTEGER_DEFAULT_TYPE, CN_CONST, CN_TYPE_IDX, FALSE, folder_driver(), Func_Entry, Func_Exit, Integer_8, NULL, result, stmt_start_col, stmt_start_line, THIS_IS_TRUE, TRACE, and TRUE.
Referenced by all_intrinsic(), analyse_loops(), array_construct_opr_handler(), array_dim_resolution(), attr_semantics(), buffer_stmt_semantics(), cast_to_type_idx(), char_intrinsic(), char_len_resolution(), check_asg_semantics(), check_substring_bounds(), concat_opr_handler(), create_constructor_constant(), cshift_intrinsic(), data_stmt_semantics(), determine_lb_ub(), directive_stmt_semantics(), doall_cmic_semantics(), doparallel_cmic_semantics(), eoshift_intrinsic(), final_arg_work(), folder_driver(), gen_bd_entry(), gen_forall_max_expr(), gen_forall_tmp_bd_entry(), gen_internal_dope_vector(), gen_loop_end_ir(), gen_static_dv_whole_def(), ibset_intrinsic(), interpret_concat_opr(), interpret_constructor(), interpret_ref(), interpret_struct_construct_opr(), io_ctl_list_semantics(), ishft_intrinsic(), ishftc_intrinsic(), lbound_intrinsic(), minus_opr_handler(), minval_intrinsic(), mp_directive_semantics(), mult_opr_handler(), namelist_static_dv_whole_def(), needs_bounds_check(), open_mp_directive_semantics(), optimize_reshape(), pe_array_dim_resolution(), plus_opr_handler(), prefetch_ref_semantics(), repeat_intrinsic(), reshape_intrinsic(), shift_intrinsic(), size_intrinsic(), spread_intrinsic(), stop_pause_stmt_semantics(), subscript_opr_handler(), substring_opr_handler(), and ubound_intrinsic().
boolean compare_target_consts | ( | long_type * | const1, |
int | type1, | ||
long_type * | const2, | ||
int | type2, | ||
int | opr | ||
) |
Definition at line 3807 of file fold_drive.c.
References FALSE, folder_driver(), Func_Entry, Func_Exit, LOGICAL_DEFAULT_TYPE, NULL, result, stmt_start_col, stmt_start_line, THIS_IS_TRUE, and TRACE.
Referenced by compare_global_array(), and compare_global_derived_type().
int cval_to_f_int | ( | long_type * | result, |
long64 * | the_constant, | ||
int | type_idx | ||
) |
Definition at line 3574 of file fold_drive.c.
References AR_convert_host_sint64_to_int(), AR_STAT_OVERFLOW, CG_INTEGER_DEFAULT_TYPE, Err_Res, Error, Func_Entry, Func_Exit, LARGEST_INTEGER_TYPE, linear_to_arith, NULL, NULL_IDX, PRINTMSG(), ret, SHIFT_ARITH_RESULT, stmt_start_col, stmt_start_line, TRACE, and TYP_LINEAR.
Referenced by ntr_int_const_tbl().
static void f90_character_compare | ( | char * | ch_ptr1, |
long64 | len1, | ||
char * | ch_ptr2, | ||
long64 | len2, | ||
int | opr, | ||
long_type * | result, | ||
int | type_idx | ||
) | [static] |
Definition at line 150 of file fold_drive.c.
References Eq_Opr, FALSE, FALSE_VALUE, Func_Entry, Func_Exit, Ge_Opr, Gt_Opr, Le_Opr, Lt_Opr, Ne_Opr, NULL, set_up_logical_constant(), TRACE, and TRUE_VALUE.
Referenced by folder_driver().
long64 f_int_to_cval | ( | long_type * | the_constant, |
int | lin_type | ||
) |
Definition at line 3526 of file fold_drive.c.
References AR_convert_int_to_host_sint64(), Func_Entry, Func_Exit, linear_to_arith, NULL, num_host_wds, result, SHIFT_ARITH_ARG, TRACE, and TYP_LINEAR.
boolean folder_driver | ( | char * | l_value_ptr, |
int | l_type_idx, | ||
char * | r_value_ptr, | ||
int | r_type_idx, | ||
long_type * | result, | ||
int * | res_type_idx, | ||
int | line, | ||
int | col, | ||
int | num_args, | ||
int | opr, | ||
... | |||
) |
Definition at line 266 of file fold_drive.c.
References Abs_Opr, Adjustl_Opr, Adjustr_Opr, And_Opr, AR_abs(), AR_add(), AR_compare(), AR_Compare_EQ, AR_Compare_GT, AR_Compare_LT, AR_Complex_IEEE_NR_128, AR_Complex_IEEE_NR_32, AR_Complex_IEEE_NR_64, AR_Complex_IEEE_ZE_128, AR_Complex_IEEE_ZE_32, AR_Complex_IEEE_ZE_64, AR_convert(), AR_convert_str_to_float(), AR_divide(), AR_dshiftl(), AR_dshiftr(), AR_Float_IEEE_NR_128, AR_Float_IEEE_NR_32, AR_Float_IEEE_NR_64, AR_Float_IEEE_ZE_128, AR_Float_IEEE_ZE_32, AR_Float_IEEE_ZE_64, AR_ibits(), AR_index(), AR_Int_32_S, AR_Int_32_U, AR_Int_64_S, AR_Int_64_U, AR_ishftc(), AR_mask(), AR_mod(), AR_Modulo(), AR_multiply(), AR_negate(), AR_power(), AR_reshape(), AR_round_int_div(), AR_scan(), AR_selected_real_kind(), AR_shiftl(), AR_shiftr(), AR_STAT_INVALID_TYPE, AR_STAT_NEGATIVE, AR_subtract(), AR_transfer(), AR_verify(), ARITH_ERROR_RESULT_TEST, Band_Opr, Beqv_Opr, bin_add_tbl, Bneqv_Opr, Bnot_Opr, Bor_Opr, C_INT_TO_CN, C_TO_F_INT, CG_INTEGER_DEFAULT_TYPE, Char_Opr, Character, CHARACTER_DEFAULT_TYPE, CLEAR_TBL_NTRY, CN_CONST, CN_INT_TO_C, CN_INTEGER_ZERO_IDX, CN_POOL_IDX, CN_Tbl_Idx, CN_TYPE_IDX, compare_cn_and_value(), Complex, Complex_4, Const_Len_Char, CP_CONSTANT, Csmg_Opr, Cvrt_Opr, Cvrt_Unsigned_Opr, Dim_Opr, Div_Opr, Eq_Opr, Eqv_Opr, Err_Res, EXIT, f90_character_compare(), FALSE, FALSE_VALUE, FOLD_OPERATION, folder_driver(), Func_Entry, Func_Exit, Ge_Opr, Gt_Opr, Ibits_Opr, Ichar_Opr, Index_Opr, input_arith_type, Int_Opr, Integer, Integer_8, INTEGER_DEFAULT_TYPE, Internal, Ishftc_Opr, Le_Opr, Len_Trim_Opr, linear_to_arith, Logical, Logical_1, Logical_2, Logical_4, Logical_8, Lt_Opr, Mask_Opr, Minus_Opr, Mod_Opr, Modulo_Opr, Mult_Opr, Ne_Opr, Neqv_Opr, Nint_Opr, Not_Opr, ntr_const_tbl(), ntr_type_tbl(), NULL, NULL_IDX, num_host_wds, Or_Opr, Plus_Opr, Power_Opr, PRECISION_REAL16_F90, PRECISION_REAL4_F90, PRECISION_REAL8_F90, PRINTMSG(), RANGE_INT1_F90, RANGE_INT2_F90, RANGE_INT4_F90, RANGE_INT8_F90, RANGE_REAL16_F90, RANGE_REAL4_F90, RANGE_REAL8_F90, Real, Real_Div_To_Int_Opr, Repeat_Opr, Reshape_Opr, Scan_Opr, set_up_logical_constant(), SHIFT_ARITH_ARG, SHIFT_ARITH_RESULT, Shift_Opr, Shifta_Opr, Shiftl_Opr, Shiftr_Opr, Sign_Opr, SIK_Opr, Sqrt_Opr, SRK_Opr, strcpy, THIS_IS_TRUE, TRACE, Transfer_Opr, Trim_Opr, TRUE, TRUE_VALUE, TYP_BIT_LEN, TYP_CHAR_CLASS, TYP_FLD, TYP_IDX, TYP_LINEAR, TYP_TYPE, TYP_WORK_IDX, type_tbl, Typeless, Uminus_Opr, and Verify_Opr.
Referenced by abs_intrinsic(), adjustl_intrinsic(), align_bit_length(), and_opr_handler(), array_construct_semantics(), bits_and_bytes_to_words(), calculate_iteration_count(), cast_to_cg_default(), cast_to_type_idx(), cast_typeless_constant(), char_intrinsic(), check_target_and_value(), cif_named_constant_rec(), cif_send_sytb(), compare_array_entries(), compare_cn_and_value(), compare_target_consts(), compare_value_to_cn(), concat_opr_handler(), const_init_semantics(), convert_hex_literal(), convert_to_do_var_type(), copy_sbtree(), create_scalar_type_tbl(), csmg_intrinsic(), cvrt_exp_to_pdg(), cvrt_opr_handler(), dim_intrinsic(), eoshift_intrinsic(), eq_opr_handler(), equivalence_semantics(), fold_aggragate_expression(), fold_relationals(), folder_driver(), gen_arg_type_descriptor(), gen_init_stmt(), gen_loop_end_ir(), ichar_intrinsic(), imp_do_metamorphed(), index_intrinsic(), int_intrinsic(), interpret_adjustl_intrinsic(), interpret_binary_intrinsic_opr(), interpret_binary_opr(), interpret_csmg_opr(), interpret_implied_do(), interpret_index_opr(), interpret_max_min_opr(), interpret_ref(), interpret_reshape_intrinsic(), interpret_size_intrinsic(), interpret_srk_intrinsic(), interpret_transfer_intrinsic(), interpret_ubound_intrinsic(), interpret_unary_intrinsic_opr(), interpret_unary_opr(), io_list_semantics(), len_trim_intrinsic(), lg_opr_handler(), lge_intrinsic(), lt_opr_handler(), mask_intrinsic(), max_intrinsic(), merge_parameter(), mergee_intrinsic(), minus_opr_handler(), mod_intrinsic(), modulo_intrinsic(), mpp_cn_int_to_c(), mult_opr_handler(), namelist_static_dv_whole_def(), nint_intrinsic(), not_opr_handler(), parse_operand(), plus_opr_handler(), power_opr_handler(), repeat_intrinsic(), reshape_intrinsic(), selected_int_kind_intrinsic(), selected_real_kind_intrinsic(), shift_intrinsic(), sign_intrinsic(), size_offset_binary_calc(), size_offset_logical_calc(), size_offset_min_max_calc(), transfer_intrinsic(), translate_distant_ref2(), trim_intrinsic(), update_fld_type(), uplus_opr_handler(), wait_send_semantics(), and write_constant().
void kludge_input_conversion | ( | char * | str, |
int | type_idx | ||
) |
Definition at line 3868 of file fold_drive.c.
References FALSE, Integer_1, Integer_2, Integer_4, Integer_8, Internal, ntr_const_tbl(), PRINTMSG(), Real_16, Real_4, Real_8, stmt_start_col, stmt_start_line, token, TOKEN_CONST_TBL_IDX, and TYP_LINEAR.
void kludge_output_conversion | ( | long_type * | the_constant, |
int | type_idx, | ||
char * | str | ||
) |
Definition at line 3931 of file fold_drive.c.
References Integer_1, Integer_2, Integer_4, Integer_8, Internal, PRINTMSG(), Real_16, Real_4, Real_8, stmt_start_col, stmt_start_line, and TYP_LINEAR.
long_type mpp_cn_int_to_c | ( | int | cn_idx | ) |
Definition at line 3756 of file fold_drive.c.
References CG_INTEGER_DEFAULT_TYPE, CN_CONST, CN_TYPE_IDX, Cvrt_Opr, folder_driver(), Func_Entry, Func_Exit, Integer_1, Integer_2, Integer_4, NULL, NULL_IDX, stmt_start_col, stmt_start_line, TRACE, and TYP_LINEAR.
int ntr_int_const_tbl | ( | int | type_idx, |
long64 | constant | ||
) |
Definition at line 3638 of file fold_drive.c.
References CG_INTEGER_DEFAULT_TYPE, cval_to_f_int(), FALSE, Func_Entry, Func_Exit, Integer_8, ntr_const_tbl(), NULL, NULL_IDX, TRACE, TYP_LINEAR, and Typeless_8.
boolean size_offset_binary_calc | ( | size_offset_type * | op1, |
size_offset_type * | op2, | ||
operator_type | opr, | ||
size_offset_type * | result | ||
) |
Definition at line 2920 of file fold_drive.c.
References AT_OBJ_CLASS, AT_Tbl_Idx, ATD_FLD, ATD_SYMBOLIC_CONSTANT, ATD_TMP_IDX, ATD_TYPE_IDX, check_type_for_size_address(), CN_CONST, CN_Tbl_Idx, CN_TYPE_IDX, Data_Obj, Div_Opr, Error, FALSE, folder_driver(), Func_Entry, Func_Exit, gen_compiler_tmp(), INTEGER_DEFAULT_TYPE, 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_OPR, IR_Tbl_Idx, IR_TYPE_IDX, issue_overflow_msg_719, LARGEST_INTEGER_TYPE, Minus_Opr, Mod_Opr, Mult_Opr, need_to_issue_719, NO_Tbl_Idx, ntr_const_tbl(), NTR_IR_TBL, NULL, OPND_COL_NUM, OPND_FLD, OPND_IDX, OPND_LINE_NUM, Plus_Opr, PRINTMSG(), Priv, SA_INTEGER_DEFAULT_TYPE, Shiftl_Opr, Shiftr_Opr, stmt_start_col, stmt_start_line, Symbolic_Div_Opr, Symbolic_Minus_Opr, Symbolic_Mod_Opr, Symbolic_Mult_Opr, Symbolic_Plus_Opr, Symbolic_Shiftl_Opr, Symbolic_Shiftr_Opr, TRACE, TRUE, and TYP_LINEAR.
Referenced by assign_offset(), assign_offsets_for_equiv_groups(), calculate_pad(), check_and_allocate_common_storage(), create_bd_ntry_for_const(), cvrt_exp_to_pdg(), data_stmt_semantics(), determine_tmp_size(), final_attr_semantics(), final_decl_semantics(), final_equivalence_semantics(), finish_cdir_id(), gen_common_dv_init(), gen_dv_whole_def_init(), gen_sf_dv_whole_def(), init_whole_array(), linearize_list_for_equiv(), merge_equivalence_groups2(), parse_id_directive(), set_stride_for_first_dim(), stor_bit_size_of(), storage_blk_resolution(), and transform_char_sequence_ref().
boolean size_offset_logical_calc | ( | size_offset_type * | op1, |
size_offset_type * | op2, | ||
operator_type | opr, | ||
size_offset_type * | result | ||
) |
Definition at line 3175 of file fold_drive.c.
References AT_Tbl_Idx, ATD_TYPE_IDX, CG_INTEGER_DEFAULT_TYPE, CN_CONST, CN_Tbl_Idx, CN_TYPE_IDX, FALSE, folder_driver(), Func_Entry, Func_Exit, 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_OPR, IR_Tbl_Idx, IR_TYPE_IDX, NO_Tbl_Idx, ntr_const_tbl(), NTR_IR_TBL, NULL, stmt_start_col, stmt_start_line, TRACE, and TRUE.
Referenced by assign_storage_blk(), check_and_allocate_common_storage(), end_function_semantics(), final_attr_semantics(), final_equivalence_semantics(), return_stmt_semantics(), stor_bit_size_of(), and storage_blk_resolution().
boolean size_offset_min_max_calc | ( | size_offset_type * | op1, |
size_offset_type * | op2, | ||
operator_type | operator, | ||
size_offset_type * | result | ||
) |
Definition at line 3327 of file fold_drive.c.
References AT_OBJ_CLASS, AT_Tbl_Idx, ATD_SYMBOLIC_CONSTANT, ATD_TYPE_IDX, CG_INTEGER_DEFAULT_TYPE, check_type_for_size_address(), CN_CONST, CN_Tbl_Idx, CN_TYPE_IDX, Data_Obj, FALSE, folder_driver(), Func_Entry, Func_Exit, IL_COL_NUM, IL_FLD, IL_IDX, IL_LINE_NUM, IL_NEXT_LIST_IDX, IL_PREV_LIST_IDX, IL_Tbl_Idx, IR_COL_NUM, IR_FLD_L, IR_IDX_L, IR_LINE_NUM, IR_LIST_CNT_L, IR_OPR, IR_Tbl_Idx, IR_TYPE_IDX, Lt_Opr, Max_Opr, Min_Opr, NO_Tbl_Idx, ntr_const_tbl(), NTR_IR_LIST_TBL, NTR_IR_TBL, NULL, OPND_COL_NUM, OPND_FLD, OPND_IDX, OPND_LINE_NUM, stmt_start_col, stmt_start_line, Symbolic_Max_Opr, Symbolic_Min_Opr, THIS_IS_TRUE, TRACE, TRUE, and TYP_LINEAR.
Referenced by calculate_pad().
char USMID[] = "\n@(#)5.0_pl/sources/fold_drive.c 5.19 10/14/99 14:09:57\n" [static] |
Definition at line 37 of file fold_drive.c.