================
@@ -4702,6 +4619,131 @@ def CIR_CoReturnOp : CIR_Op<"co_return", [
let hasLLVMLowering = false;
}
+//===----------------------------------------------------------------------===//
+// Coroutine intrinsics
+//===----------------------------------------------------------------------===//
+
+class CIR_CoroIntrinsicOp<string mnem, dag ins, dag outs,
+ list<Trait> traits = []>
+ : CIR_Op<"coro.intrinsic." # mnem, traits> {
+ let hasLLVMLowering = 1;
+ let arguments = ins;
+ let results = outs;
+
+ let assemblyFormat = [{
+ `(` operands `)` `:` functional-type(operands, results) attr-dict
+ }];
+}
+//===----------------------------------------------------------------------===//
+// Coroutine intrinsic IdOp
+//===----------------------------------------------------------------------===//
+
+// TODO: This operation should return an MLIR `token` once the type becomes
+// available. `CIR_UInt32` is used as a temporary placeholder.
----------------
erichkeane wrote:
Rather than this placeholder, I wonder if we should have a 'token-like' CIR
type to represent this, at least in the meantime? Might make it easier to
transition to later, and gives us the ability to 'type check' this better now.
https://github.com/llvm/llvm-project/pull/211699
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits