#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "flags.h"#include "tree.h"#include "real.h"#include "rtl.h"#include "expr.h"#include "tm_p.h"#include "toplev.h"#include "intl.h"#include "ggc.h"#include "hashtab.h"#include "langhooks.h"#include "md5.h"

Go to the source code of this file.
| #define BASE ((unsigned HOST_WIDE_INT) 1 << HOST_BITS_PER_WIDE_INT / 2) |
Definition at line 169 of file fold-const.c.
| #define END_FOLD_INIT |
Value:
flag_signaling_nans = saved_signaling_nans;\ flag_trapping_math = saved_trapping_math;\ flag_rounding_math = saved_rounding_math;\ flag_trapv = saved_trapv;\ folding_initializer = saved_folding_initializer;
Definition at line 12219 of file fold-const.c.
Referenced by fold_build1_initializer(), fold_build2_initializer(), and fold_build3_initializer().
| #define HIGHPART | ( | x | ) | ((unsigned HOST_WIDE_INT) (x) >> HOST_BITS_PER_WIDE_INT / 2) |
Definition at line 167 of file fold-const.c.
| #define LOGICAL_OP_NON_SHORT_CIRCUIT (BRANCH_COST >= 2) |
Definition at line 4857 of file fold-const.c.
| #define LOWPART | ( | x | ) | ((x) & (((unsigned HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) - 1)) |
Definition at line 165 of file fold-const.c.
| #define OP_SAME | ( | N | ) |
Value:
operand_equal_p (TREE_OPERAND (arg0, N), \ TREE_OPERAND (arg1, N), flags)
| #define OP_SAME_WITH_NULL | ( | N | ) |
Value:
((!TREE_OPERAND (arg0, N) || !TREE_OPERAND (arg1, N)) \ ? TREE_OPERAND (arg0, N) == TREE_OPERAND (arg1, N) : OP_SAME (N))
Definition at line 158 of file fold-const.c.
| #define START_FOLD_INIT |
Value:
int saved_signaling_nans = flag_signaling_nans;\ int saved_trapping_math = flag_trapping_math;\ int saved_rounding_math = flag_rounding_math;\ int saved_trapv = flag_trapv;\ int saved_folding_initializer = folding_initializer;\ flag_signaling_nans = 0;\ flag_trapping_math = 0;\ flag_rounding_math = 0;\ flag_trapv = 0;\ folding_initializer = 1;
Definition at line 12207 of file fold-const.c.
Referenced by fold_build1_initializer(), fold_build2_initializer(), and fold_build3_initializer().
| enum comparison_code |
Definition at line 74 of file fold-const.c.
| int add_double_with_sign | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| unsigned HOST_WIDE_INT | l2, | |||
| HOST_WIDE_INT | h2, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv, | |||
| bool | unsigned_p | |||
| ) |
Definition at line 305 of file fold-const.c.
References h, HOST_WIDE_INT, and OVERFLOW_SUM_SIGN.
Referenced by fold_div_compare().
| static int all_ones_mask_p | ( | tree | mask, | |
| int | size | |||
| ) | [static] |
Definition at line 3727 of file fold-const.c.
References build_int_cst(), const_binop(), force_fit_type(), size_int, tree_int_cst_equal(), TREE_TYPE, and TYPE_PRECISION.
Definition at line 1479 of file fold-const.c.
References build2, fold_build2, fold_convert(), integer_zerop(), TREE_CODE, and TREE_OPERAND.
Definition at line 13270 of file fold-const.c.
References build_fold_addr_expr_with_type(), build_pointer_type(), and TREE_TYPE.
Definition at line 13240 of file fold-const.c.
References base, build1, DECL_P, handled_component_p(), TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Definition at line 13362 of file fold-const.c.
References build1, fold_indirect_ref_1(), sub, and TREE_TYPE.
Definition at line 4217 of file fold-const.c.
References build_int_cst(), build_range_check(), const_binop(), fold_build2, fold_convert(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, integer_one_node, integer_onep(), integer_type_node, integer_zerop(), invert_truthvalue(), lo, NULL_TREE, operand_equal_p(), range_binop(), TREE_CODE, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OVERFLOW, TREE_TYPE, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_OVERFLOW_WRAPS, TYPE_PRECISION, and TYPE_UNSIGNED.
Definition at line 2116 of file fold-const.c.
References build_vector(), fold_convert_const(), i, integer_zero_node, NULL_TREE, tree_cons, TREE_TYPE, TYPE_VECTOR_SUBPARTS, and units.
| tree combine_comparisons | ( | enum tree_code | code, | |
| enum tree_code | lcode, | |||
| enum tree_code | rcode, | |||
| tree | truth_type, | |||
| tree | ll_arg, | |||
| tree | lr_arg | |||
| ) | [static] |
Definition at line 2513 of file fold-const.c.
References comparison_to_compcode(), COMPCODE_EQ, COMPCODE_FALSE, COMPCODE_LTGT, COMPCODE_NE, COMPCODE_ORD, compcode_to_comparison(), COMPCODE_TRUE, COMPCODE_UNORD, constant_boolean_node(), flag_trapping_math, fold_build2, HONOR_NANS, NULL_TREE, TREE_TYPE, and TYPE_MODE.
| static enum comparison_code comparison_to_compcode | ( | enum tree_code | code | ) | [static] |
Definition at line 2427 of file fold-const.c.
References COMPCODE_EQ, COMPCODE_GE, COMPCODE_GT, COMPCODE_LE, COMPCODE_LT, COMPCODE_LTGT, COMPCODE_NE, COMPCODE_ORD, COMPCODE_UNEQ, COMPCODE_UNGE, COMPCODE_UNGT, COMPCODE_UNLE, COMPCODE_UNLT, COMPCODE_UNORD, and gcc_unreachable.
| static enum tree_code compcode_to_comparison | ( | enum comparison_code | code | ) | [static] |
Definition at line 2469 of file fold-const.c.
References COMPCODE_EQ, COMPCODE_GE, COMPCODE_GT, COMPCODE_LE, COMPCODE_LT, COMPCODE_LTGT, COMPCODE_NE, COMPCODE_ORD, COMPCODE_UNEQ, COMPCODE_UNGE, COMPCODE_UNGT, COMPCODE_UNLE, COMPCODE_UNLT, COMPCODE_UNORD, and gcc_unreachable.
Definition at line 1707 of file fold-const.c.
References build_complex(), build_real(), const_binop(), d1, d2, dconst0, flag_trapping_math, flag_unsafe_math_optimizations, HONOR_SNANS, i1, i2, int_const_binop(), INTEGRAL_TYPE_P, mode, MODE_HAS_INFINITIES, NULL_TREE, real_arithmetic(), real_convert(), real_identical(), REAL_MODE_FORMAT_COMPOSITE_P, REAL_VALUE_ISINF, REAL_VALUE_ISNAN, REAL_VALUE_TYPE, REAL_VALUES_EQUAL, result, STRIP_NOPS, t1, t2, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_IMAGPART, TREE_OVERFLOW, TREE_REAL_CST, TREE_REALPART, TREE_TYPE, and TYPE_MODE.
Definition at line 5875 of file fold-const.c.
References boolean_false_node, boolean_true_node, boolean_type_node, build_int_cst(), integer_one_node, integer_type_node, and integer_zero_node.
| static tree contains_label_1 | ( | tree * | tp, | |
| int * | walk_subtrees, | |||
| void *data | ATTRIBUTE_UNUSED | |||
| ) | [static] |
Definition at line 11428 of file fold-const.c.
References NULL_TREE, and TREE_CODE.
Referenced by contains_label_p().
Definition at line 11449 of file fold-const.c.
References contains_label_1(), NULL, NULL_TREE, and walk_tree().
Referenced by fold_ternary().
| static void decode | ( | HOST_WIDE_INT * | words, | |
| unsigned HOST_WIDE_INT * | low, | |||
| HOST_WIDE_INT * | hi | |||
| ) | [static] |
| static tree decode_field_reference | ( | tree | exp, | |
| HOST_WIDE_INT * | pbitsize, | |||
| HOST_WIDE_INT * | pbitpos, | |||
| enum machine_mode * | pmode, | |||
| int * | punsignedp, | |||
| int * | pvolatilep, | |||
| tree * | pmask, | |||
| tree * | pand_mask | |||
| ) | [static] |
Definition at line 3655 of file fold-const.c.
References build_int_cst(), const_binop(), fold_build2, fold_convert(), force_fit_type(), get_inner_reference(), INTEGRAL_TYPE_P, offset, size_int, STRIP_NOPS, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_PRECISION, TYPE_UNSIGNED, and unsigned_type().
Definition at line 3355 of file fold-const.c.
References fold_build2, operand_equal_p(), TREE_CODE, and TREE_OPERAND.
| static tree distribute_real_division | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 3400 of file fold-const.c.
References build_real(), dconst1, fold_build2, NULL_TREE, operand_equal_p(), r0, real_arithmetic(), REAL_VALUE_TYPE, TREE_CODE, TREE_OPERAND, and TREE_REAL_CST.
Referenced by fold_binary().
| int div_and_round_double | ( | enum tree_code | code, | |
| int | uns, | |||
| unsigned HOST_WIDE_INT | lnum_orig, | |||
| HOST_WIDE_INT | hnum_orig, | |||
| unsigned HOST_WIDE_INT | lden_orig, | |||
| HOST_WIDE_INT | hden_orig, | |||
| unsigned HOST_WIDE_INT * | lquo, | |||
| HOST_WIDE_INT * | hquo, | |||
| unsigned HOST_WIDE_INT * | lrem, | |||
| HOST_WIDE_INT * | hrem | |||
| ) |
Definition at line 590 of file fold-const.c.
References abort, add_double, BASE, carry, decode, is::den, encode(), gcc_unreachable, HIGHPART, HOST_WIDE_INT, i, LOWPART, memset, mul_double, neg_double(), overflow, and tmp.
Definition at line 863 of file fold-const.c.
References build_int_cst_wide(), div_and_round_double(), HOST_WIDE_INT, NULL_TREE, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_TYPE, and TYPE_UNSIGNED.
Referenced by try_move_mult_to_index().
| static void encode | ( | HOST_WIDE_INT * | words, | |
| unsigned HOST_WIDE_INT | low, | |||
| HOST_WIDE_INT | hi | |||
| ) | [static] |
Definition at line 3064 of file fold-const.c.
References eval_subst(), fold_build1, fold_build2, fold_build3, operand_equal_p(), tcc_binary, tcc_comparison, tcc_expression, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, and TREE_TYPE.
Definition at line 5894 of file fold-const.c.
References array_ref_element_size(), extract_array_ref(), fold_build2, idx, NULL_TREE, SSA_VAR_P, STRIP_NOPS, TREE_CODE, TREE_OPERAND, and TREE_TYPE.
| static tree extract_muldiv_1 | ( | tree | t, | |
| tree | c, | |||
| enum tree_code | code, | |||
| tree | wide_type, | |||
| bool * | strict_overflow_p | |||
| ) | [static] |
Definition at line 5568 of file fold-const.c.
References BINARY_CLASS_P, build2, COMPARISON_CLASS_P, const_binop(), EXPRESSION_CLASS_P, extract_muldiv(), fold_build1, fold_build2, fold_convert(), GET_MODE_SIZE, integer_zero_node, integer_zerop(), multiple_of_p(), negate_expr(), NULL_TREE, omit_one_operand(), size_one_node, t1, t2, tcc_binary, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_int_cst_sgn(), TREE_OPERAND, TREE_OVERFLOW, TREE_TYPE, TYPE_IS_SIZETYPE, TYPE_MODE, TYPE_OVERFLOW_UNDEFINED, TYPE_OVERFLOW_WRAPS, TYPE_PRECISION, TYPE_UNSIGNED, and UNARY_CLASS_P.
Definition at line 11788 of file fold-const.c.
References abort, and, associate_trees(), BITS_PER_WORD, build(), build1, build_complex(), build_int_2, build_real(), BUILT_IN_MD, change, char_type_node, compare_tree_int(), COMPLEX_TYPE, const_binop(), constant_boolean_node(), CONSTRUCTOR_ELTS, contains_placeholder_p(), convert(), copy_node, count_cond(), dconst0, dconst1, DECL_BIT_FIELD, DECL_BUILT_IN, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, DECL_INITIAL, DECL_P, DECL_SIZE, distribute_bit_expr(), eval_subst(), exact_log2, exact_real_inverse(), extract_muldiv(), first_rtl_op(), flag_unsafe_math_optimizations, FLOAT_TYPE_P, fold(), fold_binary(), fold_binary_op_with_conditional_arg(), fold_builtin(), fold_convert(), fold_range_test(), fold_real_zero_addition_p(), fold_ternary(), fold_truthop(), fold_unary(), force_fit_type(), GET_MODE_BITSIZE, get_unwidened(), has_cleanups(), high, HONOR_NANS, HONOR_SIGNED_ZEROS, HONOR_SNANS, HOST_BITS_PER_WIDE_INT, host_integerp(), HOST_WIDE_INT, i, INT_CST_LT, INT_CST_LT_UNSIGNED, int_fits_type_p(), integer_all_onesp(), integer_minus_one_node, integer_one_node, integer_onep(), integer_pow2p(), integer_zero_node, integer_zerop(), INTEGRAL_TYPE_P, invert_tree_comparison(), invert_truthvalue(), IS_EXPR_CODE_CLASS, len, LOAD_EXTEND_OP, low, max, min, MODE_HAS_INFINITIES, multiple_of_p(), neg_double(), negate_expr(), non_lvalue(), NULL_TREE, omit_one_operand(), operand_equal_for_comparison_p(), operand_equal_p(), optimize, optimize_bit_field_compare(), optimize_minmax_comparison(), overflow, pedantic, pedantic_non_lvalue(), pedantic_omit_one_operand(), POINTER_TYPE_P, prev, purpose_member(), r, real_minus_onep(), real_onep(), real_twop(), REAL_VALUE_ISNAN, REAL_VALUE_MINUS_ZERO, REAL_VALUE_NEGATE, REAL_VALUE_NEGATIVE, REAL_VALUE_TYPE, REAL_VALUES_EQUAL, REAL_VALUES_LESS, real_zerop(), same, save_expr(), SAVE_EXPR_RTL, sign_bit_p(), size, size_int, split_tree(), STRIP_NOPS, STRIP_SIGN_NOPS, swap_tree_comparison(), t1, tcc_constant, tmp, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_LENGTH, TREE_CONSTANT, TREE_CONSTANT_OVERFLOW, TREE_IMAGPART, tree_int_cst_equal(), TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_int_cst_lt(), tree_int_cst_sgn(), tree_low_cst(), TREE_OPERAND, TREE_OVERFLOW, TREE_REAL_CST, TREE_REALPART, TREE_SET_CODE, TREE_SIDE_EFFECTS, TREE_TYPE, TREE_UNSIGNED, TREE_USED, TREE_VALUE, truth_value_p(), twoval_comparison_p(), TYPE_MAIN_VARIANT, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_PRECISION, unsigned_type(), and VOID_TYPE_P.
Definition at line 13023 of file fold-const.c.
References build_int_cst_wide(), build_real(), force_fit_type(), gcc_unreachable, high, HOST_WIDE_INT, INT_CST_LT, integer_minus_one_node, low, neg_double(), NULL_TREE, overflow, REAL_VALUE_NEGATE, REAL_VALUE_NEGATIVE, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OVERFLOW, TREE_REAL_CST, and TYPE_UNSIGNED.
Definition at line 8457 of file fold-const.c.
References array_ref_element_size(), associate_trees(), BITS_PER_WORD, boolean_type_node, build1, build2, build_complex(), build_fold_indirect_ref(), build_function_call_expr(), build_int_cst(), build_int_cst_type(), build_int_cst_wide(), build_real(), build_tree_list, BUILT_IN_NORMAL, BUILTIN_EXPONENT_P, builtin_mathfn_code(), BUILTIN_ROOT_P, BUILTIN_SQRT_P, c, commutative_tree_code(), compare_tree_int(), COMPARISON_CLASS_P, COMPLEX_FLOAT_TYPE_P, const_binop(), constant_boolean_node(), dconst1, dconst2, DECL_ATTRIBUTES, DECL_BUILT_IN_CLASS, DECL_EXTERNAL, DECL_FUNCTION_CODE, DECL_WEAK, distribute_bit_expr(), distribute_real_division(), equal, exact_log2, exact_real_inverse(), extract_muldiv(), flag_trapping_math, flag_trapv, flag_unsafe_math_optimizations, FLOAT_TYPE_P, fold(), fold_binary_op_with_conditional_arg(), fold_build1, fold_build2, fold_comparison(), fold_convert(), fold_minmax(), fold_mult_zconjz(), fold_negate_const(), fold_overflow_warning(), fold_plusminus_mult_expr(), fold_range_test(), fold_real_zero_addition_p(), fold_relational_const(), fold_single_bit_test_into_sign_test(), fold_strip_sign_ops(), fold_to_nonsharp_ineq_using_bound(), fold_truthop(), force_fit_type(), gcc_assert, gcc_unreachable, get_callee_fndecl(), GET_MODE_BITSIZE, HONOR_INFINITIES, HONOR_NANS, HONOR_SIGNED_ZEROS, HONOR_SNANS, HOST_BITS_PER_WIDE_INT, host_integerp(), HOST_WIDE_INT, in_gimple_form, int_const_binop(), integer_all_onesp(), integer_nonzerop(), integer_one_node, integer_onep(), integer_pow2p(), integer_zero_node, integer_zerop(), INTEGRAL_TYPE_P, invert_truthvalue(), IS_EXPR_CODE_CLASS, log2, lookup_attribute(), low, mathfn_built_in(), MODE_HAS_INFINITIES, multiple_of_p(), negate_expr(), negate_expr_p(), non_lvalue(), NULL_TREE, OEP_ONLY_CONST, ok(), omit_one_operand(), omit_two_operands(), operand_equal_p(), optimize, optimize_bit_field_compare(), optimize_size, pedantic_non_lvalue(), POINTER_TYPE_P, ptr_difference_const(), r, real_arithmetic(), real_minus_onep(), real_onep(), REAL_VALUE_ISNAN, REAL_VALUE_NEGATIVE, REAL_VALUE_TYPE, real_zerop(), reorder_operands_p(), SCALAR_FLOAT_TYPE_P, shift, sign_bit_p(), split_tree(), strip_float_extensions(), STRIP_NOPS, STRIP_SIGN_NOPS, t1, t2, tcc_binary, tcc_comparison, tmp, tmp1, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_LENGTH, tree_cons, TREE_CONSTANT, TREE_CONSTANT_OVERFLOW, tree_expr_nonnegative_warnv_p(), tree_expr_nonzero_p(), TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_int_cst_lt(), tree_int_cst_sgn(), tree_log2(), TREE_OPERAND, TREE_OVERFLOW, TREE_REAL_CST, TREE_SIDE_EFFECTS, tree_swap_operands_p(), TREE_TYPE, TREE_VALUE, truth_value_p(), try_move_mult_to_index(), TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_OVERFLOW_TRAPS, TYPE_OVERFLOW_UNDEFINED, TYPE_PRECISION, TYPE_UNSIGNED, VAR_OR_FUNCTION_DECL_P, WARN_STRICT_OVERFLOW_ALL, WARN_STRICT_OVERFLOW_CONDITIONAL, and WARN_STRICT_OVERFLOW_MISC.
| static tree fold_binary_op_with_conditional_arg | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | op0, | |||
| tree | op1, | |||
| tree | cond, | |||
| tree | arg, | |||
| int | cond_first_p | |||
| ) | [static] |
Definition at line 5966 of file fold-const.c.
References constant_boolean_node(), fold_build2, fold_build3, fold_convert(), NULL_TREE, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, TREE_TYPE, true_value, and VOID_TYPE_P.
Definition at line 12907 of file fold-const.c.
References build2, build_complex(), commutative_tree_code(), const_binop(), constant_boolean_node(), FLOAT_TYPE_P, fold_binary(), fold_convert(), fold_relational_const(), fold_relational_hi_lo(), HONOR_NANS, HONOR_SIGNED_ZEROS, integer_all_onesp(), integer_one_node, integer_zero_node, integer_zerop(), INTEGRAL_TYPE_P, MODE_HAS_INFINITIES, NULL_TREE, OEP_ONLY_CONST, omit_one_operand(), operand_equal_p(), real_zerop(), swap_tree_comparison(), TREE_CODE, TREE_CONSTANT, tree_int_cst_sgn(), TREE_OPERAND, TREE_REALPART, TREE_TYPE, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_UNSIGNED, and x.
Definition at line 12227 of file fold-const.c.
References END_FOLD_INIT, fold_build1, result, and START_FOLD_INIT.
Referenced by build_unary_op().
Definition at line 12049 of file fold-const.c.
References build1_stat(), fold_unary(), htab_create(), htab_delete(), htab_empty(), htab_eq_pointer, htab_hash_pointer, md5_finish_ctx(), md5_init_ctx(), memcmp, NULL, and PASS_MEM_STAT.
Definition at line 12239 of file fold-const.c.
References END_FOLD_INIT, fold_build2, result, and START_FOLD_INIT.
Referenced by build_binary_op().
Definition at line 12086 of file fold-const.c.
References build2_stat(), fold_binary(), htab_create(), htab_delete(), htab_empty(), htab_eq_pointer, htab_hash_pointer, md5_finish_ctx(), md5_init_ctx(), memcmp, NULL, and PASS_MEM_STAT.
Definition at line 12251 of file fold-const.c.
References END_FOLD_INIT, fold_build3, result, and START_FOLD_INIT.
Referenced by build_function_call().
| tree fold_build3_stat | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | op0, | |||
| tree | op1, | |||
| tree op2 | MEM_STAT_DECL | |||
| ) |
Definition at line 12140 of file fold-const.c.
References build3_stat(), fold_ternary(), htab_create(), htab_delete(), htab_empty(), htab_eq_pointer, htab_hash_pointer, md5_finish_ctx(), md5_init_ctx(), memcmp, NULL, and PASS_MEM_STAT.
Definition at line 13211 of file fold-const.c.
References build1, TREE_CODE, TREE_OPERAND, and TREE_SIDE_EFFECTS.
Definition at line 7964 of file fold-const.c.
References build2, build_fold_addr_expr(), build_int_cst(), build_real(), builtin_mathfn_code(), const1, const_binop(), constant_boolean_node(), dconst0, DECL_BIT_FIELD, DECL_SIZE, END_BUILTINS, eval_subst(), extract_array_ref(), flag_errno_math, flag_unsafe_math_optimizations, FLOAT_TYPE_P, fold_build2, fold_convert(), fold_div_compare(), fold_inf_compare(), fold_mathfn_compare(), fold_overflow_warning(), fold_relational_const(), fold_sign_changed_comparison(), fold_widened_comparison(), gcc_unreachable, HONOR_NANS, HONOR_SNANS, host_integerp(), HOST_WIDE_INT, integer_one_node, integer_onep(), integer_zero_node, integer_zerop(), INTEGRAL_TYPE_P, NULL_TREE, omit_one_operand(), operand_equal_p(), optimize_minmax_comparison(), POINTER_TYPE_P, REAL_VALUE_ISINF, REAL_VALUE_ISNAN, REAL_VALUE_MINUS_ZERO, REAL_VALUE_NEGATE, REAL_VALUE_TYPE, save_expr(), shift, signed_size_type_node, signed_type_for(), size, size_type_node, strip_float_extensions(), STRIP_SIGN_NOPS, swap_tree_comparison(), TREE_CODE, TREE_CONSTANT, TREE_CONSTANT_OVERFLOW, tree_low_cst(), TREE_OPERAND, TREE_OVERFLOW, TREE_REAL_CST, tree_swap_operands_p(), TREE_TYPE, twoval_comparison_p(), TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_OVERFLOW_TRAPS, TYPE_OVERFLOW_UNDEFINED, TYPE_PRECISION, and WARN_STRICT_OVERFLOW_COMPARISON.
Referenced by fold_binary().
Definition at line 4587 of file fold-const.c.
References build_int_cst(), const_binop(), flag_trapping_math, FLOAT_TYPE_P, fold_build1, fold_build2, fold_build3, fold_convert(), gcc_assert, gcc_unreachable, HONOR_NANS, in_gimple_form, integer_one_node, integer_zerop(), INTEGRAL_TYPE_P, maybe_lvalue_p(), negate_expr(), NULL_TREE, OEP_ONLY_CONST, operand_equal_for_comparison_p(), operand_equal_p(), pedantic_non_lvalue(), real_zerop(), strcmp(), STRIP_NOPS, tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_TYPE, TYPE_MAIN_VARIANT, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, and TYPE_UNSIGNED.
Definition at line 2134 of file fold-const.c.
References build1, build2, build_zero_vector(), COMPLEX_TYPE, error_mark_node, flag_float_store, fold(), fold_build1, fold_build2, fold_convert(), fold_convert_const(), fold_ignored_result(), gcc_assert, gcc_unreachable, integer_zero_node, integer_zerop(), INTEGRAL_TYPE_P, NULL_TREE, POINTER_TYPE_P, save_expr(), TREE_CODE, tree_int_cst_equal(), TREE_OPERAND, TREE_TYPE, TYPE_MAIN_VARIANT, and TYPE_SIZE.
Definition at line 2091 of file fold-const.c.
References build_real_from_int_cst(), fold_convert_const_int_from_int(), fold_convert_const_int_from_real(), fold_convert_const_real_from_real(), INTEGRAL_TYPE_P, NULL_TREE, POINTER_TYPE_P, TREE_CODE, and TREE_TYPE.
Definition at line 1955 of file fold-const.c.
References build_int_cst_wide(), force_fit_type(), POINTER_TYPE_P, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OVERFLOW, TREE_TYPE, and TYPE_UNSIGNED.
Definition at line 1981 of file fold-const.c.
References build_int_cst_wide(), force_fit_type(), gcc_unreachable, high, HOST_WIDE_INT, low, lt, NULL_TREE, overflow, r, real_ceil(), real_floor(), real_round(), real_trunc(), real_value_from_int_cst(), REAL_VALUE_ISNAN, REAL_VALUE_TO_INT, REAL_VALUE_TYPE, REAL_VALUES_LESS, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OVERFLOW, TREE_REAL_CST, TYPE_MAX_VALUE, TYPE_MIN_VALUE, and x.
Definition at line 2073 of file fold-const.c.
References build_real(), real_convert(), REAL_VALUE_TYPE, TREE_CONSTANT_OVERFLOW, TREE_OVERFLOW, TREE_REAL_CST, and TYPE_MODE.
Definition at line 912 of file fold-const.c.
References fold_deferring_overflow_warnings.
Referenced by cleanup_control_expr_graph(), estimate_numbers_of_iterations(), evaluate_stmt(), expand_simple_operations(), fold_cond_expr_cond(), fold_stmt_r(), loop_niter_by_eval(), number_of_iterations_exit(), pointer_int_sum(), scev_probably_wraps_p(), simplify_control_stmt_condition(), and value_inside_range().
Definition at line 976 of file fold-const.c.
References fold_deferring_overflow_warnings.
Referenced by verify_interpass_invariants().
Definition at line 6285 of file fold-const.c.
References add_double_with_sign(), build_int_cst_wide(), build_range_check(), fold_build2, fold_negate_const(), force_fit_type(), gcc_unreachable, HOST_WIDE_INT, int_const_binop(), integer_one_node, integer_zero_node, lo, mul_double_with_sign(), NULL_TREE, omit_one_operand(), overflow, swap_tree_comparison(), tmp, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_int_cst_sgn(), TREE_OPERAND, TREE_OVERFLOW, TREE_TYPE, and TYPE_UNSIGNED.
Definition at line 13391 of file fold-const.c.
References integer_zero_node, tcc_binary, tcc_comparison, tcc_expression, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, and TREE_SIDE_EFFECTS.
Definition at line 13376 of file fold-const.c.
References fold_indirect_ref_1(), sub, TREE_OPERAND, and TREE_TYPE.
Definition at line 13280 of file fold-const.c.
References build4, build_fold_indirect_ref(), COMPLEX_TYPE, DECL_INITIAL, fold_build1, fold_read_from_constant_string(), NULL_TREE, POINTER_TYPE_P, size, size_zero_node, STRIP_NOPS, sub, TREE_CODE, tree_int_cst_equal(), TREE_OPERAND, TREE_TYPE, TYPE_DOMAIN, TYPE_MIN_VALUE, and TYPE_SIZE_UNIT.
Definition at line 6201 of file fold-const.c.
References build_real(), CONTAINS_PLACEHOLDER_P, fold_build1, fold_build2, HONOR_NANS, HONOR_SNANS, in_gimple_form, integer_one_node, integer_zero_node, max, mode, neg(), NULL_TREE, omit_one_operand(), real_maxval(), REAL_VALUE_NEGATIVE, REAL_VALUE_TYPE, save_expr(), swap_tree_comparison(), TREE_REAL_CST, TREE_TYPE, and TYPE_MODE.
| static tree fold_mathfn_compare | ( | enum built_in_function | fcode, | |
| enum tree_code | code, | |||
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 6076 of file fold-const.c.
References build_real(), BUILTIN_SQRT_P, c, CONTAINS_PLACEHOLDER_P, dconst0, fold_build2, HONOR_INFINITIES, HONOR_NANS, integer_one_node, integer_zero_node, mode, NULL_TREE, omit_one_operand(), REAL_ARITHMETIC, real_convert(), REAL_VALUE_ISINF, REAL_VALUE_NEGATIVE, REAL_VALUE_TYPE, save_expr(), TREE_OPERAND, TREE_REAL_CST, TREE_TYPE, TREE_VALUE, and TYPE_MODE.
Definition at line 7918 of file fold-const.c.
References gcc_unreachable, NULL_TREE, omit_one_operand(), operand_equal_p(), reorder_operands_p(), TREE_CODE, and TREE_OPERAND.
Referenced by fold_binary().
Definition at line 8420 of file fold-const.c.
References fold_build1, fold_build2, fold_convert(), integer_zero_node, save_expr(), TREE_CODE, TREE_IMAGPART, TREE_OPERAND, TREE_REALPART, and TREE_TYPE.
Referenced by fold_binary().
Definition at line 12985 of file fold-const.c.
References build_int_cst_wide(), build_real(), force_fit_type(), gcc_unreachable, high, HOST_WIDE_INT, low, neg_double(), NULL_TREE, overflow, REAL_VALUE_NEGATE, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OVERFLOW, TREE_REAL_CST, and TYPE_UNSIGNED.
Definition at line 1176 of file fold-const.c.
References build_complex(), build_function_call_expr(), build_int_cst(), build_tree_list, builtin_mathfn_code(), flag_trapping_math, flag_unsafe_math_optimizations, FLOAT_TYPE_P, fold_build2, fold_convert(), fold_negate_const(), fold_overflow_warning(), G_, get_callee_fndecl(), HONOR_SIGN_DEPENDENT_ROUNDING, HOST_WIDE_INT, integer_onep(), INTEGRAL_TYPE_P, negate_expr(), negate_expr_p(), negate_mathfn_p(), NULL_TREE, reorder_operands_p(), strip_float_extensions(), TREE_CODE, TREE_IMAGPART, tree_int_cst_equal(), TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_OVERFLOW, TREE_REALPART, TREE_TYPE, TREE_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_OVERFLOW_TRAPS, TYPE_OVERFLOW_UNDEFINED, TYPE_PRECISION, TYPE_UNSIGNED, and WARN_STRICT_OVERFLOW_MISC.
Referenced by fold_unary(), and negate_expr().
Definition at line 13070 of file fold-const.c.
References build_int_cst_wide(), force_fit_type(), gcc_assert, NULL_TREE, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, and TREE_OVERFLOW.
| static void fold_overflow_warning | ( | const char * | gmsgid, | |
| enum warn_strict_overflow_code | wc | |||
| ) | [static] |
Definition at line 985 of file fold-const.c.
References flag_trapv, fold_deferred_overflow_code, fold_deferred_overflow_warning, fold_deferring_overflow_warnings, gcc_assert, issue_strict_overflow_warning, NULL, and warning.
Referenced by fold_binary(), fold_comparison(), fold_negate_expr(), fold_range_test(), tree_expr_nonnegative_p(), and tree_expr_nonzero_p().
| static tree fold_plusminus_mult_expr | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 6919 of file fold-const.c.
References build_int_cst(), build_one_cst(), exact_log2, fold_build2, fold_convert(), host_integerp(), HOST_WIDE_INT, NULL_TREE, operand_equal_p(), same, swap(), tmp, TREE_CODE, TREE_INT_CST_LOW, TREE_OPERAND, and TREE_TYPE.
Referenced by fold_binary().
Definition at line 4865 of file fold-const.c.
References build2, build_range_check(), CONTAINS_PLACEHOLDER_P, fold_overflow_warning(), G_, high, integer_zero_node, invert_truthvalue(), LOGICAL_OP_NON_SHORT_CIRCUIT, low, make_range(), merge_ranges(), operand_equal_p(), or_op, save_expr(), simple_operand_p(), and WARN_STRICT_OVERFLOW_COMPARISON.
Definition at line 12933 of file fold-const.c.
References array_ref_low_bound(), build_int_cst(), compare_tree_int(), fold_convert(), GET_MODE_CLASS, GET_MODE_SIZE, index(), integer_zerop(), MODE_INT, NULL, NULL_TREE, size_diffop(), sizetype, string_constant(), TREE_CODE, TREE_INT_CST_LOW, TREE_OPERAND, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, and TYPE_MODE.
Definition at line 6039 of file fold-const.c.
References HONOR_SIGN_DEPENDENT_ROUNDING, HONOR_SIGNED_ZEROS, HONOR_SNANS, REAL_VALUE_MINUS_ZERO, real_zerop(), TREE_CODE, TREE_REAL_CST, and TYPE_MODE.
Definition at line 13091 of file fold-const.c.
References constant_boolean_node(), flag_trapping_math, fold_build2, fold_relational_const(), gcc_unreachable, INT_CST_LT, INT_CST_LT_UNSIGNED, invert_tree_comparison(), NULL_TREE, real_compare(), real_isnan(), REAL_VALUE_TYPE, result, swap_tree_comparison(), TREE_CODE, TREE_IMAGPART, tree_int_cst_equal(), TREE_REAL_CST_PTR, TREE_REALPART, TREE_TYPE, and TYPE_UNSIGNED.
| static tree fold_sign_changed_comparison | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 6714 of file fold-const.c.
References build_int_cst_wide(), fold_build2, fold_convert(), force_fit_type(), NULL_TREE, tmp, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_OVERFLOW, TREE_TYPE, TYPE_PRECISION, and TYPE_UNSIGNED.
Definition at line 6476 of file fold-const.c.
References build2, compare_tree_int(), flag_syntax_only, fold(), fold_build2, fold_convert(), fold_single_bit_test_into_sign_test(), GET_MODE_BITSIZE, integer_one_node, integer_pow2p(), integer_zero_node, integer_zerop(), LOAD_EXTEND_OP, NULL_TREE, sign_bit_p(), SIGN_EXTEND, signed_type(), size_int, TREE_CODE, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_log2(), TREE_OPERAND, TREE_TYPE, TYPE_MODE, TYPE_PRECISION, and unsigned_type().
| static tree fold_single_bit_test_into_sign_test | ( | enum tree_code | code, | |
| tree | arg0, | |||
| tree | arg1, | |||
| tree | result_type | |||
| ) | [static] |
Definition at line 6442 of file fold-const.c.
References build_int_cst(), fold_build2, fold_convert(), GET_MODE_BITSIZE, integer_pow2p(), integer_zerop(), NULL_TREE, sign_bit_p(), TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MODE, and TYPE_PRECISION.
Referenced by fold_binary(), and fold_single_bit_test().
Definition at line 13604 of file fold-const.c.
References build2, fold(), fold_build2, fold_strip_sign_ops(), HONOR_SIGN_DEPENDENT_ROUNDING, NULL_TREE, TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_MODE.
Definition at line 11459 of file fold-const.c.
References COMPARISON_CLASS_P, CONSTRUCTOR_ELTS, contains_label_p(), DECL_BUILT_IN, fold_build2, fold_build3, fold_builtin(), fold_cond_expr_with_comparison(), fold_convert(), fold_truth_not_expr(), FOR_EACH_CONSTRUCTOR_ELT, gcc_assert, HONOR_SIGNED_ZEROS, HOST_BITS_PER_WIDE_INT, host_integerp(), HOST_WIDE_INT, idx, integer_onep(), integer_pow2p(), integer_zero_node, integer_zerop(), invert_truthvalue(), IS_EXPR_CODE_CLASS, NULL, NULL_TREE, OEP_ONLY_CONST, operand_equal_for_comparison_p(), operand_equal_p(), pedantic_non_lvalue(), pedantic_omit_one_operand(), sign_bit_p(), simple_cst_equal(), STRIP_NOPS, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_LENGTH, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_log2(), tree_low_cst(), TREE_OPERAND, TREE_SIDE_EFFECTS, tree_swap_operands_p(), TREE_TYPE, TREE_VALUE, TREE_VECTOR_CST_ELTS, truth_value_p(), type_contains_placeholder_p(), TYPE_MODE, TYPE_PRECISION, TYPE_SIZE, TYPE_VECTOR_SUBPARTS, and VOID_TYPE_P.
Referenced by fold(), and fold_build3_stat().
Definition at line 6876 of file fold-const.c.
References a, a1, fold_build2, integer_onep(), INTEGRAL_TYPE_P, NULL_TREE, POINTER_TYPE_P, TREE_CODE, TREE_OPERAND, TREE_TYPE, and is::y.
Definition at line 3202 of file fold-const.c.
References build1, build2, build3, build_int_cst(), constant_boolean_node(), flag_trapping_math, FLOAT_TYPE_P, HONOR_NANS, integer_onep(), integer_zerop(), invert_tree_comparison(), invert_truthvalue(), NULL_TREE, tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_TYPE, TYPE_MODE, and VOID_TYPE_P.
Referenced by fold_ternary(), fold_unary(), and invert_truthvalue().
Definition at line 5009 of file fold-const.c.
References all_ones_mask_p(), BRANCH_COST, build2, build_int_cst(), BYTES_BIG_ENDIAN, combine_comparisons(), const_binop(), constant_boolean_node(), decode_field_reference(), FLOAT_TYPE_P, fold_build1, fold_convert(), get_best_mode(), GET_MODE_BITSIZE, HOST_WIDE_INT, integer_onep(), integer_pow2p(), integer_zerop(), LOGICAL_OP_NON_SHORT_CIRCUIT, make_bit_field_ref(), MAX, MIN, NULL_TREE, operand_equal_p(), rcode, result, simple_cst_equal(), simple_operand_p(), size_int, swap_tree_comparison(), tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_SIDE_EFFECTS, TREE_TYPE, TYPE_ALIGN, unextend(), warning, and word_mode.
Definition at line 7404 of file fold-const.c.
References and, base, BINARY_CLASS_P, bitpos(), BITS_PER_WORD, boolean_type_node, build1, build2, build3, build_complex(), build_fold_addr_expr(), build_int_cst(), build_int_cst_wide(), change, COMPARISON_CLASS_P, COMPLEX_TYPE, copy_node, DECL_BIT_FIELD, flag_syntax_only, FLOAT_TYPE_P, fold_abs_const(), fold_build1, fold_build2, fold_build3, fold_convert(), fold_convert_const(), fold_negate_expr(), fold_not_const(), fold_strip_sign_ops(), fold_truth_not_expr(), fold_unary(), fold_view_convert_expr(), force_fit_type(), gcc_assert, get_inner_reference(), GET_MODE_BITSIZE, handled_component_p(), HOST_BITS_PER_WIDE_INT, host_integerp(), HOST_WIDE_INT, integer_all_onesp(), integer_one_node, integer_onep(), integer_zero_node, INTEGRAL_TYPE_P, IS_EXPR_CODE_CLASS, LOAD_EXTEND_OP, mode, negate_expr(), NULL_TREE, OEP_ONLY_CONST, offset, omit_one_operand(), operand_equal_p(), POINTER_TYPE_P, s0, s1, strcmp(), strip_float_extensions(), STRIP_NOPS, STRIP_SIGN_NOPS, t1, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_LENGTH, TREE_CONSTANT, TREE_CONSTANT_OVERFLOW, tree_expr_nonnegative_p(), TREE_IMAGPART, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_low_cst(), TREE_NO_WARNING, TREE_OPERAND, TREE_OVERFLOW, TREE_REALPART, TREE_TYPE, TREE_USED, TYPE_MAIN_VARIANT, TYPE_MODE, TYPE_PRECISION, TYPE_SIZE, TYPE_UNSIGNED, and VOID_TYPE_P.
Definition at line 12922 of file fold-const.c.
References build_complex(), COMPLEX_TYPE, fold_abs_const(), fold_convert_const(), fold_negate_const(), fold_not_const(), fold_unary(), negate_expr(), NULL_TREE, TREE_CODE, TREE_CONSTANT, TREE_IMAGPART, TREE_REALPART, and TREE_TYPE.
Definition at line 968 of file fold-const.c.
References fold_undefer_overflow_warnings(), and NULL_TREE.
Referenced by cleanup_control_expr_graph(), estimate_numbers_of_iterations(), expand_simple_operations(), loop_niter_by_eval(), number_of_iterations_exit(), pointer_int_sum(), scev_probably_wraps_p(), and value_inside_range().
Definition at line 927 of file fold-const.c.
References EXPR_HAS_LOCATION, EXPR_LOCATION, fold_deferred_overflow_code, fold_deferred_overflow_warning, fold_deferring_overflow_warnings, gcc_assert, input_location, issue_strict_overflow_warning, NULL, NULL_TREE, and warning.
Referenced by cleanup_control_expr_graph(), evaluate_stmt(), fold_cond_expr_cond(), fold_stmt_r(), fold_undefer_and_ignore_overflow_warnings(), and simplify_control_stmt_condition().
Definition at line 7381 of file fold-const.c.
References BITS_PER_UNIT, CHAR_BIT, len, native_encode_expr(), native_interpret_expr(), and NULL_TREE.
Referenced by fold_unary().
| static tree fold_widened_comparison | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 6624 of file fold-const.c.
References above, fold_build2, fold_convert(), fold_relational_const(), get_unwidened(), int_fits_type_p(), integer_nonzerop(), integer_one_node, integer_zero_node, lower_bound_in_type(), max, min, NULL_TREE, omit_one_operand(), TREE_CODE, TREE_TYPE, TYPE_PRECISION, TYPE_UNSIGNED, and upper_bound_in_type().
Definition at line 212 of file fold-const.c.
References build_int_cst_wide(), copy_node, gcc_assert, high, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, low, POINTER_SIZE, POINTER_TYPE_P, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OVERFLOW, TREE_TYPE, TYPE_IS_SIZETYPE, TYPE_PRECISION, and TYPE_UNSIGNED.
Definition at line 1524 of file fold-const.c.
References add_double, build_int_cst_wide(), copy_node, div_and_round_double(), force_fit_type(), gcc_unreachable, HOST_WIDE_INT, low, lrotate_double(), lshift_double(), mul_double, neg_double(), NULL_TREE, overflow, OVERFLOW_SUM_SIGN, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OVERFLOW, TREE_TYPE, TYPE_IS_SIZETYPE, TYPE_PRECISION, and TYPE_UNSIGNED.
Definition at line 3331 of file fold-const.c.
References abort, build(), build1, build_int_2, convert(), flag_unsafe_math_optimizations, FLOAT_TYPE_P, fold_truth_not_expr(), integer_onep(), integer_zero_node, integer_zerop(), invert_tree_comparison(), invert_truthvalue(), TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, and TREE_TYPE.
| void lrotate_double | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| HOST_WIDE_INT | count, | |||
| unsigned int | prec, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv | |||
| ) |
Definition at line 541 of file fold-const.c.
References HOST_WIDE_INT, lshift_double(), and rshift_double().
| void lshift_double | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| HOST_WIDE_INT | count, | |||
| unsigned int | prec, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv, | |||
| int | arith | |||
| ) |
Definition at line 418 of file fold-const.c.
References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, rshift_double(), and SHIFT_COUNT_TRUNCATED.
| static tree make_bit_field_ref | ( | tree | inner, | |
| tree | type, | |||
| int | bitsize, | |||
| int | bitpos, | |||
| int | unsignedp | |||
| ) | [static] |
Definition at line 3441 of file fold-const.c.
References BIT_FIELD_REF_UNSIGNED, bitsize_int, build3, fold_convert(), host_integerp(), INTEGRAL_TYPE_P, POINTER_TYPE_P, result, size, size_int, tree_low_cst(), TREE_TYPE, and TYPE_SIZE.
| static tree make_range | ( | tree | exp, | |
| int * | pin_p, | |||
| tree * | plow, | |||
| tree * | phigh, | |||
| bool * | strict_overflow_p | |||
| ) | [static] |
Definition at line 3932 of file fold-const.c.
References build2, build_int_cst(), fold_build2, fold_convert(), gcc_unreachable, high, int_fits_type_p(), integer_one_node, integer_onep(), integer_type_node, integer_zero_node, integer_zerop(), INTEGRAL_TYPE_P, IS_EXPR_CODE_CLASS, low, merge_ranges(), negate_expr(), NULL_TREE, range_binop(), tcc_binary, tcc_comparison, tcc_expression, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_LENGTH, tree_int_cst_equal(), tree_int_cst_lt(), TREE_OPERAND, TREE_OVERFLOW, TREE_TYPE, TYPE_MAX_VALUE, TYPE_MODE, TYPE_OVERFLOW_UNDEFINED, TYPE_PRECISION, and TYPE_UNSIGNED.
Definition at line 1030 of file fold-const.c.
References gcc_assert, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, TREE_CODE, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_TYPE, TYPE_PRECISION, TYPE_UNSIGNED, and val.
| static int merge_ranges | ( | int * | pin_p, | |
| tree * | plow, | |||
| tree * | phigh, | |||
| int | in0_p, | |||
| tree | low0, | |||
| tree | high0, | |||
| int | in1_p, | |||
| tree | low1, | |||
| tree | high1 | |||
| ) | [static] |
Definition at line 4386 of file fold-const.c.
References GET_MODE_BITSIZE, high, integer_one_node, integer_onep(), integer_type_node, integer_zerop(), low, no_overlap(), NULL_TREE, range_binop(), range_predecessor(), range_successor(), TREE_CODE, tree_int_cst_equal(), TREE_TYPE, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_PRECISION, and TYPE_UNSIGNED.
| int mul_double_with_sign | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| unsigned HOST_WIDE_INT | l2, | |||
| HOST_WIDE_INT | h2, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv, | |||
| bool | unsigned_p | |||
| ) |
Definition at line 355 of file fold-const.c.
References add_double, carry, decode, encode(), HIGHPART, HOST_WIDE_INT, i, LOWPART, memset, and neg_double().
Referenced by fold_div_compare().
Definition at line 12307 of file fold-const.c.
References const_binop(), fold_convert(), integer_pow2p(), integer_zerop(), multiple_of_p(), operand_equal_p(), size_one_node, t1, TREE_CODE, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_int_cst_sgn(), TREE_OPERAND, TREE_OVERFLOW, TREE_TYPE, TYPE_PRECISION, and TYPE_UNSIGNED.
| static int native_encode_complex | ( | tree | expr, | |
| unsigned char * | ptr, | |||
| int | len | |||
| ) | [static] |
Definition at line 7106 of file fold-const.c.
References native_encode_expr(), TREE_IMAGPART, and TREE_REALPART.
Referenced by native_encode_expr().
| static int native_encode_expr | ( | tree | expr, | |
| unsigned char * | ptr, | |||
| int | len | |||
| ) | [static] |
Definition at line 7172 of file fold-const.c.
References native_encode_complex(), native_encode_int(), native_encode_real(), native_encode_vector(), and TREE_CODE.
Referenced by fold_view_convert_expr(), native_encode_complex(), and native_encode_vector().
| static int native_encode_int | ( | tree | expr, | |
| unsigned char * | ptr, | |||
| int | len | |||
| ) | [static] |
Definition at line 7013 of file fold-const.c.
References bitpos(), BITS_PER_UNIT, BYTES_BIG_ENDIAN, char, GET_MODE_SIZE, HOST_BITS_PER_WIDE_INT, offset, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_TYPE, TYPE_MODE, UNITS_PER_WORD, words, and WORDS_BIG_ENDIAN.
Referenced by native_encode_expr().
| static int native_encode_real | ( | tree | expr, | |
| unsigned char * | ptr, | |||
| int | len | |||
| ) | [static] |
Definition at line 7058 of file fold-const.c.
References bitpos(), BITS_PER_UNIT, BYTES_BIG_ENDIAN, char, GET_MODE_SIZE, offset, real_to_target(), tmp, TREE_REAL_CST_PTR, TREE_TYPE, TYPE_MODE, UNITS_PER_WORD, words, and WORDS_BIG_ENDIAN.
Referenced by native_encode_expr().
| static int native_encode_vector | ( | tree | expr, | |
| unsigned char * | ptr, | |||
| int | len | |||
| ) | [static] |
Definition at line 7129 of file fold-const.c.
References count, GET_MODE_SIZE, i, memset, native_encode_expr(), NULL_TREE, offset, size, TREE_CHAIN, TREE_TYPE, TREE_VALUE, TREE_VECTOR_CST_ELTS, TYPE_MODE, and TYPE_VECTOR_SUBPARTS.
Referenced by native_encode_expr().
Definition at line 7298 of file fold-const.c.
References build_complex(), GET_MODE_SIZE, native_interpret_expr(), NULL_TREE, size, TREE_TYPE, and TYPE_MODE.
Referenced by native_interpret_expr().
Definition at line 7352 of file fold-const.c.
References COMPLEX_TYPE, native_interpret_complex(), native_interpret_int(), native_interpret_real(), native_interpret_vector(), NULL_TREE, and TREE_CODE.
Referenced by fold_view_convert_expr(), native_interpret_complex(), and native_interpret_vector().
Definition at line 7199 of file fold-const.c.
References bitpos(), BITS_PER_UNIT, build_int_cst_wide(), BYTES_BIG_ENDIAN, force_fit_type(), GET_MODE_SIZE, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, lo, NULL_TREE, offset, TYPE_MODE, UNITS_PER_WORD, words, and WORDS_BIG_ENDIAN.
Referenced by native_interpret_expr().
Definition at line 7248 of file fold-const.c.
References bitpos(), BITS_PER_UNIT, build_real(), BYTES_BIG_ENDIAN, GET_MODE_SIZE, long, memset, mode, NULL_TREE, offset, r, real_from_target(), REAL_VALUE_TYPE, tmp, TYPE_MODE, UNITS_PER_WORD, words, and WORDS_BIG_ENDIAN.
Referenced by native_interpret_expr().
Definition at line 7322 of file fold-const.c.
References build_vector(), count, GET_MODE_SIZE, i, native_interpret_expr(), NULL_TREE, size, tree_cons, TREE_TYPE, TYPE_MODE, and TYPE_VECTOR_SUBPARTS.
Referenced by native_interpret_expr().
| int neg_double | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv | |||
| ) |
Definition at line 331 of file fold-const.c.
Definition at line 1363 of file fold-const.c.
References build1, fold_convert(), fold_negate_expr(), NULL_TREE, STRIP_SIGN_NOPS, and TREE_TYPE.
Definition at line 1061 of file fold-const.c.
References builtin_mathfn_code(), flag_unsafe_math_optimizations, FLOAT_TYPE_P, HONOR_SIGN_DEPENDENT_ROUNDING, HOST_WIDE_INT, INTEGRAL_TYPE_P, may_negate_without_overflow_p(), negate_expr_p(), negate_mathfn_p(), reorder_operands_p(), strip_float_extensions(), STRIP_SIGN_NOPS, TREE_CODE, TREE_IMAGPART, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_REALPART, TREE_TYPE, TREE_VALUE, TYPE_MODE, TYPE_OVERFLOW_UNDEFINED, TYPE_OVERFLOW_WRAPS, TYPE_PRECISION, and TYPE_UNSIGNED.
| static bool negate_mathfn_p | ( | enum built_in_function | code | ) | [static] |
Definition at line 2310 of file fold-const.c.
References build1, in_gimple_form, maybe_lvalue_p(), result, TREE_CODE, TREE_CONSTANT, and TREE_TYPE.
Definition at line 3148 of file fold-const.c.
References build2, fold_convert(), fold_ignored_result(), non_lvalue(), and TREE_SIDE_EFFECTS.
Definition at line 3181 of file fold-const.c.
References build2, fold_convert(), non_lvalue(), TREE_CODE, and TREE_SIDE_EFFECTS.
Definition at line 2911 of file fold-const.c.
References fold_convert(), get_narrower(), INTEGRAL_TYPE_P, operand_equal_p(), STRIP_NOPS, TREE_TYPE, and TYPE_PRECISION.
Definition at line 2628 of file fold-const.c.
References call_expr_flags(), commutative_tree_code(), COMPARISON_CLASS_P, DECL_BUILT_IN, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, ECF_CONST, ECF_PURE, memcmp, OEP_ONLY_CONST, OEP_PURE_SAME, OP_SAME, OP_SAME_WITH_NULL, operand_equal_p(), REAL_VALUES_IDENTICAL, STRIP_NOPS, swap_tree_comparison(), tcc_binary, tcc_comparison, tcc_declaration, tcc_expression, tcc_reference, tcc_unary, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_CONSTANT, TREE_CONSTANT_OVERFLOW, TREE_IMAGPART, tree_int_cst_equal(), TREE_OPERAND, TREE_REAL_CST, TREE_REALPART, TREE_SIDE_EFFECTS, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, TREE_VALUE, TREE_VECTOR_CST_ELTS, TYPE_MODE, TYPE_PRECISION, and TYPE_UNSIGNED.
| static tree optimize_bit_field_compare | ( | enum tree_code | code, | |
| tree | compare_type, | |||
| tree | lhs, | |||
| tree | rhs | |||
| ) | [static] |
Definition at line 3485 of file fold-const.c.
References build2, build_int_cst(), BYTES_BIG_ENDIAN, const_binop(), constant_boolean_node(), fold_convert(), force_fit_type(), get_best_mode(), get_inner_reference(), GET_MODE_BITSIZE, HOST_WIDE_INT, integer_all_onesp(), integer_zerop(), lmode, make_bit_field_ref(), MIN, NULL_TREE, offset, signed_type(), size_int, TREE_CODE, TREE_SIDE_EFFECTS, TREE_THIS_VOLATILE, TREE_TYPE, TYPE_ALIGN, unsigned_type(), warning, and word_mode.
| static tree optimize_minmax_comparison | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | op0, | |||
| tree | op1 | |||
| ) | [static] |
Definition at line 5427 of file fold-const.c.
References comp_const(), fold_build2, integer_one_node, integer_zero_node, invert_tree_comparison(), invert_truthvalue(), NULL_TREE, omit_one_operand(), optimize_minmax_comparison(), STRIP_SIGN_NOPS, TREE_CODE, TREE_CONSTANT_OVERFLOW, tree_int_cst_equal(), tree_int_cst_lt(), and TREE_OPERAND.
Definition at line 3161 of file fold-const.c.
References build2, fold_convert(), fold_ignored_result(), pedantic_non_lvalue(), and TREE_SIDE_EFFECTS.
Definition at line 13560 of file fold-const.c.
References BITS_PER_UNIT, build2, cst_and_fits_in_hwi(), fold(), fold_build2, fold_convert(), host_integerp(), HOST_WIDE_INT, int_cst_value(), operand_equal_p(), split_address_to_core_and_offset(), tree_low_cst(), and TREE_TYPE.
| static tree range_binop | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| int | upper0_p, | |||
| tree | arg1, | |||
| int | upper1_p | |||
| ) | [static] |
Definition at line 3864 of file fold-const.c.
References constant_boolean_node(), fold_build2, fold_convert(), gcc_unreachable, result, STRIP_NOPS, tcc_comparison, TREE_CODE, TREE_CODE_CLASS, and TREE_TYPE.
Definition at line 4357 of file fold-const.c.
References integer_one_node, INTEGRAL_TYPE_P, NULL_TREE, operand_equal_p(), range_binop(), TREE_TYPE, and TYPE_MIN_VALUE.
Referenced by merge_ranges().
Definition at line 4371 of file fold-const.c.
References integer_one_node, INTEGRAL_TYPE_P, NULL_TREE, operand_equal_p(), range_binop(), TREE_TYPE, and TYPE_MAX_VALUE.
Referenced by merge_ranges().
Definition at line 6555 of file fold-const.c.
References flag_evaluation_order, TREE_CONSTANT, and TREE_SIDE_EFFECTS.
Definition at line 13487 of file fold-const.c.
References build_int_cst(), div(), gcc_assert, multiple_of_p(), NULL_TREE, size_binop(), size_int_type, TREE_CODE, and TREE_TYPE.
Definition at line 13443 of file fold-const.c.
References build_int_cst(), div(), gcc_assert, multiple_of_p(), NULL_TREE, size_binop(), size_int_type, TREE_CODE, and TREE_TYPE.
| void rrotate_double | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| HOST_WIDE_INT | count, | |||
| unsigned int | prec, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv | |||
| ) |
Definition at line 563 of file fold-const.c.
References HOST_WIDE_INT, lshift_double(), and rshift_double().
| void rshift_double | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| HOST_WIDE_INT | count, | |||
| unsigned int | prec, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv, | |||
| int | arith | |||
| ) |
Definition at line 480 of file fold-const.c.
References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, and SHIFT_COUNT_TRUNCATED.
Definition at line 3752 of file fold-const.c.
References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, INTEGRAL_TYPE_P, lo, NULL_TREE, sign_bit_p(), TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_TYPE, and TYPE_PRECISION.
| static int simple_operand_p | ( | tree | exp | ) | [static] |
Definition at line 3807 of file fold-const.c.
References CONSTANT_CLASS_P, DECL_EXTERNAL, DECL_NONLOCAL, DECL_P, DECL_REGISTER, SSA_NAME, STRIP_NOPS, TREE_ADDRESSABLE, TREE_CODE, TREE_PUBLIC, TREE_STATIC, and TREE_THIS_VOLATILE.
Definition at line 1882 of file fold-const.c.
References abort, build(), error_mark_node, fold(), fold_build2, gcc_assert, int_const_binop(), integer_onep(), integer_zerop(), TREE_CODE, TREE_TYPE, and TYPE_IS_SIZETYPE.
Definition at line 1916 of file fold-const.c.
References abort, bitsizetype, build_int_cst(), convert(), fold_convert(), gcc_assert, integer_zero_node, sbitsizetype, size_binop(), ssizetype, TREE_CODE, tree_int_cst_equal(), tree_int_cst_lt(), TREE_TYPE, TREE_UNSIGNED, TYPE_IS_SIZETYPE, TYPE_UNSIGNED, and ubitsizetype.
| tree size_int_kind | ( | HOST_WIDE_INT | number, | |
| enum size_type_kind | kind | |||
| ) |
| static tree split_address_to_core_and_offset | ( | tree | exp, | |
| HOST_WIDE_INT * | pbitpos, | |||
| tree * | poffset | |||
| ) | [static] |
Definition at line 13531 of file fold-const.c.
References build_fold_addr_expr(), get_inner_reference(), HOST_WIDE_INT, mode, NULL_TREE, TREE_CODE, and TREE_OPERAND.
| static tree split_tree | ( | tree | in, | |
| enum tree_code | code, | |||
| tree * | conp, | |||
| tree * | litp, | |||
| tree * | minus_litp, | |||
| int | negate_p | |||
| ) | [static] |
Definition at line 1400 of file fold-const.c.
References FLOAT_TYPE_P, negate_expr(), STRIP_SIGN_NOPS, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, and TREE_TYPE.
| int tree_expr_nonnegative_p | ( | tree | t | ) |
Definition at line 12685 of file fold-const.c.
References fold_overflow_warning(), rtl_expr_nonnegative_p(), RTL_EXPR_RTL, TREE_CODE, tree_expr_nonnegative_p(), tree_expr_nonnegative_warnv_p(), tree_int_cst_sgn(), TREE_OPERAND, truth_value_p(), and WARN_STRICT_OVERFLOW_MISC.
Definition at line 12385 of file fold-const.c.
References BIND_EXPR_BODY, BUILT_IN_NORMAL, CASE_FLT_FN, CASE_INT_FN, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, error_mark_node, expr_last(), FLOAT_TYPE_P, get_callee_fndecl(), HONOR_SIGNED_ZEROS, INTEGRAL_TYPE_P, MAX, operand_equal_p(), REAL_VALUE_NEGATIVE, SSA_NAME, ssa_name_nonnegative_p(), TARGET_EXPR_INITIAL, TARGET_EXPR_SLOT, TREE_CHAIN, TREE_CODE, tree_expr_nonnegative_warnv_p(), tree_int_cst_sgn(), TREE_OPERAND, TREE_REAL_CST, TREE_TYPE, TREE_VALUE, truth_value_p(), TYPE_MODE, TYPE_OVERFLOW_UNDEFINED, TYPE_PRECISION, TYPE_UNSIGNED, and VOID_TYPE_P.
Referenced by build_binary_op(), build_conditional_expr(), create_iv(), fold_binary(), tree_expr_nonnegative_p(), tree_expr_nonnegative_warnv_p(), tree_expr_nonzero_warnv_p(), and vrp_expr_computes_nonnegative().
Definition at line 12884 of file fold-const.c.
References base, CONSTANT_CLASS_P, DECL_P, DECL_WEAK, fold_overflow_warning(), get_base_address(), INTEGRAL_TYPE_P, POINTER_TYPE_P, TREE_CODE, tree_expr_nonnegative_p(), tree_expr_nonzero_warnv_p(), TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_TYPE, TYPE_PRECISION, TYPE_UNSIGNED, and WARN_STRICT_OVERFLOW_MISC.
Referenced by fold(), and fold_binary().
Definition at line 12709 of file fold-const.c.
References alloca_call_p(), base, CONSTANT_CLASS_P, DECL_WEAK, get_base_address(), INTEGRAL_TYPE_P, POINTER_TYPE_P, SSA_NAME, ssa_name_nonzero_p(), TREE_CODE, tree_expr_nonnegative_warnv_p(), tree_expr_nonzero_warnv_p(), TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_TYPE, TYPE_OVERFLOW_UNDEFINED, TYPE_PRECISION, and VAR_OR_FUNCTION_DECL_P.
Referenced by extract_range_from_unary_expr(), tree_expr_nonzero_p(), tree_expr_nonzero_warnv_p(), and vrp_expr_computes_nonzero().
Definition at line 6571 of file fold-const.c.
References DECL_P, flag_evaluation_order, optimize_size, SSA_NAME, SSA_NAME_VERSION, STRIP_SIGN_NOPS, TREE_CODE, TREE_CONSTANT, and TREE_SIDE_EFFECTS.
| static int truth_value_p | ( | enum tree_code | code | ) | [static] |
Definition at line 6774 of file fold-const.c.
References array_ref_element_size(), copy_node, div_if_zero_remainder(), fold_build1, fold_build2, fold_convert(), handled_component_p(), integer_one_node, NULL_TREE, pos(), ret, s, step(), STRIP_NOPS, tmp, TREE_CODE, tree_int_cst_equal(), TREE_OPERAND, TREE_TYPE, and TYPE_DOMAIN.
Definition at line 2972 of file fold-const.c.
References operand_equal_p(), tcc_binary, tcc_comparison, tcc_constant, tcc_expression, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_SIDE_EFFECTS, and twoval_comparison_p().
Definition at line 4948 of file fold-const.c.
References const_binop(), fold_convert(), GET_MODE_BITSIZE, size_int, TREE_TYPE, TYPE_MODE, and TYPE_UNSIGNED.
enum warn_strict_overflow_code fold_deferred_overflow_code [static] |
Definition at line 906 of file fold-const.c.
Referenced by fold_overflow_warning(), and fold_undefer_overflow_warnings().
const char* fold_deferred_overflow_warning [static] |
Definition at line 901 of file fold-const.c.
Referenced by fold_overflow_warning(), and fold_undefer_overflow_warnings().
int fold_deferring_overflow_warnings [static] |
Definition at line 894 of file fold-const.c.
Referenced by fold_defer_overflow_warnings(), fold_deferring_overflow_warnings_p(), fold_overflow_warning(), and fold_undefer_overflow_warnings().
| int folding_initializer = 0 |
| int pedantic_lvalues |
Definition at line 2325 of file fold-const.c.
1.5.6