commit 01aaff143e7d8d45b0bcb7a4bae87a05c5917211 parent 235a72c755e77fd64a69c25dc8f38201f9f10776 Author: Ryan Sepassi <rsepassi@gmail.com> Date: Tue, 16 Jun 2026 02:04:04 -0700 doc/plan/O1.md: record W5 (local same-block load/CSE) as landed Diffstat:
| M | doc/plan/O1.md | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/doc/plan/O1.md b/doc/plan/O1.md @@ -764,6 +764,13 @@ aggregate `__TEXT` 1.25× → 1.09× clang; lvm 4.66× → 2.86×; sqlite `sub x correct/linear net that currently finds 0 sites (W2/DCE clear the pattern upstream — the "compounds with W2" case). Guards `o1_cmp_imm.sh`, `o1_stack_dse.sh`. +- **W5** `235a72c7` — local same-block redundant-load + pure-expression CSE + (`pass_combine.c`): reuse the last load of an address / last compute of a pure + op until a may-alias store / call / barrier invalidates it (covers + indirect/global loads; spill/frame loads ceded to W8/compaction). Small/flat as + predicted (most redundancy is cross-block → GVN/O2). Found+fixed two MIR + value-reuse traps: self-clobbering loads and reuse of native-emit scratch + registers. Guard `o1_local_cse.sh`. - **W9+W10** `f97f2c08` — one-pass O1 branch cleanup + constant `cmp_branch` folding (`pass_jump.c`): same-target collapse, pass-through forwarding (one shot, ≤1 CFG rebuild), `x==x`/imm-imm fold; FP same-reg never folded; computed