feat(rv32-promo)!: SYNTH_RV_LOCAL_PROMO default-on — measured local promotion ships (#472, #601, epic #242) - #627
Merged
Conversation
Contributor
Author
|
Retargeted to main after #626 merged — CI should trigger now. Gate: merge on full green (frozen anchors + all execution oracles). — maintainer loop |
…romotion ships (#472, #601, epic #242) The #601 refreeze ritual, PR #583 template. With profitability now MEASURED (strict per-function no-grow vs the unpromoted baseline, every candidate subset probed), the RV32 local-promotion lever flips default-on; SYNTH_RV_LOCAL_PROMO=0 is the opt-out (pre-flip bytes). - Frozen RV32 goldens UNCHANGED: the measured gate declines promotion everywhere in control_step + signed_div_const — promo-ON bytes verified bit-identical to the pinned hashes, so no re-pin. - New escape hatch frozen_fixtures_rv32_local_promo_escape_hatch_is_noop pins the =0 rollback; the shift-fold and cmp-select hatches now pin promo=0 too (exact composition, not a byte-neutrality bet). - flag_flip_wave_242 + rv32_cmp_select_flip_472 pin promo=0 in both arms so their per-lever isolation keeps its frozen baseline. - rv32_local_promo_no_grow_corpus_472 arms become default-vs-opt-out. - All 11 *riscv*_differential.py re-run green on the NEW DEFAULT bytes BEFORE any pin. Corpus: 10 functions shrink / 0 grow across 67 fixtures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
avrabe
force-pushed
the
feat/rv-local-promo-default-on
branch
from
July 8, 2026 00:29
515fe1f to
f736c7e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SYNTH_RV_LOCAL_PROMO default-on — measured local promotion ships (#472, closes #601, epic #242)
Stacked on #626 (the measured-profitability model). The deliberate flip, executed with the refreeze ritual (PR #583 template). The RV32 local-promotion lever — leaf functions' non-parameter i32 locals into callee-saved s8/s9/s10 — now runs by default;
SYNTH_RV_LOCAL_PROMO=0is the opt-out (pre-flip bytes).Evidence basis for the flip (all from #626, re-verified on this branch)
emitted_byte_size <= baseline— per-return epilogue restores and WAR-snapshotmvs (the feat(vcr-riscv)!: SYNTH_RV_CMP_SELECT default-on — the RV32 lever flip-wave; local-promotion flip HELD on a no-grow blocker (#472) #601 blocker) priced by construction;emitted_byte_sizemirror-pinned toassemble_function(test(vcr-oracle): estimator↔encoder agreement oracle for the optimized path (#498, #242) #511).rv32_local_promo_no_grow_corpus_472, arms now default-vs-opt-out).Execution differentials — run on the NEW DEFAULT bytes BEFORE any pin
All 11
scripts/repro/*riscv*_differential.py, env unset (i.e. the shipped default), fresh binary: 11/11 PASS (const_addr_fold −56 B, control_step + controller_step + filter_axis correct + ABI-compliant, i64_divs_317, if_else_result_343, rv32_cmp_select_472 182 vectors, rv32_local_promotion_472, shift_fold 21/21, signed_div_const, u64_unpack).Refreeze table (
frozen_fixtures_rv32_text_is_bit_identical_oracle_001)6ac5d7f9…/ 48415fa429d…/ 88No re-pin needed: the measured gate declines promotion everywhere in both pinned fixtures — promo-ON
.textverified bit-identical by hash. ARM gates untouched (the lever is RV32-selector-only).Per-function deltas at the new default (vs
=0opt-out)Opt-out pin (CI-gated escape hatch)
frozen_fixtures_rv32_local_promo_escape_hatch_is_noop:SYNTH_RV_LOCAL_PROMO=0alone reproduces the pinned goldens (rollback proof + leak tripwire; the pins are promo-neutral so old bytes == current goldens).SYNTH_RV_LOCAL_PROMO=0too — exact pre-flip composition, not a byte-neutrality bet (the documented COMPOSITION NOTE pattern).flag_flip_wave_242+rv32_cmp_select_flip_472pin promo=0in both arms so each gate keeps isolating its own lever on the baseline it was frozen on.local_promotion_default_is_promoted_and_opt_out_frame_backed_472(riscv unit test): env-unset default == flag-on lowering; opt-out stays frame-backed, no s8 write.Gate (all green on this branch)
cargo test -p synth-backend-riscv(210) ✓ ·cargo test -p synth-cli(frozen gates + all three escape hatches + flip gates) ✓cargo test --workspace— 104 suites, 0 failures ✓cargo fmt --check✓ · chunked + fullcargo clippy --workspace --all-targets -- -D warnings✓🤖 Generated with Claude Code