Scheduling an early complete loop unrolling pass?
Richard Guenther
rguenther@suse.de
Mon Feb 5 16:14:00 GMT 2007
On Mon, 5 Feb 2007, Jan Hubicka wrote:
> >
> > Hi,
> >
> > currently with -ftree-vectorize we generate for
> >
> > for (i=0; i<3; ++i)
> > # SFT.4346_507 = VDEF <SFT.4346_504(D)>
> > # SFT.4347_508 = VDEF <SFT.4347_505(D)>
> > # SFT.4348_509 = VDEF <SFT.4348_506(D)>
> > d[i] = 0.0;
>
> Also Tomas' patch is supposed to catch this special case and convert it
> into memset that should be subsequently optimized into assignment that
> should be good enough (which reminds me that I forgot to merge the
> memset part of stringop optimizations).
>
> Perhaps this can be made a bit more generic and construct INIT_EXPRs for
> small arrays directly from Tomas's pass (going from memset to assignment
> works just in special cases). Tomas, what is the status of your patch?
It would be certainly interesting to make constant propagation work in
this case (though after vectorization aliasing is in an "interesting"
state).
> Did you run some benchmarks?
Not yet - I'm looking at the C++ SPEC 2006 benchmarks at the moment
and using vectorization there seems to do a lot of collateral damage
(maybe not measurable though).
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
More information about the Gcc
mailing list