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

Hal Finkel hfinkel at anl.gov
Wed Sep 26 08:17:03 PDT 2012


On Wed, 26 Sep 2012 16:52:48 +0200
Tobias Grosser <tobias at grosser.es> wrote:

> On 09/26/2012 04:34 PM, Hal Finkel wrote:
> > On Wed, 26 Sep 2012 10:10:28 +0200
> > Tobias Grosser <tobias at grosser.es> wrote:
> >
> >> On 09/26/2012 12:02 AM, Hal Finkel wrote:
> >>> I've attached an updated version of the pass. This version works
> >>> better (several bugs have been fixed), and also includes a working
> >>> bounds analysis.
> >>
> >> Hi Hal,
> >>
> >> I tested this one again and found it has still problems.
> >> himeno_2.ll gives the expected output, himeno_1.ll does not.
> >
> > You need to run LICM first in order for case 1 to work correctly. So
> > running opt -analyze -licm -delinearize and things are fine.
> 
> Would it be difficult to avoid this?

I'm not sure. The algorithm depends on being able to isolate the
loop-invariant factors from the loop-dependent factors, and assumes
that the 'size' of a dimension is loop invariant.

> The original test case had 
> branches/loops that blocked LICM. (If needed, I could provide a test 
> case where -licm does not perform a transformation).

Yes, please do, and I'll see if I can find a way to work around the
problem.

Thanks again,
Hal

> 
> Cheers
> Tobi
> 



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



More information about the llvm-commits mailing list