[RFC] Have the scalarizer generate vectorizable loops.
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Thu Jan 5 00:37:00 GMT 2006
Hello,
> > > 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,
where do we mix scev and affine expressions? We have some code that
works purely in scevs, and some that works purely with base+step
decomposition of affine ivs (whatever is more convenient for the
purpose at hand).
Well, I admit that I am no great friend of SCEVs, since we do not really
use anything but affine ivs anywhere at the moment, so they are just
overkill; but I accept them under assumption that someone will use their
full power for something useful sometimes. However, on places that work
purely with affine ivs, using SCEVs just does not make sense to me.
> 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.
As usually, I do not believe that much in speculations; I will believe
when I see it. Show me implementation of say tree-ssa-loop-niter in
scevs that is more elegant and as efficient as what we have now, and I
will apologize and apply your ideas to clean up other pieces of code,
Zdenek
More information about the Fortran
mailing list