diff options
author | Richard Guenther <rguenther@suse.de> | 2012-08-03 08:55:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-08-03 08:55:43 +0000 |
commit | b2ec94d4409cfa7f064b3579705eefd3430ec237 (patch) | |
tree | 464db285ec9884ff3ce7490e4697b1d1f1925eb3 /gcc | |
parent | 1b03a96df6de779e0ef83460223ef99a90111c3b (diff) | |
download | gcc-b2ec94d4409cfa7f064b3579705eefd3430ec237.tar.gz |
tree-vect-loop-manip.c (vect_can_advance_ivs_p): Query is_gimple_reg on the SSA name, not its variable.
2012-08-03 Richard Guenther <rguenther@suse.de>
* tree-vect-loop-manip.c (vect_can_advance_ivs_p): Query
is_gimple_reg on the SSA name, not its variable.
(vect_update_ivs_after_vectorizer): Likewise.
* tree-ssa-copyrename.c (rename_ssa_copies): Likewise.
* tree-if-conv.c (if_convertible_phi_p): Likewise.
(predicate_scalar_phi): Likewise.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
(vect_analyze_scalar_cycles_1): Likewise.
* tree-ssa-live.c (register_ssa_partition_check): Likewise.
* tree-outof-ssa.c (eliminate_useless_phis): Likewise.
* tree-ssa-reassoc.c (phi_rank): Likewise.
* tree-parloops.c (separate_decls_in_region_name): Use
replace_ssa_name_symbol.
* tree-predcom.c (base_names_in_chain_on): Likewise.
* matrix-reorg.c (update_type_size): Query the type of the SSA name,
not its variable.
* gimple-ssa-strength-reduction.c (create_mul_ssa_cand): Likewise.
(create_mul_imm_cand): Likewise.
(create_add_ssa_cand): Likewise.
(create_add_imm_cand): Likewise.
(slsr_process_add): Likewise.
* tree-inline.c (remap_ssa_name): Do not set the type of the
new SSA_NAME.
* tree-ssa-structalias.c (get_constraint_for_ssa_var): Clarify
assert. Check for default def first.
From-SVN: r190116
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 28 | ||||
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 16 | ||||
-rw-r--r-- | gcc/matrix-reorg.c | 5 | ||||
-rw-r--r-- | gcc/tree-if-conv.c | 4 | ||||
-rw-r--r-- | gcc/tree-inline.c | 1 | ||||
-rw-r--r-- | gcc/tree-outof-ssa.c | 4 | ||||
-rw-r--r-- | gcc/tree-parloops.c | 2 | ||||
-rw-r--r-- | gcc/tree-predcom.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-live.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-reassoc.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-structalias.c | 6 | ||||
-rw-r--r-- | gcc/tree-vect-loop-manip.c | 4 | ||||
-rw-r--r-- | gcc/tree-vect-loop.c | 4 |
14 files changed, 55 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb559052395..12241aa58c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,31 @@ +2012-08-03 Richard Guenther <rguenther@suse.de> + + * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Query + is_gimple_reg on the SSA name, not its variable. + (vect_update_ivs_after_vectorizer): Likewise. + * tree-ssa-copyrename.c (rename_ssa_copies): Likewise. + * tree-if-conv.c (if_convertible_phi_p): Likewise. + (predicate_scalar_phi): Likewise. + * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise. + (vect_analyze_scalar_cycles_1): Likewise. + * tree-ssa-live.c (register_ssa_partition_check): Likewise. + * tree-outof-ssa.c (eliminate_useless_phis): Likewise. + * tree-ssa-reassoc.c (phi_rank): Likewise. + * tree-parloops.c (separate_decls_in_region_name): Use + replace_ssa_name_symbol. + * tree-predcom.c (base_names_in_chain_on): Likewise. + * matrix-reorg.c (update_type_size): Query the type of the SSA name, + not its variable. + * gimple-ssa-strength-reduction.c (create_mul_ssa_cand): Likewise. + (create_mul_imm_cand): Likewise. + (create_add_ssa_cand): Likewise. + (create_add_imm_cand): Likewise. + (slsr_process_add): Likewise. + * tree-inline.c (remap_ssa_name): Do not set the type of the + new SSA_NAME. + * tree-ssa-structalias.c (get_constraint_for_ssa_var): Clarify + assert. Check for default def first. + 2012-08-04 Steven Bosscher <steven@gcc.gnu.org> * cfgrtl.c (print_rtl_with_bb): Do not print a newline between insns. diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index e6793a5e339..6a46408f0ca 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -656,7 +656,7 @@ create_mul_ssa_cand (gimple gs, tree base_in, tree stride_in, bool speed) base = base_in; index = double_int_zero; stride = stride_in; - ctype = TREE_TYPE (SSA_NAME_VAR (base_in)); + ctype = TREE_TYPE (base_in); } c = alloc_cand_and_find_basis (CAND_MULT, gs, base, index, stride, @@ -744,7 +744,7 @@ create_mul_imm_cand (gimple gs, tree base_in, tree stride_in, bool speed) base = base_in; index = double_int_zero; stride = stride_in; - ctype = TREE_TYPE (SSA_NAME_VAR (base_in)); + ctype = TREE_TYPE (base_in); } c = alloc_cand_and_find_basis (CAND_MULT, gs, base, index, stride, @@ -828,7 +828,7 @@ create_add_ssa_cand (gimple gs, tree base_in, tree addend_in, if (subtract_p) index = double_int_neg (index); stride = addend_cand->base_expr; - ctype = TREE_TYPE (SSA_NAME_VAR (base_in)); + ctype = TREE_TYPE (base_in); if (has_single_use (addend_in)) savings = (addend_cand->dead_savings + stmt_cost (addend_cand->cand_stmt, speed)); @@ -877,7 +877,7 @@ create_add_ssa_cand (gimple gs, tree base_in, tree addend_in, index = tree_to_double_int (subtrahend_cand->stride); index = double_int_neg (index); stride = subtrahend_cand->base_expr; - ctype = TREE_TYPE (SSA_NAME_VAR (base_in)); + ctype = TREE_TYPE (base_in); if (has_single_use (addend_in)) savings = (subtrahend_cand->dead_savings + stmt_cost (subtrahend_cand->cand_stmt, speed)); @@ -903,7 +903,7 @@ create_add_ssa_cand (gimple gs, tree base_in, tree addend_in, base = base_in; index = subtract_p ? double_int_minus_one : double_int_one; stride = addend_in; - ctype = TREE_TYPE (SSA_NAME_VAR (base_in)); + ctype = TREE_TYPE (base_in); } c = alloc_cand_and_find_basis (CAND_ADD, gs, base, index, stride, @@ -968,7 +968,7 @@ create_add_imm_cand (gimple gs, tree base_in, double_int index_in, bool speed) base = base_in; index = index_in; stride = integer_one_node; - ctype = TREE_TYPE (SSA_NAME_VAR (base_in)); + ctype = TREE_TYPE (base_in); } c = alloc_cand_and_find_basis (kind, gs, base, index, stride, @@ -990,7 +990,7 @@ slsr_process_add (gimple gs, tree rhs1, tree rhs2, bool speed) /* First record an interpretation assuming RHS1 is the base expression and RHS2 is the stride. But it doesn't make sense for the stride to be a pointer, so don't record a candidate in that case. */ - if (!POINTER_TYPE_P (TREE_TYPE (SSA_NAME_VAR (rhs2)))) + if (!POINTER_TYPE_P (TREE_TYPE (rhs2))) { c = create_add_ssa_cand (gs, rhs1, rhs2, subtract_p, speed); @@ -1007,7 +1007,7 @@ slsr_process_add (gimple gs, tree rhs1, tree rhs2, bool speed) /* Otherwise, record another interpretation assuming RHS2 is the base expression and RHS1 is the stride, again provided that the stride is not a pointer. */ - if (!POINTER_TYPE_P (TREE_TYPE (SSA_NAME_VAR (rhs1)))) + if (!POINTER_TYPE_P (TREE_TYPE (rhs1))) { c2 = create_add_ssa_cand (gs, rhs2, rhs1, false, speed); if (c) diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c index 830980a20f0..6fe56136960 100644 --- a/gcc/matrix-reorg.c +++ b/gcc/matrix-reorg.c @@ -976,11 +976,10 @@ update_type_size (struct matrix_info *mi, gimple stmt, tree ssa_var, { lhs = gimple_assign_lhs (stmt); gcc_assert (POINTER_TYPE_P - (TREE_TYPE (SSA_NAME_VAR (TREE_OPERAND (lhs, 0))))); + (TREE_TYPE (TREE_OPERAND (lhs, 0)))); type_size = int_size_in_bytes (TREE_TYPE - (TREE_TYPE - (SSA_NAME_VAR (TREE_OPERAND (lhs, 0))))); + (TREE_TYPE (TREE_OPERAND (lhs, 0)))); } else type_size = int_size_in_bytes (TREE_TYPE (ssa_var)); diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 7c695185096..56d375a3ce3 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -425,7 +425,7 @@ if_convertible_phi_p (struct loop *loop, basic_block bb, gimple phi) /* When the flag_tree_loop_if_convert_stores is not set, check that there are no memory writes in the branches of the loop to be if-converted. */ - if (!is_gimple_reg (SSA_NAME_VAR (gimple_phi_result (phi)))) + if (!is_gimple_reg (gimple_phi_result (phi))) { imm_use_iterator imm_iter; use_operand_p use_p; @@ -1277,7 +1277,7 @@ predicate_scalar_phi (gimple phi, tree cond, res = gimple_phi_result (phi); /* Do not handle virtual phi nodes. */ - if (!is_gimple_reg (SSA_NAME_VAR (res))) + if (!is_gimple_reg (res)) return; bb = gimple_bb (phi); diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ba716f5cbc0..ae6027b8a80 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -237,7 +237,6 @@ remap_ssa_name (tree name, copy_body_data *id) insert_decl_map (id, name, new_tree); SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_tree) = SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name); - TREE_TYPE (new_tree) = TREE_TYPE (SSA_NAME_VAR (new_tree)); /* At least IPA points-to info can be directly transferred. */ if (id->src_cfun->gimple_df && id->src_cfun->gimple_df->ipa_pta diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index 983099454be..ceb816d286d 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -762,7 +762,7 @@ eliminate_useless_phis (void) { gimple phi = gsi_stmt (gsi); result = gimple_phi_result (phi); - if (!is_gimple_reg (SSA_NAME_VAR (result))) + if (!is_gimple_reg (result)) { #ifdef ENABLE_CHECKING size_t i; @@ -772,7 +772,7 @@ eliminate_useless_phis (void) { tree arg = PHI_ARG_DEF (phi, i); if (TREE_CODE (arg) == SSA_NAME - && is_gimple_reg (SSA_NAME_VAR (arg))) + && is_gimple_reg (arg)) { fprintf (stderr, "Argument of PHI is not virtual ("); print_generic_expr (stderr, arg, TDF_SLIM); diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index d8dbc212e6b..9ccf7dfb3e5 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -837,7 +837,7 @@ separate_decls_in_region_name (tree name, copy = name; } - SSA_NAME_VAR (copy) = var_copy; + replace_ssa_name_symbol (copy, var_copy); return copy; } diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 1d7c2a57312..1cde8bd9ee0 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -1862,7 +1862,7 @@ base_names_in_chain_on (struct loop *loop, tree name, tree var) gimple stmt, phi; imm_use_iterator iter; - SSA_NAME_VAR (name) = var; + replace_ssa_name_symbol (name, var); while (1) { @@ -1880,7 +1880,7 @@ base_names_in_chain_on (struct loop *loop, tree name, tree var) return; name = PHI_RESULT (phi); - SSA_NAME_VAR (name) = var; + replace_ssa_name_symbol (name, var); } } diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 0d676ccabb3..e02d7298031 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -332,7 +332,7 @@ rename_ssa_copies (void) res = gimple_phi_result (phi); /* Do not process virtual SSA_NAMES. */ - if (!is_gimple_reg (SSA_NAME_VAR (res))) + if (!is_gimple_reg (res)) continue; for (i = 0; i < gimple_phi_num_args (phi); i++) diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index e4e6458d322..869269603d8 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -1199,7 +1199,7 @@ void register_ssa_partition_check (tree ssa_var) { gcc_assert (TREE_CODE (ssa_var) == SSA_NAME); - if (!is_gimple_reg (SSA_NAME_VAR (ssa_var))) + if (!is_gimple_reg (ssa_var)) { fprintf (stderr, "Illegally registering a virtual SSA name :"); print_generic_expr (stderr, ssa_var, TDF_SLIM); diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 179ceb7c74e..5b301f6df8b 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -234,7 +234,7 @@ phi_rank (gimple stmt) /* Ignore virtual SSA_NAMEs. */ res = gimple_phi_result (stmt); - if (!is_gimple_reg (SSA_NAME_VAR (res))) + if (!is_gimple_reg (res)) return bb_rank[bb->index]; /* The phi definition must have a single use, and that use must be diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 5c229e94267..060ca8aa1ab 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -2736,14 +2736,14 @@ get_constraint_for_ssa_var (tree t, VEC(ce_s, heap) **results, bool address_p) varinfo_t vi; /* We allow FUNCTION_DECLs here even though it doesn't make much sense. */ - gcc_assert (SSA_VAR_P (t) || DECL_P (t)); + gcc_assert (TREE_CODE (t) == SSA_NAME || DECL_P (t)); /* For parameters, get at the points-to set for the actual parm decl. */ if (TREE_CODE (t) == SSA_NAME + && SSA_NAME_IS_DEFAULT_DEF (t) && (TREE_CODE (SSA_NAME_VAR (t)) == PARM_DECL - || TREE_CODE (SSA_NAME_VAR (t)) == RESULT_DECL) - && SSA_NAME_IS_DEFAULT_DEF (t)) + || TREE_CODE (SSA_NAME_VAR (t)) == RESULT_DECL)) { get_constraint_for_ssa_var (SSA_NAME_VAR (t), results, address_p); return; diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index aaf804ae7f3..65d939d0ffd 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -1658,7 +1658,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) /* Skip virtual phi's. The data dependences that are associated with virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */ - if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi)))) + if (!is_gimple_reg (PHI_RESULT (phi))) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "virtual phi. skip."); @@ -1788,7 +1788,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters, } /* Skip virtual phi's. */ - if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi)))) + if (!is_gimple_reg (PHI_RESULT (phi))) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "virtual phi. skip."); diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index cdd3def2974..cd8c3afb1c7 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -555,7 +555,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) /* Skip virtual phi's. The data dependences that are associated with virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */ - if (!is_gimple_reg (SSA_NAME_VAR (def))) + if (!is_gimple_reg (def)) continue; STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_unknown_def_type; @@ -604,7 +604,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM); } - gcc_assert (is_gimple_reg (SSA_NAME_VAR (def))); + gcc_assert (is_gimple_reg (def)); gcc_assert (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_unknown_def_type); nested_cycle = (loop != LOOP_VINFO_LOOP (loop_vinfo)); |