* Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c
@ 2018-10-08 17:37 Richard Sandiford
2018-10-08 17:54 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Richard Sandiford @ 2018-10-08 17:37 UTC (permalink / raw)
To: gcc-patches
As pointed out by Richard in PR63155. It speeds up the testcase a few %.
Tested on aarch64-linux-gnu. OK to install?
Richard
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.
Index: gcc/gimple-ssa-backprop.c
===================================================================
--- gcc/gimple-ssa-backprop.c 2018-06-18 15:22:36.918297134 +0100
+++ gcc/gimple-ssa-backprop.c 2018-10-08 18:27:00.874770262 +0100
@@ -496,10 +496,11 @@ backprop::process_use (gimple *stmt, tre
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, usag
process_use (stmt, var, &subinfo);
*info &= subinfo;
if (!info->is_useful ())
- {
- BREAK_FROM_IMM_USE_STMT (iter);
- return false;
- }
+ return false;
}
}
return true;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c
2018-10-08 17:37 Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c Richard Sandiford
@ 2018-10-08 17:54 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2018-10-08 17:54 UTC (permalink / raw)
To: gcc-patches, richard.sandiford
On 10/8/18 11:27 AM, Richard Sandiford wrote:
> As pointed out by Richard in PR63155. It speeds up the testcase a few %.
>
> Tested on aarch64-linux-gnu. OK to install?
>
> Richard
>
>
> 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.
OK.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-08 17:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 17:37 Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c Richard Sandiford
2018-10-08 17:54 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).