diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-07-29 05:43:43 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-07-29 05:43:43 +0000 |
commit | fa233e34c957d836e99f74c03556cbe0073f1aa7 (patch) | |
tree | 41da24bff35b17064ab893482d89e84d395707fd /gcc/fold-const.c | |
parent | 5d16f08a8991d4654a7dd305d6098ee2b3d102d9 (diff) | |
download | gcc-fa233e34c957d836e99f74c03556cbe0073f1aa7.zip gcc-fa233e34c957d836e99f74c03556cbe0073f1aa7.tar.gz gcc-fa233e34c957d836e99f74c03556cbe0073f1aa7.tar.bz2 |
attribs.c (hash_attr, [...]): Constify.
* attribs.c (hash_attr, eq_attr, init_attributes): Constify.
* builtins.c (validate_arg, builtin_mathfn_code,
validate_arglist): Likewise.
* calls.c (call_expr_flags): Likewise.
* combine.c (reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine, get_last_value,
reg_truncated_to_mode): Likewise.
* emit-rtl.c (subreg_lowpart_p): Likewise.
* expr.c (highest_pow2_factor_for_target,
categorize_ctor_elements_1, categorize_ctor_elements,
count_type_elements, contains_packed_reference,
highest_pow2_factor, highest_pow2_factor_for_target): Likewise.
* fold-const.c (may_negate_without_overflow_p, int_const_binop,
fold_convertible_p, operand_equal_p, tree_swap_operands_p,
native_encode_int, native_encode_real, native_encode_complex,
native_encode_vector, native_encode_expr, native_interpret_int,
native_interpret_real, native_interpret_complex,
native_interpret_vector, native_interpret_expr): Likewise.
* function.c (use_register_for_decl): Likewise.
* gimplify.c (get_name): Likewise.
* langhooks-def.h (lhd_return_null_const_tree): New.
(LANG_HOOKS_GET_CALLEE_FNDECL): Use it.
* langhooks.c (lhd_return_null_const_tree): New.
* langhooks.h (lang_get_callee_fndecl): Constify.
* output.h (constructor_static_from_elts_p): Likewise.
* rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise.
* rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode,
subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise.
* rtlanal.c (cached_nonzero_bits, nonzero_bits1,
cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p,
nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise.
* rtlhooks-def.h (reg_nonzero_bits_general,
reg_num_sign_bit_copies_general, reg_truncated_to_mode_general):
Likewise.
* rtlhooks.c (reg_num_sign_bit_copies_general,
reg_nonzero_bits_general, reg_truncated_to_mode_general):
Likewise.
* stmt.c (warn_if_unused_value, is_body_block): Likewise.
* stor-layout.c (mode_for_size_tree): Likewise.
* tree-ssa-loop-im.c (memref_eq): Likewise.
* tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise.
* tree.c (contains_placeholder_p, type_list_equal,
simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p):
Likewise.
* tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p,
mode_for_size_tree, categorize_ctor_elements, count_type_elements,
contains_placeholder_p, contains_packed_reference,
get_callee_fndecl, operand_equal_for_phi_arg_p,
warn_if_unused_value, is_body_block, native_encode_expr,
native_interpret_expr, fold_convertible_p, operand_equal_p,
int_const_binop, tree_swap_operands_p, builtin_mathfn_code,
validate_arglist, simple_cst_equal, type_list_equal,
use_register_for_decl, call_expr_flags, get_name,
highest_pow2_factor): Likewise.
(const_call_expr_arg_iterator_d,
init_const_call_expr_arg_iterator, next_const_call_expr_arg,
first_const_call_expr_arg, more_const_call_expr_args_p,
FOR_EACH_CONST_CALL_EXPR_ARG): New.
* varasm.c (constructor_static_from_elts_p): Constify.
cp:
* parser.c (eof_token): Un-constify.
(cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
casts.
java:
* lang.c (java_get_callee_fndecl): Constify.
objc:
* objc-act.c (objc_get_callee_fndecl): Constify.
* objc-act.h (objc_get_callee_fndecl): Likewise.
From-SVN: r127036
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c7447b9..614e55a 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1074,7 +1074,7 @@ negate_mathfn_p (enum built_in_function code) overflow. */ bool -may_negate_without_overflow_p (tree t) +may_negate_without_overflow_p (const_tree t) { unsigned HOST_WIDE_INT val; unsigned int prec; @@ -1620,7 +1620,7 @@ int_binop_types_match_p (enum tree_code code, tree type1, tree type2) If NOTRUNC is nonzero, do not truncate the result to fit the data type. */ tree -int_const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc) +int_const_binop (enum tree_code code, const_tree arg1, const_tree arg2, int notrunc) { unsigned HOST_WIDE_INT int1l, int2l; HOST_WIDE_INT int1h, int2h; @@ -2213,7 +2213,7 @@ build_zero_vector (tree type) /* Returns true, if ARG is convertible to TYPE using a NOP_EXPR. */ bool -fold_convertible_p (tree type, tree arg) +fold_convertible_p (const_tree type, const_tree arg) { tree orig = TREE_TYPE (arg); @@ -2744,7 +2744,7 @@ truth_value_p (enum tree_code code) to ensure that global memory is unchanged in between. */ int -operand_equal_p (tree arg0, tree arg1, unsigned int flags) +operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) { /* If either is ERROR_MARK, they aren't equal. */ if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK) @@ -2997,13 +2997,13 @@ operand_equal_p (tree arg0, tree arg1, unsigned int flags) /* Now see if all the arguments are the same. */ { - call_expr_arg_iterator iter0, iter1; - tree a0, a1; - for (a0 = first_call_expr_arg (arg0, &iter0), - a1 = first_call_expr_arg (arg1, &iter1); + const_call_expr_arg_iterator iter0, iter1; + const_tree a0, a1; + for (a0 = first_const_call_expr_arg (arg0, &iter0), + a1 = first_const_call_expr_arg (arg1, &iter1); a0 && a1; - a0 = next_call_expr_arg (&iter0), - a1 = next_call_expr_arg (&iter1)) + a0 = next_const_call_expr_arg (&iter0), + a1 = next_const_call_expr_arg (&iter1)) if (! operand_equal_p (a0, a1, flags)) return 0; @@ -6722,7 +6722,7 @@ reorder_operands_p (tree arg0, tree arg1) evaluate the operands in reverse order. */ bool -tree_swap_operands_p (tree arg0, tree arg1, bool reorder) +tree_swap_operands_p (const_tree arg0, const_tree arg1, bool reorder) { STRIP_SIGN_NOPS (arg0); STRIP_SIGN_NOPS (arg1); @@ -7217,7 +7217,7 @@ fold_plusminus_mult_expr (enum tree_code code, tree type, tree arg0, tree arg1) upon failure. */ static int -native_encode_int (tree expr, unsigned char *ptr, int len) +native_encode_int (const_tree expr, unsigned char *ptr, int len) { tree type = TREE_TYPE (expr); int total_bytes = GET_MODE_SIZE (TYPE_MODE (type)); @@ -7262,7 +7262,7 @@ native_encode_int (tree expr, unsigned char *ptr, int len) upon failure. */ static int -native_encode_real (tree expr, unsigned char *ptr, int len) +native_encode_real (const_tree expr, unsigned char *ptr, int len) { tree type = TREE_TYPE (expr); int total_bytes = GET_MODE_SIZE (TYPE_MODE (type)); @@ -7310,7 +7310,7 @@ native_encode_real (tree expr, unsigned char *ptr, int len) upon failure. */ static int -native_encode_complex (tree expr, unsigned char *ptr, int len) +native_encode_complex (const_tree expr, unsigned char *ptr, int len) { int rsize, isize; tree part; @@ -7333,7 +7333,7 @@ native_encode_complex (tree expr, unsigned char *ptr, int len) upon failure. */ static int -native_encode_vector (tree expr, unsigned char *ptr, int len) +native_encode_vector (const_tree expr, unsigned char *ptr, int len) { int i, size, offset, count; tree itype, elem, elements; @@ -7376,7 +7376,7 @@ native_encode_vector (tree expr, unsigned char *ptr, int len) placed in the buffer, or zero upon failure. */ int -native_encode_expr (tree expr, unsigned char *ptr, int len) +native_encode_expr (const_tree expr, unsigned char *ptr, int len) { switch (TREE_CODE (expr)) { @@ -7403,7 +7403,7 @@ native_encode_expr (tree expr, unsigned char *ptr, int len) If the buffer cannot be interpreted, return NULL_TREE. */ static tree -native_interpret_int (tree type, unsigned char *ptr, int len) +native_interpret_int (tree type, const unsigned char *ptr, int len) { int total_bytes = GET_MODE_SIZE (TYPE_MODE (type)); int byte, offset, word, words; @@ -7451,7 +7451,7 @@ native_interpret_int (tree type, unsigned char *ptr, int len) If the buffer cannot be interpreted, return NULL_TREE. */ static tree -native_interpret_real (tree type, unsigned char *ptr, int len) +native_interpret_real (tree type, const unsigned char *ptr, int len) { enum machine_mode mode = TYPE_MODE (type); int total_bytes = GET_MODE_SIZE (mode); @@ -7501,7 +7501,7 @@ native_interpret_real (tree type, unsigned char *ptr, int len) If the buffer cannot be interpreted, return NULL_TREE. */ static tree -native_interpret_complex (tree type, unsigned char *ptr, int len) +native_interpret_complex (tree type, const unsigned char *ptr, int len) { tree etype, rpart, ipart; int size; @@ -7525,7 +7525,7 @@ native_interpret_complex (tree type, unsigned char *ptr, int len) If the buffer cannot be interpreted, return NULL_TREE. */ static tree -native_interpret_vector (tree type, unsigned char *ptr, int len) +native_interpret_vector (tree type, const unsigned char *ptr, int len) { tree etype, elem, elements; int i, size, count; @@ -7555,7 +7555,7 @@ native_interpret_vector (tree type, unsigned char *ptr, int len) return NULL_TREE. */ tree -native_interpret_expr (tree type, unsigned char *ptr, int len) +native_interpret_expr (tree type, const unsigned char *ptr, int len) { switch (TREE_CODE (type)) { |