[PATCH, PR 40744] Turn down SRA a bit
Richard Guenther
rguenther@suse.de
Fri Aug 7 08:26:00 GMT 2009
On Thu, 6 Aug 2009, Diego Novillo wrote:
> On Thu, Aug 6, 2009 at 14:23, Martin Jambor<mjambor@suse.cz> wrote:
>
> > This patch changes SRA in such a way that in order
> > to create a replacement, the corresponding access (group) must either:
> >
> > - be read individually multiple times or
>
> What if the only read is inside a hot loop? The multiple reads
> heuristic should probably use scalar evolutions to distinguish 1
> from many in the presence of loops. Perhaps just finding out
> whether the read is inside a loop is good enough.
It would just generate
SR_1 = var;
D.123_2 = SR_1;
thus not do anything interesting.
> > - Â if (allow_replacements && scalar && !root->first_child)
> > + Â if (allow_replacements && scalar && !root->first_child
> > + Â Â Â && (root->grp_hint
> > + Â Â Â Â || (direct_read && root->grp_write)))
>
> Clearer to line up the whole predicate vertically.
indeed.
Thanks,
Richard.
More information about the Gcc-patches
mailing list