Files
BFM-decomp/docs/backlog.md
T

4.4 KiB
Raw Blame History

Backlog — automation near-misses for hand-finishing

Generated by tools/backlog.py render from .run/backlog.jsonl. These are functions the Phase-21 automation got close on but did NOT byte-match. The whole-binary byte-gate is the sole arbiter (G3/P9): byte-matches bank and are NOT listed here — only genuine near-misses/blockers are. Ranked by hand-session priority: reach (×N propagation leverage) → closeness (match_one mismatch count, lower = closer) → size. Each row's best_draft is the closest C the machine reached — resume from there.

Open near-misses: 5 · by status {'near': 4, 'failed': 1} · by class {'WALL-CANDIDATE': 1, 'SCHED+REGALLOC': 1, 'FRAME+SCHED': 1, 'SCHED': 1, None: 1}

# addr reach class nins status closeness where it stuck best draft
1 func_80032A74 None WALL-CANDIDATE 422 near 1 WALL candidate CONFIRMED in the real TU (S83): 422/422, sole residual idx 244 lh v0,0x18(s1) vs target lhu — extendhisi2 is a force_not_mem EXPAND (the orphan frame slot is minted only at an lh; §172 producer 3 caller-save area, reload1.c:1445), so lhu loses the 8 frame bytes; ~200 byte-probes + 100-variant retyping sweep (S79) + permuter_ils 8x150s null (S80). Citation current (§172, reload1.c:1445). Draft synced to the TU (typedefs stripped via cdecl.strip_provided_typedefs; D_80064D44/D_8006A970/func_8003F144/func_800316F8 spelled as the TU) .run/P32/t4/drafts/func_80032A74_tuclean.c
2 func_800CF408 None SCHED+REGALLOC 178 near 3 S83 Fable: 49 -> 3, zero pins (the §501-H shape + a dead arg1 kill against cse re-association + the P_TAG OT write + a named mhi born before block 1). Residual idx 10-12 = §501-H verbatim (the unboosted tag load blocks one cycle behind the tpage sw; the empty cycle eats the highest-LUID floater ori $s5,0x96) COUPLED to the $t2/$t3 qty_compare contest (2389 vs 2400): every cure of one re-opens the other. NEXT: fill the OT-chain lhu gap with an UNBOOSTED p & m24 as the target does (needs a 2-set a3 that combine does not re-merge — combine.c:2309 decrements reg_n_sets on the merge — e.g. a second set through a different width/mode or a volatile-qualified temp), or move the contest margin by one ref elsewhere (an extra ob use in a block that does not touch the tag load) .run/P32/t5x/fable/func_800CF408.c
3 func_80039308 None FRAME+SCHED 518 near 4 S83 Fable: 17 -> 4 in the real TU. Closed the 11-row alias block (natural spelling; tail via a pointer so the li follows the addu in RTL) and rows 390/391 (p = r + a dead reset). Residual 4 = two causes: rows 49/50 the hoisted constant 2 vs the pinned vbase preheader order (move_movables splices after source preheader code); rows 412/415 a PHANTOM 8-byte frame slot with no traffic at sp+8 between the arg1 HImode spill (sp+0) and cnt (sp+0x10) — lhu $s7 is reload's spill register; storing arg1 directly reproduces sh $a1/lhu $s7 but not the slot (frame 0x38 vs 0x40). NEXT: induce the phantom slot — a hard-reg spill_stack_slot (reload1.c spill_hard_reg on LO or $s7 during retry_global_alloc), cf. §501-E (pins forbid regs at retry) and the func_80032A74 ghost-pseudo finding (a stranded combine temp -> alter_reg 8-byte slot in regno order) .run/P32/t5x/fable/func_80039308.c
4 func_80185810 None SCHED 489 near 13 S83 Fable: 35 -> 13 at exact length; 3 of 4 windows closed (P_TAG bitfield OT link + integer add for the addu operand order; sched1 flush_pending_lists at the 33rd memory op explains the load order -> HI temps; hard-reg destinations are not birthing-boosted -> pins uu $4 / mode $5 / ot16 $6 give the LUID order; shf pin $3). Residual ONE cause idx 363-380: cl &= 0xFFFF is an unboosted 2nd set — the fence after p[7]/= is needed (else its two reads float to the block head, 43/51) yet it blocks sched2 fillers crossing into the tpage/code window. NEXT: a spelling in which cl is single-set (its high half cleared at birth: cl = (u16)... or the shift form) so no fence is needed, or the two cl reads consume a fresh single-set copy that combine cannot fold (nonzero_bits defeats a plain andi copy; try a subreg/HI-mode temp) .run/P32/t5x/fable/func_80185810.c
5 func_80062144 None None failed won't compile standalone (loose-typing / missing decl)