[llvm] [SLP] Increase UsesLimit to 64 (PR #99467)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 03:27:30 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Yangyu Chen (cyyself)

<details>
<summary>Changes</summary>

Since commit 82b800ecb35fb46881aa52000fa40b1b99aa654e addressed the issue #<!-- -->99327 , we see some performance regression (13%) on some verilator generated C++ code. This is because the UsesLimit is set to 8, which is too small for the verilator generated code. I have analyzed the need for the UsesLimit from [1] and found that the UsesLimit should be at least 64 to cover most of these cases. Thus, This patch increases the UsesLimit to 64.

Link: https://github.com/llvm/llvm-project/issues/99327#issuecomment-2236052879 [1]

---
Full diff: https://github.com/llvm/llvm-project/pull/99467.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index d88c6307b994b..6f0878d5384be 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -209,7 +209,7 @@ static const unsigned AliasedCheckLimit = 10;
 
 // Limit of the number of uses for potentially transformed instructions/values,
 // used in checks to avoid compile-time explode.
-static constexpr int UsesLimit = 8;
+static constexpr int UsesLimit = 64;
 
 // Another limit for the alias checks: The maximum distance between load/store
 // instructions where alias checks are done.

``````````

</details>


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


More information about the llvm-commits mailing list