llvm-project/llvm/lib
Gor Nishanov df3d71a7a9 [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
..
Analysis [InstSimplify] try to eliminate icmp Pred (add nsw X, C1), C2 2017-01-24 17:03:24 +00:00
AsmParser ASMParser: use range-based for loops (NFC) 2016-12-27 18:35:22 +00:00
Bitcode [ThinLTO] Fix lazy-loading of MDString instruction attachments 2017-01-20 20:29:16 +00:00
CodeGen GlobalISel: Use the correct types when translating landingpad instructions 2017-01-25 00:16:53 +00:00
DebugInfo [pdb] Write the Named Stream mapping to Yaml and binary. 2017-01-20 22:42:09 +00:00
Demangle Demangle: correct demangling for CV-qualified functions 2017-01-24 20:04:58 +00:00
ExecutionEngine RuntimeDyldELF: add LDST128_ABS_LO12_NC reloc 2017-01-23 13:52:08 +00:00
Fuzzer [libFuzzer] mutate empty input using the regular mutators (instead of a custom dummy one). This way when we mutate an empty input there is a chance we will get a dictionary word 2017-01-23 22:52:13 +00:00
IR Make VerifyDomInfo and VerifyLoopInfo global variables 2017-01-24 05:52:07 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO [LTO] Teach lib/LTO about the new pass manager. 2017-01-24 00:58:24 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker [ThinLTO] Import only necessary DICompileUnit fields 2016-12-12 16:09:30 +00:00
MC [CodeView] Fix off-by-one error in def range gap emission 2017-01-24 16:57:55 +00:00
Object Fix llvm-objdump so it picks a good CPU based for Mach-O files 2017-01-24 23:41:04 +00:00
ObjectYAML Add LC_BUILD_VERSION load command 2017-01-23 20:07:55 +00:00
Option Generalize ArgList::AddAllArgs more 2016-09-29 19:47:58 +00:00
Passes [PM] Flesh out the new pass manager LTO pipeline. 2017-01-24 00:57:39 +00:00
ProfileData [WebAssembly] Add triple support for the new wasm object format 2017-01-17 20:34:09 +00:00
Support [Support] Use O_CLOEXEC only when declared 2017-01-24 10:57:01 +00:00
TableGen [Hexagon, TableGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-04 02:02:05 +00:00
Target AMDGPU add support for spilling to a user sgpr pointed buffers 2017-01-25 01:25:13 +00:00
Transforms [coroutines] Spill the result of the invoke instruction correctly 2017-01-25 02:25:54 +00:00
XRay Avoid std::errc::protocol_* to appease mingw 2017-01-12 18:33:14 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00