Skip to content

Commit 23b8f11

Browse files
committed
[VPlan] Remove redundant VPWidenRecipe constructors (NFC)
Since the removal of VPWidenEVLRecipe, the constructors taking a VPDefOpcode are not needed any more. Remove them.
1 parent 22a69a2 commit 23b8f11

File tree

2 files changed

+8
-18
lines changed

2 files changed

+8
-18
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,24 +1304,15 @@ struct VPIRPhi : public VPIRInstruction, public VPPhiAccessors {
13041304
class VPWidenRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
13051305
unsigned Opcode;
13061306

1307-
protected:
1308-
VPWidenRecipe(unsigned VPDefOpcode, Instruction &I,
1309-
ArrayRef<VPValue *> Operands)
1310-
: VPRecipeWithIRFlags(VPDefOpcode, Operands, I), VPIRMetadata(I),
1311-
Opcode(I.getOpcode()) {}
1312-
1313-
VPWidenRecipe(unsigned VPDefOpcode, unsigned Opcode,
1314-
ArrayRef<VPValue *> Operands, bool NUW, bool NSW, DebugLoc DL)
1315-
: VPRecipeWithIRFlags(VPDefOpcode, Operands, WrapFlagsTy(NUW, NSW), DL),
1307+
public:
1308+
VPWidenRecipe(unsigned Opcode, ArrayRef<VPValue *> Operands,
1309+
const VPIRFlags &Flags, DebugLoc DL)
1310+
: VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, Flags, DL),
13161311
Opcode(Opcode) {}
13171312

1318-
public:
13191313
VPWidenRecipe(Instruction &I, ArrayRef<VPValue *> Operands)
1320-
: VPWidenRecipe(VPDef::VPWidenSC, I, Operands) {}
1321-
1322-
VPWidenRecipe(unsigned Opcode, ArrayRef<VPValue *> Operands, bool NUW,
1323-
bool NSW, DebugLoc DL)
1324-
: VPWidenRecipe(VPDef::VPWidenSC, Opcode, Operands, NUW, NSW, DL) {}
1314+
: VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, I), VPIRMetadata(I),
1315+
Opcode(I.getOpcode()) {}
13251316

13261317
~VPWidenRecipe() override = default;
13271318

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,9 +2703,8 @@ expandVPMulAccumulateReduction(VPMulAccumulateReductionRecipe *MulAcc) {
27032703
}
27042704

27052705
std::array<VPValue *, 2> MulOps = {Op0, Op1};
2706-
auto *Mul = new VPWidenRecipe(
2707-
Instruction::Mul, ArrayRef(MulOps), MulAcc->hasNoUnsignedWrap(),
2708-
MulAcc->hasNoSignedWrap(), MulAcc->getDebugLoc());
2706+
auto *Mul = new VPWidenRecipe(Instruction::Mul, ArrayRef(MulOps), *MulAcc,
2707+
MulAcc->getDebugLoc());
27092708
Mul->insertBefore(MulAcc);
27102709

27112710
auto *Red = new VPReductionRecipe(

0 commit comments

Comments
 (0)