#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 "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 162 of file fold-const.c.
| #define CASE_BUILTIN_F | ( | BUILT_IN_FN | ) | case BUILT_IN_FN: case BUILT_IN_FN##F: case BUILT_IN_FN##L: |
Referenced by tree_expr_nonnegative_p().
| #define CASE_BUILTIN_I | ( | BUILT_IN_FN | ) | case BUILT_IN_FN: case BUILT_IN_FN##L: case BUILT_IN_FN##LL: |
Referenced by tree_expr_nonnegative_p().
| #define HIGHPART | ( | x | ) | ((unsigned HOST_WIDE_INT) (x) >> HOST_BITS_PER_WIDE_INT / 2) |
Definition at line 160 of file fold-const.c.
| #define LOGICAL_OP_NON_SHORT_CIRCUIT (BRANCH_COST >= 2) |
Definition at line 4447 of file fold-const.c.
| #define LOWPART | ( | x | ) | ((x) & (((unsigned HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) - 1)) |
Definition at line 158 of file fold-const.c.
| #define OP_SAME | ( | N | ) |
Value:
operand_equal_p (TREE_OPERAND (arg0, N), \ TREE_OPERAND (arg1, N), flags)
Referenced by operand_equal_p().
| #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))
Referenced by operand_equal_p().
Definition at line 151 of file fold-const.c.
| enum comparison_code |
Definition at line 69 of file fold-const.c.
| int add_double | ( | 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 | |||
| ) |
| static int all_ones_mask_p | ( | tree | mask, | |
| int | size | |||
| ) | [static] |
Definition at line 3380 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 1254 of file fold-const.c.
References build2, fold(), fold_convert(), integer_zerop(), TREE_CODE, and TREE_OPERAND.
Definition at line 11505 of file fold-const.c.
Referenced by create_coverage(), cxx_omp_clause_apply_fn(), declare_return_variable(), determine_base_object(), expand_call_inline(), expand_complex_libcall(), expand_omp_for_generic(), expand_parallel_call(), extract_array_ref(), find_interesting_uses_address(), fold_comparison(), fold_unary(), gimplify_addr_expr(), gimplify_cond_expr(), gimplify_expr(), gimplify_modify_expr_to_memcpy(), gimplify_modify_expr_to_memset(), gimplify_variable_sized_compare(), GTY(), initialize_argument_information(), lower_copyprivate_clauses(), lower_omp_parallel(), lower_omp_single_copy(), lower_reduction_clauses(), lower_send_clauses(), lower_send_shared_vars(), make_tree(), object_analysis(), rs6000_gimplify_va_arg(), sparc_gimplify_va_arg(), split_address_to_core_and_offset(), strip_offset_1(), tree_to_aff_combination(), and vect_object_analysis().
Definition at line 11475 of file fold-const.c.
Referenced by build_fold_addr_expr(), gimplify_va_arg_expr(), issue_prefetch_ref(), lower_rec_input_clauses(), and stabilize_va_list().
Definition at line 11564 of file fold-const.c.
Referenced by alpha_gimplify_va_arg(), alpha_gimplify_va_arg_1(), build_outer_var_ref(), build_receiver_ref(), build_va_arg_indirect_ref(), c4x_gimplify_va_arg_expr(), declare_return_variable(), expand_builtin_sincos(), fold_binary(), fold_indirect_ref_1(), gimplify_cond_expr(), gimplify_decl_expr(), gimplify_omp_atomic_mutex(), gimplify_omp_atomic_pipeline(), gimplify_parameters(), hppa_gimplify_va_arg_expr(), i860_gimplify_va_arg_expr(), lower_copyprivate_clauses(), lower_lastprivate_clauses(), lower_rec_input_clauses(), lower_reduction_clauses(), mips_gimplify_va_arg_expr(), setup_one_parameter(), sh_gimplify_va_arg_expr(), stabilize_va_list(), vect_compute_data_ref_alignment(), vect_create_addr_base_for_vector_ref(), vect_create_data_ref_ptr(), vectorizable_load(), vectorizable_store(), xstormy16_expand_builtin_va_arg(), and xtensa_gimplify_va_arg_expr().
Definition at line 3857 of file fold-const.c.
References build2, build_range_check(), const_binop(), fold(), fold_convert(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, integer_one_node, integer_onep(), integer_type_node, integer_zero_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_PRECISION, and TYPE_UNSIGNED.
Definition at line 1873 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.
Referenced by fold_convert().
| 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 2259 of file fold-const.c.
References build2, 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(), HONOR_NANS, NULL_TREE, TREE_TYPE, and TYPE_MODE.
Referenced by fold_truthop().
| static enum comparison_code comparison_to_compcode | ( | enum tree_code | code | ) | [static] |
Definition at line 2173 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 2215 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 1478 of file fold-const.c.
References build_complex(), build_real(), const_binop(), d1, d2, dconst0, flag_trapping_math, flag_unsafe_math_optimizations, gcc_unreachable, 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_ISNAN, REAL_VALUE_TYPE, REAL_VALUES_EQUAL, result, STRIP_NOPS, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_IMAGPART, TREE_OVERFLOW, TREE_REAL_CST, TREE_REALPART, TREE_TYPE, and TYPE_MODE.
Definition at line 5419 of file fold-const.c.
| 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 3308 of file fold-const.c.
References build2, build_int_cst(), const_binop(), fold(), 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 3048 of file fold-const.c.
References build2, fold(), operand_equal_p(), TREE_CODE, and TREE_OPERAND.
| 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 575 of file fold-const.c.
References add_double, BASE, carry, decode, is::den, encode(), gcc_unreachable, HIGHPART, HOST_WIDE_INT, i, LOWPART, memset, mul_double, neg_double(), overflow, and tmp.
| static void encode | ( | HOST_WIDE_INT * | words, | |
| unsigned HOST_WIDE_INT | low, | |||
| HOST_WIDE_INT | hi | |||
| ) | [static] |
Definition at line 2786 of file fold-const.c.
References build1, build2, build3, eval_subst(), fold(), operand_equal_p(), tcc_binary, tcc_comparison, tcc_expression, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, and TREE_TYPE.
Definition at line 5435 of file fold-const.c.
References build_fold_addr_expr(), NULL_TREE, STRIP_NOPS, TREE_CODE, and TREE_OPERAND.
Referenced by extract_array_ref(), fold(), and fold_comparison().
Definition at line 5132 of file fold-const.c.
References BINARY_CLASS_P, build1, build2, COMPARISON_CLASS_P, const_binop(), EXPRESSION_CLASS_P, extract_muldiv(), fold(), 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_PRECISION, TYPE_UNSIGNED, and UNARY_CLASS_P.
Definition at line 6674 of file fold-const.c.
References and, associate_trees(), BINARY_CLASS_P, BITS_PER_WORD, boolean_type_node, build1, build2, build3, build_complex(), 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, change, char_type_node, commutative_tree_code(), compare_tree_int(), COMPARISON_CLASS_P, COMPLEX_TYPE, const_binop(), constant_boolean_node(), CONSTRUCTOR_ELTS, copy_node, dconst0, dconst1, dconst2, DECL_ATTRIBUTES, DECL_BIT_FIELD, DECL_BUILT_IN, DECL_BUILT_IN_CLASS, DECL_EXTERNAL, DECL_FUNCTION_CODE, DECL_INITIAL, DECL_P, DECL_SIZE, DECL_WEAK, distribute_bit_expr(), END_BUILTINS, equal, eval_subst(), exact_log2, exact_real_inverse(), extract_array_ref(), extract_muldiv(), flag_errno_math, flag_syntax_only, flag_trapping_math, flag_trapv, flag_unsafe_math_optimizations, FLOAT_TYPE_P, fold(), fold_abs_const(), fold_binary_op_with_conditional_arg(), fold_builtin(), fold_complex_add(), fold_complex_div(), fold_complex_mult(), fold_cond_expr_with_comparison(), fold_convert(), fold_convert_const(), fold_div_compare(), fold_inf_compare(), fold_mathfn_compare(), fold_negate_const(), fold_not_const(), fold_range_test(), fold_real_zero_addition_p(), fold_relational_const(), fold_sign_changed_comparison(), fold_single_bit_test(), fold_strip_sign_ops(), fold_to_nonsharp_ineq_using_bound(), fold_truthop(), fold_widened_comparison(), force_fit_type(), gcc_unreachable, get_callee_fndecl(), GET_MODE_BITSIZE, high, HONOR_NANS, HONOR_SIGNED_ZEROS, HONOR_SNANS, HOST_BITS_PER_WIDE_INT, host_integerp(), HOST_WIDE_INT, i, in_gimple_form, 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, len, LOAD_EXTEND_OP, lookup_attribute(), low, mathfn_built_in(), MODE_HAS_INFINITIES, multiple_of_p(), negate_expr(), negate_expr_p(), non_lvalue(), NULL_TREE, OEP_ONLY_CONST, omit_one_operand(), operand_equal_for_comparison_p(), operand_equal_p(), optimize, optimize_bit_field_compare(), optimize_minmax_comparison(), optimize_size, pedantic_non_lvalue(), pedantic_omit_one_operand(), POINTER_TYPE_P, prev, ptr_difference_const(), purpose_member(), r, real_arithmetic(), real_minus_onep(), real_onep(), REAL_VALUE_ISINF, REAL_VALUE_ISNAN, REAL_VALUE_MINUS_ZERO, REAL_VALUE_NEGATE, REAL_VALUE_NEGATIVE, REAL_VALUE_TYPE, real_zerop(), reorder_operands_p(), s0, s1, same, save_expr(), SCALAR_FLOAT_TYPE_P, shift, sign_bit_p(), size, split_tree(), strip_float_extensions(), STRIP_NOPS, STRIP_SIGN_NOPS, swap_tree_comparison(), t1, tcc_binary, tcc_comparison, tcc_constant, tcc_unary, tmp, TREE_CHAIN, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_LENGTH, tree_cons, TREE_CONSTANT, TREE_CONSTANT_OVERFLOW, tree_expr_nonnegative_p(), tree_expr_nonzero_p(), TREE_IMAGPART, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, tree_int_cst_lt(), tree_int_cst_sgn(), TREE_INVARIANT, tree_log2(), tree_low_cst(), TREE_NO_WARNING, TREE_OPERAND, TREE_OVERFLOW, TREE_REAL_CST, TREE_REALPART, TREE_SIDE_EFFECTS, tree_swap_operands_p(), TREE_TYPE, TREE_USED, TREE_VALUE, truth_value_p(), try_move_mult_to_index(), twoval_comparison_p(), type_contains_placeholder_p(), TYPE_MAIN_VARIANT, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_PRECISION, TYPE_SIZE, TYPE_UNSIGNED, and VOID_TYPE_P.
Definition at line 11275 of file fold-const.c.
Referenced by fold(), fold_builtin_abs(), fold_builtin_fabs(), fold_unary(), and fold_unary_to_constant().
| static tree fold_binary_op_with_conditional_arg | ( | tree | t, | |
| enum tree_code | code, | |||
| tree | cond, | |||
| tree | arg, | |||
| int | cond_first_p | |||
| ) | [static] |
Definition at line 5490 of file fold-const.c.
References build2, build3, constant_boolean_node(), fold(), fold_convert(), NULL_TREE, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, TREE_TYPE, true_value, and VOID_TYPE_P.
Definition at line 10820 of file fold-const.c.
Referenced by ccp_fold(), fold_relational_hi_lo(), idx_find_step(), inverse(), maybe_fold_tmr(), number_of_iterations_cond(), number_of_iterations_ne(), and value_inside_range().
Definition at line 11446 of file fold-const.c.
Referenced by condition_conversion(), maybe_cleanup_point_expr(), and maybe_cleanup_point_expr_void().
Definition at line 6371 of file fold-const.c.
References br, build2, fold(), NULL, rr, TREE_CODE, TREE_IMAGPART, TREE_OPERAND, TREE_REALPART, and TREE_TYPE.
Referenced by fold().
Definition at line 6639 of file fold-const.c.
References br, fold_complex_div_parts(), NULL, TREE_CODE, TREE_IMAGPART, TREE_OPERAND, and TREE_REALPART.
Referenced by fold().
Definition at line 6540 of file fold-const.c.
References build1, build2, dconst0, dconst1, fold(), integer_onep(), integer_zerop(), NULL, REAL_VALUES_IDENTICAL, rr, SCALAR_FLOAT_TYPE_P, TREE_CODE, TREE_REAL_CST, TREE_TYPE, and zero.
Referenced by fold_builtin_complex_div(), and fold_complex_div().
Definition at line 6515 of file fold-const.c.
References br, fold_complex_mult_parts(), NULL, TREE_CODE, TREE_IMAGPART, TREE_OPERAND, and TREE_REALPART.
Referenced by fold().
Definition at line 6401 of file fold-const.c.
References build1, build2, dconst0, dconst1, fold(), integer_onep(), integer_zerop(), NULL, REAL_VALUES_IDENTICAL, rr, SCALAR_FLOAT_TYPE_P, TREE_CODE, TREE_REAL_CST, TREE_TYPE, and zero.
Referenced by fold_builtin_complex_mul(), and fold_complex_mult().
Definition at line 4186 of file fold-const.c.
References build1, build2, build3, const_binop(), flag_trapping_math, FLOAT_TYPE_P, fold(), fold_convert(), gcc_assert, gcc_unreachable, HONOR_NANS, in_gimple_form, integer_one_node, integer_zero_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.
Referenced by fold(), and fold_ternary().
Definition at line 1891 of file fold-const.c.
Definition at line 1848 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.
Referenced by build_zero_vector(), fold(), fold_convert(), fold_unary(), and fold_unary_to_constant().
Definition at line 1712 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.
Referenced by fold_convert_const().
Definition at line 1738 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.
Referenced by fold_convert_const().
Definition at line 1830 of file fold-const.c.
References build_real(), real_convert(), REAL_VALUE_TYPE, TREE_CONSTANT_OVERFLOW, TREE_OVERFLOW, TREE_REAL_CST, and TYPE_MODE.
Referenced by fold_convert_const().
Definition at line 5807 of file fold-const.c.
References add_double, build2, build_int_cst_wide(), build_range_check(), fold(), fold_negate_const(), force_fit_type(), gcc_unreachable, HOST_WIDE_INT, int_const_binop(), integer_one_node, integer_zero_node, lo, mul_double, 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.
Referenced by fold(), and fold_comparison().
Definition at line 11592 of file fold-const.c.
Referenced by ccp_fold_builtin(), fold_convert(), omit_one_operand(), and pedantic_omit_one_operand().
Definition at line 11577 of file fold-const.c.
Referenced by find_interesting_uses_address(), gimplify_compound_lval(), gimplify_expr(), and gimplify_modify_expr_rhs().
Definition at line 11514 of file fold-const.c.
References build4, build_fold_indirect_ref(), NULL_TREE, POINTER_TYPE_P, size_zero_node, STRIP_NOPS, sub, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_DOMAIN, and TYPE_MIN_VALUE.
Referenced by build_fold_indirect_ref(), copy_body_r(), and fold_indirect_ref().
Definition at line 5723 of file fold-const.c.
References build1, build2, build_real(), CONTAINS_PLACEHOLDER_P, fold(), 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.
Referenced by fold(), and fold_comparison().
Definition at line 10138 of file fold-const.c.
References flag_signaling_nans, flag_trapping_math, flag_trapv, fold(), and result.
Referenced by build_binary_op(), build_function_call(), and build_unary_op().
| static tree fold_mathfn_compare | ( | enum built_in_function | fcode, | |
| enum tree_code | code, | |||
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 5598 of file fold-const.c.
References build2, build_real(), BUILTIN_SQRT_P, c, CONTAINS_PLACEHOLDER_P, dconst0, fold(), 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.
Referenced by fold(), and fold_comparison().
Definition at line 11237 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.
Referenced by fold(), fold_binary(), fold_div_compare(), fold_negate_expr(), fold_unary_to_constant(), and negate_expr().
Definition at line 11322 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.
Referenced by fold(), fold_unary(), and fold_unary_to_constant().
Definition at line 4455 of file fold-const.c.
References build2, build_range_check(), CONTAINS_PLACEHOLDER_P, 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(), TREE_CODE, TREE_OPERAND, and TREE_TYPE.
Definition at line 11187 of file fold-const.c.
Referenced by expand_expr_real_1(), fold_indirect_ref_1(), fold_stmt_r(), maybe_fold_stmt_indirect(), and simplify_rhs_and_lookup_avail_expr().
Definition at line 5561 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 11343 of file fold-const.c.
References constant_boolean_node(), flag_trapping_math, 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_int_cst_equal(), TREE_REAL_CST_PTR, TREE_TYPE, and TYPE_UNSIGNED.
Referenced by fold(), fold_binary(), fold_binary_to_constant(), fold_comparison(), fold_relational_const(), and fold_widened_comparison().
| static tree fold_relational_hi_lo | ( | enum tree_code * | code_p, | |
| const tree | type, | |||
| tree * | op0_p, | |||
| tree * | op1_p | |||
| ) | [static] |
Definition at line 10662 of file fold-const.c.
References build2, const_binop(), exp, fold_binary_to_constant(), fold_convert(), GET_MODE_BITSIZE, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, in_gimple_form, integer_one_node, integer_zero_node, INTEGRAL_TYPE_P, max, min, NULL, NULL_TREE, omit_one_operand(), POINTER_TYPE_P, TREE_CODE, TREE_CONSTANT_OVERFLOW, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_TYPE, TYPE_MODE, and TYPE_UNSIGNED.
Referenced by fold_binary_to_constant().
| static tree fold_sign_changed_comparison | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 6191 of file fold-const.c.
References build2, build_int_cst_wide(), fold(), 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.
Referenced by fold(), and fold_comparison().
Definition at line 11805 of file fold-const.c.
Referenced by fold(), fold_binary(), fold_builtin_copysign(), fold_builtin_pow(), fold_strip_sign_ops(), and fold_unary().
Definition at line 6327 of file fold-const.c.
References a, a1, build2, fold(), integer_onep(), INTEGRAL_TYPE_P, NULL_TREE, POINTER_TYPE_P, TREE_CODE, TREE_OPERAND, TREE_TYPE, and is::y.
Referenced by fold(), and fold_binary().
Definition at line 4588 of file fold-const.c.
References all_ones_mask_p(), BRANCH_COST, build1, build2, BYTES_BIG_ENDIAN, combine_comparisons(), const_binop(), constant_boolean_node(), decode_field_reference(), FLOAT_TYPE_P, fold(), fold_convert(), get_best_mode(), GET_MODE_BITSIZE, HOST_WIDE_INT, integer_onep(), integer_pow2p(), integer_zero_node, integer_zerop(), LOGICAL_OP_NON_SHORT_CIRCUIT, make_bit_field_ref(), MAX, MIN, 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 11114 of file fold-const.c.
Referenced by ccp_fold(), compare_values_warnv(), extract_range_from_unary_expr(), and number_of_iterations_cond().
| static tree fold_widened_comparison | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| tree | arg1 | |||
| ) | [static] |
Definition at line 6102 of file fold-const.c.
References above, build(), fold(), 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().
Referenced by fold(), and fold_comparison().
Definition at line 205 of file fold-const.c.
Definition at line 1298 of file fold-const.c.
Definition at line 2923 of file fold-const.c.
References build1, build2, build3, constant_boolean_node(), flag_trapping_math, FLOAT_TYPE_P, fold_convert(), gcc_assert, HONOR_NANS, integer_onep(), integer_zero_node, integer_zerop(), invert_tree_comparison(), invert_truthvalue(), tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_TYPE, and TYPE_MODE.
| 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 526 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 403 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 3094 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.
Definition at line 3582 of file fold-const.c.
References build2, fold(), 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_PRECISION, and TYPE_UNSIGNED.
Definition at line 2018 of file fold-const.c.
References NUM_TREE_CODES, SSA_NAME, and TREE_CODE.
Referenced by fold_cond_expr_with_comparison(), and non_lvalue().
| 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 3979 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(), TREE_CODE, tree_int_cst_equal(), TREE_TYPE, TYPE_MAX_VALUE, TYPE_MIN_VALUE, TYPE_MODE, TYPE_PRECISION, and TYPE_UNSIGNED.
| int mul_double | ( | 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 | |||
| ) |
Definition at line 342 of file fold-const.c.
References add_double, carry, decode, encode(), gcc_assert, HIGHPART, HOST_WIDE_INT, i, LOWPART, memset, and neg_double().
Definition at line 10202 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.
| int neg_double | ( | unsigned HOST_WIDE_INT | l1, | |
| HOST_WIDE_INT | h1, | |||
| unsigned HOST_WIDE_INT * | lv, | |||
| HOST_WIDE_INT * | hv | |||
| ) |
Definition at line 318 of file fold-const.c.
Definition at line 1000 of file fold-const.c.
References build1, build2, build_complex(), build_function_call_expr(), build_tree_list, builtin_mathfn_code(), flag_trapping_math, flag_trapv, flag_unsafe_math_optimizations, FLOAT_TYPE_P, fold(), fold_convert(), fold_negate_const(), get_callee_fndecl(), HONOR_SIGN_DEPENDENT_ROUNDING, HOST_WIDE_INT, negate_expr(), negate_expr_p(), negate_mathfn_p(), NULL_TREE, reorder_operands_p(), strip_float_extensions(), STRIP_SIGN_NOPS, TREE_CODE, TREE_IMAGPART, TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_OVERFLOW, TREE_REALPART, TREE_TYPE, TREE_VALUE, TYPE_MODE, TYPE_PRECISION, and TYPE_UNSIGNED.
Definition at line 906 of file fold-const.c.
References builtin_mathfn_code(), flag_trapv, flag_unsafe_math_optimizations, FLOAT_TYPE_P, HONOR_SIGN_DEPENDENT_ROUNDING, HOST_WIDE_INT, may_negate_without_overflow_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_PRECISION, and TYPE_UNSIGNED.
Referenced by fold(), fold_binary(), fold_negate_expr(), negate_expr(), and negate_expr_p().
| static bool negate_mathfn_p | ( | enum built_in_function | code | ) | [static] |
Definition at line 847 of file fold-const.c.
Referenced by fold_negate_expr(), negate_expr(), and negate_expr_p().
Definition at line 2068 of file fold-const.c.
References build1, in_gimple_form, maybe_lvalue_p(), and TREE_TYPE.
Definition at line 2870 of file fold-const.c.
Definition at line 2903 of file fold-const.c.
Referenced by fold_binary(), fold_builtin_memcmp(), fold_builtin_strncat(), fold_builtin_strncmp(), fold_builtin_strspn(), and fold_builtin_unordered_cmp().
Definition at line 2633 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 2374 of file fold-const.c.
| static tree optimize_bit_field_compare | ( | enum tree_code | code, | |
| tree | compare_type, | |||
| tree | lhs, | |||
| tree | rhs | |||
| ) | [static] |
Definition at line 3138 of file fold-const.c.
References build2, build_int_cst(), BYTES_BIG_ENDIAN, const_binop(), constant_boolean_node(), fold(), fold_convert(), force_fit_type(), get_best_mode(), get_inner_reference(), GET_MODE_BITSIZE, HOST_WIDE_INT, integer_all_onesp(), integer_zero_node, 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.
Definition at line 5000 of file fold-const.c.
References build2, comp_const(), fold(), integer_one_node, integer_zero_node, invert_truthvalue(), omit_one_operand(), optimize_minmax_comparison(), STRIP_SIGN_NOPS, TREE_CODE, TREE_CONSTANT_OVERFLOW, tree_int_cst_equal(), tree_int_cst_lt(), TREE_OPERAND, and TREE_TYPE.
Definition at line 2883 of file fold-const.c.
References build2, fold_convert(), fold_ignored_result(), pedantic_non_lvalue(), and TREE_SIDE_EFFECTS.
Definition at line 11761 of file fold-const.c.
Referenced by fold(), fold_binary(), and ptr_difference_cost().
| static tree range_binop | ( | enum tree_code | code, | |
| tree | type, | |||
| tree | arg0, | |||
| int | upper0_p, | |||
| tree | arg1, | |||
| int | upper1_p | |||
| ) | [static] |
Definition at line 3517 of file fold-const.c.
References build2, constant_boolean_node(), fold(), fold_convert(), gcc_unreachable, result, STRIP_NOPS, tcc_comparison, TREE_CODE, TREE_CODE_CLASS, and TREE_TYPE.
Definition at line 6033 of file fold-const.c.
References flag_evaluation_order, TREE_CONSTANT, and TREE_SIDE_EFFECTS.
Referenced by fold(), fold_binary(), fold_minmax(), fold_negate_expr(), negate_expr(), and negate_expr_p().
Definition at line 11688 of file fold-const.c.
References build_int_cst(), div(), gcc_assert, multiple_of_p(), NULL_TREE, size_binop(), TREE_CODE, and TREE_TYPE.
Definition at line 11644 of file fold-const.c.
References build_int_cst(), div(), gcc_assert, multiple_of_p(), NULL_TREE, size_binop(), 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 548 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 465 of file fold-const.c.
References HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, and SHIFT_COUNT_TRUNCATED.
Definition at line 3405 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 3460 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 1639 of file fold-const.c.
References build2, error_mark_node, fold(), gcc_assert, int_const_binop(), integer_onep(), integer_zerop(), TREE_CODE, TREE_TYPE, and TYPE_IS_SIZETYPE.
Definition at line 1673 of file fold-const.c.
References bitsizetype, fold_convert(), gcc_assert, integer_zero_node, sbitsizetype, size_binop(), ssizetype, TREE_CODE, tree_int_cst_equal(), tree_int_cst_lt(), TREE_TYPE, TYPE_IS_SIZETYPE, and TYPE_UNSIGNED.
| tree size_int_kind | ( | HOST_WIDE_INT | number, | |
| enum size_type_kind | kind | |||
| ) |
Definition at line 1628 of file fold-const.c.
| static tree split_address_to_core_and_offset | ( | tree | exp, | |
| HOST_WIDE_INT * | pbitpos, | |||
| tree * | poffset | |||
| ) | [static] |
Definition at line 11732 of file fold-const.c.
References build_fold_addr_expr(), get_inner_reference(), HOST_WIDE_INT, mode, NULL_TREE, TREE_CODE, and TREE_OPERAND.
Referenced by ptr_difference_const().
| static tree split_tree | ( | tree | in, | |
| enum tree_code | code, | |||
| tree * | conp, | |||
| tree * | litp, | |||
| tree * | minus_litp, | |||
| int | negate_p | |||
| ) | [static] |
Definition at line 1175 of file fold-const.c.
References FLOAT_TYPE_P, negate_expr(), STRIP_SIGN_NOPS, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, and TREE_TYPE.
Definition at line 2147 of file fold-const.c.
| int tree_expr_nonnegative_p | ( | tree | t | ) |
Definition at line 10277 of file fold-const.c.
References BIND_EXPR_BODY, BUILT_IN_NORMAL, CASE_BUILTIN_F, CASE_BUILTIN_I, DECL_BUILT_IN_CLASS, DECL_FUNCTION_CODE, expr_last(), FLOAT_TYPE_P, get_callee_fndecl(), HONOR_SIGNED_ZEROS, MAX, operand_equal_p(), REAL_VALUE_NEGATIVE, TARGET_EXPR_INITIAL, TARGET_EXPR_SLOT, TREE_CHAIN, TREE_CODE, tree_expr_nonnegative_p(), tree_int_cst_sgn(), TREE_OPERAND, TREE_REAL_CST, TREE_TYPE, TREE_VALUE, truth_value_p(), TYPE_MODE, TYPE_PRECISION, TYPE_UNSIGNED, and VOID_TYPE_P.
Definition at line 10544 of file fold-const.c.
References base, CONSTANT_CLASS_P, DECL_P, DECL_WEAK, get_base_address(), INTEGRAL_TYPE_P, POINTER_TYPE_P, TREE_CODE, tree_expr_nonnegative_p(), TREE_INT_CST_HIGH, TREE_INT_CST_LOW, TREE_OPERAND, TREE_TYPE, TYPE_PRECISION, and TYPE_UNSIGNED.
Referenced by fold(), and fold_binary().
Definition at line 6049 of file fold-const.c.
Referenced by canonicalize_comparison(), fold(), fold_binary(), fold_comparison(), fold_ternary(), get_expr_operands(), and simplify_control_stmt_condition().
| static int truth_value_p | ( | enum tree_code | code | ) | [static] |
Definition at line 6249 of file fold-const.c.
References array_ref_element_size(), build1, build2, copy_node, fold(), fold_convert(), handled_component_p(), NULL_TREE, operand_equal_p(), pos(), ret, s, step(), STRIP_NOPS, TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_PRECISION.
Referenced by fold(), and fold_binary().
Definition at line 2694 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 4527 of file fold-const.c.
References const_binop(), fold_convert(), GET_MODE_BITSIZE, size_int, TREE_TYPE, TYPE_MODE, and TYPE_UNSIGNED.
| int pedantic_lvalues |
Definition at line 2083 of file fold-const.c.
1.5.6