This patch adds coroutine frame building algorithm. Now, simple coroutines such as ex0.ll and ex1.ll (first examples from docs\Coroutines.rst can be compiled).
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)
...
- Split coroutine into subfunctions. (https://reviews.llvm.org/D23461)
- Coroutine Frame Building algorithm <= we are here
- Add f.cleanup subfunction.
10+. The rest of the logic