[PATCH] D23176: [LoopVectorizer] Fixed a bug in memory conflict run-time check
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 12:11:32 PDT 2016
anemet added a comment.
I am happy with this now with the comments addressed as long as Ayal also likes it. Thanks for the fix!
================
Comment at: ../lib/Analysis/LoopAccessAnalysis.cpp:165-167
@@ -152,1 +164,5 @@
+/// NoConflict = (P2.Start >= P1.End) || (P1.Start >= P2.End)
+///
+/// The addition of SizeOfElt may be omitted when all accesses are aligned on
+/// size of element boundary. (In this case '<=' should be used instead of '<'.)
void RuntimePointerChecking::insert(Loop *Lp, Value *Ptr, bool WritePtr,
----------------
I am not sure there is value in saying whether it can be omitted. Just say why we need it.
================
Comment at: ../lib/Analysis/LoopAccessAnalysis.cpp:1890-1891
@@ +1889,4 @@
+ // [A|B].End points one byte after the last accessed byte, plus one.
+ // There is no conflict when the intervals are disjoint:
+ // NoConflict = (B.Start >= A.End) || (A.Start >= B.End)
+ //
----------------
Add it that the code actually checks the inverse of this, i.e. B.Start < A.End && A.Start < B.End.
Repository:
rL LLVM
https://reviews.llvm.org/D23176
More information about the llvm-commits
mailing list