[RFC] Have the scalarizer generate vectorizable loops.

Daniel Berlin dberlin@dberlin.org
Thu Jan 5 00:21:00 GMT 2006


On Thu, 2006-01-05 at 01:13 +0100, Zdenek Dvorak wrote:
> Hello,
> 
> > > > > It passed make -k check with no additional regressions.
> > > > > 
> > > > > Who can approve this patch ? Sebastian ? DannyB ?
> > > > 
> > > > I looked at the patch, and it looks fine to me, although it does look
> > > > like this code is getting a bit messy.
> > > > 
> > > > (Personally, I think we should be using SCEV more heavily than we do
> > > > now, instead of making up affine style expressions everywhere, like loop
> > > > strength reduction)
> > > 
> > > the reason for this is that ivopts and # of iteration analysis only work
> > > with affine ivs,
> > >  and having to wrap and unwrap the components from
> > > CHRECs would be quite cumbersome (and wasting memory). 
> > 
> > You are joking, right?
> > 
> > It ends up looking something like ComputeIterationCount* in
> > http://llvm.cs.uiuc.edu/cvsweb/cvsweb.cgi/llvm/lib/Analysis/ScalarEvolution.cpp?rev=1.44&content-type=text/x-cvsweb-markup
> > 
> > This code looks a heck of a lot nicer than the weird mix of stuff we
> > have.
> 
> you are joking, right? Not about the part that the code looks nicer, of
> course.  But:
...

> If everyone agrees that it is sufficient for gcc to handle loops of very
> special form, with step one, whose control variable is signed, I may
> also write the # of iteration analysis into 100 lines of nice code.
> Unfortunately, unlike toy compilers, we probably cannot afford this type
> of simplification :-(

You've missed the point entirely.
Notice that they compute *everything* using SCEV, instead of a weird mix
of SCEV and affine expressions, which you claim is so "cumbersome to
wrap and unwrap".

There is in fact, *nothing* that stops them from extending their code to
work as well as ours, and do so in a way that retains the niceness that
we don't have.






More information about the Fortran mailing list