Commit Graph

496 Commits

Author SHA1 Message Date
Drew T 7fd9f2cd8c T4: batch t38_4HL1 — restruct: batch t38_4HL1 rung L — 3 files (headers; 3 drawable) · 29 definitions: 3 folded (42 member renames) / 26 refused · compiles 111305 in 1679 s wall · final 3/3 identical · written 3 files | R22 check-all: 218 passed, 0 failed of 218 | (census skipped) (restruct_cycle) 2026-09-29 22:53:24 -06:00
Drew T 1e876b0ec8 src(phase-37): T4 batch t4_HD7 — restruct: batch t4_HD7 rung D — 271 files (headers; 271 drawable) · 289 declaration units: 182 canonical / 0 promoted / 91 K&R marked / 0 aliases typed / 0 __builtin_abs → abs / 107 kept · compiles 41375 in 1381 s wall · final 271/271 identical · written 159 files | R22 check-all: 218 passed, 0 failed of 218 | (census skipped) (restruct_cycle) 2026-09-12 22:21:38 -06:00
Drew T 3d9c8aed12 src(phase-37): T4 batch t4_HD5 — restruct: batch t4_HD5 rung D — 281 files (headers; 281 drawable) · 24 declaration units: 20 canonical / 0 promoted / 4 K&R marked / 0 aliases typed / 0 __builtin_abs → abs / 4 kept · compiles 2828 in 69 s wall · final 281/281 identical · written 12 files | R22 check-all: 218 passed, 0 failed of 218 | (census skipped) (restruct_cycle) 2026-09-12 20:58:15 -06:00
Drew T 5016a185d9 src(phase-37): T4 step (d) t4_sig2d — restruct: signature func_80029D3C — IDENTICAL · 2177 files written | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S108, sig_cycle) 2026-09-12 18:51:55 -06:00
Drew T 062467aab5 src(phase-37): T4 step (d) t4_sig12c — restruct: signature func_80157D20 — IDENTICAL · 2105 files written | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S108, sig_cycle) 2026-09-12 18:47:43 -06:00
Drew T c0bbd26c6e src(phase-37): T4 step (c) DONE — the shared headers: t4_HD4 216 headers · 9 units (4 canonical / 1 K&R / 2 aliases typed / 3 kept), 6 files; the header plan now empty (0 of 0); restruct_cycle skips the fleet run when src/ is unchanged after a batch | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress — step (d) NEXT (S108) 2026-09-12 18:06:52 -06:00
Drew T 436cfd8a1c src(phase-37): T4 batch t4_HD1 — restruct: batch t4_HD1 rung D — 20 files (headers; 276 drawable) · 30 declaration units: 27 canonical / 0 promoted / 0 K&R marked / 0 aliases typed / 0 __builtin_abs → abs / 3 kept · compiles 1327 in 72 s wall · final 20/20 identical · written 7 files | R22 check-all: 218 passed, 0 failed of 218 | (census skipped) (restruct_cycle) 2026-09-12 17:52:51 -06:00
Drew T 095fe75e2c src(phase-37): T4 unalias t4_ua13 — 3 more alias-defined functions back under their real names as K&R-style definitions (169 files; the ladder's arity escalation counts attempts, not distinct files); step (b) DONE: 133 of 149 back, 16 kept with causes | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress — step (c) NEXT (S108) 2026-09-12 17:46:12 -06:00
Drew T 7f8d448449 src(phase-37): T4 unalias t4_ua7 — func_80131CA8 back under its real name as a K&R-style definition (callers pass more arguments than its byte-true head declares; 235 files, 202 objects IDENTICAL); the unit's per-file prototype ladder (exact → promoted → () → untouched) | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S107) 2026-09-12 13:27:05 -06:00
Drew T b2c6b23646 src(phase-37): T4 unalias t4_ua6 — 6 more alias-defined functions back under their real names (612 files; the hoist of a shared header's declaration into its includers landed 4 of them) | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S107) 2026-09-12 13:07:03 -06:00
Drew T 111e98d758 src(phase-37): T4 unalias t4_ua4 — func_801466F0 back under its real name as a K&R-style definition (narrow u16 parameters in the block) with promoted prototypes everywhere (172 files, 316 objects IDENTICAL) | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S107) 2026-09-12 12:45:43 -06:00
Drew T 7ae2e7f811 src(phase-37): T4 unalias t4_ua3 (partial, stopped with SIGINT) — 1 more alias-defined function back under its real name (136 files); the unit gains the hoist pre-step, the arity/conflict/DIFFERS fallbacks and the promoted (K&R-style definition) mode | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S107) 2026-09-12 12:42:29 -06:00
Drew T 783bacb5e8 src(phase-37): T4 unalias t4_ua2 — 98 of 148 alias-defined functions back under their real names with their byte-true signatures (592 files; 50 kept, causes bucketed) | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S107) 2026-09-12 12:27:26 -06:00
Drew T 74aac39e74 src(phase-37): T4 unalias t4_ua1 — func_8012EFB8 back under its real name (s32 (void *, void *)): 194 alias prototypes gone, 375 declarations canonical, 2 shared headers K&R-marked; the --unalias unit + the planner's settled-TU skip + the same-name-alias fix | IDENTICAL on 478 objects | R22 check-all: 218 passed, 0 failed of 218 | 🛑 T4 in progress (S107) 2026-09-12 11:44:51 -06:00
Drew T d85a4e3877 phase-36: S105 s105_r22b — func_80146B9C.h banked at 0 by the fixed R22 (IDENTICAL on every includer) 2026-09-11 14:09:52 -06:00
Drew T 0076a9d2ee phase-36: S105 s105_r44r22 — 3 classes banked at 0 by the R44/R22 regen (func_800CFB3C R22, func_8014A2E4.h R44 IDENTICAL on 141 objects, func_80180FF4 R44) 2026-09-11 11:58:28 -06:00
Drew T edd427861b phase-36: S104 widened R39 pass banked 1 of 1 (732 classes, 112 s); R42 pass banked 2 of 2 (745 classes, 2,640 s) 2026-09-11 04:10:21 -06:00
Drew T 4de2fb06ad phase-36: S104 s104_e6 — func_8017D0BC banked at 0 through the whole-object gate + propagated — e6 port onto the shared header (4 includers) 2026-09-11 01:34:39 -06:00
Drew T 65b0855c1c phase-36: S104 part-3 bank resumed — 6 of 38 MATCH rows banked (the rest banked before the timeout); e1–e5 TU-batch packs; R22 follows 2026-09-11 00:32:13 -06:00
Drew T c5786dac6f phase-36: S104 part-3 bank (R37 ×4 + the all-families pass since part 2, live residue only), interrupted by a 590 s tool timeout mid-run — the 30 files it had written verified by R22 check-all 218/218 before this commit; the rest resumes 2026-09-11 00:27:14 -06:00
Drew T 93e2a9170c phase-36: S104 banks — the R23(case-label)/R34/R35/R36 pass: 915 classes in 1,757 s, MATCH 16 (bank line above); d20's minimum-lever func_80180324 (8 → 2 marked dead branches) PARKED for Drew — an invented always-false condition is not covered by ruling (a) 2026-09-10 23:50:01 -06:00
Drew T 1d42fff3c2 phase-36: S104 s104_d27 — func_8013E448 banked at 0 through the whole-object gate + propagated — d27 port onto the shared header (136 includers) 2026-09-10 23:20:34 -06:00
Drew T 13069c142d phase-36: S104 banks — R29/R31/R32/R33 pass: 4 of 4 MATCH (R28–R34 families' first residue pass: 945 classes in 842 s); R27 pass remainder: 2 more (25 MATCH of 995 in all); each IDENTICAL through the whole-object gate; R22 follows 2026-09-10 22:45:44 -06:00
Drew T 72153b4af1 phase-36: S104 sweep banks part 2 — 39 of 44 MATCH rows (R27 ports 21, R7 do-while marked 7, R8/R18/R12/R19/R20/R9) + 35 siblings, each IDENTICAL through the whole-object gate; R22 follows 2026-09-10 22:11:30 -06:00
Drew T 0d26d8d82a phase-36: S104 s104_d10 — func_8017F040 banked at 0 through the whole-object gate + propagated — d10's sibling, the same union move 2026-09-10 21:46:18 -06:00
Drew T 699fbbfdde phase-36: S104 s104_d10 — func_8017EF88 banked at 0 through the whole-object gate + propagated — 3 pins + 2 keepalives + a do-while + a dead pad → 0: register unions {struct{s16 x,y;}v; s32 sxy;} — the field insert makes flow mark them live from entry (global.c:640-660) 2026-09-10 21:44:46 -06:00
Drew T b27c987ba9 phase-36: S103 ends — c51 func_8012E364 at two marked pins (134 bodies); 46 orphan markers scrubbed (one scrub false positive restored, the defect recorded); census 5,097 sites, 0 unmarked, exit 0; checkpoint final (R22 218/218) 2026-09-10 19:13:58 -06:00
Drew T 94520756e0 phase-36: the R26 regen closes 28 classes (71 bodies); c55 and c53 close five tier classes; census 5,231 sites, 0 unmarked — exit 1 on 45 orphan !FAKE markers, scrubbed next (R22 218/218) 2026-09-10 19:05:22 -06:00
Drew T c02fc7cd55 phase-36: minimum-lever banks — func_8013D9B0 (2 marked GTE asm instead of 34 levers) and func_80140958 (2 marked levers), 266 bodies; c52 closes four ov_SC06_010 classes with the R26 alias (R22 218/218) 2026-09-10 18:44:29 -06:00
Drew T 433aa07018 phase-36: c50 closes func_80136824 with zero levers body-only (off the types-phase list, 130 bodies); c49 func_8013F350 at two marked head levers (133 bodies); delever_regen survives stale sites (R22 218/218) 2026-09-10 18:38:42 -06:00
Drew T aada3bdc2b phase-36: the first minimum-lever bank (func_80177B5C: 1 marked launder instead of 23 levers, 133 bodies); c43/c44/c45/c37 closes with their cross-address copies (delever --port-scan); generator R26 alias_repeated_addresses (known-true: c45's close from its start text) (R22 218/218) 2026-09-10 18:32:46 -06:00
Drew T 321b540e7f phase-36: propagate ignores body-local externs (re-propagation: 97 siblings banked of 145 candidates); R19 cast-arity regen 8 classes; c39 ports two variants; c41, c34, c32 closes; related.txt lists the same function lever-free elsewhere; cc1_dumps_tu.sh -dd (R22 218/218) 2026-09-10 18:07:41 -06:00
Drew T a2a1fc1865 phase-36: re-draw c30 — func_8017B614 closed with no do-while (one pointer across both arms; struct/array spellings let sched2 restore the order), 125 bodies (R22 218/218) 2026-09-10 17:32:29 -06:00
Drew T 01f066923d phase-36: re-draw c21 — func_801397B0 closed (a do-while reference-weight wrapper, on the a4/c15 precedent), 125 bodies; c22's and c28's readings (func_8012E364 at 4, func_8013F350's head irreducible); --try parallel-safe per call with --keep (R22 218/218) 2026-09-10 17:14:30 -06:00
Drew T e984e5822f phase-36: re-draws c25 (func_80166F58, a narrowing copy) and c26 (func_80133CD4, split temps) closed, 254 bodies; tools/localalloc_sim.py (c26's local-alloc simulator, 0 mismatches over 150 blocks); propagate no longer trusts stale ledger hashes; R25 regen 3 classes; regen reports COMPILE-ERROR (14,xxx -> 13,083 sites, R22 218/218) 2026-09-10 16:58:01 -06:00
Drew T 96820256ce phase-36: re-draws c24 (func_8012956C: a phantom 4th argument + a switch) and c23 (func_80133784: the exit block inside a real loop, overturning b4's de-loop reading) closed, 252 bodies; R25 trim_arguments; argcheck reads K&R definitions (95 callees were invisible); the selftest asserts every dispatched family is registered (R22 218/218) 2026-09-10 16:45:14 -06:00
Drew T 970d88f386 phase-36: T7 agent c15 — func_80135EB0 closed (one if per case defeats jump2's cross-jump, struct-spelled stores keep the dependence; the register swap via a do-while, banked on the a4 precedent and raised with Drew), 128 bodies (R22 218/218) 2026-09-10 16:03:01 -06:00
Drew T a620e1880f phase-36: generator R24 (the addPrim copy read as a whole word, c20's move) + its regen pass (2 classes, the func_80140D68 header on 140 objects); c13's reading of func_80140958 (43 -> 4, not closed) (R22 218/218) 2026-09-10 15:57:16 -06:00
Drew T 5eb46b267f phase-36: T7 agent c20 — func_8013DD68 closed on a re-draw (the bit-field copy read as a whole word: a phantom flow-time mask reference), 128 bodies (16,273 → 16,015 sites, R22 218/218) 2026-09-10 15:49:51 -06:00
Drew T 750797a048 phase-36: T7 agent c18 — func_80176734 closed (one variable per role across blocks, s16 flag in a nested if, u8 copy), 128 bodies (R22 218/218) 2026-09-10 15:39:50 -06:00
Drew T 164825b5d8 phase-36: delever_regen — R22+R23 re-run over the whole residue closes 17 classes / 22 bodies with no agent; --try learns header TUs (24 classes had never been scorable) (17,715 → 17,692 sites, R22 218/218)
- tools/delever_regen.py: read-only pass (both starting texts, only the named families, delever_search --try --body,
  one worker per class) + --bank (re-score on the current tree, apply_body_core, propagate); dictionary + SETUP rows
- pass 1: 1169 classes in 127 s, 14 MATCH; the 25 UNSCORED read before banking: 24 were header-TU classes whose
  includer's ../shared include never resolved in --try (fixed; controlled: unchanged body 0, lever-free 32, mutated 1),
  1 a body-local #define (R22/R23 now refuse preprocessor lines); pass 2 over header TUs: 104 judged, 3 MATCH
- banked: 14/14 + 3/3 (two shared headers IDENTICAL on 141 objects each); R23 12 classes, R22 5
- check-all 218 passed 0 failed; lever_census 17,692 marked 0 UNMARKED
2026-09-10 15:36:01 -06:00
Drew T a060705725 phase-36: T7 agents c14 + c16 — func_801670E4 (all seven levers; its refuted @stuck note replaced in 136 copies) and func_8013D178 (one pointer per if-group), 261 bodies; R23 widened to one open block and now closes func_8013D178 alone; c9's reading of func_8013CF68 (38 -> 10, not closed) (18,776 → 17,715 sites, R22 218/218) 2026-09-10 15:24:01 -06:00
Drew T 6252516263 phase-36: T7 agent c11 — func_80175AB8 closed (derived-pointer reads, one temp for both $a1 values, a cast-wrapped table read), 124 bodies; cc1_dumps_tu.sh dumps .cse2 and .jump2 (R22 218/218) 2026-09-10 15:15:34 -06:00
Drew T e6a8f35052 phase-36: T7 agents c12 + c10 — the func_80148E54/D44 twins (implicit handler argument) and func_80135A4C (cross-jump tails, parameters passed through), 395 bodies; delever_pack writes related.txt (20,206 → 19,276 sites, R22 218/218)
- c12: c3's reading held on both twins — the angle as the handler's first argument + tmp reused as the later operand;
  the stale 'jalr with no args' comment corrected in the 135 files whose body now passes it
- c10: jump2 cross-jump merged two walk tails (exits now fall to the single final return), the s16 SUBREG gate, and
  func_80135480 called at its real arity; its answer was func_80135888 in another file
- delever_pack related.txt: lever-free bodies in the overlay sharing a func_/D_ symbol, ranked (known-true: top hit for
  func_80135A4C is func_80135888); METHOD_S103 +6 emitter entries; SETUP rows
- apply-body IDENTICAL x3, propagate 131/131 x2 + 133/133; check-all 218 passed 0 failed; lever_census 19,276 marked 0 UNMARKED
2026-09-10 15:03:27 -06:00
Drew T 2e61220bde phase-36: T7 wave c — seven agent closes (c4 c6 c1 c7 c3 c5 c8) + func_8017EEC0's parameter, ~1,000 bodies; generator R23; CI's verbatim_check fixed and wired into tools-health (23,988 → 20,206 sites, R22 218/218)
- closes, each --try 0 then apply-body IDENTICAL + propagate N/N 0 refused: func_80133AB0 (u16 width moves), func_80130D48
  (one call per goto-tail site), func_80135168 (reused temps split + H16 member store), func_80134A74 (widths + join
  statement in both arms), func_80148AFC (implicit handler argument + later operand), func_8015D738 (jump threading:
  re-read + a do-while on precedent, the class raised with Drew), func_80135004 (temp split + argument from its global)
- func_8017EEC0: the uninitialised a0v T4 tus10 left is the parameter (8/8, IDENTICAL)
- CI red since cb2fb5e6d: verbatim_check --strict saw the DECOMPILE-NOW row func_8017EEC0 converted; row removed (one
  row), --update keeps order + UTF-8 (proven equal to the hand fix), verbatim_check --strict now in make tools-health
- delever.split_reused_locals = family R23 (selftest + two refusals; known-true: joint split = the agents' measured 12/26)
- check-all 218 passed 0 failed (twice); lever_census 20,206 marked 0 UNMARKED; Drew: at most five concurrent agents
2026-09-10 14:56:17 -06:00
Drew T 205331765f phase-36: T7 agent c2 — func_8013D8FC closed (the walked-pointer merge), 131 bodies; harvested as generator R22 (24,119 → 23,988 sites, R22 218/218)
- agent c2 (Opus): a second pointer q = p + 5 stepped in lockstep with p kept a second biv alive (loop.c strength
  reduction, -dL 'Cannot eliminate biv'); one pointer lets combine_givs fold every field read onto one base
- bank: apply-body IDENTICAL, propagate 130/130, check-all 218 passed 0 failed, lever_census 23,988 marked 0 UNMARKED
- delever.merge_walked_pointers = family R22 (selftest + two refusal controls; known-true: the agent's start text's
  candidate is its closing body, --try score 0); leads the COUNT class after R19 in delever_search; SETUP row
- S103 opening: the method addendum .run/P36/agents/METHOD_S103.md; wave c launched (six agents); Fable out of credits,
  c5/c6 relaunched on Opus
2026-09-10 14:30:30 -06:00
Drew T d30ccc9a72 phase-36: T7 agent b8 — func_80135888, the largest class left, closed with all five levers gone (134 bodies; 24,789 → 24,119 sites, R22 218/218)
check-all: 218 passed, 0 failed of 218
  lever_census --check: 24,119 pin/asm sites, 24,119 marked !FAKE, 0 UNMARKED — OK

Three moves, each predicted from a dump before it was compiled:
- while -> a guarded do-while (29 to 22). Cross-jump (jump.c:1969 -> find_cross_jump :2371, from toplev.c:3142) had
  matched the load in front of the jump against the one in front of the bottom test and deleted three instructions; the
  guarded form makes the two tails differ.
- the duplicated pre-loop call block -> goto (22 to 6). This is an allocno_compare rank move (global.c:585-611): the
  priority is floor_log2(refs)*refs/live, reg_n_refs is loop-weighted (flow.c:2067), the in-loop copy of that call is
  worth two references, and deleting the out-of-loop copy takes exactly one off — 8 to 7 crosses a floor_log2 step and
  drops the pointer's priority from 3157.9 to 1891.9. The predicted allocation order matched the dump exactly. The
  rewrite is byte-neutral on its own: reorg steals the target's first insn into the delay slot and retargets.
- the two-arm mask temp inlined (6 to 0): set in two arms it has two deaths, fails local-alloc.c:472, and combine_regs
  bails at :1774, so it went to global allocation and took its copy preference.

Harvested as R21 second_consumer, from agents b2 and b6 together: give a computed value a second consumer before its
copy, either by chaining (v = slot = E) or by hoisting the store above it. cse deletes such a copy only when the
producer sits immediately before it (cse.c:7440-7501, guard :7454-7460), and flow links only the FIRST following use
(flow.c:2076-2091), so a store in between defeats both. R9 can never produce it — the two statements share the
identifier, so its independence guard refuses the swap. Known-true: the joint form scores 0 on b6's pre-bank text, and
the single-site forms do not, which is the third measured case this session of a joint edit no hill-climb can reach.

Also recorded from b8, worth a pre-check later: declaration-order moves are PROVABLY DEAD on a register residual whose
allocnos have distinct priorities, because global.c:604-610 compares priority first and only ties by allocno number —
4,811 compiles of those candidates sat flat because of it.
2026-09-10 13:31:47 -06:00
Drew T 0d92d10299 phase-36: T7 agent b7 — func_80166690 closed from a residual of 41 (126 bodies; 24,915 → 24,789 sites)
- the moves: retype four accumulators int -> short in ONE edit, delete the five hand temps that were spelling the
  truncation, and type the colour temp to its destination field's own width (u8). Measured A/B/C on bytes: unsigned int
  34, short 1, unsigned short 1, u8 0.
- mechanism: all four missing instructions were the same one — a move after an addiu whose result is re-read through a
  16-bit shift. A narrowing assignment expands to a mode-changing copy, and combine_regs ties source into destination
  only when the source DIES there (local-alloc.c:1855, return 0 at :1881); the wide temp is still live in the following
  sign-extended test, so the copy survives. At int the copy is same-mode, the source dies, the tie happens, and combine
  then re-selects the whole counter into the pre-shifted domain. The last instruction is cse's mode gate in insert_regs
  (cse.c:1019-1021, :1029-1032).
- it confirms R20's shape and refines it: the group retype must be keyed on the residual's missing-move SET, since R12
  is per-declarator and its single moves topped out at 24 here — a hill-climb cannot reach a four-way retype.
- delever_pack.py was missing an import for the neighbours block added an hour ago, so two packs shipped without
  neighbours.txt and both agents said so. Fixed; all 34 packs now carry it.
- method note from the agent, now in the briefs: dump the target function WHOLE off the tree's own object rather than
  reading the residual's hunks — the hunk view had scrambled two moves into branch delay slots and hid that four
  differences were one repeated shape.
2026-09-10 13:17:56 -06:00
Drew T 17d192d243 phase-36: T7 wave b — four agent closes plus the engine's own two (766 bodies; 26,074 → 24,915 sites, R22 218/218)
check-all: 218 passed, 0 failed of 218
  lever_census --check: 24,915 pin/asm sites, 24,915 marked !FAKE, 0 UNMARKED — OK

- b2 func_80162438 (127 bodies): hoist the store above the assignment and store the EXPRESSION, so the temp falls out.
  cse's 'REG0 is the cheapest' rewrite (cse.c:7440-7501, guarded :7454-7460) deletes a copy only when the insn
  immediately before it set the source; putting a USE between compute and copy defeats that and flow's LOG_LINK, which
  goes only to the first following use (flow.c:2076-2091), so combine is never offered the pair.
- b6 func_80161E08 (127 bodies): the same three blocks written as a CHAINED assignment, p = slot = base + K. The value
  gains a second consumer, flow's only link goes to the store, and the copy survives — the instruction the pin faked.
- b5 func_80145934 + its sibling func_80145A2C (126 + 126 bodies): a body-local symbol ALIAS. Cross-jump's equality test
  compares symbol names by POINTER (jump.c:2440), so two arms referencing one extern merge; an asm-label alias makes the
  identifier distinct, the blocks survive, and assemble_name strips the star so the bytes and relocations are unchanged.
  The barrier it replaces was standing in for symbol identity, not for ordering or liveness.
- the engine banked two of its own while the agents worked: R20 closed func_80139BE0 (129 bodies) by chain-narrowing —
  the body agent a14 could only reach with an INVENTED identically-zero term, which I refused. The refusal was right and
  the honest close arrived hours later from the generator.
- R19 closed func_8017A3D8's ov_SC07_006 copy (16 bodies) by restoring a dropped argument.

Two things to act on, both reported by agents:
- 'a @stuck: note claiming a lever is required should be re-tested, not trusted' — two such notes were refuted on bytes
  today ('natural C ALWAYS coalesces that copy', 'no pure-C spelling survives that fold').
- one pack lacked neighbours.txt because the packs predate that change; the next --build carries it.
2026-09-10 13:12:08 -06:00
Drew T 9d78fc4085 phase-36: T7 agent b3 — func_8016CBC0 closed from a residual of 55 (128 bodies), and its move toolified as R20
- the move: narrow every local in the counter's def-use chain together — the counter, its +/-1 temp and the copy-back —
  and do it for BOTH chains at once. Four instructions were MISSING, not miscoloured, three of them the moves the $0 pin
  was faking. insert_regs (cse.c:1029-1032, early bail :1018-1020) puts two pseudos in one equivalence class only when
  their MODES match, so an all-int copy-back is collapsed and swept, while the narrowed one is a truncation: no
  equivalence, the wide temp stays live and reaches reload as the move the target has. The fourth instruction is
  strength_reduce minting a shift giv from a wide counter whose every use is a cast; a HImode pseudo cannot be that giv.
  delever --propagate: 127 of 127 sibling(s) banked, 0 refused. 26,202 -> the census below.

- R20 narrow_chains: the agent PROVED the joint form is necessary, and the generator reproduces it. Single declarations
  scored 45/72/51/24, each chain alone 43, both chains together 0 — every intermediate worse than the search's own best
  of 11, so a beam over R12's one-declaration width moves cannot reach the answer from either side. Seven runs and 4,811
  compiles stalled at 11; R20 offers six candidates and the right one is a single compile.
- known-true check: run on b3's pre-bank text, R20's joint signed candidate scores 0 (MATCH) and its single-chain
  candidates score 43 and 51 — the agent's own hand-measured numbers, reproduced by the tool.
- chains are built conservatively from the body's text (two locals linked when one is assigned from the other, through a
  cast or a +/- constant), and only whole components are offered, so the partial narrowings the measurement showed are
  always worse are never generated. Selftest: the chain is found whole, an unlinked local is not pulled in, and a body
  with no linked pair offers nothing.
2026-09-10 12:57:06 -06:00