pub fn optimize_for_run<'a>(
stmts: Vec<Stmt<'a>>,
expr_arena: &'a Arena<Expr<'a>>,
stmt_arena: &'a Arena<Stmt<'a>>,
interner: &mut Interner,
cfg: &OptimizationConfig,
) -> Vec<Stmt<'a>>Expand description
The RUN-PATH pipeline (EXODIA D1): the Futamura residual — fold,
propagate, polyvariant PE, CTFE, GVN, LICM, closed-form, deforestation,
interval analysis, DCE — everything except supercompilation (whose
driving cost is unbounded; it stays AOT-only). Budgeted: programs beyond
the statement gate run raw, and LOGOS_RUN_OPT=0 kills the pass
entirely. Optimizer time lands inside the measured run, so the budget is
part of the contract.