[Mlir-commits] [llvm] [mlir] [Coroutines] Fix incorrect attribute name coroutine.presplit (PR #78296)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jan 16 07:35:05 PST 2024


https://github.com/yonillasky created https://github.com/llvm/llvm-project/pull/78296

Those are probably leftovers from an old name of the same attribute. Fixed for the sake of consistency.

>From 1c048b049969111375e2ba99afbc44d4893bded9 Mon Sep 17 00:00:00 2001
From: Yoni Lavi <yoni.lavi at nextsilicon.com>
Date: Tue, 16 Jan 2024 17:32:51 +0200
Subject: [PATCH] [Coroutines] Fix incorrect attribute name coroutine.presplit

---
 llvm/lib/Transforms/Coroutines/CoroEarly.cpp              | 2 +-
 mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Transforms/Coroutines/CoroEarly.cpp b/llvm/lib/Transforms/Coroutines/CoroEarly.cpp
index d510b90d9dec6d..489106422e199c 100644
--- a/llvm/lib/Transforms/Coroutines/CoroEarly.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroEarly.cpp
@@ -203,7 +203,7 @@ void Lowerer::lowerEarlyIntrinsics(Function &F) {
           if (CII->getInfo().isPreSplit()) {
             assert(F.isPresplitCoroutine() &&
                    "The frontend uses Swtich-Resumed ABI should emit "
-                   "\"coroutine.presplit\" attribute for the coroutine.");
+                   "\"presplitcoroutine\" attribute for the coroutine.");
             setCannotDuplicate(CII);
             CII->setCoroutineSelf();
             CoroId = cast<CoroIdInst>(&I);
diff --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index d1a913409ca366..828f53c16d8f86 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
@@ -242,7 +242,7 @@ static CoroMachinery setupCoroMachinery(func::FuncOp func) {
   // continuations, and will conditionally branch to cleanup or suspend blocks.
 
   // The switch-resumed API based coroutine should be marked with
-  // coroutine.presplit attribute to mark the function as a coroutine.
+  // presplitcoroutine attribute to mark the function as a coroutine.
   func->setAttr("passthrough", builder.getArrayAttr(
                                    StringAttr::get(ctx, "presplitcoroutine")));
 



More information about the Mlir-commits mailing list