Commit 9566a759 by Kaveh R. Ghazi Committed by Kaveh Ghazi

expr.c (handled_component_p): Constify.

	* expr.c (handled_component_p): Constify.
	* fold-const.c (fit_double_type): Likewise.
	* real.h (real_value_from_int_cst): Likewise.
	* tree-flow-inline.h (gimple_in_ssa_p,
	gimple_aliases_computed_p, gimple_addressable_vars,
	gimple_call_clobbered_vars, gimple_referenced_vars,
	gimple_global_var, gimple_nonlocal_all, gimple_var_anns,
	end_htab_p, end_referenced_vars_p, var_ann, function_ann,
	may_aliases, end_readonly_imm_use_p, has_zero_uses,
	has_single_use, single_imm_use, num_imm_uses, is_exec_stmt,
	is_label_stmt, is_global_var, phi_ssa_name_p,
	factoring_name_p, is_call_clobbered, tree_common_ann,
	op_iter_done, end_imm_use_stmt_p, end_imm_use_on_stmt_p,
	unmodifiable_var_p, array_ref_contains_indirect_ref,
	ref_contains_array_ref, lookup_subvars_for_var,
	var_can_have_subvars, overlap_subvar, gimple_ssa_operands,
	gimple_mem_ref_stats): Likewise.
	* tree-flow.h (tree_common_ann, var_ann, function_ann,
	may_aliases, is_exec_stmt, is_label_stmt,
	ref_contains_array_ref, array_ref_contains_indirect_ref,
	var_can_have_subvars, overlap_subvar, is_call_clobbered,
	unmodifiable_var_p): Likewise.
	* tree-gimple.c (is_gimple_min_invariant): Likewise.
	* tree-gimple.h (is_gimple_min_invariant): Likewise. 
	* tree.c (type_hash_list, attribute_hash_list, tree_size,
	cst_and_fits_in_hwi, real_value_from_int_cst,
	build_real_from_int_cst, integer_zerop, integer_onep,
	integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2,
	tree_floor_log2, real_zerop, real_onep, real_twop,
	real_minus_onep, really_constant_p, purpose_member, chain_member,
	list_length, fields_length, int_size_in_bytes, bit_position,
	int_bit_position, byte_position, int_byte_position, expr_align,
	array_type_nelts, tree_node_structure,
	type_contains_placeholder_1, iterative_hash_pointer,
	is_attribute_with_length_p, is_attribute_p, check_qualified_type,
	tree_map_base_eq, type_hash_list, type_hash_eq,
	attribute_hash_list, type_num_arguments, tree_int_cst_equal,
	tree_int_cst_lt, tree_int_cst_compare, host_integerp,
	tree_low_cst, tree_int_cst_msb, tree_int_cst_sgn,
	simple_cst_list_equal, compare_tree_int, iterative_hash_expr,
	int_fits_type_p, get_containing_scope, decl_function_context,
	decl_type_context, omp_clause_operand_check_failed,
	initializer_zerop, int_cst_value, num_ending_zeros): Likewise.
	* tree.h (omp_clause_operand_check_failed, tree_size,
	build_real_from_int_cst, array_type_nelts, purpose_member,
	tree_int_cst_equal, tree_int_cst_lt, tree_int_cst_compare,
	host_integerp, tree_low_cst, tree_int_cst_msb, tree_int_cst_sgn,
	is_attribute_p, check_qualified_type, expr_align,
	int_size_in_bytes, bit_position, int_bit_position, byte_position,
	int_byte_position, list_length, fields_length, initializer_zerop,
	integer_zerop, integer_onep, integer_all_onesp, integer_pow2p,
	integer_nonzerop, cst_and_fits_in_hwi, num_ending_zeros,
	tree_node_structure, handled_component_p, get_containing_scope,
	decl_function_context, decl_type_context, real_zerop,
	type_num_arguments, fit_double_type, really_constant_p,
	int_fits_type_p, tree_log2, tree_floor_log2, iterative_hash_expr,
	compare_tree_int, chain_member, simple_cst_list_equal, real_onep,
	real_twop, real_minus_onep, int_cst_value): Likewise.

From-SVN: r126923
parent f7d504c2
2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c (handled_component_p): Constify.
* fold-const.c (fit_double_type): Likewise.
* real.h (real_value_from_int_cst): Likewise.
* tree-flow-inline.h (gimple_in_ssa_p,
gimple_aliases_computed_p, gimple_addressable_vars,
gimple_call_clobbered_vars, gimple_referenced_vars,
gimple_global_var, gimple_nonlocal_all, gimple_var_anns,
end_htab_p, end_referenced_vars_p, var_ann, function_ann,
may_aliases, end_readonly_imm_use_p, has_zero_uses,
has_single_use, single_imm_use, num_imm_uses, is_exec_stmt,
is_label_stmt, is_global_var, phi_ssa_name_p,
factoring_name_p, is_call_clobbered, tree_common_ann,
op_iter_done, end_imm_use_stmt_p, end_imm_use_on_stmt_p,
unmodifiable_var_p, array_ref_contains_indirect_ref,
ref_contains_array_ref, lookup_subvars_for_var,
var_can_have_subvars, overlap_subvar, gimple_ssa_operands,
gimple_mem_ref_stats): Likewise.
* tree-flow.h (tree_common_ann, var_ann, function_ann,
may_aliases, is_exec_stmt, is_label_stmt,
ref_contains_array_ref, array_ref_contains_indirect_ref,
var_can_have_subvars, overlap_subvar, is_call_clobbered,
unmodifiable_var_p): Likewise.
* tree-gimple.c (is_gimple_min_invariant): Likewise.
* tree-gimple.h (is_gimple_min_invariant): Likewise.
* tree.c (type_hash_list, attribute_hash_list, tree_size,
cst_and_fits_in_hwi, real_value_from_int_cst,
build_real_from_int_cst, integer_zerop, integer_onep,
integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2,
tree_floor_log2, real_zerop, real_onep, real_twop,
real_minus_onep, really_constant_p, purpose_member, chain_member,
list_length, fields_length, int_size_in_bytes, bit_position,
int_bit_position, byte_position, int_byte_position, expr_align,
array_type_nelts, tree_node_structure,
type_contains_placeholder_1, iterative_hash_pointer,
is_attribute_with_length_p, is_attribute_p, check_qualified_type,
tree_map_base_eq, type_hash_list, type_hash_eq,
attribute_hash_list, type_num_arguments, tree_int_cst_equal,
tree_int_cst_lt, tree_int_cst_compare, host_integerp,
tree_low_cst, tree_int_cst_msb, tree_int_cst_sgn,
simple_cst_list_equal, compare_tree_int, iterative_hash_expr,
int_fits_type_p, get_containing_scope, decl_function_context,
decl_type_context, omp_clause_operand_check_failed,
initializer_zerop, int_cst_value, num_ending_zeros): Likewise.
* tree.h (omp_clause_operand_check_failed, tree_size,
build_real_from_int_cst, array_type_nelts, purpose_member,
tree_int_cst_equal, tree_int_cst_lt, tree_int_cst_compare,
host_integerp, tree_low_cst, tree_int_cst_msb, tree_int_cst_sgn,
is_attribute_p, check_qualified_type, expr_align,
int_size_in_bytes, bit_position, int_bit_position, byte_position,
int_byte_position, list_length, fields_length, initializer_zerop,
integer_zerop, integer_onep, integer_all_onesp, integer_pow2p,
integer_nonzerop, cst_and_fits_in_hwi, num_ending_zeros,
tree_node_structure, handled_component_p, get_containing_scope,
decl_function_context, decl_type_context, real_zerop,
type_num_arguments, fit_double_type, really_constant_p,
int_fits_type_p, tree_log2, tree_floor_log2, iterative_hash_expr,
compare_tree_int, chain_member, simple_cst_list_equal, real_onep,
real_twop, real_minus_onep, int_cst_value): Likewise.
2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cfglayout.c (insn_scope, insn_line): Constify. * cfglayout.c (insn_scope, insn_line): Constify.
* emit-rtl.c (const_int_htab_hash, const_int_htab_eq, * emit-rtl.c (const_int_htab_hash, const_int_htab_eq,
const_double_htab_hash, const_double_htab_eq, const_double_htab_hash, const_double_htab_eq,
......
...@@ -6061,7 +6061,7 @@ component_ref_field_offset (tree exp) ...@@ -6061,7 +6061,7 @@ component_ref_field_offset (tree exp)
/* Return 1 if T is an expression that get_inner_reference handles. */ /* Return 1 if T is an expression that get_inner_reference handles. */
int int
handled_component_p (tree t) handled_component_p (const_tree t)
{ {
switch (TREE_CODE (t)) switch (TREE_CODE (t))
{ {
......
...@@ -198,7 +198,7 @@ decode (HOST_WIDE_INT *words, unsigned HOST_WIDE_INT *low, ...@@ -198,7 +198,7 @@ decode (HOST_WIDE_INT *words, unsigned HOST_WIDE_INT *low,
int int
fit_double_type (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1, fit_double_type (unsigned HOST_WIDE_INT l1, HOST_WIDE_INT h1,
unsigned HOST_WIDE_INT *lv, HOST_WIDE_INT *hv, tree type) unsigned HOST_WIDE_INT *lv, HOST_WIDE_INT *hv, const_tree type)
{ {
unsigned HOST_WIDE_INT low0 = l1; unsigned HOST_WIDE_INT low0 = l1;
HOST_WIDE_INT high0 = h1; HOST_WIDE_INT high0 = h1;
......
...@@ -391,7 +391,7 @@ extern REAL_VALUE_TYPE dconste; ...@@ -391,7 +391,7 @@ extern REAL_VALUE_TYPE dconste;
/* Function to return a real value (not a tree node) /* Function to return a real value (not a tree node)
from a given integer constant. */ from a given integer constant. */
REAL_VALUE_TYPE real_value_from_int_cst (tree, tree); REAL_VALUE_TYPE real_value_from_int_cst (const_tree, const_tree);
/* Given a CONST_DOUBLE in FROM, store into TO the value it represents. */ /* Given a CONST_DOUBLE in FROM, store into TO the value it represents. */
#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \ #define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \
......
...@@ -519,11 +519,11 @@ typedef struct function_ann_d *function_ann_t; ...@@ -519,11 +519,11 @@ typedef struct function_ann_d *function_ann_t;
typedef struct stmt_ann_d *stmt_ann_t; typedef struct stmt_ann_d *stmt_ann_t;
typedef struct tree_ann_common_d *tree_ann_common_t; typedef struct tree_ann_common_d *tree_ann_common_t;
static inline tree_ann_common_t tree_common_ann (tree); static inline tree_ann_common_t tree_common_ann (const_tree);
static inline tree_ann_common_t get_tree_common_ann (tree); static inline tree_ann_common_t get_tree_common_ann (tree);
static inline var_ann_t var_ann (tree); static inline var_ann_t var_ann (const_tree);
static inline var_ann_t get_var_ann (tree); static inline var_ann_t get_var_ann (tree);
static inline function_ann_t function_ann (tree); static inline function_ann_t function_ann (const_tree);
static inline function_ann_t get_function_ann (tree); static inline function_ann_t get_function_ann (tree);
static inline stmt_ann_t stmt_ann (tree); static inline stmt_ann_t stmt_ann (tree);
static inline bool has_stmt_ann (tree); static inline bool has_stmt_ann (tree);
...@@ -534,11 +534,11 @@ extern void set_bb_for_stmt (tree, basic_block); ...@@ -534,11 +534,11 @@ extern void set_bb_for_stmt (tree, basic_block);
static inline bool noreturn_call_p (tree); static inline bool noreturn_call_p (tree);
static inline void update_stmt (tree); static inline void update_stmt (tree);
static inline bool stmt_modified_p (tree); static inline bool stmt_modified_p (tree);
static inline bitmap may_aliases (tree); static inline bitmap may_aliases (const_tree);
static inline int get_lineno (tree); static inline int get_lineno (tree);
static inline const char *get_filename (tree); static inline const char *get_filename (tree);
static inline bool is_exec_stmt (tree); static inline bool is_exec_stmt (const_tree);
static inline bool is_label_stmt (tree); static inline bool is_label_stmt (const_tree);
static inline bitmap addresses_taken (tree); static inline bitmap addresses_taken (tree);
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
...@@ -840,14 +840,14 @@ extern void count_uses_and_derefs (tree, tree, unsigned *, unsigned *, ...@@ -840,14 +840,14 @@ extern void count_uses_and_derefs (tree, tree, unsigned *, unsigned *,
unsigned *); unsigned *);
static inline subvar_t get_subvars_for_var (tree); static inline subvar_t get_subvars_for_var (tree);
static inline tree get_subvar_at (tree, unsigned HOST_WIDE_INT); static inline tree get_subvar_at (tree, unsigned HOST_WIDE_INT);
static inline bool ref_contains_array_ref (tree); static inline bool ref_contains_array_ref (const_tree);
static inline bool array_ref_contains_indirect_ref (tree); static inline bool array_ref_contains_indirect_ref (const_tree);
extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *, extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *,
HOST_WIDE_INT *, HOST_WIDE_INT *); HOST_WIDE_INT *, HOST_WIDE_INT *);
static inline bool var_can_have_subvars (tree); static inline bool var_can_have_subvars (const_tree);
static inline bool overlap_subvar (unsigned HOST_WIDE_INT, static inline bool overlap_subvar (unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT,
tree, bool *); const_tree, bool *);
extern tree create_tag_raw (enum tree_code, tree, const char *); extern tree create_tag_raw (enum tree_code, tree, const char *);
extern void delete_mem_ref_stats (struct function *); extern void delete_mem_ref_stats (struct function *);
extern void dump_mem_ref_stats (FILE *); extern void dump_mem_ref_stats (FILE *);
...@@ -1061,10 +1061,10 @@ enum escape_type ...@@ -1061,10 +1061,10 @@ enum escape_type
}; };
/* In tree-flow-inline.h */ /* In tree-flow-inline.h */
static inline bool is_call_clobbered (tree); static inline bool is_call_clobbered (const_tree);
static inline void mark_call_clobbered (tree, unsigned int); static inline void mark_call_clobbered (tree, unsigned int);
static inline void set_is_used (tree); static inline void set_is_used (tree);
static inline bool unmodifiable_var_p (tree); static inline bool unmodifiable_var_p (const_tree);
/* In tree-eh.c */ /* In tree-eh.c */
extern void make_eh_edges (tree); extern void make_eh_edges (tree);
......
...@@ -170,7 +170,7 @@ is_gimple_addressable (tree t) ...@@ -170,7 +170,7 @@ is_gimple_addressable (tree t)
form of function invariant. */ form of function invariant. */
bool bool
is_gimple_min_invariant (tree t) is_gimple_min_invariant (const_tree t)
{ {
switch (TREE_CODE (t)) switch (TREE_CODE (t))
{ {
......
...@@ -64,7 +64,7 @@ extern bool is_gimple_addressable (tree); ...@@ -64,7 +64,7 @@ extern bool is_gimple_addressable (tree);
extern bool is_gimple_lvalue (tree); extern bool is_gimple_lvalue (tree);
/* Returns true iff T is a GIMPLE restricted function invariant. */ /* Returns true iff T is a GIMPLE restricted function invariant. */
extern bool is_gimple_min_invariant (tree); extern bool is_gimple_min_invariant (const_tree);
/* Returns true iff T is a GIMPLE rvalue. */ /* Returns true iff T is a GIMPLE rvalue. */
extern bool is_gimple_val (tree); extern bool is_gimple_val (tree);
/* Returns true iff T is a GIMPLE asm statement input. */ /* Returns true iff T is a GIMPLE asm statement input. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment