1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/Coroutines
Gor Nishanov 026990c96b [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

llvm-svn: 280646
2016-09-05 04:44:30 +00:00
..
coro-early.ll Part 4c: Coroutine Devirtualization: Devirtualize coro.resume and coro.destroy. 2016-08-06 02:16:35 +00:00
coro-elide.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
coro-heap-elide.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
coro-split-00.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
coro-split-01.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
ex0.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
ex1.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
ex2.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
ex3.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
ex4.ll [Coroutines] Part 10: Add coroutine promise support. 2016-08-31 00:35:41 +00:00
ex5.ll [Coroutines] Part11: Add final suspend handling. 2016-09-05 04:44:30 +00:00
restart-trigger.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
smoketest.ll [Coroutines] Part 8: Coroutine Frame Building algorithm 2016-08-24 04:44:35 +00:00