re PR tree-optimization/79389 (30% performance regression in SciMark2 MonteCarlo)
authorRichard Biener <rguenther@suse.de>
Fri, 24 Feb 2017 11:51:33 +0000 (11:51 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 24 Feb 2017 11:51:33 +0000 (11:51 +0000)
2017-02-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79389
* gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
debug insns.

From-SVN: r245713

gcc/ChangeLog
gcc/gimple-ssa-split-paths.c

index 66535bf4e3c3839075fc1496ae55344f33c4f7f0..22964c87c3890e53a6c57415f55e5b72ac243d27 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-24  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/79389
+       * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
+       debug insns.
+
 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
 
        * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
index 0f6b2417d2c0b0237e46cfdfe400e6e204995d31..df88c76aa53fa2c5af6773a281d27f78f7ce33ba 100644 (file)
@@ -249,6 +249,8 @@ is_feasible_trace (basic_block bb)
                  imm_use_iterator iter2;
                  FOR_EACH_IMM_USE_FAST (use2_p, iter2, gimple_phi_result (stmt))
                    {
+                     if (is_gimple_debug (USE_STMT (use2_p)))
+                       continue;
                      basic_block use_bb = gimple_bb (USE_STMT (use2_p));
                      if (use_bb != bb
                          && dominated_by_p (CDI_DOMINATORS, bb, use_bb))
@@ -280,11 +282,15 @@ is_feasible_trace (basic_block bb)
            use_operand_p use_p;
            imm_use_iterator iter;
            FOR_EACH_IMM_USE_FAST (use_p, iter, op)
-             if (gimple_bb (USE_STMT (use_p)) == bb)
-               {
-                 found_cprop_opportunity = true;
-                 break;
-               }
+             {
+               if (is_gimple_debug (USE_STMT (use_p)))
+                 continue;
+               if (gimple_bb (USE_STMT (use_p)) == bb)
+                 {
+                   found_cprop_opportunity = true;
+                   break;
+                 }
+             }
          }
        if (found_cprop_opportunity)
          break;