diff --git a/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td b/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td --- a/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td +++ b/mlir/include/mlir/Dialect/Async/IR/AsyncOps.td @@ -170,7 +170,6 @@ ``` }]; - let arguments = (ins ); let results = (outs Async_GroupType:$result); let assemblyFormat = "attr-dict"; @@ -250,7 +249,6 @@ The `async.coro.id` returns a switched-resume coroutine identifier. }]; - let arguments = (ins ); let results = (outs Async_CoroIdType:$id); let assemblyFormat = "attr-dict"; } @@ -276,7 +274,6 @@ let arguments = (ins Async_CoroIdType:$id, Async_CoroHandleType:$handle); - let results = (outs ); let assemblyFormat = "$id `,` $handle attr-dict"; } @@ -289,7 +286,6 @@ }]; let arguments = (ins Async_CoroHandleType:$handle); - let results = (outs ); let assemblyFormat = "$handle attr-dict"; } @@ -309,8 +305,8 @@ let description = [{ The `async.coro.suspend` suspends the coroutine and transfers control to the `suspend` successor. If suspended coroutine later resumed it will transfer - control to the `resume` successor. If it destroyed it will transfer control - to the the `cleanup` successor. + control to the `resume` successor. If it is destroyed it will transfer + control to the the `cleanup` successor. In switched-resume lowering coroutine can be already in resumed state when suspend operation is called, in this case control will be transferred to the @@ -334,14 +330,13 @@ // Runtime API defined in the `ExecutionEngine/AsyncRuntime.h`. def Async_RuntimeCreateOp : Async_Op<"runtime.create"> { - let summary = "creates and async runtime value (token, value or group)"; + let summary = "creates an async runtime value (token, value or group)"; let description = [{ The `async.runtime.create` operation creates an async dialect value (token, value or group). Tokens and values are created in non-ready state. Groups are created in empty state. }]; - let arguments = (ins ); let results = (outs Async_AnyAsyncType:$result); let assemblyFormat = "attr-dict `:` type($result)"; } @@ -354,7 +349,6 @@ }]; let arguments = (ins Async_AnyValueOrTokenType:$operand); - let results = (outs ); let assemblyFormat = "$operand attr-dict `:` type($operand)"; } @@ -366,7 +360,6 @@ }]; let arguments = (ins Async_AnyAsyncType:$operand); - let results = (outs ); let assemblyFormat = "$operand attr-dict `:` type($operand)"; } @@ -378,7 +371,6 @@ }]; let arguments = (ins Async_CoroHandleType:$handle); - let results = (outs ); let assemblyFormat = "$handle attr-dict"; } @@ -392,7 +384,6 @@ let arguments = (ins Async_AnyAsyncType:$operand, Async_CoroHandleType:$handle); - let results = (outs ); let assemblyFormat = "$operand `,` $handle attr-dict `:` type($operand)"; } @@ -408,7 +399,6 @@ let arguments = (ins AnyType:$value, Async_AnyValueType:$storage); - let results = (outs ); let assemblyFormat = "$value `,` $storage attr-dict `:` type($storage)"; } @@ -472,7 +462,6 @@ let arguments = (ins Async_AnyAsyncType:$operand, Confined:$count); - let results = (outs ); let assemblyFormat = [{ $operand attr-dict `:` type($operand) @@ -488,7 +477,6 @@ let arguments = (ins Async_AnyAsyncType:$operand, Confined:$count); - let results = (outs ); let assemblyFormat = [{ $operand attr-dict `:` type($operand) diff --git a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp --- a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp +++ b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp @@ -195,17 +195,11 @@ } //===----------------------------------------------------------------------===// -// LLVM coroutines intrinsics declarations. +// Add malloc/free declarations to the module. //===----------------------------------------------------------------------===// -static constexpr const char *kCoroId = "llvm.coro.id"; -static constexpr const char *kCoroSizeI64 = "llvm.coro.size.i64"; -static constexpr const char *kCoroBegin = "llvm.coro.begin"; -static constexpr const char *kCoroSave = "llvm.coro.save"; -static constexpr const char *kCoroSuspend = "llvm.coro.suspend"; -static constexpr const char *kCoroEnd = "llvm.coro.end"; -static constexpr const char *kCoroFree = "llvm.coro.free"; -static constexpr const char *kCoroResume = "llvm.coro.resume"; +static constexpr const char *kMalloc = "malloc"; +static constexpr const char *kFree = "free"; static void addLLVMFuncDecl(ModuleOp module, ImplicitLocOpBuilder &builder, StringRef name, Type ret, ArrayRef params) { @@ -215,40 +209,6 @@ builder.create(name, type); } -/// Adds coroutine intrinsics declarations to the module. -static void addCoroutineIntrinsicsDeclarations(ModuleOp module) { - using namespace mlir::LLVM; - - MLIRContext *ctx = module.getContext(); - ImplicitLocOpBuilder builder(module.getLoc(), - module.getBody()->getTerminator()); - - auto token = LLVMTokenType::get(ctx); - auto voidTy = LLVMVoidType::get(ctx); - - auto i8 = IntegerType::get(ctx, 8); - auto i1 = IntegerType::get(ctx, 1); - auto i32 = IntegerType::get(ctx, 32); - auto i64 = IntegerType::get(ctx, 64); - auto i8Ptr = LLVMPointerType::get(i8); - - addLLVMFuncDecl(module, builder, kCoroId, token, {i32, i8Ptr, i8Ptr, i8Ptr}); - addLLVMFuncDecl(module, builder, kCoroSizeI64, i64, {}); - addLLVMFuncDecl(module, builder, kCoroBegin, i8Ptr, {token, i8Ptr}); - addLLVMFuncDecl(module, builder, kCoroSave, token, {i8Ptr}); - addLLVMFuncDecl(module, builder, kCoroSuspend, i8, {token, i1}); - addLLVMFuncDecl(module, builder, kCoroEnd, i1, {i8Ptr, i1}); - addLLVMFuncDecl(module, builder, kCoroFree, i8Ptr, {token, i8Ptr}); - addLLVMFuncDecl(module, builder, kCoroResume, voidTy, {i8Ptr}); -} - -//===----------------------------------------------------------------------===// -// Add malloc/free declarations to the module. -//===----------------------------------------------------------------------===// - -static constexpr const char *kMalloc = "malloc"; -static constexpr const char *kFree = "free"; - /// Adds malloc/free declarations to the module. static void addCRuntimeDeclarations(ModuleOp module) { using namespace mlir::LLVM; @@ -293,10 +253,7 @@ auto *block = resumeOp.addEntryBlock(); auto blockBuilder = ImplicitLocOpBuilder::atBlockEnd(loc, block); - blockBuilder.create(TypeRange(), - blockBuilder.getSymbolRefAttr(kCoroResume), - resumeOp.getArgument(0)); - + blockBuilder.create(resumeOp.getArgument(0)); blockBuilder.create(ValueRange()); } @@ -576,9 +533,8 @@ auto nullPtr = rewriter.create(loc, i8Ptr); // Get coroutine id: @llvm.coro.id. - rewriter.replaceOpWithNewOp( - op, token, rewriter.getSymbolRefAttr(kCoroId), - ValueRange({constZero, nullPtr, nullPtr, nullPtr})); + rewriter.replaceOpWithNewOp( + op, token, ValueRange({constZero, nullPtr, nullPtr, nullPtr})); return success(); } @@ -601,20 +557,18 @@ auto loc = op->getLoc(); // Get coroutine frame size: @llvm.coro.size.i64. - auto coroSize = rewriter.create( - loc, rewriter.getI64Type(), rewriter.getSymbolRefAttr(kCoroSizeI64), - ValueRange()); + auto coroSize = + rewriter.create(loc, rewriter.getI64Type()); // Allocate memory for the coroutine frame. auto coroAlloc = rewriter.create( loc, i8Ptr, rewriter.getSymbolRefAttr(kMalloc), - ValueRange(coroSize.getResult(0))); + ValueRange(coroSize.getResult())); // Begin a coroutine: @llvm.coro.begin. auto coroId = CoroBeginOpAdaptor(operands).id(); - rewriter.replaceOpWithNewOp( - op, i8Ptr, rewriter.getSymbolRefAttr(kCoroBegin), - ValueRange({coroId, coroAlloc.getResult(0)})); + rewriter.replaceOpWithNewOp( + op, i8Ptr, ValueRange({coroId, coroAlloc.getResult(0)})); return success(); } @@ -637,13 +591,12 @@ auto loc = op->getLoc(); // Get a pointer to the coroutine frame memory: @llvm.coro.free. - auto coroMem = rewriter.create( - loc, i8Ptr, rewriter.getSymbolRefAttr(kCoroFree), operands); + auto coroMem = rewriter.create(loc, i8Ptr, operands); // Free the memory. rewriter.replaceOpWithNewOp(op, TypeRange(), rewriter.getSymbolRefAttr(kFree), - ValueRange(coroMem.getResult(0))); + ValueRange(coroMem.getResult())); return success(); } @@ -668,9 +621,8 @@ // Mark the end of a coroutine: @llvm.coro.end. auto coroHdl = CoroEndOpAdaptor(operands).handle(); - rewriter.create(op->getLoc(), rewriter.getI1Type(), - rewriter.getSymbolRefAttr(kCoroEnd), - ValueRange({coroHdl, constFalse})); + rewriter.create(op->getLoc(), rewriter.getI1Type(), + ValueRange({coroHdl, constFalse})); rewriter.eraseOp(op); return success(); @@ -691,9 +643,8 @@ matchAndRewrite(CoroSaveOp op, ArrayRef operands, ConversionPatternRewriter &rewriter) const override { // Save the coroutine state: @llvm.coro.save - rewriter.replaceOpWithNewOp( - op, AsyncAPI::tokenType(op->getContext()), - rewriter.getSymbolRefAttr(kCoroSave), operands); + rewriter.replaceOpWithNewOp( + op, AsyncAPI::tokenType(op->getContext()), operands); return success(); } @@ -723,7 +674,7 @@ /// /// ^suspended: /// "opBefore"(...) -/// %suspend = llmv.call @llvm.coro.suspend(...) +/// %suspend = llmv.intr.coro.suspend ... /// switch %suspend [-1: ^suspend, 0: ^resume, 1: ^cleanup] /// ^resume: /// "op"(...) @@ -747,9 +698,8 @@ // Suspend a coroutine: @llvm.coro.suspend auto coroState = CoroSuspendOpAdaptor(operands).state(); - auto coroSuspend = rewriter.create( - loc, i8, rewriter.getSymbolRefAttr(kCoroSuspend), - ValueRange({coroState, constFalse})); + auto coroSuspend = rewriter.create( + loc, i8, ValueRange({coroState, constFalse})); // Cast return code to i32. @@ -760,7 +710,7 @@ llvm::SmallVector caseDest = {op.resumeDest(), op.cleanupDest()}; rewriter.replaceOpWithNewOp( - op, rewriter.create(loc, i32, coroSuspend.getResult(0)), + op, rewriter.create(loc, i32, coroSuspend.getResult()), /*defaultDestination=*/op.suspendDest(), /*defaultOperands=*/ValueRange(), /*caseValues=*/caseValues, @@ -1382,7 +1332,6 @@ // Add declarations for all functions required by the coroutines lowering. addResumeFunction(module); addAsyncRuntimeApiDeclarations(module); - addCoroutineIntrinsicsDeclarations(module); addCRuntimeDeclarations(module); // ------------------------------------------------------------------------ // diff --git a/mlir/test/Conversion/AsyncToLLVM/convert-coro-to-llvm.mlir b/mlir/test/Conversion/AsyncToLLVM/convert-coro-to-llvm.mlir --- a/mlir/test/Conversion/AsyncToLLVM/convert-coro-to-llvm.mlir +++ b/mlir/test/Conversion/AsyncToLLVM/convert-coro-to-llvm.mlir @@ -4,29 +4,29 @@ func @coro_id() { // CHECK: %0 = llvm.mlir.constant(0 : i32) : i32 // CHECK: %1 = llvm.mlir.null : !llvm.ptr - // CHECK: %2 = llvm.call @llvm.coro.id(%0, %1, %1, %1) + // CHECK: %2 = llvm.intr.coro.id %0, %1, %1, %1 : !llvm.token %0 = async.coro.id return } // CHECK-LABEL: @coro_begin func @coro_begin() { - // CHECK: %[[ID:.*]] = llvm.call @llvm.coro.id + // CHECK: %[[ID:.*]] = llvm.intr.coro.id %0 = async.coro.id - // CHECK: %[[SIZE:.*]] = llvm.call @llvm.coro.size.i64() + // CHECK: %[[SIZE:.*]] = llvm.intr.coro.size : i64 // CHECK: %[[ALLOC:.*]] = llvm.call @malloc(%[[SIZE]]) - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin(%[[ID]], %[[ALLOC]]) + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %[[ID]], %[[ALLOC]] %1 = async.coro.begin %0 return } // CHECK-LABEL: @coro_free func @coro_free() { - // CHECK: %[[ID:.*]] = llvm.call @llvm.coro.id + // CHECK: %[[ID:.*]] = llvm.intr.coro.id %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 - // CHECK: %[[MEM:.*]] = llvm.call @llvm.coro.free(%[[ID]], %[[HDL]]) + // CHECK: %[[MEM:.*]] = llvm.intr.coro.free %[[ID]], %[[HDL]] // CHECK: llvm.call @free(%[[MEM]]) async.coro.free %0, %1 return @@ -35,10 +35,10 @@ // CHECK-LABEL: @coro_end func @coro_end() { %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 // CHECK: %[[FALSE:.*]] = llvm.mlir.constant(false) : i1 - // CHECK: llvm.call @llvm.coro.end(%[[HDL]], %[[FALSE]]) + // CHECK: llvm.intr.coro.end %[[HDL]], %[[FALSE]] async.coro.end %1 return } @@ -46,9 +46,9 @@ // CHECK-LABEL: @coro_save func @coro_save() { %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 - // CHECK: llvm.call @llvm.coro.save(%[[HDL]]) + // CHECK: llvm.intr.coro.save %[[HDL]] %2 = async.coro.save %1 return } @@ -56,13 +56,13 @@ // CHECK-LABEL: @coro_suspend func @coro_suspend() { %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 - // CHECK: %[[STATE:.*]] = llvm.call @llvm.coro.save(%[[HDL]]) + // CHECK: %[[STATE:.*]] = llvm.intr.coro.save %[[HDL]] %2 = async.coro.save %1 // CHECK: %[[FINAL:.*]] = llvm.mlir.constant(false) : i1 - // CHECK: %[[RET:.*]] = llvm.call @llvm.coro.suspend(%[[STATE]], %[[FINAL]]) + // CHECK: %[[RET:.*]] = llvm.intr.coro.suspend %[[STATE]], %[[FINAL]] // CHECK: %[[SEXT:.*]] = llvm.sext %[[RET]] : i8 to i32 // CHECK: llvm.switch %[[SEXT]], ^[[SUSPEND:[b0-9]+]] // CHECK-NEXT: 0: ^[[RESUME:[b0-9]+]] diff --git a/mlir/test/Conversion/AsyncToLLVM/convert-runtime-to-llvm.mlir b/mlir/test/Conversion/AsyncToLLVM/convert-runtime-to-llvm.mlir --- a/mlir/test/Conversion/AsyncToLLVM/convert-runtime-to-llvm.mlir +++ b/mlir/test/Conversion/AsyncToLLVM/convert-runtime-to-llvm.mlir @@ -73,7 +73,7 @@ // CHECK-LABEL: @await_and_resume_token func @await_and_resume_token() { %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 // CHECK: %[[TOKEN:.*]] = call @mlirAsyncRuntimeCreateToken %2 = async.runtime.create : !async.token @@ -87,7 +87,7 @@ // CHECK-LABEL: @await_and_resume_value func @await_and_resume_value() { %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 // CHECK: %[[VALUE:.*]] = call @mlirAsyncRuntimeCreateValue %2 = async.runtime.create : !async.value @@ -101,7 +101,7 @@ // CHECK-LABEL: @await_and_resume_group func @await_and_resume_group() { %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 // CHECK: %[[TOKEN:.*]] = call @mlirAsyncRuntimeCreateGroup %2 = async.runtime.create : !async.group @@ -115,7 +115,7 @@ // CHECK-LABEL: @resume func @resume() { %0 = async.coro.id - // CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin + // CHECK: %[[HDL:.*]] = llvm.intr.coro.begin %1 = async.coro.begin %0 // CHECK: %[[RESUME:.*]] = llvm.mlir.addressof @__resume // CHECK: call @mlirAsyncRuntimeExecute(%[[HDL]], %[[RESUME]]) diff --git a/mlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir b/mlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir --- a/mlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir +++ b/mlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir @@ -35,13 +35,13 @@ // Create token for return op, and mark a function as a coroutine. // CHECK: %[[RET:.*]] = call @mlirAsyncRuntimeCreateToken() -// CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL:.*]] = llvm.intr.coro.begin // Pass a suspended coroutine to the async runtime. -// CHECK: %[[STATE:.*]] = llvm.call @llvm.coro.save +// CHECK: %[[STATE:.*]] = llvm.intr.coro.save // CHECK: %[[RESUME:.*]] = llvm.mlir.addressof @__resume // CHECK: call @mlirAsyncRuntimeExecute(%[[HDL]], %[[RESUME]]) -// CHECK: %[[SUSPENDED:.*]] = llvm.call @llvm.coro.suspend(%[[STATE]] +// CHECK: %[[SUSPENDED:.*]] = llvm.intr.coro.suspend %[[STATE]] // Decide the next block based on the code returned from suspend. // CHECK: %[[SEXT:.*]] = llvm.sext %[[SUSPENDED]] : i8 to i32 @@ -56,12 +56,12 @@ // Delete coroutine. // CHECK: ^[[CLEANUP]]: -// CHECK: %[[MEM:.*]] = llvm.call @llvm.coro.free +// CHECK: %[[MEM:.*]] = llvm.intr.coro.free // CHECK: llvm.call @free(%[[MEM]]) // Suspend coroutine, and also a return statement for ramp function. // CHECK: ^[[SUSPEND]]: -// CHECK: llvm.call @llvm.coro.end +// CHECK: llvm.intr.coro.end // CHECK: return %[[RET]] // ----- @@ -92,9 +92,9 @@ // CHECK-LABEL: func private @async_execute_fn(%arg0: f32, %arg1: memref<1xf32>, %arg2: index) // CHECK-SAME: -> !llvm.ptr // CHECK: %[[RET_0:.*]] = call @mlirAsyncRuntimeCreateToken() -// CHECK: %[[HDL_0:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL_0:.*]] = llvm.intr.coro.begin // CHECK: call @mlirAsyncRuntimeExecute -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // CHECK: store %arg0, %arg1[%arg2] : memref<1xf32> // CHECK: call @mlirAsyncRuntimeEmplaceToken(%[[RET_0]]) @@ -102,17 +102,17 @@ // CHECK-LABEL: func private @async_execute_fn_0(%arg0: f32, %arg1: memref<1xf32>, %arg2: f32) // CHECK-SAME: -> !llvm.ptr // CHECK: %[[RET_1:.*]] = call @mlirAsyncRuntimeCreateToken() -// CHECK: %[[HDL_1:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL_1:.*]] = llvm.intr.coro.begin // Suspend coroutine in the beginning. // CHECK: call @mlirAsyncRuntimeExecute -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Suspend coroutine second time waiting for the completion of inner execute op. // CHECK: %[[TOKEN_1:.*]] = call @async_execute_fn -// CHECK: llvm.call @llvm.coro.save +// CHECK: llvm.intr.coro.save // CHECK: call @mlirAsyncRuntimeAwaitTokenAndExecute(%[[TOKEN_1]], %[[HDL_1]] -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Emplace result token after second resumption. // CHECK: store %arg2, %arg1[%c0] : memref<1xf32> @@ -141,9 +141,9 @@ // CHECK-LABEL: func private @async_execute_fn(%arg0: f32, %arg1: memref<1xf32>) // CHECK-SAME: -> !llvm.ptr // CHECK: %[[RET_0:.*]] = call @mlirAsyncRuntimeCreateToken() -// CHECK: %[[HDL_0:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL_0:.*]] = llvm.intr.coro.begin // CHECK: call @mlirAsyncRuntimeExecute -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // CHECK: store %arg0, %arg1[%c0] : memref<1xf32> // CHECK: call @mlirAsyncRuntimeEmplaceToken(%[[RET_0]]) @@ -151,16 +151,16 @@ // CHECK-LABEL: func private @async_execute_fn_0(%arg0: !llvm.ptr, %arg1: f32, %arg2: memref<1xf32>) // CHECK-SAME: -> !llvm.ptr // CHECK: %[[RET_1:.*]] = call @mlirAsyncRuntimeCreateToken() -// CHECK: %[[HDL_1:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL_1:.*]] = llvm.intr.coro.begin // Suspend coroutine in the beginning. // CHECK: call @mlirAsyncRuntimeExecute(%[[HDL_1]], -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Suspend coroutine second time waiting for the completion of token dependency. -// CHECK: llvm.call @llvm.coro.save +// CHECK: llvm.intr.coro.save // CHECK: call @mlirAsyncRuntimeAwaitTokenAndExecute(%arg0, %[[HDL_1]], -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Emplace result token after second resumption. // CHECK: store %arg1, %arg2[%c0] : memref<1xf32> @@ -193,16 +193,16 @@ // Function outlined from the async.execute operation. // CHECK: func private @async_execute_fn_0(%arg0: !llvm.ptr) // CHECK: %[[RET_1:.*]] = call @mlirAsyncRuntimeCreateToken() -// CHECK: %[[HDL_1:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL_1:.*]] = llvm.intr.coro.begin // Suspend coroutine in the beginning. // CHECK: call @mlirAsyncRuntimeExecute(%[[HDL_1]], -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Suspend coroutine second time waiting for the group. -// CHECK: llvm.call @llvm.coro.save +// CHECK: llvm.intr.coro.save // CHECK: call @mlirAsyncRuntimeAwaitAllInGroupAndExecute(%arg0, %[[HDL_1]], -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Emplace result token. // CHECK: call @mlirAsyncRuntimeEmplaceToken(%[[RET_1]]) @@ -229,11 +229,11 @@ // CHECK-LABEL: func private @async_execute_fn() // CHECK: %[[TOKEN:.*]] = call @mlirAsyncRuntimeCreateToken() // CHECK: %[[VALUE:.*]] = call @mlirAsyncRuntimeCreateValue -// CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL:.*]] = llvm.intr.coro.begin // Suspend coroutine in the beginning. // CHECK: call @mlirAsyncRuntimeExecute(%[[HDL]], -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Emplace result value. // CHECK: %[[CST:.*]] = constant 1.230000e+02 : f32 @@ -274,16 +274,16 @@ // Function outlined from the second async.execute operation. // CHECK-LABEL: func private @async_execute_fn_0(%arg0: !llvm.ptr) // CHECK: %[[TOKEN:.*]] = call @mlirAsyncRuntimeCreateToken() -// CHECK: %[[HDL:.*]] = llvm.call @llvm.coro.begin +// CHECK: %[[HDL:.*]] = llvm.intr.coro.begin // Suspend coroutine in the beginning. // CHECK: call @mlirAsyncRuntimeExecute(%[[HDL]], -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Suspend coroutine second time waiting for the async operand. -// CHECK: llvm.call @llvm.coro.save +// CHECK: llvm.intr.coro.save // CHECK: call @mlirAsyncRuntimeAwaitValueAndExecute(%arg0, %[[HDL]], -// CHECK: llvm.call @llvm.coro.suspend +// CHECK: llvm.intr.coro.suspend // Get the operand value storage, cast to f32 and add the value. // CHECK: %[[STORAGE:.*]] = call @mlirAsyncRuntimeGetValueStorage(%arg0)