Skip to main content

is_valid_linear_scan

Function is_valid_linear_scan 

Source
pub fn is_valid_linear_scan(
    spec: &RegSpec,
    assignment: &[Option<usize>],
) -> bool
Expand description

Re-check a linear-scan assignment: every assigned register is within budget, and no two variables that are live at the same time are given the same register — the soundness property any register allocation must satisfy. (Spilled variables, None, impose no constraint: they live in memory.)