Skip to main content

insert_spill_code

Function insert_spill_code 

Source
pub fn insert_spill_code(
    instructions: &mut Vec<LirInst>,
    spilled: &[VReg],
    next_vreg: &mut u32,
    spill_slot_base: u32,
) -> u32
Expand description

Generate spill code for a set of spilled virtual registers.

Inserts local stores after definitions and local loads before uses of spilled registers, using a fresh VReg for each reload.