[llvm] [LAA] Support backward dependences with non-constant distance. (PR #91525)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 04:26:36 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 1494d8849fa2aef575dabd431b0060639f4a57c1 464ec4786467b01cbaca6427d1948e7e97bab182 -- llvm/include/llvm/Analysis/LoopAccessAnalysis.h llvm/lib/Analysis/LoopAccessAnalysis.cpp llvm/lib/Transforms/Scalar/LoopFlatten.cpp llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp llvm/unittests/Transforms/Vectorize/VPlanSlpTest.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
index ccc2694ed8..6ebd0fb847 100644
--- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
+++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
@@ -316,7 +316,10 @@ private:
   /// RecordDependences is true.
   SmallVector<Dependence, 8> Dependences;
 
-  /// The maximum width of a target's vector registers multiplied by 2 to also roughly account for additional interleaving. Is used to decide if a backwards dependence with non-constant stride should be classified as backwards-vectorizable or unknown (triggering a runtime check).
+  /// The maximum width of a target's vector registers multiplied by 2 to also
+  /// roughly account for additional interleaving. Is used to decide if a
+  /// backwards dependence with non-constant stride should be classified as
+  /// backwards-vectorizable or unknown (triggering a runtime check).
   unsigned MaxTargetVectorWidthInBits = 0;
 
   /// Check whether there is a plausible dependence between the two
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index be8deae251..35061508c3 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -3048,7 +3048,8 @@ LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE,
     TypeSize FixedWidth =
         TTI->getRegisterBitWidth(TargetTransformInfo::RGK_FixedWidthVector);
     if (FixedWidth.isNonZero()) {
-      // Scale the vector width by 2 as rough estimate to also consider interleaving.
+      // Scale the vector width by 2 as rough estimate to also consider
+      // interleaving.
       MaxTargetVectorWidthInBits = FixedWidth.getFixedValue() * 2;
     }
 

``````````

</details>


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


More information about the llvm-commits mailing list