[clang] [llvm] [RFC][Coroutines] Implement HALO for coroutines that flow off final suspend (PR #185336)
Weibo He via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 19:18:13 PDT 2026
================
@@ -1100,10 +1100,9 @@ void coro::SwitchCloner::create() {
// Clone the function
coro::BaseCloner::create();
- // Eliminate coro.free from the clones, replacing it with 'null' in cleanup,
- // to suppress deallocation code.
- coro::replaceCoroFree(cast<CoroIdInst>(VMap[Shape.CoroBegin->getId()]),
- /*Elide=*/FKind == coro::CloneKind::SwitchCleanup);
----------------
NewSigma wrote:
Here we lower `coro.free` only if `coro.alloc` exists. The rest is deferred to CoroCleanup as well.
https://github.com/llvm/llvm-project/pull/185336
More information about the cfe-commits
mailing list