cairo_lang_lowering::reorganize_blocks

Function reorganize_blocks

source
pub fn reorganize_blocks(lowered: &mut FlatLowered)
Expand description

Reorganizes the blocks in lowered function and removes unnecessary remappings.

Removes unreachable blocks. Blocks that are reachable only through goto are combined with the block that does the goto. The order of the blocks is changed to be a topologically sorted.