[PATCH] D24408: [Coroutines] Part14: Handle coroutines with no suspend points.

Gor Nishanov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 10:17:46 PDT 2016


GorNishanov created this revision.
GorNishanov added a reviewer: majnemer.
GorNishanov added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

If coroutine has no suspend points, remove heap allocation and turn a coroutine into a normal function.

Also, if a pattern is detected that coroutine resumes or destroys itself prior to coro.suspend call, turn the suspend point into a simple jump to resume or cleanup label. This pattern occurs when coroutines are used to propagate errors in functions that return expected<T>.

https://reviews.llvm.org/D24408

Files:
  lib/Transforms/Coroutines/CoroInstr.h
  lib/Transforms/Coroutines/CoroSplit.cpp
  test/Transforms/Coroutines/no-suspend.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24408.70858.patch
Type: text/x-patch
Size: 10868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160909/83c8cde8/attachment.bin>


More information about the llvm-commits mailing list