Skip to main content

blocks

Function blocks 

Source
pub fn blocks(func: &mut Func, insts: &BranchInsts, names: &mut Interner)
Expand description

Puts a function’s blocks in an order and writes the jumps that order needs.

Run last, after crate::finish.

§Panics

Panics on a block with more than two successors, which nothing lowers to yet, and on a block with two whose last instruction is not the conditional branch the target named. Both are a function that was built wrongly somewhere earlier, and both are worth finding here rather than as a jump to the wrong place.