Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include "defs.h"
#include "glob.h"
#include "stab.h"
#include "strtab.h"
#include "errors.h"
#include "config_targ.h"
#include "targ_const.h"
#include "wn.h"
#include "wn_util.h"
#include "const.h"
#include "f90_utils.h"
#include "sgi_cmd_line.h"
#include "i_cvrt.h"
#include "cwh_defines.h"
#include "cwh_addr.h"
#include "cwh_expr.h"
#include "cwh_block.h"
#include "cwh_types.h"
#include "cwh_preg.h"
#include "cwh_stab.h"
#include "cwh_auxst.h"
#include "cwh_stmt.h"
#include "cwh_stk.h"
#include "cwh_intrin.h"
Go to the source code of this file.
#define binop_routine | ( | name, | |
opr | |||
) |
extern void name (TYPE type) \ { \ cwh_expr_binop(opr,cast_to_TY(t_TY(type))); \ }
Definition at line 1082 of file cwh_expr.cxx.
#define binop_shift_routine | ( | name, | |
opr | |||
) |
extern void name (TYPE type) \ { \ cwh_expr_binop_shift(opr,cast_to_TY(t_TY(type))); \ }
Definition at line 1088 of file cwh_expr.cxx.
#define compare_bitwise | ( | name, | |
opr | |||
) |
extern void name (TYPE type) \ { \ cwh_expr_compare_bitwise(opr,cast_to_TY(t_TY(type))); \ }
Definition at line 1106 of file cwh_expr.cxx.
#define compare_logical | ( | name, | |
opr_l, | |||
opr_c | |||
) |
extern void name (TYPE type) \ { \ cwh_expr_compare_logical(FTN_Short_Circuit_On ? opr_c : opr_l,cast_to_TY(t_TY(type))); \ }
Definition at line 1100 of file cwh_expr.cxx.
#define compare_routine | ( | name, | |
opr | |||
) |
extern void name (TYPE type) \ { \ cwh_expr_compare(opr,cast_to_TY(t_TY(type))); \ }
Definition at line 1094 of file cwh_expr.cxx.
#define unop_routine | ( | name, | |
opr | |||
) |
extern void name (TYPE type) \ { \ cwh_expr_unop(opr,cast_to_TY(t_TY(type))); \ }
Definition at line 1212 of file cwh_expr.cxx.
binop_routine | ( | fei_plus | , |
OPR_ADD | |||
) |
OPR_SUB binop_routine | ( | fei_mult | , |
OPR_MPY | |||
) |
OPR_SUB OPR_DIV OPR_GE OPR_LE OPR_NE OPR_BXOR OPC_I4CIOR binop_shift_routine | ( | fei_lshift | , |
OPR_SHL | |||
) |
OPR_SUB OPR_DIV OPR_GE OPR_LE OPR_NE OPR_BXOR OPC_I4CIOR OPR_LSHR binop_shift_routine | ( | fei_ashift | , |
OPR_ASHR | |||
) |
OPR_SUB OPR_DIV OPR_GE OPR_LE OPR_NE OPR_BXOR compare_logical | ( | fei_land | , |
OPC_I4LAND | , | ||
OPC_I4CAND | |||
) |
WN* cwh_convert_to_ty | ( | WN * | wn, |
TYPE_ID | ty | ||
) |
Definition at line 191 of file cwh_expr.cxx.
References cwh_convert_to_ty(), cwh_wrap_cvtl(), Mtype_complex_to_real(), MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_is_complex, MTYPE_is_float, MTYPE_size_reg, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_V, OPCODE_UNKNOWN, OPR_COMPLEX, OPR_CVT, OPR_IMAGPART, OPR_REALPART, OPR_TAS, OPR_TRUNC, wn, WN_COPY_Tree(), WN_CreateExp1(), WN_CreateExp2(), WN_set_opcode(), WNOPR, and WNRTY.
Referenced by cwh_addr_pstid(), cwh_addr_stid(), cwh_convert_to_ty(), cwh_do_tranformational(), cwh_dope_read_bound(), cwh_expr_bincalc(), cwh_expr_binop(), cwh_expr_binop_shift(), cwh_expr_compare(), cwh_funny_fp_intrinsic(), cwh_get_typed_operand(), cwh_intrin_popcnt_leadz_helper(), cwh_stmt_insert_conformance_check(), do_simple(), fei_doloop(), fei_dot_product(), fei_dot_product_logical(), fei_exponentiate(), fei_ieee_trunc(), fei_imag(), fei_leqv(), fei_lxor(), fei_matmul(), fei_multiply_high(), fei_remainder(), fei_round(), fei_rtc(), fei_trunc(), and simple_intrinsic().
WN* cwh_expr_address | ( | FLAG | flag | ) |
Definition at line 1009 of file cwh_expr.cxx.
References ADDR_item, cwh_addr_address_ST(), cwh_addr_offset(), cwh_addr_WN_ST(), cwh_expr_address(), cwh_expr_bincalc(), cwh_expr_operand(), cwh_expr_set_flags(), cwh_stk_get_class(), cwh_stk_pop_ST(), cwh_stk_pop_STR(), cwh_stk_pop_WHIRL(), DEREF_item, DevAssert, FLD_item, NULL, FLD_det::off, OPR_ADD, Pointer_Mtype, ST_item, ST_item_whole_array, STR_item, FLD_det::type, wn, WN_Delete, WN_Intconst(), WN_item, and WN_item_whole_array.
Referenced by cwh_addr_substr_util(), cwh_char_intrin(), cwh_do_tranformational(), cwh_dope_read_bound(), cwh_dope_store_bound(), cwh_expr_address(), cwh_expr_compare_char(), cwh_intrin_sync_intrin(), cwh_io_char_ioitem(), cwh_io_ioitem(), cwh_io_no_desc(), cwh_mp_region(), cwh_stmt_call_helper(), cwh_stmt_character_icall(), fei_addr(), fei_addr_con(), fei_arg_addr(), fei_assert(), fei_close(), fei_concat(), fei_control_list(), fei_copy_in(), fei_criticalsection(), fei_dv_def(), fei_dv_deref(), fei_dv_ptr_asg(), fei_get_dv_hdr_fld(), fei_inquire(), fei_iolength(), fei_length(), fei_nseq_subscr(), fei_omp_set_lock(), fei_omp_test_lock(), fei_omp_unset_lock(), fei_open(), fei_page_place(), fei_prefetch_ref(), fei_present(), fei_pstore(), fei_ranget(), fei_ranset(), fei_seq_subscr(), fei_set_dv_hdr_fld(), fei_store(), and fei_unit().
WN* cwh_expr_bincalc | ( | OPERATOR | op, |
WN * | wn1, | ||
WN * | wn2 | ||
) |
Definition at line 882 of file cwh_expr.cxx.
References cwh_convert_to_ty(), cwh_get_highest_type(), MTYPE_V, and WN_CreateExp2().
Referenced by cwh_addr_address_ST(), cwh_addr_adjust_array(), cwh_addr_do_bounds_check(), cwh_addr_extent(), cwh_addr_iload(), cwh_addr_istore(), cwh_addr_lda(), cwh_addr_mload(), cwh_addr_mstore(), cwh_addr_nonc_recast(), cwh_addr_pstore(), cwh_addr_substr_util(), cwh_addr_temp_section(), cwh_addr_ubound_from_triplet(), cwh_addr_zero_based(), cwh_dope_from_expression(), cwh_dope_initialize(), cwh_expr_address(), cwh_inline_allocate(), cwh_intrin_popcnt_leadz_helper(), cwh_types_array_temp_TY(), cwh_types_size_WN(), fei_as_ref(), fei_concat(), fei_doloop(), fei_get_dv_hdr_fld(), fei_ibits(), fei_ieee_sign_xfer(), fei_mvbits(), fei_nseq_subscr(), fei_nullify(), fei_poppar(), fei_pstore(), fei_seq_subscr(), fei_set_dv_hdr_fld(), and fei_store().
static void cwh_expr_binop | ( | OPERATOR | op, |
TY_IDX | result_ty | ||
) | [static] |
Definition at line 411 of file cwh_expr.cxx.
References addr_gen_iload_for_strctfld(), cwh_convert_to_ty(), cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_get_highest_type(), cwh_make_typed_opcode(), cwh_stk_push_typed(), cwh_wrap_cvtl(), MTYPE_V, NULL, OPR_STRCTFLD, TY_mtype(), wn, WN_CreateExp2(), WN_item, and WN_operator().
static void cwh_expr_binop_shift | ( | OPERATOR | op, |
TY_IDX | result_ty | ||
) | [static] |
Definition at line 464 of file cwh_expr.cxx.
References ARCH_mask_shift_counts, arg, Be_Type_Tbl, cwh_convert_to_ty(), cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_make_typed_opcode(), cwh_stk_push_typed(), cwh_wrap_cvtl(), MTYPE_I4, MTYPE_I8, MTYPE_is_integral, MTYPE_size_best, MTYPE_U4, MTYPE_V, NULL, OPR_ASHR, OPR_LSHR, TY_mtype(), wn, WN_Band, WN_Bior, WN_COPY_Tree(), WN_CreateExp2(), WN_GT, WN_Intconst(), WN_item, WN_LT, WN_Neg, WN_Tas(), and WNRTY.
void cwh_expr_compare | ( | OPERATOR | op, |
TY_IDX | ty | ||
) |
Definition at line 553 of file cwh_expr.cxx.
References cwh_convert_to_ty(), cwh_expr_compare_char(), cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_get_highest_type(), cwh_make_typed_opcode(), cwh_stk_get_class(), cwh_stk_push_typed(), Mtype_comparison(), MTYPE_I4, NULL, STR_item, wn, WN_CreateExp2(), WN_item, and WN_set_ty().
Referenced by cwh_stmt_str_falsebr_util(), and fei_islg().
static void cwh_expr_compare_bitwise | ( | OPERATOR | op, |
TY_IDX | ty | ||
) | [static] |
Definition at line 766 of file cwh_expr.cxx.
References cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_make_typed_opcode(), cwh_stk_push(), cwh_types_scalar_TY(), cwh_types_WN_TY(), FALSE, MTYPE_I4, MTYPE_I8, MTYPE_is_integral, MTYPE_U4, MTYPE_U8, MTYPE_V, NULL, TY_mtype(), wn, WN_CreateExp2(), WN_item, WN_rtype(), WN_set_ty(), and WN_Tas().
static WN * cwh_expr_compare_char | ( | OPERATOR | op, |
TY_IDX | ty | ||
) | [static] |
Definition at line 671 of file cwh_expr.cxx.
References cwh_expr_address(), cwh_expr_operand(), cwh_intrin_op(), cwh_stk_pop_STR(), DevAssert, F90_Wrap_ARREXP(), f_NONE, FALSE, NULL, OPR_EQ, OPR_GE, OPR_GT, OPR_LE, OPR_LT, OPR_NE, TRUE, TY_mtype(), wn, and WN_COPY_Tree().
Referenced by cwh_expr_compare().
static void cwh_expr_compare_logical | ( | OPCODE | opc, |
TY_IDX | ty | ||
) | [static] |
Definition at line 737 of file cwh_expr.cxx.
References cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_stk_push_typed(), NULL, wn, WN_CreateExp2(), WN_item, and WN_set_ty().
WN* cwh_expr_extract_arrayexp | ( | WN * | wn, |
WN ** | arrayexp | ||
) |
Definition at line 118 of file cwh_expr.cxx.
References DELETE_ARRAYEXP_WN, Full_arrayexp, NULL, OPR_ARRAYEXP, wn, WN_Delete, WN_DELETE_Tree(), WN_kid(), WN_kid0(), WN_kid_count(), and WNOPR.
Referenced by cwh_expr_operand(), fei_non_conform_store(), fei_nullify(), and fei_store().
WN* cwh_expr_operand | ( | WN ** | arrexp | ) |
Definition at line 913 of file cwh_expr.cxx.
References ADDR_item, cwh_addr_address_ST(), cwh_addr_is_array(), cwh_addr_is_section(), cwh_addr_load_ST(), cwh_addr_load_WN(), cwh_addr_offset(), cwh_expr_extract_arrayexp(), cwh_stk_get_class(), cwh_stk_get_TY(), cwh_stk_pop_ADDR(), cwh_stk_pop_DEREF(), cwh_stk_pop_PCONST(), cwh_stk_pop_ST(), cwh_stk_pop_WHIRL(), cwh_stk_pop_WN(), DELETE_ARRAYEXP_WN, DEREF_item, DevAssert, F90_Wrap_ARREXP(), FLD_item, Full_arrayexp, NULL, FLD_det::off, PCONST_item, ST_item, ST_item_whole_array, FLD_det::type, wn, WN_item, and WN_item_whole_array.
Referenced by cwh_addr_do_bounds_check(), cwh_ceiling_floor(), cwh_char_intrin(), cwh_do_tranformational(), cwh_dope_store_bound(), cwh_expr_address(), cwh_expr_binop(), cwh_expr_binop_shift(), cwh_expr_compare(), cwh_expr_compare_bitwise(), cwh_expr_compare_char(), cwh_expr_compare_logical(), cwh_get_typed_operand(), cwh_inline_allocate(), cwh_intrin_get_return_value(), cwh_intrin_ieee_intrin_call_helper(), cwh_intrin_ieee_intrin_helper(), cwh_intrin_popcnt_leadz_helper(), cwh_intrin_sync_intrin(), cwh_io_ioitem(), cwh_io_no_desc(), cwh_io_str_ioitem(), cwh_mp_region(), cwh_reorder(), cwh_stmt_assigned_goto(), cwh_stmt_call_helper(), cwh_stmt_character_icall(), cwh_stmt_character_store(), cwh_stmt_computed_goto(), cwh_stmt_select_case_char(), cwh_stmt_str_falsebr_util(), do_simple(), fei_abs(), fei_alloc(), fei_allocate(), fei_arith_goto(), fei_array_construct(), fei_array_dimen(), fei_assert(), fei_blocking_size(), fei_bneg(), fei_brtrue(), fei_close(), fei_co_array_dimen(), fei_control_list(), fei_cot(), fei_count(), fei_doloop(), fei_dot_product(), fei_dot_product_logical(), fei_dowhile(), fei_dv_def(), fei_dv_deref(), fei_exponent(), fei_exponentiate(), fei_fission(), fei_fpclass(), fei_free(), fei_fuse(), fei_ibits(), fei_ieee_sign_xfer(), fei_ieee_trunc(), fei_if(), fei_imag(), fei_implied_do(), fei_inquire(), fei_IO_list(), fei_iolength(), fei_iotype(), fei_isfinite(), fei_islg(), fei_isnan(), fei_isunordered(), fei_label_def_named(), fei_leqv(), fei_lneg(), fei_logb(), fei_lxor(), fei_malloc(), fei_matmul(), fei_mfree(), fei_multiply_high(), fei_mvbits(), fei_near(), fei_new_select(), fei_new_select_case(), fei_noio_implied_do(), fei_nseq_subscr(), fei_nullify(), fei_open(), fei_page_place(), fei_poppar(), fei_prefetch_ref(), fei_pstore(), fei_purple_conditional(), fei_redistribute(), fei_remainder(), fei_return(), fei_round(), fei_scalb(), fei_scale(), fei_seq_subscr(), fei_set_dv_hdr_fld(), fei_set_exponent(), fei_sign_xfer(), fei_static_simple_reloc_init(), fei_store(), fei_subscr_src_triplet(), fei_subscr_triplet(), fei_substr(), fei_trunc(), fei_unroll(), fei_where(), simple_intrinsic(), and simple_intrinsic_nt().
WN* cwh_expr_restore_arrayexp | ( | WN * | wn, |
WN * | arrayexp | ||
) |
Definition at line 152 of file cwh_expr.cxx.
References cwh_make_typed_opcode(), Full_arrayexp, MTYPE_V, OPR_ARRAYEXP, wn, WN_kid0(), WN_rtype(), and WN_set_opcode().
Referenced by cwh_ceiling_floor(), cwh_expr_binop(), cwh_expr_binop_shift(), cwh_expr_compare(), cwh_expr_compare_bitwise(), cwh_expr_compare_logical(), cwh_expr_unop(), cwh_funny_fp_intrinsic(), cwh_intrin_popcnt_leadz_helper(), do_simple(), fei_abs(), fei_bneg(), fei_count(), fei_dot_product(), fei_dot_product_logical(), fei_exponent(), fei_exponentiate(), fei_ibits(), fei_ieee_sign_xfer(), fei_ieee_trunc(), fei_imag(), fei_leqv(), fei_lneg(), fei_logb(), fei_lxor(), fei_multiply_high(), fei_mvbits(), fei_near(), fei_poppar(), fei_round(), fei_scale(), fei_set_exponent(), fei_sign_xfer(), fei_trunc(), simple_intrinsic(), and simple_intrinsic_nt().
static void cwh_expr_unop | ( | OPERATOR | op, |
TY_IDX | result_ty | ||
) | [static] |
Definition at line 847 of file cwh_expr.cxx.
References cwh_expr_restore_arrayexp(), cwh_get_typed_operand(), cwh_make_typed_opcode(), cwh_stk_push(), cwh_wrap_cvtl(), MTYPE_V, NULL, TY_mtype(), wn, WN_CreateExp1(), WN_item, and WN_set_ty().
TYPE_ID cwh_get_highest_type | ( | WN * | lhs, |
WN * | rhs | ||
) |
Definition at line 296 of file cwh_expr.cxx.
References MTYPE_C4, MTYPE_C8, Mtype_complex_to_real(), MTYPE_CQ, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_is_complex, MTYPE_type_order, t1, and WN_rtype().
Referenced by cwh_expr_bincalc(), cwh_expr_binop(), cwh_expr_compare(), fei_dot_product_logical(), fei_leqv(), fei_lxor(), fei_multiply_high(), and fei_remainder().
WN* cwh_get_typed_operand | ( | TYPE_ID | ty, |
WN ** | arrexp | ||
) |
Definition at line 356 of file cwh_expr.cxx.
References cwh_convert_to_ty(), and cwh_expr_operand().
Referenced by cwh_expr_unop(), fei_exponentiate(), fei_logb(), fei_scalb(), fei_scale(), and fei_set_exponent().
OPCODE cwh_make_typed_opcode | ( | OPERATOR | op, |
TYPE_ID | ty1, | ||
TYPE_ID | ty2 | ||
) |
Definition at line 375 of file cwh_expr.cxx.
References MTYPE_B, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_U1, MTYPE_U2, and MTYPE_U4.
Referenced by cwh_ceiling_floor(), cwh_do_tranformational(), cwh_expr_binop(), cwh_expr_binop_shift(), cwh_expr_compare(), cwh_expr_compare_bitwise(), cwh_expr_restore_arrayexp(), cwh_expr_unop(), cwh_funny_fp_intrinsic(), cwh_intrin_build(), cwh_intrin_call(), cwh_intrin_op(), cwh_stmt_append_truebr(), cwh_stmt_call_helper(), cwh_stmt_falsebr(), cwh_stmt_truebr(), fei_arith_goto(), fei_bneg(), fei_count(), fei_dot_product(), fei_dot_product_logical(), fei_imag(), fei_leqv(), fei_lxor(), and fei_round().
WN* cwh_wrap_cvtl | ( | WN * | wn, |
TYPE_ID | ty | ||
) |
Definition at line 175 of file cwh_expr.cxx.
References F90_wrap_cvtl().
Referenced by cwh_convert_to_ty(), cwh_do_tranformational(), cwh_expr_binop(), cwh_expr_binop_shift(), cwh_expr_unop(), fei_abs(), fei_bneg(), fei_dot_product(), fei_ibits(), fei_ieee_trunc(), fei_logb(), fei_matmul(), fei_mvbits(), and fei_round().
Definition at line 1254 of file cwh_expr.cxx.
References Be_Type_Tbl, cast_to_TY, cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_make_typed_opcode(), cwh_stk_push_typed(), cwh_types_scalar_TY(), cwh_types_WN_TY(), cwh_wrap_cvtl(), FALSE, MTYPE_complement, MTYPE_is_integral, MTYPE_is_unsigned, MTYPE_V, NULL, OPR_BNOT, t_TY, TY_mtype(), wn, WN_CreateExp1(), WN_item, WN_rtype(), and WN_Tas().
Referenced by cvrt_exp_to_pdg(), and fei_eqv().
OPR_SUB OPR_DIV OPR_GE OPR_LE OPR_NE OPR_BXOR OPC_I4CIOR OPR_LSHR OPR_BIOR void fei_eqv | ( | TYPE | type | ) |
Definition at line 1135 of file cwh_expr.cxx.
References fei_bneg(), and fei_xor().
Referenced by cvrt_exp_to_pdg().
Definition at line 1227 of file cwh_expr.cxx.
References cast_to_TY, cwh_convert_to_ty(), cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_make_typed_opcode(), cwh_stk_push(), Mtype_complex_to_real(), MTYPE_V, NULL, OPR_IMAGPART, t_TY, TY_mtype(), wn, WN_CreateExp1(), WN_item, and WN_rtype().
Referenced by cvrt_exp_to_pdg(), cwh_addr_pstid(), and cwh_addr_stid().
Definition at line 1151 of file cwh_expr.cxx.
References cwh_expr_compare(), cwh_expr_operand(), cwh_stk_push(), fei_lor(), NULL, OPR_GT, OPR_LT, WN_COPY_Tree(), and WN_item.
Referenced by cvrt_exp_to_pdg().
Definition at line 590 of file cwh_expr.cxx.
References cast_to_TY, cwh_convert_to_ty(), cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_get_highest_type(), cwh_make_typed_opcode(), cwh_stk_push_typed(), Mtype_comparison(), MTYPE_I4, NULL, OPR_EQ, t_TY, wn, WN_CreateExp2(), WN_item, WN_Set_Eq_Is_Logical, and WN_set_ty().
Referenced by cvrt_exp_to_pdg().
Definition at line 817 of file cwh_expr.cxx.
References cast_to_TY, cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_stk_push_typed(), NULL, OPC_I4LNOT, t_TY, wn, WN_CreateExp1(), WN_item, and WN_set_ty().
Referenced by cvrt_exp_to_pdg().
Definition at line 626 of file cwh_expr.cxx.
References cast_to_TY, cwh_convert_to_ty(), cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_get_highest_type(), cwh_make_typed_opcode(), cwh_stk_push_typed(), Mtype_comparison(), MTYPE_I4, NULL, OPR_NE, t_TY, wn, WN_CreateExp2(), WN_item, WN_Set_Eq_Is_Logical, and WN_set_ty().
Referenced by cvrt_exp_to_pdg().
void fei_multiply_high | ( | TYPE | type | ) |
Definition at line 1173 of file cwh_expr.cxx.
References cwh_convert_to_ty(), cwh_expr_operand(), cwh_expr_restore_arrayexp(), cwh_get_highest_type(), cwh_stk_push(), MTYPE_I8, MTYPE_U4, MTYPE_U8, NULL, OPC_U4HIGHMPY, OPC_U8HIGHMPY, wn, WN_CreateExp2(), and WN_item.
Referenced by cvrt_exp_to_pdg().
unop_routine | ( | fei_uminus | , |
OPR_NEG | |||
) |
Definition at line 1125 of file cwh_expr.cxx.
char* source_file = __FILE__ [static] |
Definition at line 61 of file cwh_expr.cxx.