The functions use LAI and MemoryDepChecker classes so they need to be
defined after those definitions outside of the Dependence class.
Will be used by the LoopLoadElimination pass.
Differential D13257
[LAA] LLE 4/6: APIs to access the dependent instructions for a dependence, NFC anemet on Sep 29 2015, 10:28 AM. Authored by
Details The functions use LAI and MemoryDepChecker classes so they need to be Will be used by the LoopLoadElimination pass.
Diff Detail
Event TimelineComment Actions LGTM. 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 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. Comment Actions Thanks for the reviews, Hal!
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. Comment Actions 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, |