Skip to content

Commit d9b9ae6

Browse files
committed
[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.
1 parent 80c5ccd commit d9b9ae6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16398,10 +16398,10 @@ SLPVectorizerPass::vectorizeStoreChain(ArrayRef<Value *> Chain, BoUpSLP &R,
1639816398
}
1639916399
R.reorderTopToBottom();
1640016400
R.reorderBottomToTop();
16401+
R.transformNodes();
1640116402
R.buildExternalUses();
1640216403

1640316404
R.computeMinimumValueSizes();
16404-
R.transformNodes();
1640516405

1640616406
Size = R.getTreeSize();
1640716407
if (S.getOpcode() == Instruction::Load)
@@ -16968,10 +16968,10 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
1696816968
R.reorderBottomToTop(
1696916969
/*IgnoreReorder=*/!isa<InsertElementInst>(Ops.front()) &&
1697016970
!R.doesRootHaveInTreeUses());
16971+
R.transformNodes();
1697116972
R.buildExternalUses();
1697216973

1697316974
R.computeMinimumValueSizes();
16974-
R.transformNodes();
1697516975
InstructionCost Cost = R.getTreeCost();
1697616976
CandidateFound = true;
1697716977
MinCost = std::min(MinCost, Cost);
@@ -17906,10 +17906,10 @@ class HorizontalReduction {
1790617906
for (Value *RdxVal : VL)
1790717907
if (RequiredExtract.contains(RdxVal))
1790817908
LocalExternallyUsedValues[RdxVal];
17909+
V.transformNodes();
1790917910
V.buildExternalUses(LocalExternallyUsedValues);
1791017911

1791117912
V.computeMinimumValueSizes();
17912-
V.transformNodes();
1791317913

1791417914
// Estimate cost.
1791517915
InstructionCost TreeCost = V.getTreeCost(VL);

0 commit comments

Comments
 (0)