[PATCH] D37125: [coroutines] Add support for symmetric control transfer (musttail on coro.resumes followed by a suspend)

Gor Nishanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 15:59:44 PDT 2017


GorNishanov created this revision.
Herald added a subscriber: EricWF.

Add musttail to any resume instructions that is immediately followed by a
suspend (i.e. ret). We do this even in -O0 to support guaranteed tail call
for symmetrical coroutine control transfer (C++ Coroutines TS extension).
This transformation is done only in the resume part of the coroutine that has
identical signature and calling convention as the coro.resume call.


https://reviews.llvm.org/D37125

Files:
  lib/Transforms/Coroutines/CoroSplit.cpp
  test/Transforms/Coroutines/coro-split-musttail.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37125.112628.patch
Type: text/x-patch
Size: 5418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170824/5e80b2fe/attachment.bin>


More information about the llvm-commits mailing list