Commit 91a3cbb4 by Richard Sandiford Committed by Richard Sandiford

Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c

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
parent be86efa7
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> 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
PR target/87517 PR target/87517
...@@ -496,10 +496,11 @@ bool ...@@ -496,10 +496,11 @@ bool
backprop::intersect_uses (tree var, usage_info *info) backprop::intersect_uses (tree var, usage_info *info)
{ {
imm_use_iterator iter; imm_use_iterator iter;
gimple *stmt; use_operand_p use_p;
*info = usage_info::intersection_identity (); *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)) if (is_gimple_debug (stmt))
continue; continue;
gphi *phi = dyn_cast <gphi *> (stmt); gphi *phi = dyn_cast <gphi *> (stmt);
...@@ -523,10 +524,7 @@ backprop::intersect_uses (tree var, usage_info *info) ...@@ -523,10 +524,7 @@ backprop::intersect_uses (tree var, usage_info *info)
process_use (stmt, var, &subinfo); process_use (stmt, var, &subinfo);
*info &= subinfo; *info &= subinfo;
if (!info->is_useful ()) if (!info->is_useful ())
{ return false;
BREAK_FROM_IMM_USE_STMT (iter);
return false;
}
} }
} }
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment