[llvm] [VPlan] Populate and use VPIRMetadata from VPInstructions (NFC) (PR #167253)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 10 02:30:49 PST 2025
================
@@ -1453,9 +1454,12 @@ class LLVM_ABI_FOR_TEST VPWidenRecipe : public VPRecipeWithIRFlags,
: VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, Flags, DL),
VPIRMetadata(Metadata), Opcode(Opcode) {}
- VPWidenRecipe(Instruction &I, ArrayRef<VPValue *> Operands)
- : VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, I), VPIRMetadata(I),
- Opcode(I.getOpcode()) {}
+ VPWidenRecipe(Instruction &I, ArrayRef<VPValue *> Operands,
+ const VPIRMetadata &Metadata, DebugLoc DL)
+ : VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, VPIRFlags(I), DL),
----------------
lukel97 wrote:
> We're trying to avoid stashing the Instruction I in the VPValue that VPSingleDefRecipe derives from.
It looks like we're still setting the underlying value below, if that's what you mean by stashing the instruction. Maybe if we want to make the underlying value more explicit as well then we should remove the `VPRecipeWithIRFlags(const unsigned char, ArrayRef<VPValue *>, Instruction)` constructor altogether?
https://github.com/llvm/llvm-project/pull/167253
More information about the llvm-commits
mailing list