1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/test/Transforms/Coroutines
Gor Nishanov 750a36491c [coroutines] Spill the result of the invoke instruction correctly
Summary:
When we decide that the result of the invoke instruction need to be spilled, we need to insert the spill into a block that is on the normal edge coming out of the invoke instruction. (Prior to this change the code would insert the spill immediately after the invoke instruction, which breaks the IR, since invoke is a terminator instruction).

In the following example, we will split the edge going into %cont and insert the spill there.

```
  %r = invoke double @print(double 0.0) to label %cont unwind label %pad

  cont:
    %0 = call i8 @llvm.coro.suspend(token none, i1 false)
    switch i8 %0, label %suspend [i8 0, label %resume
                                  i8 1, label %cleanup]
  resume:
    call double @print(double %r)
```

Reviewers: majnemer

Reviewed By: majnemer

Subscribers: mehdi_amini, llvm-commits, EricWF

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

llvm-svn: 293006
2017-01-25 02:25:54 +00:00
..
ArgAddr.ll [Coroutines] Part12: Handle alloca address-taken 2016-09-05 23:45:45 +00:00
coro-cleanup.ll [Coroutines] Part 15a: Lower coro.subfn.addr in CoroCleanup 2016-09-30 18:41:35 +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-frame.ll [coroutines] Spill the result of the invoke instruction correctly 2017-01-25 02:25:54 +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] Store an address of destroy OR cleanup part in the coroutine frame. 2016-10-08 00:22:50 +00:00
coro-split-01.ll [Coroutines] Part 9: Add cleanup subfunction. 2016-08-29 14:34:12 +00:00
coro-split-02.ll [Coroutines] Part15c: Fix coro-split to correctly handle definitions between coro.save and coro.suspend 2016-09-30 19:24:19 +00:00
coro-split-dbg.ll [Coroutines] Part15b: Fix dbg information handling in coro-split. 2016-09-30 19:05:06 +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
no-suspend.ll [Coroutines] Part14: Handle coroutines with no suspend points. 2016-09-26 15:49:28 +00:00
phi-coro-end.ll [Coroutines] Part13: Handle single edge PHINodes across suspends 2016-09-09 05:39:00 +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