Summary:
If one of the uses of the value is a single edge PHINode, handle it.
Original:
%val = something
<suspend>
%p = PHINode [%val]
After Spill + Part13:
%val = something
%slot = gep val.spill.slot
store %val, %slot
<suspend>
%p = load %slot
Plus tiny fixes/changes:
* use correct index for coro.free in CoroCleanup
* fixup id parameter in coro.free to allow authoring coroutine in plain C with __builtins
Reviewers: majnemer
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D24242
llvm-svn: 281020
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| CoroCleanup.cpp | ||
| CoroEarly.cpp | ||
| CoroElide.cpp | ||
| CoroFrame.cpp | ||
| CoroInstr.h | ||
| CoroInternal.h | ||
| CoroSplit.cpp | ||
| Coroutines.cpp | ||
| LLVMBuild.txt | ||