Function sway_ir::optimize::dce::func_dce

source ·
pub fn func_dce(
    context: &mut Context,
    module: &Module,
    entry_fns: &[Function]
) -> bool
Expand description

Remove entire functions from a module based on whether they are called or not, using a list of root ‘entry’ functions to perform a search.

Functions which are pub will not be removed and only functions within the passed Module are considered for removal.