Skip to main content

generic_transfer

Function generic_transfer 

Source
fn generic_transfer(
    live: &mut BitVec,
    h_before: usize,
    inp: usize,
    out: usize,
    input_snap: &[AbsValue],
    output: Option<AbsValue>,
)
Expand description

Generic liveness transfer: kill all outputs, then mark all inputs as live.

When the output is a known constant, codegen replaces the entire instruction with a constant push and never reads any inputs from the stack, so none of them need to be live. When individual inputs are known constants, codegen pre-writes them into the stack slots (via operand_value_or_load or sp_after_inputs), so those positions don’t need to be live.