[clang] [Clang][Coroutines] Improve GRO handling to better fit scopes and cleanups (PR #66706)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 19 11:49:13 PDT 2023


bcardosolopes wrote:

Thanks for the fast reply @ChuanqiXu9 

> I remember that there is a defect that we may place the GRO on the coroutine frame.

Can you point me to such defect? I had no luck searching for it.

> And my instinct reaction is that would this patch be covered by forcing GRO to not live on the coroutine frame?

How do you suggest we do so? Even if we teach the optimizers to not touch the GRO (e.g. `-O0`) there's still a correctness issue. The generated code is still wrong, given that currently, the lifetime of `__coro_gro` outlives the `__promise`, but accessing the proxy for delayed conversion might still depend on the promise.

Also, what do you mean by "patch be covered"? I'm confused.

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


More information about the cfe-commits mailing list