sway_ir::optimize::inline

Function inline_function_call

Source
pub fn inline_function_call(
    context: &mut Context<'_>,
    function: Function,
    block: Block,
    call_site: Value,
    inlined_function: Function,
    call_data: &FxHashMap<Value, RefCell<(Block, Function)>>,
) -> Result<(), IrError>
Expand description

Inline a function to a specific call site within another function.

The destination function, block and call site must be specified along with the function to inline.