[PATCH 6/6] Move loop flattening and SLP vectorization at the end of loop transforms.

Richard Guenther richard.guenther@gmail.com
Sat Oct 30 08:01:00 GMT 2010


On Fri, Oct 29, 2010 at 10:52 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> On Fri, Oct 29, 2010 at 08:18, Richard Guenther <rguenther@suse.de> wrote:
>> IVOPTs should certainly be after SLP.
>
> Ok.
>
>> I also don't expect loop
>> flattening to introduce SLP opportunities (I'd be curious for
>> a testcase where it does so).
>
> Whenever the loop nests are not perfectly nested, there is an
> opportunity to SLP after loop flattening and if-conversion.
> See the last two slides of the presentation that Reza gave at the
> summit:
>
> http://gcc.gnu.org/wiki/summit2010?action=AttachFile&do=get&target=pop-slides.pdf
>
> for (i = 0; i < 1000; i++) {
>   if (i & 1) a[i] = b[i] + 1;
>   for (j = 0; j < 50; j++) {
>     if (j & 1) c[i,j] = d[j] + 1;
>   }
> }

That's not SLP I think (the slides are somewhat odd - well, the pseudocode is,
I can't see that the loops are equivalent).

Note that SLP is straight-line code vectorization.

Richard.

> Sebastian
>



More information about the Gcc-patches mailing list