Function globals_dce

Source
pub fn globals_dce(
    context: &mut Context<'_>,
    _: &AnalysisResults,
    module: Module,
) -> Result<bool, IrError>
Expand description

Remove entire functions and globals from a module based on whether they are called / used 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.