Scheduling an early complete loop unrolling pass?

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Mon Feb 5 21:51:00 GMT 2007


Hello,

> >As we also only vectorize innermost loops I believe doing a
> >complete unrolling pass early will help in general (I pushed
> >for this some time ago).
> >
> >Thoughts?
> 
> It might also hurt, though, since we don't have a basic block 
> vectorizer.  IIUC the vectorizer is able to turn
> 
>   for (i = 0; i < 4; i++)
>     v[i] = 0.0;
> 
> into
> 
>   *(vector double *)v = (vector double){0.0, 0.0, 0.0, 0.0};

I intentionally put the cunroll pass after vectorizer to enable this.  I
guess we might choose to rather unroll the loop, and leave creation of
the vector operations on some kind of later combine/straight-line code
vectorization pass.

Zdenek



More information about the Gcc mailing list