Rework br_table to use BlockCall (#5731)

Rework br_table to use BlockCall, allowing us to avoid adding new nodes during ssa construction to hold block arguments. Additionally, many places where we previously matched on InstructionData to extract branch destinations can be replaced with a use of branch_destination or branch_destination_mut.
This commit is contained in:
Trevor Elliott
2023-02-16 09:23:27 -08:00
committed by GitHub
parent c3c16eb207
commit 80c147d9c0
26 changed files with 475 additions and 269 deletions

View File

@@ -79,7 +79,8 @@ fn define_control_flow(
Use ``x`` as an unsigned index into the jump table ``JT``. If a jump
table entry is found, branch to the corresponding block. If no entry was
found or the index is out-of-bounds, branch to the given default block.
found or the index is out-of-bounds, branch to the default block of the
table.
Note that this branch instruction can't pass arguments to the targeted
blocks. Split critical edges as needed to work around this.