Skip to content

Commit 0948c29

Browse files
fhahnIcohedron
authored andcommitted
[VPlan] Remove dead VPBB argument from tryTo[Create]Widen[Recipe] (NFC)
The functions now use VPBuilder to insert recipes and the VPBB argument is unused. Clean it up.
1 parent df68c22 commit 0948c29

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8542,8 +8542,7 @@ bool VPRecipeBuilder::shouldWiden(Instruction *I, VFRange &Range) const {
85428542
}
85438543

85448544
VPWidenRecipe *VPRecipeBuilder::tryToWiden(Instruction *I,
8545-
ArrayRef<VPValue *> Operands,
8546-
VPBasicBlock *VPBB) {
8545+
ArrayRef<VPValue *> Operands) {
85478546
switch (I->getOpcode()) {
85488547
default:
85498548
return nullptr;
@@ -8823,10 +8822,8 @@ bool VPRecipeBuilder::getScaledReductions(
88238822
return false;
88248823
}
88258824

8826-
VPRecipeBase *
8827-
VPRecipeBuilder::tryToCreateWidenRecipe(Instruction *Instr,
8828-
ArrayRef<VPValue *> Operands,
8829-
VFRange &Range, VPBasicBlock *VPBB) {
8825+
VPRecipeBase *VPRecipeBuilder::tryToCreateWidenRecipe(
8826+
Instruction *Instr, ArrayRef<VPValue *> Operands, VFRange &Range) {
88308827
// First, check for specific widening recipes that deal with inductions, Phi
88318828
// nodes, calls and memory operations.
88328829
VPRecipeBase *Recipe;
@@ -8905,7 +8902,7 @@ VPRecipeBuilder::tryToCreateWidenRecipe(Instruction *Instr,
89058902
*CI);
89068903
}
89078904

8908-
return tryToWiden(Instr, Operands, VPBB);
8905+
return tryToWiden(Instr, Operands);
89098906
}
89108907

89118908
VPRecipeBase *
@@ -9373,7 +9370,7 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
93739370
}
93749371

93759372
VPRecipeBase *Recipe =
9376-
RecipeBuilder.tryToCreateWidenRecipe(Instr, Operands, Range, VPBB);
9373+
RecipeBuilder.tryToCreateWidenRecipe(Instr, Operands, Range);
93779374
if (!Recipe)
93789375
Recipe = RecipeBuilder.handleReplication(Instr, Operands, Range);
93799376

llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ class VPRecipeBuilder {
128128
/// Check if \p I has an opcode that can be widened and return a VPWidenRecipe
129129
/// if it can. The function should only be called if the cost-model indicates
130130
/// that widening should be performed.
131-
VPWidenRecipe *tryToWiden(Instruction *I, ArrayRef<VPValue *> Operands,
132-
VPBasicBlock *VPBB);
131+
VPWidenRecipe *tryToWiden(Instruction *I, ArrayRef<VPValue *> Operands);
133132

134133
/// Makes Histogram count operations safe for vectorization, by emitting a
135134
/// llvm.experimental.vector.histogram.add intrinsic in place of the
@@ -174,7 +173,7 @@ class VPRecipeBuilder {
174173
/// the given VF \p Range.
175174
VPRecipeBase *tryToCreateWidenRecipe(Instruction *Instr,
176175
ArrayRef<VPValue *> Operands,
177-
VFRange &Range, VPBasicBlock *VPBB);
176+
VFRange &Range);
178177

179178
/// Create and return a partial reduction recipe for a reduction instruction
180179
/// along with binary operation and reduction phi operands.

0 commit comments

Comments
 (0)