[llvm] 23b8f11 - [VPlan] Remove redundant VPWidenRecipe constructors (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 12:59:49 PDT 2025
Author: Florian Hahn
Date: 2025-06-18T20:59:16+01:00
New Revision: 23b8f11b27f1345cfdd9d03c9ebaccaf81897764
URL: https://github.com/llvm/llvm-project/commit/23b8f11b27f1345cfdd9d03c9ebaccaf81897764
DIFF: https://github.com/llvm/llvm-project/commit/23b8f11b27f1345cfdd9d03c9ebaccaf81897764.diff
LOG: [VPlan] Remove redundant VPWidenRecipe constructors (NFC)
Since the removal of VPWidenEVLRecipe, the constructors taking a
VPDefOpcode are not needed any more. Remove them.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index f3306ad7cb8ec..ab5ff82a77208 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1304,24 +1304,15 @@ struct VPIRPhi : public VPIRInstruction, public VPPhiAccessors {
class VPWidenRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
unsigned Opcode;
-protected:
- VPWidenRecipe(unsigned VPDefOpcode, Instruction &I,
- ArrayRef<VPValue *> Operands)
- : VPRecipeWithIRFlags(VPDefOpcode, Operands, I), VPIRMetadata(I),
- Opcode(I.getOpcode()) {}
-
- VPWidenRecipe(unsigned VPDefOpcode, unsigned Opcode,
- ArrayRef<VPValue *> Operands, bool NUW, bool NSW, DebugLoc DL)
- : VPRecipeWithIRFlags(VPDefOpcode, Operands, WrapFlagsTy(NUW, NSW), DL),
+public:
+ VPWidenRecipe(unsigned Opcode, ArrayRef<VPValue *> Operands,
+ const VPIRFlags &Flags, DebugLoc DL)
+ : VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, Flags, DL),
Opcode(Opcode) {}
-public:
VPWidenRecipe(Instruction &I, ArrayRef<VPValue *> Operands)
- : VPWidenRecipe(VPDef::VPWidenSC, I, Operands) {}
-
- VPWidenRecipe(unsigned Opcode, ArrayRef<VPValue *> Operands, bool NUW,
- bool NSW, DebugLoc DL)
- : VPWidenRecipe(VPDef::VPWidenSC, Opcode, Operands, NUW, NSW, DL) {}
+ : VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, I), VPIRMetadata(I),
+ Opcode(I.getOpcode()) {}
~VPWidenRecipe() override = default;
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 11f0f2a930329..cc73ae44f9c0b 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -2703,9 +2703,8 @@ expandVPMulAccumulateReduction(VPMulAccumulateReductionRecipe *MulAcc) {
}
std::array<VPValue *, 2> MulOps = {Op0, Op1};
- auto *Mul = new VPWidenRecipe(
- Instruction::Mul, ArrayRef(MulOps), MulAcc->hasNoUnsignedWrap(),
- MulAcc->hasNoSignedWrap(), MulAcc->getDebugLoc());
+ auto *Mul = new VPWidenRecipe(Instruction::Mul, ArrayRef(MulOps), *MulAcc,
+ MulAcc->getDebugLoc());
Mul->insertBefore(MulAcc);
auto *Red = new VPReductionRecipe(
More information about the llvm-commits
mailing list