mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-07 09:27:55 -04:00
e6c0fad818
From the S76 func_8001EA14 agent (371 ins, 349/303 -> 89, length exact), cracked with cc1 -dL. The loop.c hoist threshold is call-dependent: 29 when the loop contains a call, not the 58 this file has been quoting. And the inputs are not what their names suggest — savings is the COUNT of matched movables, lifetime is their SUM. Anyone applying §148-A to a loop with a call has had the wrong constant. MEM_IN_STRUCT_P runs both ways: §469 set it to unblock hoisting, here it must stay CLEAR (plain casts, not a struct) to reproduce the target's alias-blocked schedule. Decide which direction the target needs first. The COND_EXPR 'X ? A op B : A' singleton fold is escaped only by making the arms structurally different TREES, not merely different values. Spill slots follow DECLARATION order — completing the frame model with §463 (8-byte rounding), §469 (layouts only a declared local can give) and §471 (the §172 USE-orphan): a slot nothing reads is a spill or an orphan, never padding.