[PATCH] D151004: [SLP] Cleanup: Remove `tryToVectorizePair()`, most probably NFC
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 20:26:21 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG806dea46be4c: [SLP] Cleanup: Remove `tryToVectorizePair()`, most probably NFC (authored by vporpo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151004/new/
https://reviews.llvm.org/D151004
Files:
llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Index: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -12418,15 +12418,6 @@
}
}
-bool SLPVectorizerPass::tryToVectorizePair(Value *A, Value *B, BoUpSLP &R) {
- if (!A || !B)
- return false;
- if (isa<InsertElementInst>(A) || isa<InsertElementInst>(B))
- return false;
- Value *VL[] = {A, B};
- return tryToVectorizeList(VL, R);
-}
-
bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
bool MaxVFOnly) {
if (VL.size() < 2)
@@ -12602,14 +12593,14 @@
}
if (Candidates.size() == 1)
- return tryToVectorizePair(Op0, Op1, R);
+ return tryToVectorizeList({Op0, Op1}, R);
// We have multiple options. Try to pick the single best.
std::optional<int> BestCandidate = R.findBestRootPair(Candidates);
if (!BestCandidate)
return false;
- return tryToVectorizePair(Candidates[*BestCandidate].first,
- Candidates[*BestCandidate].second, R);
+ return tryToVectorizeList(
+ {Candidates[*BestCandidate].first, Candidates[*BestCandidate].second}, R);
}
namespace {
Index: llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
===================================================================
--- llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
+++ llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
@@ -91,9 +91,6 @@
/// every time we run into a memory barrier.
void collectSeedInstructions(BasicBlock *BB);
- /// Try to vectorize a chain that starts at two arithmetic instrs.
- bool tryToVectorizePair(Value *A, Value *B, slpvectorizer::BoUpSLP &R);
-
/// Try to vectorize a list of operands.
/// \param MaxVFOnly Vectorize only using maximal allowed register size.
/// \returns true if a value was vectorized.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151004.523985.patch
Type: text/x-patch
Size: 1965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230520/31b64d65/attachment.bin>
More information about the llvm-commits
mailing list