]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-loop-distribution.c (pass_loop_distribution::execute): Skip if no loops.
authorBin Cheng <bin.cheng@arm.com>
Wed, 5 Jul 2017 11:50:09 +0000 (11:50 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Wed, 5 Jul 2017 11:50:09 +0000 (11:50 +0000)
* tree-loop-distribution.c (pass_loop_distribution::execute): Skip
if no loops.

From-SVN: r249984

gcc/ChangeLog
gcc/tree-loop-distribution.c

index fa8c40cacddf65f43f2277eb4f1914cc0f517e0f..666159bc8e9f106d283ca9244a50a3602f423af7 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-05  Bin Cheng  <bin.cheng@arm.com>
+
+       * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
+       if no loops.
+
 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
 
        * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
index a60454b521861da3b503b5a004379aa0e112bef4..9f0c801007ca9f69f333fc718c3f83fb07d75948 100644 (file)
@@ -1758,6 +1758,9 @@ pass_loop_distribution::execute (function *fun)
   control_dependences *cd = NULL;
   auto_vec<loop_p> loops_to_be_destroyed;
 
+  if (number_of_loops (fun) <= 1)
+    return 0;
+
   FOR_ALL_BB_FN (bb, fun)
     {
       gimple_stmt_iterator gsi;