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

Hal Finkel hfinkel at anl.gov
Wed Oct 3 10:19:34 PDT 2012


On Wed, 3 Oct 2012 12:50:59 +0530
Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com> wrote:

> On Mon, 1 Oct 2012 10:32:46 -0700
> Andrew Trick <atrick at apple.com> wrote:
> 
> > Still, it would be worth attempting to solve this problem without a
> > separate polynomial package. I could imagine special-casing the
> > solution for the kind of nested recurrences that we expect to see.
> > It might also make sense to do the division "implicitly" without
> > attempting to create a SCEVUDiv expression. I think you're only
> > dealing with linear expressions of a fairly regular form. SCEV's
> > ability to canonicalize and unqiue expressions certainly helps. I
> > can't say for sure whether this will lead to a simpler
> > implementation, but I hope you consider it.
> 
> I think this is the correct way to go for the delinearizer.

I plan on investigating this approach in the near future.

 -Hal

> Note that
> the implicit division is already happening in the polynomial
> package ... it can instead be ported to produce SCEVs as the quotient
> and remainder.
> 
> Is the following statement a correct generalization of
> delinearization?
> 
>   (ab+c,+,as) = a*(b,+,s) + c
> 
> Note that we are not dividing the start by the step, but instead
> extracting a GCD from both sides along with a remainder from the
> start. Then `a' will be the co-efficient and `c' will be the quantity
> added to the index.
> 
> If this idea makes sense, what are the conditions for the 
> factorization to be correct?
> 
> In some sense, we are externally ``undoing'' the work done by the SCEV
> constructors when they push loop-invariant terms into the AddRec.
> 
> Sameer.
> 



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



More information about the llvm-commits mailing list