[llvm] Changed default value of slp-max-vf to 192 (PR #70479)
Dmitriy Smirnov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 27 09:59:45 PDT 2023
https://github.com/d-smirnov created https://github.com/llvm/llvm-project/pull/70479
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
>From 6252e1ec1b01e482dcae1ad5cc685616eeffa409 Mon Sep 17 00:00:00 2001
From: Dmitriy Smirnov <dmitriy.smirnov at arm.com>
Date: Fri, 27 Oct 2023 15:58:46 +0000
Subject: [PATCH] Changed default value of slp-max-vf to 192
1. Changed default value of slp-max-vf to 192
2. Minor performance fix: SmallSet -> SmallDenseSet
---
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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)
More information about the llvm-commits
mailing list