Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
Go to the source code of this file.
#define B | ( | t | ) | (1<<t) |
Definition at line 1315 of file wn_simp_code.h.
Referenced by NAME().
#define FACTOR_11 1 |
Definition at line 873 of file wn_simp_code.h.
Referenced by simp_factor().
#define FACTOR_12 2 |
Definition at line 874 of file wn_simp_code.h.
Referenced by simp_factor().
#define FACTOR_21 4 |
Definition at line 875 of file wn_simp_code.h.
Referenced by simp_factor().
#define FACTOR_22 8 |
Definition at line 876 of file wn_simp_code.h.
Referenced by simp_band(), simp_bior(), simp_bxor(), and simp_factor().
#define FACTOR_ALL (FACTOR_11 | FACTOR_12 | FACTOR_21 | FACTOR_22) |
Definition at line 877 of file wn_simp_code.h.
Referenced by simp_add_sub(), simp_band(), simp_bior(), simp_bxor(), simp_land(), and simp_lior().
#define FACTOR_OK | ( | flag, | |
type | |||
) | ((flag&type)!=0) |
Definition at line 878 of file wn_simp_code.h.
Referenced by simp_factor().
#define IS_POWER_OF_2 | ( | x | ) | (((x)!=0) && ((x) & ((x)-1))==0) |
Definition at line 270 of file wn_simp_code.h.
Referenced by simp_band(), simp_bior(), simp_eq_neq(), simp_mod_rem(), and simp_shift().
#define LDA_CANNOT_BE_ZERO 1 |
Definition at line 441 of file wn_simp_code.h.
Referenced by get_lda_info(), and simp_eq_neq().
#define LDA_EQUIV_POSSIBLE 2 |
Definition at line 442 of file wn_simp_code.h.
Referenced by get_lda_info().
#define LDA_UNTESTABLE 4 |
Definition at line 443 of file wn_simp_code.h.
Referenced by get_lda_info(), and LDA_Equal_Address().
#define MAX_INTRINSIC_ARGS 6 |
Definition at line 5114 of file wn_simp_code.h.
Referenced by SIMPNODE_SimplifyIntrinsic().
#define OPC_FROM_OPR | ( | opr, | |
type | |||
) | (OPCODE_make_op(opr,type,MTYPE_V)) |
Definition at line 156 of file wn_simp_code.h.
Referenced by cancel_in_relop(), Fold2_Into_Select(), simp_abs(), simp_add_sub(), simp_band(), simp_bior(), simp_bnor(), simp_bxor(), simp_cvtl(), simp_div(), simp_eq_neq(), simp_factor(), simp_factor_idty(), simp_land(), simp_lior(), simp_mod_rem(), simp_neg(), simp_not(), simp_power(), simp_recip(), simp_shift(), simp_times(), SIMPNODE_SimplifyExp1(), and SIMPNODE_SimplifyExp3().
Definition at line 1324 of file wn_simp_code.h.
Referenced by convert_precise().
#define PRECISE_F8 B(MTYPE_F8)|B(MTYPE_FQ) |
Definition at line 1325 of file wn_simp_code.h.
Referenced by convert_precise().
#define PRECISE_FQ B(MTYPE_FQ) |
Definition at line 1326 of file wn_simp_code.h.
Referenced by convert_precise().
#define PRECISE_I1 B(MTYPE_F4)|B(MTYPE_F8)|B(MTYPE_FQ)|B(MTYPE_I1)|B(MTYPE_I2)|B(MTYPE_I4)|B(MTYPE_I8) |
Definition at line 1316 of file wn_simp_code.h.
Referenced by convert_precise().
Definition at line 1317 of file wn_simp_code.h.
Referenced by convert_precise().
Definition at line 1318 of file wn_simp_code.h.
Referenced by convert_precise().
#define PRECISE_I8 B(MTYPE_FQ)|B(MTYPE_I8) |
Definition at line 1319 of file wn_simp_code.h.
Referenced by convert_precise().
#define PRECISE_U1 B(MTYPE_F4)|B(MTYPE_F8)|B(MTYPE_FQ)|B(MTYPE_U1)|B(MTYPE_U2)|B(MTYPE_U4)|B(MTYPE_U8) |
Definition at line 1320 of file wn_simp_code.h.
Referenced by convert_precise().
Definition at line 1321 of file wn_simp_code.h.
Referenced by convert_precise().
Definition at line 1322 of file wn_simp_code.h.
Referenced by convert_precise().
#define PRECISE_U8 B(MTYPE_FQ) |
Definition at line 1323 of file wn_simp_code.h.
Referenced by convert_precise().
#define SELECT_ADD_SUB | ( | x | ) | ((x)? subop : addop) |
Definition at line 1616 of file wn_simp_code.h.
Referenced by simp_add_sub().
Definition at line 171 of file wn_simp_code.h.
Referenced by cancel_in_relop(), Fold2_Into_Select(), simp_abs(), simp_add_sub(), simp_band(), simp_bior(), simp_bnor(), simp_bxor(), simp_cand(), simp_cior(), simp_cvt(), simp_cvtl(), simp_div(), simp_eq_neq(), simp_factor(), simp_factor_idty(), simp_land(), simp_lior(), simp_min_max(), simp_mod_rem(), simp_neg(), simp_not(), simp_power(), simp_recip(), simp_relop(), simp_shift(), simp_times(), SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), SIMPNODE_SimplifyExp1(), SIMPNODE_SimplifyExp2_h(), SIMPNODE_SimplifyExp3(), and SIMPNODE_SimplifyIntrinsic().
#define SHOW_TREE | ( | opc, | |
k0, | |||
k1, | |||
result | |||
) | if ((result!=NULL) && trace_trees) show_tree(opc,k0,k1,result) |
Definition at line 165 of file wn_simp_code.h.
Referenced by SIMPNODE_SimplifyCvtl(), SIMPNODE_SimplifyExp1(), SIMPNODE_SimplifyExp2(), and SIMPNODE_SimplifyIntrinsic().
#define SIMP_DELETE | ( | x | ) | simp_delete(x) |
Definition at line 214 of file wn_simp_code.h.
Referenced by cancel_in_relop(), simp_abs(), simp_add_sub(), simp_band(), simp_bior(), simp_bxor(), simp_cand(), simp_cior(), simp_cvt(), simp_cvtl(), simp_div(), simp_eq_neq(), simp_factor(), simp_factor_idty(), simp_land(), simp_lior(), simp_min_max(), simp_mod_rem(), simp_neg(), simp_not(), simp_power(), simp_recip(), simp_relop(), simp_shift(), simp_times(), SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), SIMPNODE_SimplifyExp2_h(), and SIMPNODE_SimplifyIntrinsic().
#define SIMP_DELETE_TREE | ( | x | ) | simp_delete_tree(x) |
Definition at line 215 of file wn_simp_code.h.
Referenced by cancel_in_relop(), simp_add_sub(), simp_band(), simp_bior(), simp_bxor(), simp_cand(), simp_cior(), simp_cvt(), simp_div(), simp_eq_neq(), simp_factor(), simp_factor_idty(), simp_land(), simp_lior(), simp_min_max(), simp_mod_rem(), simp_power(), simp_relop(), simp_shift(), simp_times(), and SIMPNODE_SimplifyExp3().
#define SIMP_FLOATCONST | ( | ty, | |
value | |||
) | SIMPNODE_CreateFloatconstFromTcon(Host_To_Targ_Float(ty,(value))) |
Definition at line 201 of file wn_simp_code.h.
Referenced by make_identity(), simp_diff_value(), simp_div(), simp_power(), and simp_times().
#define SIMP_INTCONST | ( | ty, | |
value | |||
) | SIMPNODE_CreateIntconst(OPC_FROM_OPR(OPR_INTCONST,ty),(value)) |
Definition at line 198 of file wn_simp_code.h.
Referenced by cancel_in_relop(), make_identity(), simp_band(), simp_bior(), simp_bxor(), simp_cand(), simp_cior(), simp_cvtl(), simp_diff_value(), simp_div(), simp_eq_neq(), simp_land(), simp_lior(), simp_mod_rem(), simp_power(), simp_relop(), simp_shift(), simp_times(), SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), SIMPNODE_SimplifyExp3(), and SIMPNODE_SimplifyIntrinsic().
#define SIMP_IS_TYPE_COMPLEX | ( | x | ) | ((MTYPE_type_class(x)&MTYPE_CLASS_COMPLEX)!=0) |
Definition at line 153 of file wn_simp_code.h.
Referenced by is_floating_equal(), is_numeric_equal(), simp_abs(), simp_div(), and simp_times().
#define SIMP_IS_TYPE_FLOATING | ( | x | ) | ((MTYPE_type_class(x)&MTYPE_CLASS_FLOAT)!=0) |
Definition at line 152 of file wn_simp_code.h.
Referenced by cancel_in_relop(), is_numeric_equal(), is_ok_to_reassociate(), make_identity(), simp_abs(), simp_add_sub(), simp_bxor(), simp_diff_value(), simp_div(), simp_eq_neq(), simp_factor(), simp_factor_idty(), simp_not(), simp_power(), and simp_times().
#define SIMP_IS_TYPE_INTEGRAL | ( | x | ) | ((MTYPE_type_class(x)&MTYPE_CLASS_INTEGER)!=0) |
Definition at line 150 of file wn_simp_code.h.
Referenced by cancel_in_relop(), is_floating_equal(), is_numeric_equal(), is_ok_to_reassociate(), simp_add_sub(), simp_div(), simp_eq_neq(), simp_power(), simp_relop(), simp_shift(), simp_times(), SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), and SIMPNODE_SimplifyIntrinsic().
#define SIMP_IS_TYPE_UNSIGNED | ( | x | ) | ((MTYPE_type_class(x)&MTYPE_CLASS_UNSIGNED)!=0) |
Definition at line 151 of file wn_simp_code.h.
Referenced by cancel_in_relop(), is_numeric_equal(), simp_add_sub(), simp_cvt(), simp_div(), simp_mod_rem(), simp_neg(), simp_power(), simp_relop(), simp_shift(), and simp_times().
#define SIMP_TYPE | ( | x | ) | SIMPNODE_rtype(x) |
Definition at line 217 of file wn_simp_code.h.
Referenced by simp_band(), simp_bior(), and simp_shift().
#define SIMP_TYPE_SIZE | ( | x | ) | MTYPE_size_min(x) |
Definition at line 146 of file wn_simp_code.h.
Referenced by simp_cvtl(), and simp_shift().
#define TESTABLE_TYPE |
#define TYPEISIN | ( | t, | |
b | |||
) | ( ((1<<(t)) & (b)) !=0) |
Definition at line 1330 of file wn_simp_code.h.
Referenced by convert_precise().
Definition at line 444 of file wn_simp_code.h.
enum YESNOMAYBE |
Definition at line 489 of file wn_simp_code.h.
Definition at line 3572 of file wn_simp_code.h.
References buf, Enable_Cfold_Aggressive, Enable_Cfold_Reassociate, FALSE, Force_IEEE_Comparisons, KIND_POINTER, MTYPE_I4, MTYPE_I8, MTYPE_U4, MTYPE_U8, NULL, OPC_FROM_OPR, OPCODE_commutative_op(), OPCODE_has_1ty(), OPCODE_has_2ty(), OPCODE_operator(), OPCODE_rtype(), OPR_ADD, OPR_EQ, OPR_LDA, OPR_NE, OPR_NEG, OPR_SUB, ROUNDOFF_ANY, Roundoff_Level, s, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, simp_diff_value(), Simp_Fold_Unsigned_Relops, SIMP_INTCONST, SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, Simp_Unsafe_Relops, SIMPNODE_Compare_Symbols, SIMPNODE_DELETE, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_lda_offset, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), SIMPNODE_ty, top, TRUE, and TY_kind().
Referenced by simp_eq_neq(), and simp_relop().
static BOOL convert_precise | ( | TYPE_ID | t1, |
TYPE_ID | t2 | ||
) | [static] |
Definition at line 1332 of file wn_simp_code.h.
References FALSE, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, PRECISE_F4, PRECISE_F8, PRECISE_FQ, PRECISE_I1, PRECISE_I2, PRECISE_I4, PRECISE_I8, PRECISE_U1, PRECISE_U2, PRECISE_U4, PRECISE_U8, TESTABLE_TYPE, and TYPEISIN.
Referenced by simp_cvt().
static INT64 create_bitmask | ( | INT64 | num_bits | ) | [static] |
Definition at line 274 of file wn_simp_code.h.
Referenced by simp_band(), simp_bior(), and simp_shift().
static simpnode Fold2_Into_Select | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1 | ||
) | [static] |
Definition at line 4459 of file wn_simp_code.h.
References NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_SELECT, SHOW_RULE, SIMP_Is_Constant(), SIMPNODE_CopyNode, SIMPNODE_kid, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_operator, SIMPNODE_SimpCreateExp2(), and SIMPNODE_SimpCreateExp3().
Referenced by SIMPNODE_SimplifyExp2_h().
static OPCODE get_inverse_relop | ( | OPCODE | opc | ) | [static] |
Definition at line 803 of file wn_simp_code.h.
References OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), OPCODE_UNKNOWN, OPR_EQ, OPR_GE, OPR_GT, OPR_LE, OPR_LT, and OPR_NE.
Referenced by simp_band(), simp_bior(), simp_bxor(), simp_eq_neq(), simp_not(), and SIMPNODE_SimplifyExp3().
static LDA_FLAGS get_lda_info | ( | simpnode | lda, |
INT64 & | offset, | ||
ST_IDX & | base_sym_idx | ||
) | [static] |
Definition at line 446 of file wn_simp_code.h.
References EXPORT_OPTIONAL, EXPORT_PREEMPTIBLE, LDA_CANNOT_BE_ZERO, LDA_EQUIV_POSSIBLE, LDA_UNTESTABLE, SCLASS_COMMON, SCLASS_EXTERN, SCLASS_FORMAL_REF, SCLASS_MODULE, SCLASS_TEXT, SIMPNODE_lda_offset, SIMPNODE_st_idx, ST_base(), ST_export(), ST_is_weak_symbol(), ST_ofst(), ST_ptr(), ST_sclass(), and ST_st_idx().
Referenced by LDA_Equal_Address(), and simp_eq_neq().
static TYPE_ID get_value_type | ( | simpnode | k0 | ) | [static] |
Definition at line 827 of file wn_simp_code.h.
References OPCODE_desc(), OPR_ILOAD, OPR_LDBITS, OPR_LDID, SIMPNODE_opcode, SIMPNODE_operator, and SIMPNODE_rtype.
Referenced by simp_cvt(), and simp_shift().
Definition at line 309 of file wn_simp_code.h.
References FALSE, i2, MTYPE_I4, MTYPE_I8, MTYPE_U4, MTYPE_U8, and TRUE.
Referenced by simp_add_sub(), and simp_relop().
static BOOL is_floating_equal | ( | simpnode | k, |
double | d | ||
) | [static] |
Definition at line 382 of file wn_simp_code.h.
References FALSE, Host_To_Targ_Float(), MTYPE_F4, MTYPE_F8, MTYPE_FQ, NULL, OPC_I4FQEQ, SIMP_Flt_ConstVal(), SIMP_Is_Constant(), SIMP_IS_TYPE_COMPLEX, SIMP_IS_TYPE_INTEGRAL, SIMPNODE_rtype, Targ_To_Host(), Targ_To_Host_Float(), and Targ_WhirlOp().
Referenced by is_numeric_equal(), simp_add_sub(), simp_div(), simp_power(), and simp_times().
Definition at line 739 of file wn_simp_code.h.
References OPCODE_operator(), OPCODE_UNKNOWN, OPR_LAND, and OPR_LIOR.
Referenced by simp_eq_neq().
static BOOL is_numeric_equal | ( | simpnode | k, |
double | d | ||
) | [static] |
Definition at line 415 of file wn_simp_code.h.
References c, FALSE, is_floating_equal(), SIMP_Int_ConstVal(), SIMP_Is_Constant(), SIMP_IS_TYPE_COMPLEX, SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, and SIMPNODE_rtype.
Referenced by simp_power().
static BOOL is_ok_to_reassociate | ( | OPCODE | opc | ) | [static] |
Definition at line 762 of file wn_simp_code.h.
References Enable_Cfold_Reassociate, FALSE, OPCODE_operator(), OPCODE_rtype(), OPR_ADD, OPR_BAND, OPR_BIOR, OPR_BXOR, OPR_LAND, OPR_LIOR, OPR_MAX, OPR_MIN, OPR_MPY, SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, and TRUE.
Referenced by simp_times(), and SIMPNODE_SimplifyExp2_h().
Definition at line 342 of file wn_simp_code.h.
References FALSE, i2, MTYPE_I4, MTYPE_I8, MTYPE_U4, MTYPE_U8, and TRUE.
Referenced by simp_relop().
static YESNOMAYBE LDA_Equal_Address | ( | simpnode | lda_x, |
simpnode | lda_y | ||
) | [static] |
Definition at line 494 of file wn_simp_code.h.
References EXPORT_OPTIONAL, EXPORT_PREEMPTIBLE, get_lda_info(), LDA_UNTESTABLE, MAYBE, NO, SCLASS_EXTERN, ST_export(), ST_is_weak_symbol(), ST_ptr(), ST_sclass(), ST_st_idx(), ST_strong_idx(), and YES.
Referenced by simp_eq_neq().
static simpnode make_identity | ( | OPERATOR | opr, |
TYPE_ID | ty | ||
) | [static] |
Definition at line 957 of file wn_simp_code.h.
References FALSE, FmtAssert, NULL, OPR_ADD, OPR_BAND, OPR_BIOR, OPR_BXOR, OPR_LAND, OPR_LIOR, OPR_MPY, OPR_SUB, SIMP_FLOATCONST, SIMP_INTCONST, and SIMP_IS_TYPE_FLOATING.
Referenced by simp_factor_idty().
Definition at line 173 of file wn_simp_code.h.
References fprintf(), trace_rules, and TRACEFILE.
static simpnode simp_abs | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 1088 of file wn_simp_code.h.
References NULL, OPC_FROM_OPR, OPCODE_desc(), OPCODE_rtype(), OPR_ABS, OPR_CVT, OPR_NEG, SHOW_RULE, SIMP_DELETE, SIMP_IS_TYPE_COMPLEX, SIMP_IS_TYPE_FLOATING, SIMPNODE_kid0, SIMPNODE_opcode, SIMPNODE_operator, and SIMPNODE_SimpCreateExp1().
static simpnode simp_add_sub | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 1618 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, Enable_Cfold_Reassociate, FACTOR_ALL, FALSE, is_add_ok(), is_floating_equal(), MTYPE_I4, MTYPE_size_reg, NULL, OPC_FROM_OPR, OPCODE_operator(), OPCODE_rtype(), OPR_ADD, OPR_LDA, OPR_MPY, OPR_NEG, OPR_SUB, s, SELECT_ADD_SUB, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, simp_diff_value(), simp_factor(), simp_factor_idty(), SIMP_Int_ConstVal(), SIMP_Is_Constant(), SIMP_Is_Int_Constant(), SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_lda_offset, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), TRUE, and WN_Simp_Fold_LDA.
static simpnode simp_band | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2686 of file wn_simp_code.h.
References create_bitmask(), Enable_Cfold_Aggressive, Enable_extract_compose, FACTOR_22, FACTOR_ALL, FALSE, get_inverse_relop(), IS_POWER_OF_2, wn_simp_code::log2(), MTYPE_bit_size, NULL, OPC_FROM_OPR, OPC_U4EXTRACT_BITS, OPC_U8EXTRACT_BITS, OPCODE_rtype(), OPR_ASHR, OPR_BAND, OPR_BIOR, OPR_BNOT, OPR_EQ, OPR_LSHR, OPR_SHL, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, simp_factor(), simp_factor_idty(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_Is_Int_Constant(), SIMP_TYPE, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), and SIMPNODE_SimpCreateExtract().
static simpnode simp_bior | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2823 of file wn_simp_code.h.
References create_bitmask(), Enable_Cfold_Aggressive, Enable_extract_compose, FACTOR_22, FACTOR_ALL, FALSE, get_inverse_relop(), IS_POWER_OF_2, wn_simp_code::log2(), MTYPE_bit_size, NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_ASHR, OPR_BAND, OPR_BIOR, OPR_BNOT, OPR_COMPOSE_BITS, OPR_LSHR, OPR_NE, OPR_SHL, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, simp_factor(), simp_factor_idty(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_Is_Int_Constant(), SIMP_TYPE, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_op_bit_offset, SIMPNODE_op_bit_size, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateDeposit(), SIMPNODE_SimpCreateExp1(), and SIMPNODE_SimpCreateExp2().
static simpnode simp_bnor | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2980 of file wn_simp_code.h.
References NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_BIOR, OPR_BNOT, SHOW_RULE, SIMPNODE_SimpCreateExp1(), and SIMPNODE_SimplifyExp2().
static simpnode simp_bxor | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 3012 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, FACTOR_22, FACTOR_ALL, FALSE, Force_IEEE_Comparisons, get_inverse_relop(), NULL, OPC_FROM_OPR, OPCODE_desc(), OPCODE_rtype(), OPR_ASHR, OPR_BAND, OPR_BNOT, OPR_LSHR, OPR_SHL, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, simp_factor(), simp_factor_idty(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_IS_TYPE_FLOATING, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp1(), and SIMPNODE_SimpCreateExp2().
static simpnode simp_cand | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 3237 of file wn_simp_code.h.
References NULL, OPCODE_rtype(), SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), and SIMP_INTCONST.
static simpnode simp_cior | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 3277 of file wn_simp_code.h.
References NULL, OPCODE_rtype(), SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), and SIMP_INTCONST.
static simpnode simp_cvt | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 1384 of file wn_simp_code.h.
References CLASS_PREG, convert_precise(), get_value_type(), Is_Valid_Opcode_Parts(), MTYPE_BS, NULL, OPC_I4I8CVT, OPC_I4U8CVT, OPC_I8I4CVT, OPC_U4I8CVT, OPC_U4U8CVT, OPC_U8I4CVT, OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), OPCODE_UNKNOWN, OPR_ASHR, OPR_BAND, OPR_COMPLEX, OPR_CVT, OPR_ILOAD, OPR_IMAGPART, OPR_LDID, OPR_LSHR, OPR_REALPART, OPR_TAS, OPR_TRUNC, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), SIMP_Is_Constant(), SIMP_IS_TYPE_UNSIGNED, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_SimpCreateExp1(), ST_class(), WHIRL_Keep_Cvt_On, WN_Is_Volatile_Mem(), WN_set_opcode(), and WN_st().
Definition at line 4823 of file wn_simp_code.h.
References FALSE, Host_To_Targ(), MTYPE_bit_size, MTYPE_I8, NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_ABS, OPR_ADD, OPR_BAND, OPR_BIOR, OPR_BNOT, OPR_BXOR, OPR_EQ, OPR_GE, OPR_GT, OPR_LAND, OPR_LE, OPR_LIOR, OPR_LNOT, OPR_LT, OPR_MPY, OPR_NE, OPR_NEG, OPR_SELECT, OPR_SHL, OPR_SUB, s_size, SHOW_RULE, SIMP_DELETE, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_TYPE_SIZE, SIMPNODE_cvtl_bits, SIMPNODE_kid, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_SimpCreateCvtl, SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), SIMPNODE_SimpCreateExp3(), SIMPNODE_SimplifyCvtl(), Split_64_Bit_Int_Ops, Targ_To_Host(), and Targ_WhirlOp().
Referenced by SIMPNODE_SimplifyCvtl().
static void simp_delete | ( | simpnode | w | ) | [static] |
Definition at line 209 of file wn_simp_code.h.
References SIMPNODE_DELETE, and trace_trees.
static void simp_delete_tree | ( | simpnode | w | ) | [static] |
Definition at line 204 of file wn_simp_code.h.
References SIMPNODE_TREE_DELETE, and trace_trees.
static simpnode simp_diff_value | ( | simpnode | k0, |
simpnode | k1, | ||
BOOL | negate_result | ||
) | [static] |
Definition at line 844 of file wn_simp_code.h.
References MTYPE_I4, MTYPE_I8, MTYPE_U4, NULL, OPR_LDA, SIMP_FLOATCONST, SIMP_INTCONST, SIMP_IS_TYPE_FLOATING, SIMPNODE_Compare_Symbols, SIMPNODE_lda_offset, SIMPNODE_operator, SIMPNODE_rtype, and SIMPNODE_Simp_Compare_Trees().
Referenced by cancel_in_relop(), and simp_add_sub().
static simpnode simp_div | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2284 of file wn_simp_code.h.
References Div_Split_Allowed, Enable_Cfold_Aggressive, Force_IEEE_Comparisons, Host_To_Targ_Float(), IEEE_Arithmetic, IEEE_INEXACT, is_floating_equal(), NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_MPY, OPR_NEG, OPR_RECIP, OPR_SQRT, Recip_Allowed, Roundoff_Level, ROUNDOFF_SIMPLE, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_FLOATCONST, SIMP_Flt_ConstVal(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_IS_TYPE_COMPLEX, SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, SIMPNODE_CreateFloatconstFromTcon, SIMPNODE_kid0, SIMPNODE_operator, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), Targ_Is_Power_Of_Two(), and Targ_WhirlOp().
static simpnode simp_eq_neq | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 3889 of file wn_simp_code.h.
References ARCH_has_bit_tests, cancel_in_relop(), Enable_Cfold_Aggressive, Force_IEEE_Comparisons, get_inverse_relop(), get_lda_info(), is_logop(), IS_POWER_OF_2, LDA_CANNOT_BE_ZERO, LDA_Equal_Address(), MTYPE_bit_size, MTYPE_complement, MTYPE_I4, MTYPE_is_unsigned, NO, NULL, OPC_FROM_OPR, OPC_I4SHL, OPC_I8SHL, OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), OPR_ADD, OPR_ASHR, OPR_BAND, OPR_BIOR, OPR_BNOT, OPR_EQ, OPR_GE, OPR_LDA, OPR_LNOT, OPR_LSHR, OPR_LT, OPR_MPY, OPR_SUB, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), and YES.
static simpnode simp_factor | ( | simpnode | k0, |
simpnode | k1, | ||
OPERATOR | op1, | ||
OPCODE | opc2, | ||
TYPE_ID | ty, | ||
INT32 | flag | ||
) | [static] |
Definition at line 886 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, Enable_Cfold_Reassociate, FACTOR_11, FACTOR_12, FACTOR_21, FACTOR_22, FACTOR_OK, NULL, OPC_FROM_OPR, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_IS_TYPE_FLOATING, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_Simp_Compare_Trees(), and SIMPNODE_SimpCreateExp2().
Referenced by simp_add_sub(), simp_band(), simp_bior(), simp_bxor(), simp_land(), and simp_lior().
static simpnode simp_factor_idty | ( | simpnode | k0, |
simpnode | k1, | ||
OPERATOR | op1, | ||
OPCODE | opc2, | ||
TYPE_ID | ty, | ||
INT32 | const_only | ||
) | [static] |
Definition at line 992 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, Enable_Cfold_Reassociate, make_identity(), NULL, OPC_FROM_OPR, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Is_Constant(), SIMP_IS_TYPE_FLOATING, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_Simp_Compare_Trees(), and SIMPNODE_SimpCreateExp2().
Referenced by simp_add_sub(), simp_band(), simp_bior(), simp_bxor(), simp_land(), and simp_lior().
TCON SIMP_Flt_ConstVal | ( | simpnode | x | ) | [inline] |
Definition at line 263 of file wn_simp_code.h.
References SIMPNODE_fconst_val, and SIMPNODE_GetDefinition().
Referenced by is_floating_equal(), simp_div(), SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), and SIMPNODE_SimplifyIntrinsic().
INT64 SIMP_Int_ConstVal | ( | simpnode | x | ) | [inline] |
Definition at line 257 of file wn_simp_code.h.
References SIMPNODE_const_val, and SIMPNODE_GetDefinition().
Referenced by is_numeric_equal(), simp_add_sub(), simp_band(), simp_bior(), simp_bxor(), simp_cand(), simp_cior(), simp_cvt(), simp_cvtl(), simp_div(), simp_eq_neq(), simp_land(), simp_lior(), simp_min_max(), simp_mod_rem(), simp_power(), simp_relop(), simp_shift(), simp_times(), SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), SIMPNODE_SimplifyExp3(), and SIMPNODE_SimplifyIntrinsic().
BOOL SIMP_Is_Constant | ( | simpnode | x | ) | [inline] |
Definition at line 247 of file wn_simp_code.h.
References OPR_CONST, OPR_INTCONST, SIMPNODE_GetDefinition(), and SIMPNODE_operator.
Referenced by Fold2_Into_Select(), is_floating_equal(), is_numeric_equal(), simp_add_sub(), simp_band(), simp_bior(), simp_cvt(), simp_cvtl(), simp_eq_neq(), simp_factor_idty(), simp_neg(), simp_relop(), simp_shift(), simp_times(), SIMPNODE_SimplifyExp1(), SIMPNODE_SimplifyExp2_h(), and SIMPNODE_SimplifyIntrinsic().
BOOL SIMP_Is_Flt_Constant | ( | simpnode | x | ) | [inline] |
Definition at line 241 of file wn_simp_code.h.
References OPR_CONST, SIMPNODE_GetDefinition(), and SIMPNODE_operator.
Referenced by SIMPNODE_ConstantFold1(), SIMPNODE_ConstantFold2(), and SIMPNODE_SimplifyIntrinsic().
BOOL SIMP_Is_Int_Constant | ( | simpnode | x | ) | [inline] |
Definition at line 236 of file wn_simp_code.h.
References OPR_INTCONST, and SIMPNODE_operator.
Referenced by simp_add_sub(), simp_band(), simp_bior(), simp_min_max(), and SIMPNODE_SimplifyExp3().
static simpnode simp_land | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 3099 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, FACTOR_ALL, FALSE, NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_LIOR, OPR_LNOT, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, simp_factor(), simp_factor_idty(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMPNODE_kid0, SIMPNODE_operator, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp1(), and SIMPNODE_SimpCreateExp2().
static simpnode simp_lior | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 3171 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, FACTOR_ALL, NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_LAND, OPR_LNOT, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, simp_factor(), simp_factor_idty(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMPNODE_kid0, SIMPNODE_operator, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), and TRUE.
static simpnode simp_min_max | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2593 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, MTYPE_I4, MTYPE_I8, MTYPE_U4, MTYPE_U8, NULL, OPCODE_operator(), OPCODE_rtype(), OPR_MAX, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), SIMP_Is_Int_Constant(), and SIMPNODE_Simp_Compare_Trees().
static simpnode simp_mod_rem | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2423 of file wn_simp_code.h.
References IS_POWER_OF_2, NULL, OPC_FROM_OPR, OPCODE_operator(), OPCODE_rtype(), OPR_BAND, OPR_REM, OPR_SUB, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_IS_TYPE_UNSIGNED, and SIMPNODE_SimpCreateExp2().
static simpnode simp_neg | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 1188 of file wn_simp_code.h.
References NULL, OPC_FROM_OPR, OPR_DIV, OPR_MPY, OPR_NEG, OPR_SUB, SHOW_RULE, SIMP_DELETE, SIMP_Is_Constant(), SIMP_IS_TYPE_UNSIGNED, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_SimpCreateExp1(), and SIMPNODE_SimpCreateExp2().
static simpnode simp_not | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 1134 of file wn_simp_code.h.
References ARCH_generate_nor, Force_IEEE_Comparisons, get_inverse_relop(), NULL, OPC_BLNOT, OPC_FROM_OPR, OPC_I4LNOT, OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), OPR_BIOR, OPR_BNOR, OPR_BNOT, SHOW_RULE, SIMP_DELETE, SIMP_IS_TYPE_FLOATING, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, and SIMPNODE_SimpCreateExp2().
static simpnode simp_power | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2504 of file wn_simp_code.h.
References is_floating_equal(), is_numeric_equal(), NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_BAND, OPR_DIV, OPR_SHL, OPR_SQRT, OPR_SUB, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_FLOATCONST, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, SIMPNODE_SimpCreateExp1(), and SIMPNODE_SimpCreateExp2().
static simpnode simp_recip | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 1240 of file wn_simp_code.h.
References NULL, OPC_FROM_OPR, OPCODE_operator(), OPCODE_rtype(), OPR_RECIP, OPR_RSQRT, OPR_SQRT, Roundoff_Level, ROUNDOFF_SIMPLE, Rsqrt_Allowed, SHOW_RULE, SIMP_DELETE, SIMPNODE_kid0, SIMPNODE_operator, and SIMPNODE_SimpCreateExp1().
static simpnode simp_relop | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 4182 of file wn_simp_code.h.
References cancel_in_relop(), Enable_Cfold_Aggressive, FALSE, Force_IEEE_Comparisons, is_add_ok(), is_sub_ok(), MTYPE_I4, MTYPE_I8, MTYPE_U4, MTYPE_U8, NULL, OPCODE_commutative_op(), OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), OPR_ADD, OPR_GE, OPR_GT, OPR_LE, OPR_LT, OPR_MPY, OPR_SUB, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, Simp_Fold_Unsigned_Relops, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, Simp_Unsafe_Relops, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp2(), and TRUE.
static simpnode simp_shift | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 3341 of file wn_simp_code.h.
References ARCH_mask_shift_counts, create_bitmask(), Enable_extract_compose, FALSE, get_value_type(), IS_POWER_OF_2, wn_simp_code::log2(), MIN, MTYPE_bit_size, MTYPE_I4, MTYPE_I8, MTYPE_U4, MTYPE_U8, NULL, OPC_FROM_OPR, OPC_I4EXTRACT_BITS, OPC_I8EXTRACT_BITS, OPC_I8I4CVT, OPC_U4EXTRACT_BITS, OPC_U8EXTRACT_BITS, OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), OPR_ASHR, OPR_BAND, OPR_COMPOSE_BITS, OPR_CVT, OPR_LSHR, OPR_SHL, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, SIMP_TYPE, SIMP_TYPE_SIZE, SIMPNODE_CopyNode, SIMPNODE_DELETE, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_SimpCreateDeposit(), SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), SIMPNODE_SimpCreateExtract(), TRUE, and WHIRL_Keep_Cvt_On.
static simpnode simp_times | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
BOOL | k0const, | ||
BOOL | k1const | ||
) | [static] |
Definition at line 2115 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, IEEE_Arithmetic, IEEE_INEXACT, is_floating_equal(), is_ok_to_reassociate(), NULL, OPC_FROM_OPR, OPCODE_rtype(), OPR_ADD, OPR_DIV, OPR_NEG, OPR_RECIP, OPR_RSQRT, OPR_SQRT, OPR_SUB, Roundoff_Level, ROUNDOFF_SIMPLE, SHOW_RULE, SIMP_DELETE, SIMP_DELETE_TREE, SIMP_FLOATCONST, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_IS_TYPE_COMPLEX, SIMP_IS_TYPE_FLOATING, SIMP_IS_TYPE_INTEGRAL, SIMP_IS_TYPE_UNSIGNED, SIMPNODE_CopyNode, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_SimpCreateExp1(), and SIMPNODE_SimpCreateExp2().
static simpnode SIMPNODE_ConstantFold1 | ( | OPCODE | opc, |
simpnode | k0 | ||
) | [static] |
Definition at line 4494 of file wn_simp_code.h.
References Host_To_Targ(), MTYPE_bit_size, MTYPE_I8, NULL, OPCODE_desc(), OPCODE_operator(), OPCODE_rtype(), OPR_CVT, OPR_CVTL, OPR_PARM, SHOW_RULE, SIMP_DELETE, SIMP_Flt_ConstVal(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Flt_Constant(), SIMP_IS_TYPE_INTEGRAL, SIMPNODE_CreateFloatconstFromTcon, SIMPNODE_rtype, Split_64_Bit_Int_Ops, Targ_To_Host(), Targ_WhirlOp(), and TCON_ty.
Referenced by simp_add_sub(), and SIMPNODE_SimplifyExp1().
static simpnode SIMPNODE_ConstantFold2 | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1 | ||
) | [static] |
Definition at line 4539 of file wn_simp_code.h.
References Host_To_Targ(), NULL, SHOW_RULE, SIMP_DELETE, SIMP_Flt_ConstVal(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Flt_Constant(), SIMP_IS_TYPE_INTEGRAL, SIMPNODE_CreateFloatconstFromTcon, SIMPNODE_rtype, Targ_To_Host(), Targ_WhirlOp(), and TCON_ty.
Referenced by simp_add_sub(), and SIMPNODE_SimplifyExp2_h().
simpnode SIMPNODE_GetDefinition | ( | simpnode | x | ) | [inline] |
Definition at line 219 of file wn_simp_code.h.
References CLASS_PREG, OPR_LDID, Preg_Home(), SIMPNODE_operator, ST_class(), WN_load_offset(), and WN_st().
Referenced by SIMP_Flt_ConstVal(), SIMP_Int_ConstVal(), SIMP_Is_Constant(), and SIMP_Is_Flt_Constant().
INT32 SIMPNODE_Simp_Compare_Trees | ( | simpnode | t1, |
simpnode | t2 | ||
) |
Definition at line 565 of file wn_simp_code.h.
References MTYPE_BS, OPCODE_is_expression(), OPR_ARRAY, OPR_COMMA, OPR_COMPOSE_BITS, OPR_CONST, OPR_CSELECT, OPR_CVTL, OPR_EXTRACT_BITS, OPR_IDNAME, OPR_ILDBITS, OPR_ILOAD, OPR_ILOADX, OPR_INTCONST, OPR_INTRINSIC_OP, OPR_LDA, OPR_LDBITS, OPR_LDID, OPR_MLOAD, OPR_RCOMMA, SIMPNODE_array_base, SIMPNODE_array_dim, SIMPNODE_array_index, SIMPNODE_bit_offset, SIMPNODE_Compare_Symbols, SIMPNODE_const_val, SIMPNODE_cvtl_bits, SIMPNODE_desc, SIMPNODE_element_size, SIMPNODE_field_id, SIMPNODE_i_bit_offset, SIMPNODE_i_field_id, SIMPNODE_idname_offset, SIMPNODE_intrinsic, SIMPNODE_kid, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_kid_count, SIMPNODE_lda_offset, SIMPNODE_load_offset, SIMPNODE_num_dim, SIMPNODE_op_bit_offset, SIMPNODE_op_bit_size, SIMPNODE_opcode, and SIMPNODE_operator.
Referenced by simp_band(), simp_bior(), simp_bxor(), simp_diff_value(), simp_div(), simp_eq_neq(), simp_factor(), simp_factor_idty(), simp_land(), simp_lior(), simp_min_max(), simp_relop(), simp_times(), SIMPNODE_SimplifyExp2_h(), and SIMPNODE_SimplifyExp3().
static simpnode SIMPNODE_SimpCreateDeposit | ( | OPCODE | opc, |
INT16 | boffset, | ||
INT16 | bsize, | ||
simpnode | k0, | ||
simpnode | k1 | ||
) | [static] |
Referenced by simp_bior(), and simp_shift().
static simpnode SIMPNODE_SimpCreateExp1 | ( | OPCODE | opc, |
simpnode | k0 | ||
) | [static] |
Referenced by cancel_in_relop(), simp_abs(), simp_add_sub(), simp_band(), simp_bior(), simp_bnor(), simp_bxor(), simp_cvt(), simp_cvtl(), simp_div(), simp_eq_neq(), simp_land(), simp_lior(), simp_neg(), simp_power(), simp_recip(), simp_shift(), simp_times(), SIMPNODE_SimplifyExp1(), SIMPNODE_SimplifyExp2_h(), and SIMPNODE_SimplifyExp3().
static simpnode SIMPNODE_SimpCreateExp2 | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1 | ||
) | [static] |
Referenced by cancel_in_relop(), Fold2_Into_Select(), simp_add_sub(), simp_band(), simp_bior(), simp_bxor(), simp_cvtl(), simp_div(), simp_eq_neq(), simp_factor(), simp_factor_idty(), simp_land(), simp_lior(), simp_mod_rem(), simp_neg(), simp_not(), simp_power(), simp_relop(), simp_shift(), simp_times(), SIMPNODE_SimplifyExp2_h(), and SIMPNODE_SimplifyExp3().
static simpnode SIMPNODE_SimpCreateExp3 | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1, | ||
simpnode | k2 | ||
) | [static] |
Referenced by Fold2_Into_Select(), simp_cvtl(), and SIMPNODE_SimplifyExp1().
static simpnode SIMPNODE_SimpCreateExtract | ( | OPCODE | opc, |
INT16 | boffset, | ||
INT16 | bsize, | ||
simpnode | k0 | ||
) | [static] |
Referenced by simp_band(), and simp_shift().
static void SIMPNODE_Simplify_Initialize | ( | void | ) | [static] |
simpnode SIMPNODE_SimplifyCvtl | ( | OPCODE | opc, |
INT16 | cvtl_bits, | ||
simpnode | k0 | ||
) |
Definition at line 5008 of file wn_simp_code.h.
References NULL, result, SHOW_TREE, simp_cvtl(), SIMPNODE_enable, SIMPNODE_simp_initialized, and SIMPNODE_Simplify_Initialize().
Referenced by simp_cvtl().
simpnode SIMPNODE_SimplifyExp1 | ( | OPCODE | opc, |
simpnode | k0 | ||
) |
Definition at line 4751 of file wn_simp_code.h.
References FALSE, NULL, OPC_FROM_OPR, OPCODE_is_expression(), OPCODE_operator(), OPCODE_rtype(), OPR_PAREN, OPR_PARM, OPR_SELECT, result, SHOW_RULE, SHOW_TREE, SIMP_Is_Constant(), simplify_function_table, SIMPNODE_ConstantFold1(), SIMPNODE_enable, SIMPNODE_kid, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_operator, SIMPNODE_simp_initialized, SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp3(), and SIMPNODE_Simplify_Initialize().
simpnode SIMPNODE_SimplifyExp2 | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1 | ||
) |
Definition at line 4742 of file wn_simp_code.h.
References result, SHOW_TREE, and SIMPNODE_SimplifyExp2_h().
Referenced by simp_bnor().
static simpnode SIMPNODE_SimplifyExp2_h | ( | OPCODE | opc, |
simpnode | k0, | ||
simpnode | k1 | ||
) | [static] |
Definition at line 4572 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, Fold2_Into_Select(), is_ok_to_reassociate(), MTYPE_V, NULL, OPCODE_commutative_op(), OPCODE_is_expression(), OPCODE_operator(), OPR_DIVREM, OPR_LDA, OPR_MINMAX, OPR_TAS, Pointer_Mtype, result, SHOW_RULE, Simp_Canonicalize, SIMP_DELETE, SIMP_Is_Constant(), simplify_function_table, SIMPNODE_ConstantFold2(), SIMPNODE_enable, SIMPNODE_kid0, SIMPNODE_kid1, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_simp_initialized, SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), SIMPNODE_Simplify_Initialize(), SIMPNODE_st, ST_type(), Type_Is_Shared_Ptr(), and WN_set_ty().
Referenced by SIMPNODE_SimplifyExp2().
Definition at line 5036 of file wn_simp_code.h.
References Enable_Cfold_Aggressive, get_inverse_relop(), MTYPE_B, NULL, OPC_FROM_OPR, OPCODE_operator(), OPCODE_rtype(), OPCODE_UNKNOWN, OPR_CAND, OPR_CIOR, OPR_CSELECT, OPR_CVT, OPR_LNOT, OPR_NE, OPR_SELECT, SHOW_RULE, SIMP_DELETE_TREE, SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Int_Constant(), SIMPNODE_enable, SIMPNODE_opcode, SIMPNODE_operator, SIMPNODE_Simp_Compare_Trees(), SIMPNODE_simp_initialized, SIMPNODE_SimpCreateExp1(), SIMPNODE_SimpCreateExp2(), and SIMPNODE_Simplify_Initialize().
Definition at line 5115 of file wn_simp_code.h.
References c, FALSE, Host_To_Targ(), MAX_INTRINSIC_ARGS, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_U1, MTYPE_U2, MTYPE_U4, NULL, OPCODE_operator(), OPR_INTRINSIC_OP, OPR_PARM, SHOW_RULE, SHOW_TREE, SIMP_DELETE, SIMP_Flt_ConstVal(), SIMP_Int_ConstVal(), SIMP_INTCONST, SIMP_Is_Constant(), SIMP_Is_Flt_Constant(), SIMP_IS_TYPE_INTEGRAL, SIMPNODE_CreateFloatconstFromTcon, SIMPNODE_enable, SIMPNODE_kid0, SIMPNODE_operator, SIMPNODE_rtype, SIMPNODE_simp_initialized, SIMPNODE_Simplify_Initialize(), Targ_IntrinsicOp(), Targ_To_Host(), TCON_ty, and TRUE.
BOOL SIMPNODE_simp_initialized = FALSE [static] |
Definition at line 159 of file wn_simp_code.h.
Referenced by SIMPNODE_Simplify_Initialize(), SIMPNODE_SimplifyCvtl(), SIMPNODE_SimplifyExp1(), SIMPNODE_SimplifyExp2_h(), SIMPNODE_SimplifyExp3(), and SIMPNODE_SimplifyIntrinsic().
BOOL trace_rules [static] |
Definition at line 169 of file wn_simp_code.h.
Referenced by show_rule(), and SIMPNODE_Simplify_Initialize().
BOOL trace_trees [static] |
Definition at line 164 of file wn_simp_code.h.
Referenced by simp_delete(), simp_delete_tree(), and SIMPNODE_Simplify_Initialize().