llvm/lib/Transforms
Gor Nishanov ac396ea37f [Coroutines] Part11: Add final suspend handling.
Summary:
A frontend may designate a particular suspend to be final, by setting the second argument of the coro.suspend intrinsic to true. Such a suspend point has two properties:

* it is possible to check whether a suspended coroutine is at the final suspend point via coro.done intrinsic;
* a resumption of a coroutine stopped at the final suspend point leads to undefined behavior. The only possible action for a coroutine at a final suspend point is destroying it via coro.destroy intrinsic.

This patch adds final suspend handling logic to CoroEarly and CoroSplit passes.
Now, the final suspend point example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex5.ll).

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D24068

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-05 04:44:30 +00:00
..
Coroutines [Coroutines] Part11: Add final suspend handling. 2016-09-05 04:44:30 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
InstCombine [InstCombine] allow icmp (and X, C2), C1 folds for splat constant vectors 2016-09-04 20:58:27 +00:00
Instrumentation Add cast to appease windows builder. Fixes build break introduced in r280306. 2016-08-31 23:24:43 +00:00
IPO s/static inline/static/ for headers I have changed in r279475. NFC. 2016-08-31 16:48:13 +00:00
ObjCARC Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
Scalar Cleanup : Use metadata preserving API for branch creation 2016-09-03 22:26:11 +00:00
Utils Fix inliner funclet unwind memoization 2016-09-04 01:23:20 +00:00
Vectorize ADT: Do not inherit from std::iterator in ilist_iterator 2016-09-03 02:27:35 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00