[llvm-commits] [PATCH] Multidimensional Array Index Delinearization Analysis

Hal Finkel hfinkel at anl.gov
Thu Sep 27 21:09:14 PDT 2012


On Fri, 28 Sep 2012 03:37:02 +0000
"Sahasrabuddhe, Sameer" <Sameer.Sahasrabuddhe at amd.com> wrote:

> Hi Hal,
> 
> > I agree; this should be tried. I already had the polynomial
> > extraction code written, which is why I used it; it was not really
> > a design decision. I think that I now understand the requirements
> > well enough to try extracting things from the SCEVs directly.
> 
> Good to hear that! 
> 
> In a different email, you wrote:
> 
> > better to use SCEVs directly instead of a separate polynomial class
> > (because SCEV's use a recursive polynomial decomposition, things
> > like counting terms in the multivariate sense become more
> > complicated -- but it might be nevertheless worthwhile).
> 
> Can we even do that in the SCEV itself? It seems to me that any
> attempt at counting terms will end up looking just like the
> polynomial implementation.

I think that you're right, but it will be a polynomial in terms of
SCEVs and loop-trip-count variables instead of Values. Nevertheless,
extracting these polynomials from SE should, as you and Tobi
have suggested, be better than doing it directly from the instructions.

> 
> We may have to be careful when handling add-recurrences in SCEV, since
> scalar evolution eagerly pushes loop-invariant terms into the add
> recurrence, when in fact we want those terms outside, to be picked up
> in the GCD. This happens inside ScalarEvolution::getAddExpr() and
> getMulExpr().

Agreed; we'll need to re-expand these.

Thanks again,
Hal

> 
> Sameer.
> 



-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list