osprey-gcc-4.2.0/gcc/fold-const.c File Reference

#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"

Include dependency graph for fold-const.c:

Go to the source code of this file.

Defines

#define OVERFLOW_SUM_SIGN(a, b, sum)   ((~((a) ^ (b)) & ((a) ^ (sum))) < 0)
#define LOWPART(x)   ((x) & (((unsigned HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) - 1))
#define HIGHPART(x)   ((unsigned HOST_WIDE_INT) (x) >> HOST_BITS_PER_WIDE_INT / 2)
#define BASE   ((unsigned HOST_WIDE_INT) 1 << HOST_BITS_PER_WIDE_INT / 2)
#define OP_SAME(N)
#define OP_SAME_WITH_NULL(N)
#define LOGICAL_OP_NON_SHORT_CIRCUIT   (BRANCH_COST >= 2)
#define START_FOLD_INIT
#define END_FOLD_INIT

Enumerations

enum  comparison_code {
  COMPCODE_FALSE = 0, COMPCODE_LT = 1, COMPCODE_EQ = 2, COMPCODE_LE = 3,
  COMPCODE_GT = 4, COMPCODE_LTGT = 5, COMPCODE_GE = 6, COMPCODE_ORD = 7,
  COMPCODE_UNORD = 8, COMPCODE_UNLT = 9, COMPCODE_UNEQ = 10, COMPCODE_UNLE = 11,
  COMPCODE_UNGT = 12, COMPCODE_NE = 13, COMPCODE_UNGE = 14, COMPCODE_TRUE = 15,
  COMPCODE_FALSE = 0, COMPCODE_LT = 1, COMPCODE_EQ = 2, COMPCODE_LE = 3,
  COMPCODE_GT = 4, COMPCODE_LTGT = 5, COMPCODE_GE = 6, COMPCODE_ORD = 7,
  COMPCODE_UNORD = 8, COMPCODE_UNLT = 9, COMPCODE_UNEQ = 10, COMPCODE_UNLE = 11,
  COMPCODE_UNGT = 12, COMPCODE_NE = 13, COMPCODE_UNGE = 14, COMPCODE_TRUE = 15
}

Functions/Subroutines

static void encode (HOST_WIDE_INT *, unsigned HOST_WIDE_INT, HOST_WIDE_INT)
static void decode (HOST_WIDE_INT *, unsigned HOST_WIDE_INT *, HOST_WIDE_INT *)
static bool negate_mathfn_p (enum built_in_function)
static bool negate_expr_p (tree)
static tree negate_expr (tree)
static tree split_tree (tree, enum tree_code, tree *, tree *, tree *, int)
static tree associate_trees (tree, tree, enum tree_code, tree)
static tree const_binop (enum tree_code, tree, tree, int)
static enum comparison_code comparison_to_compcode (enum tree_code)
static enum tree_code compcode_to_comparison (enum comparison_code)
static tree combine_comparisons (enum tree_code, enum tree_code, enum tree_code, tree, tree, tree)
static int truth_value_p (enum tree_code)
static int operand_equal_for_comparison_p (tree, tree, tree)
static int twoval_comparison_p (tree, tree *, tree *, int *)
static tree eval_subst (tree, tree, tree, tree, tree)
static tree pedantic_omit_one_operand (tree, tree, tree)
static tree distribute_bit_expr (enum tree_code, tree, tree, tree)
static tree make_bit_field_ref (tree, tree, int, int, int)
static tree optimize_bit_field_compare (enum tree_code, tree, tree, tree)
static tree decode_field_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *, enum machine_mode *, int *, int *, tree *, tree *)
static int all_ones_mask_p (tree, int)
static tree sign_bit_p (tree, tree)
static int simple_operand_p (tree)
static tree range_binop (enum tree_code, tree, tree, int, tree, int)
static tree range_predecessor (tree)
static tree range_successor (tree)
static tree make_range (tree, int *, tree *, tree *, bool *)
static tree build_range_check (tree, tree, int, tree, tree)
static int merge_ranges (int *, tree *, tree *, int, tree, tree, int, tree, tree)
static tree fold_range_test (enum tree_code, tree, tree, tree)
static tree fold_cond_expr_with_comparison (tree, tree, tree, tree)
static tree unextend (tree, int, int, tree)
static tree fold_truthop (enum tree_code, tree, tree, tree)
static tree optimize_minmax_comparison (enum tree_code, tree, tree, tree)
static tree extract_muldiv (tree, tree, enum tree_code, tree, bool *)
static tree extract_muldiv_1 (tree, tree, enum tree_code, tree, bool *)
static int multiple_of_p (tree, tree, tree)
static tree fold_binary_op_with_conditional_arg (enum tree_code, tree, tree, tree, tree, tree, int)
static bool fold_real_zero_addition_p (tree, tree, int)
static tree fold_mathfn_compare (enum built_in_function, enum tree_code, tree, tree, tree)
static tree fold_inf_compare (enum tree_code, tree, tree, tree)
static tree fold_div_compare (enum tree_code, tree, tree, tree)
static bool reorder_operands_p (tree, tree)
static tree fold_negate_const (tree, tree)
static tree fold_not_const (tree, tree)
static tree fold_relational_const (enum tree_code, tree, tree, tree)
static int native_encode_expr (tree, unsigned char *, int)
static tree native_interpret_expr (tree, unsigned char *, int)
tree force_fit_type (tree t, int overflowable, bool overflowed, bool overflowed_const)
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)
int neg_double (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1, unsigned HOST_WIDE_INT *lv, HOST_WIDE_INT *hv)
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)
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)
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)
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)
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)
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)
static tree div_if_zero_remainder (enum tree_code code, tree arg1, tree arg2)
void fold_defer_overflow_warnings (void)
void fold_undefer_overflow_warnings (bool issue, tree stmt, int code)
void fold_undefer_and_ignore_overflow_warnings (void)
bool fold_deferring_overflow_warnings_p (void)
static void fold_overflow_warning (const char *gmsgid, enum warn_strict_overflow_code wc)
bool may_negate_without_overflow_p (tree t)
static tree fold_negate_expr (tree t)
tree int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
tree size_int_kind (HOST_WIDE_INT number, enum size_type_kind kind)
tree size_binop (enum tree_code code, tree arg0, tree arg1)
tree size_diffop (tree arg0, tree arg1)
static tree fold_convert_const_int_from_int (tree type, tree arg1)
static tree fold_convert_const_int_from_real (enum tree_code code, tree type, tree arg1)
static tree fold_convert_const_real_from_real (tree type, tree arg1)
static tree fold_convert_const (enum tree_code code, tree type, tree arg1)
static tree build_zero_vector (tree type)
tree fold_convert (tree type, tree arg)
static bool maybe_lvalue_p (tree x)
tree non_lvalue (tree x)
static tree pedantic_non_lvalue (tree x)
enum tree_code invert_tree_comparison (enum tree_code code, bool honor_nans)
enum tree_code swap_tree_comparison (enum tree_code code)
int operand_equal_p (tree arg0, tree arg1, unsigned int flags)
tree omit_one_operand (tree type, tree result, tree omitted)
tree omit_two_operands (tree type, tree result, tree omitted1, tree omitted2)
tree fold_truth_not_expr (tree arg)
tree invert_truthvalue (tree arg)
static tree distribute_real_division (enum tree_code code, tree type, tree arg0, tree arg1)
tree constant_boolean_node (int value, tree type)
static bool extract_array_ref (tree expr, tree *base, tree *offset)
static tree fold_single_bit_test_into_sign_test (enum tree_code code, tree arg0, tree arg1, tree result_type)
tree fold_single_bit_test (enum tree_code code, tree arg0, tree arg1, tree result_type)
bool tree_swap_operands_p (tree arg0, tree arg1, bool reorder)
static tree fold_widened_comparison (enum tree_code code, tree type, tree arg0, tree arg1)
static tree fold_sign_changed_comparison (enum tree_code code, tree type, tree arg0, tree arg1)
static tree try_move_mult_to_index (enum tree_code code, tree addr, tree op1)
static tree fold_to_nonsharp_ineq_using_bound (tree ineq, tree bound)
static tree fold_plusminus_mult_expr (enum tree_code code, tree type, tree arg0, tree arg1)
static int native_encode_int (tree expr, unsigned char *ptr, int len)
static int native_encode_real (tree expr, unsigned char *ptr, int len)
static int native_encode_complex (tree expr, unsigned char *ptr, int len)
static int native_encode_vector (tree expr, unsigned char *ptr, int len)
static tree native_interpret_int (tree type, unsigned char *ptr, int len)
static tree native_interpret_real (tree type, unsigned char *ptr, int len)
static tree native_interpret_complex (tree type, unsigned char *ptr, int len)
static tree native_interpret_vector (tree type, unsigned char *ptr, int len)
static tree fold_view_convert_expr (tree type, tree expr)
tree fold_unary (enum tree_code code, tree type, tree op0)
static tree fold_minmax (enum tree_code code, tree type, tree op0, tree op1)
static tree fold_comparison (enum tree_code code, tree type, tree op0, tree op1)
static tree fold_mult_zconjz (tree type, tree expr)
tree fold_binary (enum tree_code code, tree type, tree op0, tree op1)
static tree contains_label_1 (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
static bool contains_label_p (tree st)
tree fold_ternary (enum tree_code code, tree type, tree op0, tree op1, tree op2)
tree fold (tree expr)
tree fold_build1_stat (enum tree_code code, tree type, tree op0 MEM_STAT_DECL)
tree fold_build2_stat (enum tree_code code, tree type, tree op0, tree op1 MEM_STAT_DECL)
tree fold_build3_stat (enum tree_code code, tree type, tree op0, tree op1, tree op2 MEM_STAT_DECL)
tree fold_build1_initializer (enum tree_code code, tree type, tree op)
tree fold_build2_initializer (enum tree_code code, tree type, tree op0, tree op1)
tree fold_build3_initializer (enum tree_code code, tree type, tree op0, tree op1, tree op2)
int tree_expr_nonnegative_warnv_p (tree t, bool *strict_overflow_p)
int tree_expr_nonnegative_p (tree t)
bool tree_expr_nonzero_warnv_p (tree t, bool *strict_overflow_p)
bool tree_expr_nonzero_p (tree t)
tree fold_binary_to_constant (enum tree_code code, tree type, tree op0, tree op1)
tree fold_unary_to_constant (enum tree_code code, tree type, tree op0)
tree fold_read_from_constant_string (tree exp)
tree fold_abs_const (tree arg0, tree type)
tree fold_build_cleanup_point_expr (tree type, tree expr)
tree build_fold_addr_expr_with_type (tree t, tree ptrtype)
tree build_fold_addr_expr (tree t)
tree fold_indirect_ref_1 (tree type, tree op0)
tree build_fold_indirect_ref (tree t)
tree fold_indirect_ref (tree t)
tree fold_ignored_result (tree t)
tree round_up (tree value, int divisor)
tree round_down (tree value, int divisor)
static tree split_address_to_core_and_offset (tree exp, HOST_WIDE_INT *pbitpos, tree *poffset)
bool ptr_difference_const (tree e1, tree e2, HOST_WIDE_INT *diff)
tree fold_strip_sign_ops (tree exp)

Variables

int folding_initializer = 0
static int fold_deferring_overflow_warnings
static const char * fold_deferred_overflow_warning
static enum
warn_strict_overflow_code 
fold_deferred_overflow_code
int pedantic_lvalues


Define Documentation

#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 (  )     ((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) & (((unsigned HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) - 1))

Definition at line 165 of file fold-const.c.

#define OP_SAME (  ) 

Value:

#define OP_SAME_WITH_NULL (  ) 

Value:

((!TREE_OPERAND (arg0, N) || !TREE_OPERAND (arg1, N)) \
   ? TREE_OPERAND (arg0, N) == TREE_OPERAND (arg1, N) : OP_SAME (N))

#define OVERFLOW_SUM_SIGN ( a,
b,
sum   )     ((~((a) ^ (b)) & ((a) ^ (sum))) < 0)

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().


Enumeration Type Documentation

Enumerator:
COMPCODE_FALSE 
COMPCODE_LT 
COMPCODE_EQ 
COMPCODE_LE 
COMPCODE_GT 
COMPCODE_LTGT 
COMPCODE_GE 
COMPCODE_ORD 
COMPCODE_UNORD 
COMPCODE_UNLT 
COMPCODE_UNEQ 
COMPCODE_UNLE 
COMPCODE_UNGT 
COMPCODE_NE 
COMPCODE_UNGE 
COMPCODE_TRUE 
COMPCODE_FALSE 
COMPCODE_LT 
COMPCODE_EQ 
COMPCODE_LE 
COMPCODE_GT 
COMPCODE_LTGT 
COMPCODE_GE 
COMPCODE_ORD 
COMPCODE_UNORD 
COMPCODE_UNLT 
COMPCODE_UNEQ 
COMPCODE_UNLE 
COMPCODE_UNGT 
COMPCODE_NE 
COMPCODE_UNGE 
COMPCODE_TRUE 

Definition at line 74 of file fold-const.c.


Function Documentation

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]

static tree associate_trees ( tree  t1,
tree  t2,
enum tree_code  code,
tree  type 
) [static]

Definition at line 1479 of file fold-const.c.

References build2, fold_build2, fold_convert(), integer_zerop(), TREE_CODE, and TREE_OPERAND.

tree build_fold_addr_expr ( tree  t  ) 

Definition at line 13270 of file fold-const.c.

References build_fold_addr_expr_with_type(), build_pointer_type(), and TREE_TYPE.

tree build_fold_addr_expr_with_type ( tree  t,
tree  ptrtype 
)

tree build_fold_indirect_ref ( tree  t  ) 

Definition at line 13362 of file fold-const.c.

References build1, fold_indirect_ref_1(), sub, and TREE_TYPE.

static tree build_range_check ( tree  type,
tree  exp,
int  in_p,
tree  low,
tree  high 
) [static]

static tree build_zero_vector ( tree  type  )  [static]

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]

static enum comparison_code comparison_to_compcode ( enum tree_code  code  )  [static]

static enum tree_code compcode_to_comparison ( enum comparison_code  code  )  [static]

static tree const_binop ( enum tree_code  code,
tree  arg1,
tree  arg2,
int  notrunc 
) [static]

tree constant_boolean_node ( int  value,
tree  type 
)

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().

static bool contains_label_p ( tree  st  )  [static]

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]

static tree distribute_bit_expr ( enum tree_code  code,
tree  type,
tree  arg0,
tree  arg1 
) [static]

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]

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 
)

static tree div_if_zero_remainder ( enum tree_code  code,
tree  arg1,
tree  arg2 
) [static]

static void encode ( HOST_WIDE_INT *  words,
unsigned HOST_WIDE_INT  low,
HOST_WIDE_INT  hi 
) [static]

Definition at line 176 of file fold-const.c.

References HIGHPART, and LOWPART.

static tree eval_subst ( tree  arg,
tree  old0,
tree  new0,
tree  old1,
tree  new1 
) [static]

static bool extract_array_ref ( tree  expr,
tree base,
tree offset 
) [static]

static tree extract_muldiv ( tree  t,
tree  c,
enum tree_code  code,
tree  wide_type,
bool strict_overflow_p 
) [static]

Definition at line 5546 of file fold-const.c.

References extract_muldiv_1(), NULL, and ret.

static tree extract_muldiv_1 ( tree  t,
tree  c,
enum tree_code  code,
tree  wide_type,
bool strict_overflow_p 
) [static]

tree fold ( tree  expr  ) 

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.

tree fold_abs_const ( tree  arg0,
tree  type 
)

tree fold_binary ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
)

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]

tree fold_binary_to_constant ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
)

tree fold_build1_initializer ( enum tree_code  code,
tree  type,
tree  op 
)

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().

tree fold_build1_stat ( enum tree_code  code,
tree  type,
tree op0  MEM_STAT_DECL 
)

tree fold_build2_initializer ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
)

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().

tree fold_build2_stat ( enum tree_code  code,
tree  type,
tree  op0,
tree op1  MEM_STAT_DECL 
)

tree fold_build3_initializer ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1,
tree  op2 
)

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 
)

tree fold_build_cleanup_point_expr ( tree  type,
tree  expr 
)

Definition at line 13211 of file fold-const.c.

References build1, TREE_CODE, TREE_OPERAND, and TREE_SIDE_EFFECTS.

static tree fold_comparison ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
) [static]

static tree fold_cond_expr_with_comparison ( tree  type,
tree  arg0,
tree  arg1,
tree  arg2 
) [static]

tree fold_convert ( tree  type,
tree  arg 
)

static tree fold_convert_const ( enum tree_code  code,
tree  type,
tree  arg1 
) [static]

static tree fold_convert_const_int_from_int ( tree  type,
tree  arg1 
) [static]

static tree fold_convert_const_int_from_real ( enum tree_code  code,
tree  type,
tree  arg1 
) [static]

static tree fold_convert_const_real_from_real ( tree  type,
tree  arg1 
) [static]

void fold_defer_overflow_warnings ( void   ) 

bool fold_deferring_overflow_warnings_p ( void   ) 

Definition at line 976 of file fold-const.c.

References fold_deferring_overflow_warnings.

Referenced by verify_interpass_invariants().

static tree fold_div_compare ( enum tree_code  code,
tree  type,
tree  arg0,
tree  arg1 
) [static]

tree fold_ignored_result ( tree  t  ) 

tree fold_indirect_ref ( tree  t  ) 

Definition at line 13376 of file fold-const.c.

References fold_indirect_ref_1(), sub, TREE_OPERAND, and TREE_TYPE.

tree fold_indirect_ref_1 ( tree  type,
tree  op0 
)

static tree fold_inf_compare ( enum tree_code  code,
tree  type,
tree  arg0,
tree  arg1 
) [static]

static tree fold_mathfn_compare ( enum built_in_function  fcode,
enum tree_code  code,
tree  type,
tree  arg0,
tree  arg1 
) [static]

static tree fold_minmax ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
) [static]

static tree fold_mult_zconjz ( tree  type,
tree  expr 
) [static]

static tree fold_negate_const ( tree  arg0,
tree  type 
) [static]

static tree fold_negate_expr ( tree  t  )  [static]

static tree fold_not_const ( tree  arg0,
tree  type 
) [static]

static void fold_overflow_warning ( const char *  gmsgid,
enum warn_strict_overflow_code  wc 
) [static]

static tree fold_plusminus_mult_expr ( enum tree_code  code,
tree  type,
tree  arg0,
tree  arg1 
) [static]

static tree fold_range_test ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
) [static]

tree fold_read_from_constant_string ( tree  exp  ) 

static bool fold_real_zero_addition_p ( tree  type,
tree  addend,
int  negate 
) [static]

static tree fold_relational_const ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
) [static]

static tree fold_sign_changed_comparison ( enum tree_code  code,
tree  type,
tree  arg0,
tree  arg1 
) [static]

tree fold_single_bit_test ( enum tree_code  code,
tree  arg0,
tree  arg1,
tree  result_type 
)

static tree fold_single_bit_test_into_sign_test ( enum tree_code  code,
tree  arg0,
tree  arg1,
tree  result_type 
) [static]

tree fold_strip_sign_ops ( tree  exp  ) 

tree fold_ternary ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1,
tree  op2 
)

static tree fold_to_nonsharp_ineq_using_bound ( tree  ineq,
tree  bound 
) [static]

tree fold_truth_not_expr ( tree  arg  ) 

static tree fold_truthop ( enum tree_code  code,
tree  truth_type,
tree  lhs,
tree  rhs 
) [static]

tree fold_unary ( enum tree_code  code,
tree  type,
tree  op0 
)

tree fold_unary_to_constant ( enum tree_code  code,
tree  type,
tree  op0 
)

void fold_undefer_and_ignore_overflow_warnings ( void   ) 

void fold_undefer_overflow_warnings ( bool  issue,
tree  stmt,
int  code 
)

static tree fold_view_convert_expr ( tree  type,
tree  expr 
) [static]

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]

tree force_fit_type ( tree  t,
int  overflowable,
bool  overflowed,
bool  overflowed_const 
)

tree int_const_binop ( enum tree_code  code,
tree  arg1,
tree  arg2,
int  notrunc 
)

enum tree_code invert_tree_comparison ( enum tree_code  code,
bool  honor_nans 
)

Definition at line 2345 of file fold-const.c.

References flag_trapping_math, and gcc_unreachable.

tree invert_truthvalue ( tree  arg  ) 

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 
)

static tree make_bit_field_ref ( tree  inner,
tree  type,
int  bitsize,
int  bitpos,
int  unsignedp 
) [static]

static tree make_range ( tree  exp,
int *  pin_p,
tree plow,
tree phigh,
bool strict_overflow_p 
) [static]

bool may_negate_without_overflow_p ( tree  t  ) 

static bool maybe_lvalue_p ( tree  x  )  [static]

Definition at line 2260 of file fold-const.c.

References NUM_TREE_CODES, SSA_NAME, and TREE_CODE.

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]

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().

static int multiple_of_p ( tree  type,
tree  top,
tree  bottom 
) [static]

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]

static int native_encode_int ( tree  expr,
unsigned char *  ptr,
int  len 
) [static]

static int native_encode_real ( tree  expr,
unsigned char *  ptr,
int  len 
) [static]

static int native_encode_vector ( tree  expr,
unsigned char *  ptr,
int  len 
) [static]

static tree native_interpret_complex ( tree  type,
unsigned char *  ptr,
int  len 
) [static]

static tree native_interpret_expr ( tree  type,
unsigned char *  ptr,
int  len 
) [static]

static tree native_interpret_int ( tree  type,
unsigned char *  ptr,
int  len 
) [static]

static tree native_interpret_real ( tree  type,
unsigned char *  ptr,
int  len 
) [static]

static tree native_interpret_vector ( tree  type,
unsigned char *  ptr,
int  len 
) [static]

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.

static tree negate_expr ( tree  t  )  [static]

Definition at line 1363 of file fold-const.c.

References build1, fold_convert(), fold_negate_expr(), NULL_TREE, STRIP_SIGN_NOPS, and TREE_TYPE.

static bool negate_expr_p ( tree  t  )  [static]

static bool negate_mathfn_p ( enum built_in_function  code  )  [static]

Definition at line 1005 of file fold-const.c.

References CASE_FLT_FN.

tree non_lvalue ( tree  x  ) 

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.

tree omit_one_operand ( tree  type,
tree  result,
tree  omitted 
)

tree omit_two_operands ( tree  type,
tree  result,
tree  omitted1,
tree  omitted2 
)

Definition at line 3181 of file fold-const.c.

References build2, fold_convert(), non_lvalue(), TREE_CODE, and TREE_SIDE_EFFECTS.

static int operand_equal_for_comparison_p ( tree  arg0,
tree  arg1,
tree  other 
) [static]

int operand_equal_p ( tree  arg0,
tree  arg1,
unsigned int  flags 
)

static tree optimize_bit_field_compare ( enum tree_code  code,
tree  compare_type,
tree  lhs,
tree  rhs 
) [static]

static tree optimize_minmax_comparison ( enum tree_code  code,
tree  type,
tree  op0,
tree  op1 
) [static]

static tree pedantic_non_lvalue ( tree  x  )  [static]

Definition at line 2331 of file fold-const.c.

References non_lvalue(), and pedantic_lvalues.

static tree pedantic_omit_one_operand ( tree  type,
tree  result,
tree  omitted 
) [static]

bool ptr_difference_const ( tree  e1,
tree  e2,
HOST_WIDE_INT *  diff 
)

static tree range_binop ( enum tree_code  code,
tree  type,
tree  arg0,
int  upper0_p,
tree  arg1,
int  upper1_p 
) [static]

static tree range_predecessor ( tree  val  )  [static]

static tree range_successor ( tree  val  )  [static]

static bool reorder_operands_p ( tree  arg0,
tree  arg1 
) [static]

Definition at line 6555 of file fold-const.c.

References flag_evaluation_order, TREE_CONSTANT, and TREE_SIDE_EFFECTS.

tree round_down ( tree  value,
int  divisor 
)

tree round_up ( tree  value,
int  divisor 
)

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.

static tree sign_bit_p ( tree  exp,
tree  val 
) [static]

static int simple_operand_p ( tree  exp  )  [static]

tree size_binop ( enum tree_code  code,
tree  arg0,
tree  arg1 
)

tree size_diffop ( tree  arg0,
tree  arg1 
)

tree size_int_kind ( HOST_WIDE_INT  number,
enum size_type_kind  kind 
)

Definition at line 1871 of file fold-const.c.

References build_int_cst(), and sizetype_tab.

static tree split_address_to_core_and_offset ( tree  exp,
HOST_WIDE_INT *  pbitpos,
tree poffset 
) [static]

static tree split_tree ( tree  in,
enum tree_code  code,
tree conp,
tree litp,
tree minus_litp,
int  negate_p 
) [static]

enum tree_code swap_tree_comparison ( enum tree_code  code  ) 

Definition at line 2389 of file fold-const.c.

References gcc_unreachable.

int tree_expr_nonnegative_p ( tree  t  ) 

int tree_expr_nonnegative_warnv_p ( tree  t,
bool strict_overflow_p 
)

bool tree_expr_nonzero_p ( tree  t  ) 

bool tree_expr_nonzero_warnv_p ( tree  t,
bool strict_overflow_p 
)

bool tree_swap_operands_p ( tree  arg0,
tree  arg1,
bool  reorder 
)

static int truth_value_p ( enum tree_code  code  )  [static]

Definition at line 2593 of file fold-const.c.

References tcc_comparison, and TREE_CODE_CLASS.

static tree try_move_mult_to_index ( enum tree_code  code,
tree  addr,
tree  op1 
) [static]

static int twoval_comparison_p ( tree  arg,
tree cval1,
tree cval2,
int *  save_p 
) [static]

static tree unextend ( tree  c,
int  p,
int  unsignedp,
tree  mask 
) [static]


Variable Documentation

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().

Definition at line 69 of file fold-const.c.

Referenced by fold_builtin_constant_p().

Definition at line 2325 of file fold-const.c.


Generated on Wed Apr 8 15:32:32 2009 for Open64 by  doxygen 1.5.6