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

Sahasrabuddhe, Sameer Sameer.Sahasrabuddhe at amd.com
Thu Sep 27 20:37:02 PDT 2012


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.

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().

Sameer.





More information about the llvm-commits mailing list