diff options
author | Daniel Paoliello <danpao@microsoft.com> | 2020-09-25 11:26:40 -0700 |
---|---|---|
committer | Xun Li <xun@fb.com> | 2020-09-25 11:30:38 -0700 |
commit | d2166076b882e38becf3657ea830ffd2b6a5695e (patch) | |
tree | 64022b9fd5fa75e2cd85f65be10cc5857a17cc77 /lldb/unittests/ScriptInterpreter/Python | |
parent | 2c2a7494482133ecdd681869e1ccc53b71d27385 (diff) | |
download | llvm-d2166076b882e38becf3657ea830ffd2b6a5695e.zip llvm-d2166076b882e38becf3657ea830ffd2b6a5695e.tar.gz llvm-d2166076b882e38becf3657ea830ffd2b6a5695e.tar.bz2 |
[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
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions