aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-01-10 16:59:06 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-01-10 16:59:06 +0000
commitd0f76c4b4fa4e0248b0aeac950fd001dcfc32f4d (patch)
treeafc9546800253c22fc041a6064d3cc8ed6f5848e /gcc/tree-cfg.c
parent90d12f1f04dc8a9e11716c79d2411eb922c13b49 (diff)
downloadgcc-d0f76c4b4fa4e0248b0aeac950fd001dcfc32f4d.zip
gcc-d0f76c4b4fa4e0248b0aeac950fd001dcfc32f4d.tar.gz
gcc-d0f76c4b4fa4e0248b0aeac950fd001dcfc32f4d.tar.bz2
re PR tree-optimization/34683 (SSA rewriting in the loop unroller causes quadratic behavior)
2008-01-10 Richard Guenther <rguenther@suse.de> PR middle-end/34683 * tree-cfg.c (tree_merge_blocks): Do not go through the full-blown folding and stmt updating path if we just deal with virtual operands. * tree-ssa-copy.c (may_propagate_copy): Do not short-cut test for abnormal SSA_NAMEs. From-SVN: r131446
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index a8cb627..8da55ff 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1322,7 +1322,21 @@ tree_merge_blocks (basic_block a, basic_block b)
}
else
{
- replace_uses_by (def, use);
+ /* If we deal with a PHI for virtual operands, we can simply
+ propagate these without fussing with folding or updating
+ the stmt. */
+ if (!is_gimple_reg (def))
+ {
+ imm_use_iterator iter;
+ use_operand_p use_p;
+ tree stmt;
+
+ FOR_EACH_IMM_USE_STMT (stmt, iter, def)
+ FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
+ SET_USE (use_p, use);
+ }
+ else
+ replace_uses_by (def, use);
remove_phi_node (phi, NULL, true);
}
}