This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Scheduling an early complete loop unrolling pass?
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: Richard Guenther <rguenther at suse dot de>, gcc at gcc dot gnu dot org, dorit at il dot ibm dot com
- Date: Mon, 5 Feb 2007 22:51:20 +0100
- Subject: Re: Scheduling an early complete loop unrolling pass?
- References: <45C75005.7010409@lu.unisi.ch>
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