[llvm] [LoopVectorizer] Prune VFs based on plan register pressure (PR #132190)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 20 04:50:54 PDT 2025


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 cd0a2a3f1bdaf8dc54d4a4d3c478d41345671e72 43c98be25e6e59958eb53d7216273e9aa3012e98 --extensions h,cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h llvm/lib/Transforms/Vectorize/VPlan.h
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 3574aa3119..916db94bb7 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7610,8 +7610,7 @@ VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
         calculateRegisterUsage(getPlanFor(LegacyVF.Width), LegacyVFs, TTI);
     auto RUs = calculateRegisterUsage(BestPlan, VFs, TTI);
 
-    auto GetMaxUsage = [](
-                          SmallMapVector<unsigned, unsigned, 4> MaxLocalUsers) {
+    auto GetMaxUsage = [](SmallMapVector<unsigned, unsigned, 4> MaxLocalUsers) {
       unsigned Max = 0;
       for (auto Pair : MaxLocalUsers)
         if (Pair.second > Max)

``````````

</details>


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


More information about the llvm-commits mailing list