[llvm] d9b9ae6 - [SLP][NFC]Use transform nodes before building external uses, NFC.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 08:19:20 PDT 2024
Author: Alexey Bataev
Date: 2024-08-14T08:19:05-07:00
New Revision: d9b9ae6ba9d85114c61878b783d4eac816fd06a6
URL: https://github.com/llvm/llvm-project/commit/d9b9ae6ba9d85114c61878b783d4eac816fd06a6
DIFF: https://github.com/llvm/llvm-project/commit/d9b9ae6ba9d85114c61878b783d4eac816fd06a6.diff
LOG: [SLP][NFC]Use transform nodes before building external uses, NFC.
In preparing for the future upcoming patches, just moving the call to
the proper place, which is NFC for now.
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 feffd9ae3c99b..0550c926e5d1d 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -16398,10 +16398,10 @@ SLPVectorizerPass::vectorizeStoreChain(ArrayRef<Value *> Chain, BoUpSLP &R,
}
R.reorderTopToBottom();
R.reorderBottomToTop();
+ R.transformNodes();
R.buildExternalUses();
R.computeMinimumValueSizes();
- R.transformNodes();
Size = R.getTreeSize();
if (S.getOpcode() == Instruction::Load)
@@ -16968,10 +16968,10 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
R.reorderBottomToTop(
/*IgnoreReorder=*/!isa<InsertElementInst>(Ops.front()) &&
!R.doesRootHaveInTreeUses());
+ R.transformNodes();
R.buildExternalUses();
R.computeMinimumValueSizes();
- R.transformNodes();
InstructionCost Cost = R.getTreeCost();
CandidateFound = true;
MinCost = std::min(MinCost, Cost);
@@ -17906,10 +17906,10 @@ class HorizontalReduction {
for (Value *RdxVal : VL)
if (RequiredExtract.contains(RdxVal))
LocalExternallyUsedValues[RdxVal];
+ V.transformNodes();
V.buildExternalUses(LocalExternallyUsedValues);
V.computeMinimumValueSizes();
- V.transformNodes();
// Estimate cost.
InstructionCost TreeCost = V.getTreeCost(VL);
More information about the llvm-commits
mailing list