Skip to main content

optimize_for_run_tiered

Function optimize_for_run_tiered 

Source
pub fn optimize_for_run_tiered<'a>(
    stmts: Vec<Stmt<'a>>,
    expr_arena: &'a Arena<Expr<'a>>,
    stmt_arena: &'a Arena<Stmt<'a>>,
    interner: &mut Interner,
    cfg: &OptimizationConfig,
    hs: &HotswapConfig,
    tier: Tier,
) -> Vec<Stmt<'a>>
Expand description

The run-path optimizer, gated by the unit’s hotness tier (HOTSWAP §4). Every pass runs in the SAME order as the un-tiered pipeline; tier decides WHICH passes run (via admits_pinned, a single cost comparison, with hs’s per-opt pins applied) and how many PE-fixpoint iterations to pay for. Tier::T3 with an all-on config and no pins reproduces optimize_for_run exactly — the compatibility + soundness anchor.