[clang] [llvm] [mlir] [Coroutines] Add llvm.coro.where and drop return value of llvm.coro.end (PR #153404)
    Chuanqi Xu via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Aug 15 01:55:35 PDT 2025
    
    
  
================
@@ -2117,6 +2118,30 @@ Example:
       %hdl.result = ... ; get address of returned coroutine handle
       ret ptr %hdl.result
 
+'llvm.coro.is_in_resume' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+::
+
+  declare i1 @llvm.coro.is_in_resume()
+
+Overview:
+"""""""""
+
+The '``llvm.coro.is_in_resume``' intrinsic returns a bool value that marks coroutine resume
+function and ramp function.
+
+Arguments:
+""""""""""
+
+None
+
+Semantics:
+""""""""""
+
+The `CoroSpit` pass replaces `coro.is_in_resume` with ``True`` in the resume functions,
----------------
ChuanqiXu9 wrote:
Sorry for not making the right call first. But I find it is not correct to call it `is_in_resume`. The actual semantic should be `not_in_ramp`. Since the it should be true in destroy function (or other function in other ABI) too.  Given we generally don't use `no` in builtin names, let's change its name to `is_in_ramp` and change the value correspondingly.
https://github.com/llvm/llvm-project/pull/153404
    
    
More information about the llvm-commits
mailing list