[llvm] Changed default value of slp-max-vf to 192 (PR #70479)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 10:00:45 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Dmitriy Smirnov (d-smirnov)

<details>
<summary>Changes</summary>

This PR 
1. Changed default value of slp-max-vf to 192
2. Minor performance fix: SmallSet -> SmallDenseSet

The PR fixes sharp compilation time increase noted in 527.cam4_r when patch https://reviews.llvm.org/D155689 applied. 
Issue observed at LTO phase and caused by increased amount of lengthy instruction chains that SLP vectorizer tries to asses. 
@<!-- -->vporpo 

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


1 Files Affected:

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


``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index bb4e743c1544a98..de7952b1839f5b3 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -138,7 +138,7 @@ MaxVectorRegSizeOption("slp-max-reg-size", cl::init(128), cl::Hidden,
     cl::desc("Attempt to vectorize for this register size in bits"));
 
 static cl::opt<unsigned>
-MaxVFOption("slp-max-vf", cl::init(0), cl::Hidden,
+MaxVFOption("slp-max-vf", cl::init(192), cl::Hidden,
     cl::desc("Maximum SLP vectorization factor (0=unlimited)"));
 
 /// Limits the size of scheduling regions in a block.
@@ -4135,7 +4135,7 @@ static bool areTwoInsertFromSameBuildVector(
   // Go through the vector operand of insertelement instructions trying to find
   // either VU as the original vector for IE2 or V as the original vector for
   // IE1.
-  SmallSet<int, 8> ReusedIdx;
+  SmallDenseSet<int, 8> ReusedIdx;
   bool IsReusedIdx = false;
   do {
     if (IE2 == VU && !IE1)

``````````

</details>


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


More information about the llvm-commits mailing list