[llvm] [VPlan] Implement interleaving as VPlan-to-VPlan transform. (PR #95842)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 15:24:29 PDT 2024


================
@@ -161,6 +161,15 @@ class VPBuilder {
     return tryInsertInstruction(
         new VPInstruction(Opcode, Operands, WrapFlags, DL, Name));
   }
+
+  VPInstruction *createFPOp(unsigned Opcode,
+                            std::initializer_list<VPValue *> Operands,
+                            DebugLoc DL = {}, const Twine &Name = "",
+                            FastMathFlags FMFs = {}) {
----------------
ayalz wrote:

nit, for consistency:
```suggestion
                            
                            FastMathFlags FMFs = {}, DebugLoc DL = {}, const Twine &Name = "") {
```
Flags tend to follow Operands as they can be considered optional constant operands (as in MLIR's Attributes), Name tends to appear last. Matching the order in the delegated call to VPInstruction's constructor.
Both callers below feed all parameters anyway, although one could use the default empty name (only).


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


More information about the llvm-commits mailing list