[PATCH] D36791: [Polly][Bug fix] Wrong dependences filtering during Fully Indexed expansion

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 19 12:30:45 PDT 2017


Meinersbur added inline comments.


================
Comment at: lib/Transform/MaximalStaticExpansion.cpp:166
+
+        // Filter out Statement to Statement dependences.
+        if (!Map.can_curry())
----------------
niosega wrote:
> Meinersbur wrote:
> > niosega wrote:
> > > Meinersbur wrote:
> > > > niosega wrote:
> > > > > Meinersbur wrote:
> > > > > > Why? How can this happen?
> > > > > I don't know why but when I am asking AL_Reference or AL_Access dependencies, I also get Statement to Statement dependencies in the union_map. So I need to filter these out. Am I doing something wrong in the dependencies retrieval call ?
> > > > I think this is due to the broken dependency info in case there are reduction candidates. Did you switch off reduction detection?
> > > With -polly-dependences-use-reductions=false in the opt command line, I still have the Statement to Statement dependencies.
> > > 
> > Can you check whether these are the same as the reference-level dependencies (i.e. without the tag)?
> > 
> > In any case, AL_Access and AL_Reference are very broken. We'll have to fix that one day.
> For the following source code :
> ```
> void mse(double A[Ni], double B[Nj], double C[Nj], double D[Nj]) {
>   int i,j;
>   for (j = 0; j < Ni; j++) {
>     for (int i = 0; i<Nj; i++)
>       B[i] = i;
>     for (int i = 0; i<Nj; i++)
>       D[i] = i;
>     A[j] = B[j];
>     C[j] = D[j];
>   }
> }
> ```
> 
> I have these AL_Ref deps :
> ```
> Stmt_for_body9[i0, i0] -> Stmt_for_end15[i0] : 0 <= i0 <= 9999; 
> Stmt_for_body4[i0, i0] -> Stmt_for_end15[i0] : 0 <= i0 <= 9999;
>  [Stmt_for_body4[i0, i0] -> MemRef_B[]] -> [Stmt_for_end15[i0] -> MemRef_B[]] : 0 <= i0 <= 9999; 
> [Stmt_for_body9[i0, i0] -> MemRef_D[]] -> [Stmt_for_end15[i0] -> MemRef_D[]] : 0 <= i0 <= 9999 
> ```
> 
> And these AL_Statement deps :
> ```
> Stmt_for_body9[i0, i0] -> Stmt_for_end15[i0] : 0 <= i0 <= 9999; 
> Stmt_for_body4[i0, i0] -> Stmt_for_end15[i0] : 0 <= i0 <= 9999 
> ```
> 
> The dependencies seems to be correct and coherent.
Thanks for confirming.


Repository:
  rL LLVM

https://reviews.llvm.org/D36791





More information about the llvm-commits mailing list