Repository navigation
[AUTOMATED] campaign(decbench): triage the returndup regression set — no gate exists, keep it - #245
Merged
Merged
Conversation
… no gate exists, keep it The kuna-only re-run on the optimized datasets reported 411/189 (O2-noinline) and 293/114 (O2) with a return/tail-duplication transform on most functions whose score moved. Triaged in three steps; the code is unchanged. WHICH TRANSFORM. `taildup:` and `returndup:` render as the SAME `return-dupe` slug (PrintC::warning_slug), so the reported correlation lumped two passes. They separate by warning sink: returndup uses warning_header (prototype line), taildup uses warning(addr) (statement line). Classified that way, returndup covers 86% of wins and 66% of regressions; taildup 2-3%. The July artifacts carry 5,183 `taildup:` banners and ZERO `returndup:` — taildup never moved. WHY IT STARTED. returndup is default-OFF; `aggressive` turns it on, and DIV-40 made `auto` (=aggressive under 500 KiB) the front-end default. The July artifacts predate the mode system entirely. #228/DIV-47 is refuted directly: with returndup forced on, the fire count is identical at #228 and its parent on all six probe binaries (17/17, 52/52, 410/410, 699/699, 76/76, 35/35), and 0 with returndup off. NO DISCRIMINATOR. An isolating A/B on the same 36641d3 build over 536 slices / 52,862 functions (validated: the 46,005 non-firing functions score identically, and the harness reproduces a published artifact byte-for-byte) puts returndup at +417 GED-perfect and -7,756 aggregate GED — 608 perfects created vs 191 destroyed. Nine candidate gates were partitioned causally (split count, void vs value return, distinct return values, return count, switch, all-returns-identical, body size, project, opt level): every cell is net-positive. The void-return escape hatch in returndup_is_const_ret, which explains xmalloc and do_statx, is MORE profitable than the value case, not less. The single net-negative cell — the split de-structures a loop (cleanflight nextArg loses its `for` header) — was implemented as a gate and measured, not left as theory: +2 GED-perfect / -209 GED. Not kept, and reverted here. Also corrects docs/modes.md, which told readers `aggressive` enables an option "known to regress aggregate GED (DIV-18)" — superseded by #137's const-return gate — and annotates the DIV-18 row. returndup as a default now also passes the datatest gate (675/675, PARITY OK); promoting it is left as a separate DIV. Gates: make test PARITY OK 675/675; make test-stages PARITY OK 356/356; make check-spec OK; kuna catalog --check OK. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011RXVU58TKJxb518oViChwo
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.
The kuna-only re-run on the optimized datasets reported 411 wins / 189 regressions
(O2-noinline) and 293 / 114 (O2), with a return/tail-duplication transform firing on the
large majority of every function whose score moved. This triages that finding. No code
changes — the analysis says to leave the transform alone, and the measurements that say so
are recorded in
docs/decbench/returndup-regression-triage.md.Which transform
taildup:andreturndup:render as the samereturn-dupeslug (PrintC::warning_slug),so the reported correlation was measuring two passes at once. They separate by warning sink —
returndupuseswarning_header(prototype line),taildupuseswarning(addr)(statementline). Classified that way it is
returndup: 86% of wins, 66% of regressions;taildup2–3%. The July artifacts carry 5,183
taildup:banners and zeroreturndup:—taildupnever moved.
Why it started firing
returndupis default-OFF.aggressiveturns it on, and DIV-40 madeauto(=
aggressiveunder 500 KiB) the front-end default. The July artifacts predate the modesystem entirely. On
base-passwd::xmalloc,--mode reliable==--option returndup off==the July body, byte for byte.
#228 / DIV-47 is refuted. With
returndupforced on, the fire count is identical at #228and at its parent on all six probe binaries (17/17, 52/52, 410/410, 699/699, 76/76, 35/35),
and 0 with
returndup off. A pass that is switched off cannot have its eligibility widened.No discriminator exists
Isolating A/B on the same
36641d35build, 536 slices / 52,862 functions. Validation: the46,005 functions where
returndupnever fired score identically in both arms, and theharness reproduces a published artifact byte-for-byte with zero score mismatches.
returndupON608 perfects created vs 191 destroyed (3.2 : 1); 3,676 functions improved vs 2,079 worsened.
Nine candidate gates partitioned causally — split count, void vs value return, distinct return
values, return count,
switch, all-returns-identical, body size, project, opt level — andevery cell is net-positive. The attractive void-return escape hatch in
returndup_is_const_ret(which explainsxmallocanddo_statx) is more profitable thanthe value case, not less.
The one net-negative cell — the split de-structures a loop (
cleanflight nextArgloses itsforheader, n=321, −257 GED) — was implemented as a gate and measured rather than left asa theory: +2 GED-perfect / −209 GED. Not worth a new CFG walk, a stages testcase, a spec
revision and a baseline re-record; reverted.
Are the regressions real?
40% of them are not
returndupat all. Of the eight worst, only three are. One of the others,coreutils kill::print_table_row(0 → 10), is an outright improvement scored as aregression — the July body silently dropped the
description ? description : "?"argument. Thereturndupregressions, read against source, are genuine shape divergences:xmalloc,do_statx(nestedif+ one trailingreturn),USBD_StdDevReq(switch+break),DCD_HandleUSBSuspend_ISR(one&&chain),nextArg(aforloop).Also in this PR
docs/modes.mdno longer tells readersaggressiveenables an option "known to regressaggregate GED (DIV-18)" — superseded by returndup: make it selective like angr (const-return gate) — cut the over-eager variable-return splits #137's const-return gate.
docs/history.mdis annotated with the superseding measurement.returndupas a default now also passes the datatest gate(675/675, PARITY OK, zero assertion movement), so it clears the standing default-ON bar.
Promoting it is a separate change with its own DIV row.
Gates
make testmake test-stagesmake rust-testmake check-speckuna catalog --checkSpeed: docs only, no code change.
🤖 Generated with Claude Code
https://claude.ai/code/session_011RXVU58TKJxb518oViChwo