Skip to content

edg: the bit-field baseline is taken and the cost is measured - #625

Merged
staalmannen merged 1 commit into
mainfrom
claude/upgrade-ape-c-library-mmZGd
Oct 14, 2026
Merged

staalmannen merged 1 commit into
mainfrom
claude/upgrade-ape-c-library-mmZGd

Conversation

@staalmannen

Copy link
Copy Markdown
Owner

apeabi-probe's acid dump on the VM confirms every number written down first. All four controls answer as predicted, and the two that matter are the two that already agree with gcc: aligned 4/8 and trailing 16 must be identical in the after-dump, or the patch changed more than the sharing rule -- which a shares-only check could not have told apart. split was left unknown and is answered: kencc closes the container across base types too, where gcc shares.

__res_state is the only mover in the public surface, with unused[3] at 368 against gcc's 365; fenv_t and obstack are identical under both rules, as called. curl was not compiled in, so it stays a reading. And the dump swept itself -- every aggr scanned for two members at one offset, acid's own signature for a bit-field group -- finding those same three and nothing else, the rest being unions.

bfmove-sweep.py measures what no acid dump of one translation unit can: lib/ap 3 groups / 1 mover, external/ 43093 / 268, and 266 of the 268 are EDG, which is the purpose arriving as the cost line. The other two are sqlite's struct Column and curl's hstsentry, each internal to one package. The lib/ap hit is a latent bug rather than a cost: mallocng's meta.h sizes its pad so the struct is exactly UNIT only if the bit field shares, wrong under kencc by construction, costing nothing because nothing includes it.

The sweep's first version allowed a pointer and reported perl's char *subbeg, which can never share a 4-byte tail; a regex matching the type name is not one matching the type, and that was the whole 284->268.

Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs

apeabi-probe's acid dump on the VM confirms every number written down
first.  All four controls answer as predicted, and the two that matter
are the two that already agree with gcc: aligned 4/8 and trailing 16
must be identical in the after-dump, or the patch changed more than the
sharing rule -- which a shares-only check could not have told apart.
split was left unknown and is answered: kencc closes the container
across base types too, where gcc shares.

__res_state is the only mover in the public surface, with unused[3] at
368 against gcc's 365; fenv_t and obstack are identical under both
rules, as called.  curl was not compiled in, so it stays a reading.
And the dump swept itself -- every aggr scanned for two members at one
offset, acid's own signature for a bit-field group -- finding those
same three and nothing else, the rest being unions.

bfmove-sweep.py measures what no acid dump of one translation unit can:
lib/ap 3 groups / 1 mover, external/ 43093 / 268, and 266 of the 268
are EDG, which is the purpose arriving as the cost line.  The other two
are sqlite's struct Column and curl's hstsentry, each internal to one
package.  The lib/ap hit is a latent bug rather than a cost: mallocng's
meta.h sizes its pad so the struct is exactly UNIT only if the bit
field shares, wrong under kencc by construction, costing nothing
because nothing includes it.

The sweep's first version allowed a pointer and reported perl's
char *subbeg, which can never share a 4-byte tail; a regex matching the
type name is not one matching the type, and that was the whole 284->268.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
@staalmannen
staalmannen merged commit 5359841 into main Oct 14, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants