Repository navigation
[AUTOMATED] Print one || guard and a return in each arm where optimized code shares a return block (returndup auto) - #1965
Merged
Merged
Conversation
[AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
…rndup [AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
…e equivalence, void merge past looptest guards [AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
…to), C reverted [AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
…0 functions) [AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
…default re-spells [AUTOMATED] Four vendored datatests (13 assertions) and 17 stage tests (30 assertions) test something other than return shapes; each pins the structured form after its image loads. docs/baseline.json is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Stage corpus count 920, stage baseline re-recorded with the nine retshape assertions, phase catalog and options.md regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
…tion [AUTOMATED] The action listing snapshot and schedule count gain retshape; the boolless parity tests and two kuna-cli renaming tests pin the structured returns; the bejoin round trip declares each function without the signature line's trailing annotation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] The returndup symptoms no longer contain `||` (the catalog splits symptoms on `|`); use_when and the spec chapter carry the numbers measured against `record` on main fb88f58, the one goto gainer and the speed measurement. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] 5,428 on main plus the nine retshape assertions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
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.
In optimized code the binary's return layout, not the author, decides two return shapes kuna prints: tests that share one return block print as one guard each, and a return block the arms share prints as one
return v;fed by assignments. Sources rarely wrote either. The new fixture shows both (--option returndup recordprints the old form):returnduptakes a new valuerecord(the previous default). The defaultautokeeps it and adds both re-spellings, only in functions the unoptimized detector does not flag and that do not address their frame through a frame pointer.p8_structure/kuna_retshape.rs,ActionRetShape, a print-tree edit beforetailform): adjacent guards with the same bare return fold into one||guard when the later test prints nothing before it. Each test keeps its polarity and order, so it is the same program. Two tests that both call something stay apart when the return is void or a constant, as sources usually check one call per guard.arm_returns, handed toreturndup): a return block whose value is a phi of its in-edges, perhaps cast or extended, and nothing else is split per arm with the existingnode_split. A block that only runs into the return (the join a stripped stack-protector check leaves) is spliced first. Every in-edge must end an arm entered from one place, oneifor one short-circuit chain; otherwise the split arm would need agoto. A one-blockifsplits only when the arm does not read the carried value, sov += kupdates keep one return.On the decbench corpus, against
recordin the same build, 305 more O2-noinline functions match the source's control flow exactly and 23 fewer (+282; +204 and +78 on the two project halves). At O0, 61 more and 8 fewer, all in functions the detector misses. One function gains agoto, throughloopcondhoist's per-structuring check.Tests:
tests/stages/kuna-retshape-guards.xmlandkuna-retshape-arms.xml(default, thenrecord) on the new gcc -O2 fixture. They also cover the cases that must not change: two call tests and a one-armed update.kuna-cli/tests/retshape_round_trip.rscompiles and runs the printed C under gcc and clang at -O0/-O2 in both modes. Tests that cover something else pinoption returndup record: 4 vendored datatests and 17 stage files, withdocs/baseline.jsonunchanged.Model:
anthropic/claude-opus-5-5🤖 Generated with Claude Code
https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU