[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)
Chuanqi Xu via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 19:47:16 PST 2025
ChuanqiXu9 wrote:
> > Since the case a coroutine without a suspend point is relatively rare case to me.
>
> For what it's worth, this issue isn't limited to coroutines without any suspend point. It can also occur:
>
> * If the coroutine conditionally doesn't await (e.g., `if (condition) { co_await foo(); }` and `condition` is false)
> * If the coroutine awaits, but the awaitor's `await_ready()` returns true so the coroutine doesn't suspend
> * If the coroutine suspends, but the awaitor's `await_suspend()` returns false so the coroutine is immediately resumed
> * If the coroutine suspends, but the awaitor's `await_suspend()` causes the coroutine to resume before the ramp function finishes (either by resuming on the same thread or losing a race)
> * If the coroutine suspends, but the awaitor's `await_suspend()` returns a coroutine handle whose resumption ultimately results in the current coroutine resuming before the ramp function finishes
Or we can model it as, if it is possible to reach the section after coro.end from entry without reaching a real suspend point.
https://github.com/llvm/llvm-project/pull/127653
More information about the llvm-commits
mailing list