[llvm] [LAA] Check if invariant accesses is strictly before other access. (PR #92307)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 06:58:21 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff d108fa03d4ac1a2634fa0a1e9b3058f4196f261c 11e549f3c97001f7d00c713698516d3a989002d2 -- llvm/lib/Analysis/LoopAccessAnalysis.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index db6cab1fc4..97a102eaa8 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -1977,12 +1977,13 @@ getDependenceDistanceStrideAndSize(
                                    InnermostLoop))
     return MemoryDepChecker::Dependence::IndirectUnsafe;
 
-  // Conservatively use size of 0. Users of the sizes already check and ignore the size if it is 0.
+  // Conservatively use size of 0. Users of the sizes already check and ignore
+  // the size if it is 0.
   uint64_t TypeByteSizeA = 0;
   uint64_t TypeByteSizeB = 0;
   if (!ATy->isScalableTy() && !BTy->isScalableTy()) {
-     TypeByteSizeA = DL.getTypeAllocSize(ATy);
-     TypeByteSizeB = DL.getTypeAllocSize(BTy);
+    TypeByteSizeA = DL.getTypeAllocSize(ATy);
+    TypeByteSizeB = DL.getTypeAllocSize(BTy);
   }
   // If either Src or Sink are loop invariant, check if Src + AccessSize <= Sink
   // (or vice versa). This is done by checking (Sink - (Src + AccessSize)) s>=

``````````

</details>


https://github.com/llvm/llvm-project/pull/92307


More information about the llvm-commits mailing list