Skip to main content

dead

Function dead 

Source
pub fn dead(func: &mut Func, insts: &BitInsts, names: &Interner) -> usize
Expand description

Takes out every conversion whose result nothing reads above the width of its source, and gives back how many.

Each one that goes takes its readers with it: they are pointed at the source instead, which holds the same bits as the result did for as far as anything was looking.

Run after lowering and before allocation. Running it once is enough, because the analysis is over the whole function at once and a chain of conversions is settled by the fixpoint rather than by a second run.