1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib/Transforms/Coroutines
Daniel Paoliello 24ad32b97c [Coroutine] Split PHI Nodes in cleanuppad blocks in a way that obeys EH pad rules
Issue Details:
In order to support coroutine splitting, any multi-value PHI node in a coroutine is split into multiple blocks with single-value PHI Nodes, which then allows a subsequent transform to generate `reload` instructions as required (i.e., to reload the value if required if the coroutine has been resumed). This causes issues with EH pads (`catchswitch` and `catchpad`) as all pads within a `catchswitch` must have the same unwind destination, but the coroutine splitting logic may modify them to each have a unique unwind destination if there is a PHI node in the unwind `cleanuppad` that is set from values in the `catchswitch` and `cleanuppad` blocks.

Fix Details:
During splitting, if such a PHI node is detected, then create a "dispatcher" `cleanuppad` as well as the blocks with single-value PHI Nodes: thus the "dispatcher" is the unwind destination and it will detect which predecessor called it and then branch to the appropriate single-value PHI node block, which will then branch back to the original `cleanuppad` block.

Reviewed By: GorNishanov, lxfind

Differential Revision: https://reviews.llvm.org/D88059
2020-09-25 11:30:38 -07:00
..
CMakeLists.txt [Transforms][Coroutines] Add missing header path to CMakeLists.txt 2020-09-15 10:37:25 +01:00
CoroCleanup.cpp
CoroEarly.cpp [llvm][NFC][CallSite] Remove CallSite from CoroEarly 2020-04-20 18:15:25 -07:00
CoroElide.cpp AllocaInst should store Align instead of MaybeAlign. 2020-05-16 14:53:16 -07:00
CoroFrame.cpp [Coroutine] Split PHI Nodes in cleanuppad blocks in a way that obeys EH pad rules 2020-09-25 11:30:38 -07:00
CoroInstr.h [Alignment][NFC] Use proper getter to retrieve alignment from ConstantInt and ConstantSDNode 2020-07-03 08:06:43 +00:00
CoroInternal.h Revert D85812 "[coroutine] should disable inline before calling coro split" 2020-08-24 11:41:05 -07:00
CoroSplit.cpp [NewPM][CGSCC] Handle newly added functions in updateCGAndAnalysisManagerForPass 2020-09-23 15:22:18 -07:00
Coroutines.cpp [CallSite removal] Remove unneeded includes of CallSite.h. NFC 2020-04-22 00:07:13 -07:00
LLVMBuild.txt