[llvm] [LAA] Strip outdated comment in isDependent (NFC) (PR #146367)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 08:25:46 PDT 2025


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/146367

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

>From bacd8915300198cbd81760f4040780e2e8f84117 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
Date: Mon, 30 Jun 2025 16:23:16 +0100
Subject: [PATCH] [LAA] Strip outdated comment in isDependent (NFC)

The comment has been outdated since 87ddd3a1 ([LAA] Rename and fix
semantics of MaxSafeDepDistBytes to MinDepDistBytes).
---
 llvm/lib/Analysis/LoopAccessAnalysis.cpp | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 007ee3cf01502..b14eedae07a1c 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -2280,22 +2280,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 different 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