[LAA] Comment how memchecks are codegened
authorAdam Nemet <anemet@apple.com>
Wed, 19 Aug 2015 17:24:36 +0000 (17:24 +0000)
committerAdam Nemet <anemet@apple.com>
Wed, 19 Aug 2015 17:24:36 +0000 (17:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245465 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LoopAccessAnalysis.cpp

index b931589ed04340eeb410fb14ca600c9fb9a31fcf..41499df43cc3ccb23204e74f54491851a06dd017 100644 (file)
@@ -1668,6 +1668,8 @@ std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeChecks(
 
   for (const auto &Check : ExpandedChecks) {
     const PointerBounds &A = Check.first, &B = Check.second;
+    // Check if two pointers (A and B) conflict where conflict is computed as:
+    // start(A) <= end(B) && start(B) <= end(A)
     unsigned AS0 = A.Start->getType()->getPointerAddressSpace();
     unsigned AS1 = B.Start->getType()->getPointerAddressSpace();