]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Speedup loop splitting SSA update
authorRichard Biener <rguenther@suse.de>
Tue, 28 Jun 2022 10:07:14 +0000 (12:07 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 28 Jun 2022 11:13:34 +0000 (13:13 +0200)
Since we never process loops with inner loops that have been split
we can delay SSA update until after the pass is done with the whole
loop, avoiding the O(function-size) work associated with it.

2022-06-28  Richard Biener  <rguenther@suse.de>

* tree-ssa-loop-split.cc (fix_loop_bb_probability): Do not
call update_ssa.

gcc/tree-ssa-loop-split.cc

index d61bad5ba47bbbabb6461b3b3b16a4f5c59853ba..bccf621493b00d693fb72c962dd7f09da07e9a1a 100644 (file)
@@ -491,8 +491,6 @@ static void
 fix_loop_bb_probability (class loop *loop1, class loop *loop2, edge true_edge,
                         edge false_edge)
 {
-  update_ssa (TODO_update_ssa);
-
   /* Proportion first loop's bb counts except those dominated by true
      branch to avoid drop 1s down.  */
   basic_block *bbs1, *bbs2;
@@ -1668,7 +1666,8 @@ tree_ssa_split_loops (void)
       if (loop->aux)
        {
          /* If any of our inner loops was split, don't split us,
-            and mark our containing loop as having had splits as well.  */
+            and mark our containing loop as having had splits as well.
+            This allows for delaying SSA update.  */
          loop_outer (loop)->aux = loop;
          continue;
        }