[Mlir-commits] [mlir] MLIR: Add llvm.intr.coro.promise (PR #76640)

Tobias Gysi llvmlistbot at llvm.org
Sun Dec 31 00:18:49 PST 2023


================
@@ -435,6 +435,13 @@ def LLVM_CoroResumeOp : LLVM_IntrOp<"coro.resume", [], [], [], 0> {
   let assemblyFormat = "$handle attr-dict `:` qualified(type($handle))";
 }
 
+def LLVM_CoroPromiseOp : LLVM_IntrOp<"coro.promise", [], [], [], 1> {
+  let arguments = (ins LLVM_AnyPointer:$handle,
+                       I32:$align,
+                       I1:$from);
+  let assemblyFormat = "$handle `,` $align `,` $from attr-dict `:` functional-type(operands, results)";
----------------
gysit wrote:

```suggestion
                       I1:$from);
  let results = (outs LLVM_AnyPointer:$res);
  let assemblyFormat = "$handle `,` $align `,` $from attr-dict `:` functional-type(operands, results)";
```
If I understand correctly the result has to be a pointer? If yes, I would specify the result type to ensure it is verified.

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


More information about the Mlir-commits mailing list