[llvm] 20864c4 - [LAA] Strip outdated comment in isDependent (NFC) (#146367)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 05:54:41 PDT 2025


Author: Ramkumar Ramachandra
Date: 2025-07-07T13:54:37+01:00
New Revision: 20864c4379f31844eae7da1179b78d48ad0ae487

URL: https://github.com/llvm/llvm-project/commit/20864c4379f31844eae7da1179b78d48ad0ae487
DIFF: https://github.com/llvm/llvm-project/commit/20864c4379f31844eae7da1179b78d48ad0ae487.diff

LOG: [LAA] Strip outdated comment in isDependent (NFC) (#146367)

The comment has been outdated since 87ddd3a1 ([LAA] Rename and fix
semantics of MaxSafeDepDistBytes to MinDepDistBytes).

Added: 
    

Modified: 
    llvm/lib/Analysis/LoopAccessAnalysis.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index b6dc5c487475e..7b71dad23948c 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -2256,22 +2256,6 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
     return Dependence::Backward;
   }
 
-  // Positive distance bigger than max vectorization factor.
-  // FIXME: Should use max factor instead of max distance in bytes, which could
-  // not handle 
diff erent types.
-  // E.g. Assume one char is 1 byte in memory and one int is 4 bytes.
-  //      void foo (int *A, char *B) {
-  //        for (unsigned i = 0; i < 1024; i++) {
-  //          A[i+2] = A[i] + 1;
-  //          B[i+2] = B[i] + 1;
-  //        }
-  //      }
-  //
-  // This case is currently unsafe according to the max safe distance. If we
-  // analyze the two accesses on array B, the max safe dependence distance
-  // is 2. Then we analyze the accesses on array A, the minimum distance needed
-  // is 8, which is less than 2 and forbidden vectorization, But actually
-  // both A and B could be vectorized by 2 iterations.
   MinDepDistBytes =
       std::min(static_cast<uint64_t>(MinDistance), MinDepDistBytes);
 


        


More information about the llvm-commits mailing list