[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
Tue Jan 19 09:57:31 PST 2016
anemet added a comment.
In http://reviews.llvm.org/D13257#279151, @hfinkel wrote:
> 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.
Hal, sorry for the huge delay on this but now that I got back to this and reread your question, I think I understand the disconnect. Dependence objects are between instructions and *not* between pointers/accesses. (This is one change when LAA was moved out of LV and the interface was generalized.) Thus we will have multiple distance-8 dependence here as I said in my original reply.
There is a comment before the Dependence class mentioning that this is a relation between instructions (and not pointers/accesses):
/// \brief Dependece between memory access instructions.
struct Dependence {
Let me know if that's sufficient or you want me to elaborate somehow.
Thanks,
Adam
Repository:
rL LLVM
http://reviews.llvm.org/D13257
More information about the llvm-commits
mailing list