[llvm] 007aa6d - [SLP] Increase UsesLimit to 64 (#99467)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 05:32:32 PDT 2024
Author: Yangyu Chen
Date: 2024-07-19T20:32:28+08:00
New Revision: 007aa6d1b274baf0b4d1c02a8d7d56f219e5f127
URL: https://github.com/llvm/llvm-project/commit/007aa6d1b274baf0b4d1c02a8d7d56f219e5f127
DIFF: https://github.com/llvm/llvm-project/commit/007aa6d1b274baf0b4d1c02a8d7d56f219e5f127.diff
LOG: [SLP] Increase UsesLimit to 64 (#99467)
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]
Signed-off-by: Yangyu Chen <cyy at cyyself.name>
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index d8c3bae06e932..bf2f2c334e4c1 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.
More information about the llvm-commits
mailing list