Function sway_ir::optimize::mem2reg::promote_to_registers
source ยท pub fn promote_to_registers(
context: &mut Context<'_>,
analyses: &AnalysisResults,
function: Function,
) -> Result<bool, IrError>
Expand description
Promote local values that are accessed via load/store to SSA registers.
We promote only locals of non-copy type, whose every use is in a get_local
without offsets, and the result of such a get_local
is used only in a load
or a store.