From aae87fc346d89bc5cf107a45dd5bade361b16533 Mon Sep 17 00:00:00 2001 From: ghazi Date: Wed, 25 Jul 2007 19:06:06 +0000 Subject: * c-common.c (fname_as_string, c_type_hash): Constify. * c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise. * cgraph.c (edge_hash, edge_eq): Likewise. * dwarf2out.c (decl_die_table_eq, decl_loc_table_eq): Likewise. * emit-rtl.c (mem_attrs_htab_eq, reg_attrs_htab_hash, reg_attrs_htab_eq): Likewise. * except.c (t2r_eq, t2r_hash, ttypes_filter_eq, ehl_hash, ehl_eq): Likewise. * genautomata.c (const_reserv_sets_t, const_unit_decl_t, const_decl_t, const_state_t, const_automata_list_el_t): New. (first_out_arc, DECL_UNIT, DECL_BYPASS, DECL_AUTOMATON, DECL_EXCL, DECL_PRESENCE, DECL_ABSENCE, DECL_RESERV, DECL_INSN_RESERV, automaton_decl_hash, automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash, decl_eq_p, alt_state_cmp, reserv_sets_cmp, reserv_sets_eq, state_hash, state_eq_p, automata_list_hash, automata_list_eq_p, compare_states_for_equiv, compare_max_occ_cycle_nums, out_state_arcs_num, compare_transition_els_num, units_cmp, state_reservs_cmp): Constify. * genmodes.c (cmp_modes): Likewise. * ggc-common.c (saving_htab_hash, saving_htab_eq): Likewise. * gimplify.c (compare_case_labels): Likewise. * ipa-type-escape.c (get_name_of_type, type_brand_s): Likewise. * loop-unroll.c (si_info_hash, ve_info_hash): Likewise. * matrix-reorg.c (mtt_info_hash): Likewise. * postreload-gcse.c (hash_expr_for_htab, expr_equiv_p): Likewise. * rtl-factoring.c (const_p_hash_bucket, const_p_hash_elem): New. (htab_hash_bucket, htab_hash_elem): Constify. * tree-browser.c (TB_parent_eq): Likewise. * tree-scalar-evolution.c (hash_scev_info): Likewise. * tree-ssa-alias.c (sort_tags_by_id): Likewise. * tree-ssa-coalesce.c (const_coalesce_pair_p): New. (coalesce_pair_map_hash, coalesce_pair_map_eq, compare_pairs): Constify. * tree-ssa-dom.c (avail_expr_hash, avail_expr_eq): Likewise. * tree-ssa-pre.c (const_expr_pred_trans_t): New. (expr_pred_trans_hash, expr_pred_trans_eq): Constify. * tree-ssa-sccvn.c (const_vn_binary_op_t, const_vn_unary_op_t, const_vn_phi_t, const_vn_reference_op_t, const_vn_reference_t): New. (vn_reference_op_eq, vn_reference_hash, vn_reference_eq, vn_unary_op_hash, vn_unary_op_eq, vn_binary_op_hash, vn_binary_op_eq, vn_phi_hash, vn_phi_eq): Constify. * tree-ssa-threadupdate.c (redirection_data_hash, redirection_data_eq): Likewise. * tree-ssa-uncprop.c (equiv_hash, equiv_eq): Likewise. * tree-ssa.c (var_ann_eq): Likewise. * tree-vrp.c (compare_case_labels): Likewise. * tree.c (int_cst_hash_hash, int_cst_hash_eq, tree_map_base_marked_p, type_hash_marked_p, tree_check_failed, tree_not_check_failed, tree_class_check_failed, tree_range_check_failed, tree_not_class_check_failed, omp_clause_check_failed, omp_clause_range_check_failed, tree_contains_struct_check_failed, tree_operand_check_failed): Likewise. * tree.h (tree_contains_struct_check_failed, tree_check_failed, tree_not_check_failed, tree_class_check_failed, tree_range_check_failed, tree_not_class_check_failed, tree_operand_check_failed, omp_clause_operand_check_failed, tree_operand_length): Likewise. * var-tracking.c (const_variable): New. (variable_htab_hash, variable_htab_eq): Constify. * varasm.c (const_desc_hash): Likewise. cp: * decl.c (typename_hash, typename_compare): Constify. * mangle.c (hash_type, compare_type): Likewise. * pt.c (eq_local_specializations, hash_local_specialization): Likewise. * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq, list_hash): Likewise. * typeck2.c (pat_compare): Likewise. fortran: * gfortran.h (generate_isocbinding_symbol): Constify. * symbol.c (gen_special_c_interop_ptr, gen_cptr_param, generate_isocbinding_symbol): Likewise. java: * class.c (java_treetreehash_hash, java_treetreehash_compare): Constify. * expr.c (type_assertion_eq): Likewise. * jcf-io.c (compare_path): Likewise. * jcf-parse.c (cmpstringp): Likewise. * verify-impl.c (get_one_type, compute_argument_types, compute_return_type): Likewise. objc: * objc-act.c (volatilized_hash, volatilized_eq, string_hash, string_eq): Constify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126925 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-sccvn.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'gcc/tree-ssa-sccvn.c') diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 589058fdc2c..145db955964 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -131,6 +131,7 @@ typedef struct vn_binary_op_s hashval_t hashcode; tree result; } *vn_binary_op_t; +typedef const struct vn_binary_op_s *const_vn_binary_op_t; /* Unary operations in the hashtable consist of a single operand, an opcode, and a type. Result is the value number of the operation, @@ -144,6 +145,7 @@ typedef struct vn_unary_op_s hashval_t hashcode; tree result; } *vn_unary_op_t; +typedef const struct vn_unary_op_s *const_vn_unary_op_t; /* Phi nodes in the hashtable consist of their non-VN_TOP phi arguments, and the basic block the phi is in. Result is the value @@ -158,6 +160,7 @@ typedef struct vn_phi_s hashval_t hashcode; tree result; } *vn_phi_t; +typedef const struct vn_phi_s *const_vn_phi_t; /* Reference operands only exist in reference operations structures. They consist of an opcode, type, and some number of operands. For @@ -174,6 +177,7 @@ typedef struct vn_reference_op_struct tree op2; } vn_reference_op_s; typedef vn_reference_op_s *vn_reference_op_t; +typedef const vn_reference_op_s *const_vn_reference_op_t; DEF_VEC_O(vn_reference_op_s); DEF_VEC_ALLOC_O(vn_reference_op_s, heap); @@ -193,6 +197,7 @@ typedef struct vn_reference_s hashval_t hashcode; tree result; } *vn_reference_t; +typedef const struct vn_reference_s *const_vn_reference_t; /* Valid hashtables storing information we have proven to be correct. */ @@ -281,8 +286,8 @@ VN_INFO_GET (tree name) static int vn_reference_op_eq (const void *p1, const void *p2) { - const vn_reference_op_t vro1 = (vn_reference_op_t) p1; - const vn_reference_op_t vro2 = (vn_reference_op_t) p2; + const_vn_reference_op_t const vro1 = (const_vn_reference_op_t) p1; + const_vn_reference_op_t const vro2 = (const_vn_reference_op_t) p2; return vro1->opcode == vro2->opcode && vro1->type == vro2->type && expressions_equal_p (vro1->op0, vro2->op0) @@ -305,7 +310,7 @@ vn_reference_op_compute_hash (const vn_reference_op_t vro1) static hashval_t vn_reference_hash (const void *p1) { - const vn_reference_t vr1 = (vn_reference_t) p1; + const_vn_reference_t const vr1 = (const_vn_reference_t) p1; return vr1->hashcode; } @@ -337,8 +342,8 @@ vn_reference_eq (const void *p1, const void *p2) int i; vn_reference_op_t vro; - const vn_reference_t vr1 = (vn_reference_t) p1; - const vn_reference_t vr2 = (vn_reference_t) p2; + const_vn_reference_t const vr1 = (const_vn_reference_t) p1; + const_vn_reference_t const vr2 = (const_vn_reference_t) p2; if (vr1->vuses == vr2->vuses && vr1->operands == vr2->operands) @@ -694,7 +699,7 @@ vn_reference_insert (tree op, tree result, VEC (tree, gc) *vuses) static hashval_t vn_unary_op_hash (const void *p1) { - const vn_unary_op_t vuo1 = (vn_unary_op_t) p1; + const_vn_unary_op_t const vuo1 = (const_vn_unary_op_t) p1; return vuo1->hashcode; } @@ -711,8 +716,8 @@ vn_unary_op_compute_hash (const vn_unary_op_t vuo1) static int vn_unary_op_eq (const void *p1, const void *p2) { - const vn_unary_op_t vuo1 = (vn_unary_op_t) p1; - const vn_unary_op_t vuo2 = (vn_unary_op_t) p2; + const_vn_unary_op_t const vuo1 = (const_vn_unary_op_t) p1; + const_vn_unary_op_t const vuo2 = (const_vn_unary_op_t) p2; return vuo1->opcode == vuo2->opcode && vuo1->type == vuo2->type && expressions_equal_p (vuo1->op0, vuo2->op0); @@ -781,7 +786,7 @@ vn_binary_op_compute_hash (const vn_binary_op_t vbo1) static hashval_t vn_binary_op_hash (const void *p1) { - const vn_binary_op_t vbo1 = (vn_binary_op_t) p1; + const_vn_binary_op_t const vbo1 = (const_vn_binary_op_t) p1; return vbo1->hashcode; } @@ -791,8 +796,8 @@ vn_binary_op_hash (const void *p1) static int vn_binary_op_eq (const void *p1, const void *p2) { - const vn_binary_op_t vbo1 = (vn_binary_op_t) p1; - const vn_binary_op_t vbo2 = (vn_binary_op_t) p2; + const_vn_binary_op_t const vbo1 = (const_vn_binary_op_t) p1; + const_vn_binary_op_t const vbo2 = (const_vn_binary_op_t) p2; return vbo1->opcode == vbo2->opcode && vbo1->type == vbo2->type && expressions_equal_p (vbo1->op0, vbo2->op0) @@ -897,7 +902,7 @@ vn_phi_compute_hash (vn_phi_t vp1) static hashval_t vn_phi_hash (const void *p1) { - const vn_phi_t vp1 = (vn_phi_t) p1; + const_vn_phi_t const vp1 = (const_vn_phi_t) p1; return vp1->hashcode; } @@ -906,8 +911,8 @@ vn_phi_hash (const void *p1) static int vn_phi_eq (const void *p1, const void *p2) { - const vn_phi_t vp1 = (vn_phi_t) p1; - const vn_phi_t vp2 = (vn_phi_t) p2; + const_vn_phi_t const vp1 = (const_vn_phi_t) p1; + const_vn_phi_t const vp2 = (const_vn_phi_t) p2; if (vp1->block == vp2->block) { -- cgit v1.2.1