[PATCH] D128163: [Coroutines] Don't add musttail call if WebAssembly are enabled
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 20:17:09 PDT 2022
ChuanqiXu added a comment.
In D128163#3599994 <https://reviews.llvm.org/D128163#3599994>, @avogelsgesang wrote:
> Afaict, symmetric transfer is guaranteed by the C++20 standard.
>
> https://eel.is/c++draft/expr.await#note-1 states
>
>> [...] Any number of coroutines can be successively resumed in this fashion, eventually returning control flow to the current coroutine caller or resumer [...]
>
> Without symmetric transfer or an equivalent optimization, this statement wouldn't hold true, because we would run out of stack space before resuming an arbitrary number of coroutines
Oh, my bad. Thanks for reporting this. But it is still odd to me since it is not supported by all archs and C++ is intended to be target independent. I've sent this question to WG21. I would take an eye on this. And let's not block this one to not prevent C++ coroutines to be used in more targets.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128163/new/
https://reviews.llvm.org/D128163
More information about the llvm-commits
mailing list