[PATCH] D13257: [LAA] LLE 4/6: APIs to access the dependent instructions for a dependence, NFC

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 15:45:57 PST 2015


anemet added a comment.

In http://reviews.llvm.org/D13257#279151, @hfinkel wrote:

> LGTM.


Thanks for the reviews, Hal!

> Maybe I'm overlooking some existing commentary, but we should do a better job of documenting what the source and destination mean where there are multiple possible sources and/or destinations of the same distance. To be clear about what I mean, if I take your example from http://reviews.llvm.org/D13254:

> 

>   for (unsigned i = 0; i < 100; i++) {

>     A[i+8] = B[i] + 2;

>     C[i] = A[i] * 2;

>   }

>    

> 

> and I do this:

> 

>   for (unsigned i = 0; i < 100; i++) {

>     A[i+8] = B[i] + 2;

>     A[i+8] = F[i] + 2;

>     C[i] = A[i] * 2;

>     D[i] = A[i] * 4;

>   }

>    

> 

> are there multiple distance-8 dependencies, or only one for A[i] <-> A[i+8], and if only one, to which A[i+8] store does it refer (the first or the second). I realize this is a bit silly here, because one of these stores is dead, but generally speaking, we should define how this is represented.


There are multiple (=4) because kills are not taken into consideration.  We just look at the pointers with the same underlying object, whether they are read or write and their order.  So we get the full combination {S1, S2} -> {S3, S4}.

Let me add a comment about this.


http://reviews.llvm.org/D13257





More information about the llvm-commits mailing list