Function sway_ir::optimize::dce::func_dce

source ·
pub fn func_dce(
    context: &mut Context,
    _: &AnalysisResults,
    module: Module
) -> Result<bool, IrError>
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.