[PATCH] D128163: [Coroutines] Don't add musttail call if WebAssembly are enabled

Adrian Vogelsgesang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 12:33:53 PDT 2022


avogelsgesang added a comment.

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


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128163/new/

https://reviews.llvm.org/D128163



More information about the llvm-commits mailing list