Skip to main content

Module hir_builder

Module hir_builder 

Source

Structs§

HirBuilder
WipBlock

Functions§

create_temporary_place
Create a temporary Place with a fresh identifier allocated in the arena.
get_reverse_postordered_blocks
Compute a reverse-postorder of blocks reachable from the entry.
mark_instruction_ids
Sequentially number all instructions and terminals starting from 1.
mark_predecessors
DFS from entry, for each successor add the predecessor’s id to the successor’s preds set.
remove_dead_do_while_statements
For each block with a DoWhile terminal whose test block is not in the blocks map, replace the terminal with a Goto to the loop block.
remove_unnecessary_try_catch
For each block with a Try terminal whose handler block is not in the blocks map, replace the terminal with a Goto to the try block.
remove_unreachable_for_updates
For each block with a For terminal whose update block is not in the blocks map, set update to None.