sway_ir::optimize::inline

Function inline_all_function_calls

Source
pub fn inline_all_function_calls(
    context: &mut Context<'_>,
    function: &Function,
) -> Result<bool, IrError>
Expand description

Inline all calls made from a specific function, effectively removing all Call instructions.

e.g., If this is applied to main() then all calls in the program are removed. This is obviously dangerous for recursive functions, in which case this pass would inline forever.