]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2012-09-05 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Sep 2012 13:29:13 +0000 (13:29 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Sep 2012 13:29:13 +0000 (13:29 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190978 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-loop-ivcanon.c
gcc/tree-ssa-loop-manip.c

index 9866362b50b4da8cd161f1f5c4addf360747f181..33a8dfd2c7f8690ad925e328c3458718797931f2 100644 (file)
@@ -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
index 48fd3f4425b3618a9b7ef6d20cf80e509f464e00..e1584b44e93e4a259609db3a96c5b524309e5bfe 100644 (file)
@@ -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.  */
index 832a5011493f90f181050eed3d5c6a63f0f65ff3..9732fbe484a8fa0d1a42ec5efe845e34d68a2934 100644 (file)
@@ -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