[Coroutines] Part 7: Split coroutine into subfunctions
authorGor Nishanov <GorNishanov@gmail.com>
Tue, 16 Aug 2016 18:04:14 +0000 (18:04 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Tue, 16 Aug 2016 18:04:14 +0000 (18:04 +0000)
commit74309fa0143e59344dd0fbd0637117837b01da63
treef82b9c9643a7fa48fbca07c607887f21d90bb3b1
parent68b97c7dc94b78a1752b67106464f48819cc341e
[Coroutines] Part 7: Split coroutine into subfunctions

Summary:
This patch adds simple coroutine splitting logic to CoroSplit pass.

Documentation and overview is here: http://llvm.org/docs/Coroutines.html.

Upstreaming sequence (rough plan)
1.Add documentation. (https://reviews.llvm.org/D22603)
2.Add coroutine intrinsics. (https://reviews.llvm.org/D22659)
...
7. Split coroutine into subfunctions <= we are here
8. Coroutine Frame Building algorithm
9. Handle coroutine with unwinds
10+. The rest of the logic

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 278830
llvm/lib/Transforms/Coroutines/CMakeLists.txt
llvm/lib/Transforms/Coroutines/CoroCleanup.cpp
llvm/lib/Transforms/Coroutines/CoroEarly.cpp
llvm/lib/Transforms/Coroutines/CoroFrame.cpp [new file with mode: 0644]
llvm/lib/Transforms/Coroutines/CoroInstr.h
llvm/lib/Transforms/Coroutines/CoroInternal.h
llvm/lib/Transforms/Coroutines/CoroSplit.cpp
llvm/lib/Transforms/Coroutines/Coroutines.cpp
llvm/test/Transforms/Coroutines/coro-split-00.ll [new file with mode: 0644]
llvm/test/Transforms/Coroutines/coro-split-01.ll [new file with mode: 0644]
llvm/test/Transforms/Coroutines/restart-trigger.ll