mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-08 01:34:14 -04:00
ce79a3e432
Provenance stated per row (CONFIRMED = banked through the whole-binary gate; CLAIMED = the agent's own measurement on a function that did not bank), because one of these came from a function that was adversarially upheld and then FAILED the real gate. A. reg_n_sets is a one-line scheduling dial (CONFIRMED, func_80180ABC 257 ins). sched1 schedules backward; a pseudo set exactly once gets the birthing_insn_p launch boost (priority = 7f000001 in cc1 -dS), which drags its load LATE. Splitting the RMW as 't = t + 1; *p = t;' makes reg_n_sets 2, suppresses the boost, and floats the load to the block head -- the block-local dual of §350's shared temp, WITHOUT the global-allocno penalty that costs the in-place addiu. Companions: 180 legal statement permutations all scored identically while one cc1 -dS dump named the cause (diagnose, don't permute); a pin-free fix for paired-register inversion; and gcc frame slot order is NOT declaration order (BLKmode aggregates go in order at expand_decl, an addressable scalar is forced to the stack later -- declare 's32 x[2]' to place a slot between two aggregates). B. A single-set local's VALUE is visible at a switch join and erases a zero-extension (CONFIRMED, func_801806F8 241 ins). combine.c:10035 lets get_last_value bypass the label_tick guard when reg_n_sets == 1, so all seven narrowing spellings emit nothing. Diagnostic: a visible extension in the target means the variable has MORE THAN ONE SET in the original source. Verified against a matched sibling: andi is the multi-set zero-extend and sll;srl is NEVER reachable from a single expression. C. CORRECTION to §439 -- the sll 16; srl 16 pair lands AFTER the jal, not before it (sched1 sinks the ashift past the call), and it works even for a KNOWN CONSTANT, because the call-split defeats folding structurally rather than by hiding the value. D. An offline jtbl-rodata placement audit (CLAIMED, func_800CB00C -- did not bank, which is the point: both matchers compare .text only, so a jtbl function's MATCH says nothing about its table).