[Mlir-commits] [mlir] [mlir] [LLVM IR] Introduce VaArgOp (PR #109260)
Markus Böck
llvmlistbot at llvm.org
Thu Sep 19 04:29:25 PDT 2024
================
@@ -582,6 +582,26 @@ def LLVM_LandingpadOp : LLVM_Op<"landingpad"> {
let hasVerifier = 1;
}
+//===----------------------------------------------------------------------===//
+// VAArgOp
+//===----------------------------------------------------------------------===//
+
+def LLVM_VaArgOp : LLVM_Op<"va_arg"> {
+ let arguments = (ins LLVM_AnyPointer:$arg);
+ let results = (outs LLVM_Type:$res);
+
+ let builders = [LLVM_OneResultOpBuilder];
+
+ let llvmBuilder = " $res = builder.CreateVAArg($arg, $_resultType); ";
+ let assemblyFormat = "$arg attr-dict `:` `(` type($arg) `)` `->` type($res)";
----------------
zero9178 wrote:
```suggestion
let assemblyFormat = "$arg attr-dict `:` functional-type($arg, $res)";
```
https://github.com/llvm/llvm-project/pull/109260
More information about the Mlir-commits
mailing list