[llvm] 53f9124 - [SLP][NFC]Remove extra unused vars, add TODO, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 12:27:05 PST 2023
Author: Alexey Bataev
Date: 2023-11-22T12:26:54-08:00
New Revision: 53f912480f7fab5ee903d76fd5c7aed5df88eea4
URL: https://github.com/llvm/llvm-project/commit/53f912480f7fab5ee903d76fd5c7aed5df88eea4
DIFF: https://github.com/llvm/llvm-project/commit/53f912480f7fab5ee903d76fd5c7aed5df88eea4.diff
LOG: [SLP][NFC]Remove extra unused vars, add TODO, NFC.
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 eebfeed6a877fd9..b73de2ed6ff9a38 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -6961,13 +6961,12 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
}))) &&
!all_of(Gathers, [&](Value *V) { return R.getTreeEntry(V); }) &&
!isSplat(Gathers)) {
- BoUpSLP::ValueSet VectorizedLoads;
+ SetVector<Value *> VectorizedLoads;
SmallVector<LoadInst *> VectorizedStarts;
SmallVector<std::pair<unsigned, unsigned>> ScatterVectorized;
unsigned StartIdx = 0;
unsigned VF = VL.size() / 2;
- const unsigned Sz = R.DL->getTypeSizeInBits(VL.front()->getType());
- for (unsigned MinVF = R.getMinVF(2 * Sz); VF >= MinVF; VF /= 2) {
+ for (; VF >= MinVF; VF /= 2) {
for (unsigned Cnt = StartIdx, End = VL.size(); Cnt + VF <= End;
Cnt += VF) {
ArrayRef<Value *> Slice = VL.slice(Cnt, VF);
@@ -6990,6 +6989,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
case LoadsState::PossibleStridedVectorize:
// Mark the vectorized loads so that we don't vectorize them
// again.
+ // TODO: better handling of loads with reorders.
if (LS == LoadsState::Vectorize && CurrentOrder.empty())
VectorizedStarts.push_back(cast<LoadInst>(Slice.front()));
else
More information about the llvm-commits
mailing list