[llvm] [VPlan] Separate out logic to manage IR flags to VPIRFlags (NFC). (PR #140621)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 08:53:53 PDT 2025


================
@@ -1082,13 +1047,9 @@ class VPInstructionWithType : public VPInstruction {
 
 public:
   VPInstructionWithType(unsigned Opcode, ArrayRef<VPValue *> Operands,
-                        Type *ResultTy, DebugLoc DL, const Twine &Name = "")
-      : VPInstruction(Opcode, Operands, DL, Name), ResultTy(ResultTy) {}
-  VPInstructionWithType(unsigned Opcode,
-                        std::initializer_list<VPValue *> Operands,
-                        Type *ResultTy, FastMathFlags FMFs, DebugLoc DL = {},
+                        Type *ResultTy, const VPIRFlags &Flags, DebugLoc DL,
                         const Twine &Name = "")
-      : VPInstruction(Opcode, Operands, FMFs, DL, Name), ResultTy(ResultTy) {}
+      : VPInstruction(Opcode, Operands, Flags, DL, Name), ResultTy(ResultTy) {}
----------------
fhahn wrote:

The reason I removed the constructor here but not VPInstruction is that  VPINstructionWithTypes are all created thorugh VPBuilder, so there are very few places that need updating, which is different for VPInstruction, where we would need to pull in quite a few additional updates. We could move the Flags argument to the end, but that position would seem inconsistent I think.

https://github.com/llvm/llvm-project/pull/140621


More information about the llvm-commits mailing list