[clang] [llvm] [RFC][Coroutines] Implement HALO for coroutines that flow off final suspend (PR #185336)

Chuanqi Xu via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 8 20:38:00 PDT 2026


================
@@ -1169,6 +1171,47 @@ Example (standard deallocation functions):
     call void @free(ptr %mem)
     ret void
 
+.. _coro.dead:
+
+'llvm.coro.dead' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+::
+
+  declare void @llvm.coro.dead(ptr <frame>)
+
+Overview:
+"""""""""
+
+The '``llvm.coro.dead``' intrinsic is an optimization hint to help Heap Allocation eLision Optimization(HALO).
----------------
ChuanqiXu9 wrote:

```suggestion
The '``llvm.coro.dead``' intrinsic is an optimization hint to help Heap Allocation eLision Optimization(HALO) to mark the end of the lifetime of the coroutine frame.
```

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


More information about the llvm-commits mailing list