aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2005-08-04 18:16:41 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2005-08-04 14:16:41 -0400
commitc4f548b8c5bd9b7178466ec69433f652bdc7e7f6 (patch)
tree14c04ed7180eb69104119cc479397db4833e81aa /gcc/tree-cfg.c
parent9ef524bac29974fbed968990aeb8ca887c228f13 (diff)
downloadgcc-c4f548b8c5bd9b7178466ec69433f652bdc7e7f6.zip
gcc-c4f548b8c5bd9b7178466ec69433f652bdc7e7f6.tar.gz
gcc-c4f548b8c5bd9b7178466ec69433f652bdc7e7f6.tar.bz2
re PR tree-optimization/22037 (internal compiler error: verify_ssa failed)
PR 22037 * tree-cfg.c (replace_uses_by): Call mark_new_vars_to_rename. (tree_merge_blocks): Propagate anything allowed by may_propagate_copy. Clarify documentation. * passes.c (execute_todo): If cleanup_tree_cfg invalidated the SSA form, schedule an update if necessary. testsuite/ChangeLog PR 22037 * g++.dg/tree-ssa/pr22037.C: From-SVN: r102740
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 096da09..b5a0696 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1273,7 +1273,7 @@ replace_uses_by (tree name, tree val)
if (TREE_CODE (rhs) == ADDR_EXPR)
recompute_tree_invarant_for_addr_expr (rhs);
- update_stmt (stmt);
+ mark_new_vars_to_rename (stmt);
}
VEC_free (tree, heap, stmts);
@@ -1304,18 +1304,15 @@ tree_merge_blocks (basic_block a, basic_block b)
if (dump_file)
fprintf (dump_file, "Merging blocks %d and %d\n", a->index, b->index);
- /* Remove the phi nodes. */
+ /* Remove all single-valued PHI nodes from block B of the form
+ V_i = PHI <V_j> by propagating V_j to all the uses of V_i. */
bsi = bsi_last (a);
for (phi = phi_nodes (b); phi; phi = phi_nodes (b))
{
tree def = PHI_RESULT (phi), use = PHI_ARG_DEF (phi, 0);
tree copy;
- if (!may_propagate_copy (def, use)
- /* Propagating pointers might cause the set of vops for statements
- to be changed, and thus require ssa form update. */
- || (is_gimple_reg (def)
- && POINTER_TYPE_P (TREE_TYPE (def))))
+ if (!may_propagate_copy (def, use))
{
gcc_assert (is_gimple_reg (def));
@@ -1330,6 +1327,7 @@ tree_merge_blocks (basic_block a, basic_block b)
}
else
replace_uses_by (def, use);
+
remove_phi_node (phi, NULL);
}