aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-09-05 13:29:13 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-09-05 13:29:13 +0000
commit18eb76ebfa25806dab9a23e726f1d8f914c51630 (patch)
tree6a4da24f3eeac38fb070a1b1006f7948c7c1d8c3
parente124e65f35b41bf118766d910bc307db160f3073 (diff)
downloadgcc-18eb76ebfa25806dab9a23e726f1d8f914c51630.zip
gcc-18eb76ebfa25806dab9a23e726f1d8f914c51630.tar.gz
gcc-18eb76ebfa25806dab9a23e726f1d8f914c51630.tar.bz2
re PR tree-optimization/46590 (long compile time with -O2 and many loops)
2012-09-05 Richard Guenther <rguenther@suse.de> PR tree-optimization/46590 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Do not update SSA form here. (canonicalize_induction_variables): Assert we do not need to update SSA form. (tree_unroll_loops_completely): Update SSA form here. * tree-ssa-loop-manip.c (gimple_duplicate_loop_to_header_edge): Do not verify loop-closed SSA form if SSA form is not up-to-date. From-SVN: r190978
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c4
-rw-r--r--gcc/tree-ssa-loop-manip.c8
3 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9866362..33a8dfd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2012-09-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/46590
+ * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Do not
+ update SSA form here.
+ (canonicalize_induction_variables): Assert we do not need to
+ update SSA form.
+ (tree_unroll_loops_completely): Update SSA form here.
+ * tree-ssa-loop-manip.c (gimple_duplicate_loop_to_header_edge):
+ Do not verify loop-closed SSA form if SSA form is not up-to-date.
+
2012-09-05 Georg-Johann Lay <avr@gjlay.de>
PR target/54461
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 48fd3f4..e1584b4 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -414,7 +414,6 @@ try_unroll_loop_completely (struct loop *loop,
else
gimple_cond_make_false (cond);
update_stmt (cond);
- update_ssa (TODO_update_ssa);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Unrolled loop %d completely.\n", loop->num);
@@ -493,6 +492,7 @@ canonicalize_induction_variables (void)
true, UL_SINGLE_ITER,
true);
}
+ gcc_assert (!need_ssa_update_p (cfun));
/* Clean up the information about numbers of iterations, since brute force
evaluation could reveal new information. */
@@ -536,6 +536,8 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer)
if (changed)
{
+ update_ssa (TODO_update_ssa);
+
/* This will take care of removing completely unrolled loops
from the loop structures so we can continue unrolling now
innermost loops. */
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 832a501..9732fbe 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -752,7 +752,13 @@ gimple_duplicate_loop_to_header_edge (struct loop *loop, edge e,
return false;
#ifdef ENABLE_CHECKING
- if (loops_state_satisfies_p (LOOP_CLOSED_SSA))
+ /* ??? This forces needless update_ssa calls after processing each
+ loop instead of just once after processing all loops. We should
+ instead verify that loop-closed SSA form is up-to-date for LOOP
+ only (and possibly SSA form). For now just skip verifying if
+ there are to-be renamed variables. */
+ if (!need_ssa_update_p (cfun)
+ && loops_state_satisfies_p (LOOP_CLOSED_SSA))
verify_loop_closed_ssa (true);
#endif