[llvm] [DSE] Mark promise of pre-split coroutine visible to caller (PR #133918)
Chuanqi Xu via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 10 02:13:12 PDT 2025
ChuanqiXu9 wrote:
> I don't have time to look deeply into this right now, but the change looks very concerning to me. Allocas becoming dead at the end of the function is a very core property of allocas. If it does not hold for the promise alloca, it probably should not be an alloca? Is it possible to use a different IR representation?
It sounds make sense to use a different IR representation to address the concern. But I don't have a concrete plan and I feel we lack the human resource right now. Maybe we can mark this as an issue or a bug and asking for volunteers.
for the problem itself, the problem actually may **be** the `return` of the `get_return_object`. It returns value to the caller in the initial suspend. But from the inner perspective, the function coroutine doesn't finish. So semantically I feel it is fine to make promise an alloca. It is dead in the end of the lifetime of the function. But the return doesn't imply the the end in coroutines.
I don't have solution in mind now. I feel it is somewhat fundamental. For the patch itself, I feel it might be better to add FIXME and land it to stop bleeding. WDYT?
https://github.com/llvm/llvm-project/pull/133918
More information about the llvm-commits
mailing list