]> gcc.gnu.org Git - gcc.git/commitdiff
Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 8 Oct 2018 18:58:59 +0000 (18:58 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 8 Oct 2018 18:58:59 +0000 (18:58 +0000)
As pointed out by Richard in PR63155.  It speeds up the testcase a few %.

2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
PR middle-end/63155
* gimple-ssa-backprop.c (backprop::intersect_uses): Use
FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.

From-SVN: r264941

gcc/ChangeLog
gcc/gimple-ssa-backprop.c

index b351e9c5d3dc71acb47d9dff55b152b8b5337dfc..8e06be7620baff1a3d3671292c688c9188a9a77d 100644 (file)
@@ -1,3 +1,9 @@
+2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
+
+       PR middle-end/63155
+       * gimple-ssa-backprop.c (backprop::intersect_uses): Use
+       FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
+
 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/87517
index d554826216f6d4721c6dc57582391ed7e49dcb0c..16b8943d58ee0b0052f1a6ed3f47ce15383a1df2 100644 (file)
@@ -496,10 +496,11 @@ bool
 backprop::intersect_uses (tree var, usage_info *info)
 {
   imm_use_iterator iter;
-  gimple *stmt;
+  use_operand_p use_p;
   *info = usage_info::intersection_identity ();
-  FOR_EACH_IMM_USE_STMT (stmt, iter, var)
+  FOR_EACH_IMM_USE_FAST (use_p, iter, var)
     {
+      gimple *stmt = USE_STMT (use_p);
       if (is_gimple_debug (stmt))
        continue;
       gphi *phi = dyn_cast <gphi *> (stmt);
@@ -523,10 +524,7 @@ backprop::intersect_uses (tree var, usage_info *info)
          process_use (stmt, var, &subinfo);
          *info &= subinfo;
          if (!info->is_useful ())
-           {
-             BREAK_FROM_IMM_USE_STMT (iter);
-             return false;
-           }
+           return false;
        }
     }
   return true;
This page took 0.086734 seconds and 5 git commands to generate.