[Mips] R3000A scheduling model, constant address folding and delay slot filling (PS2-184) #7
Loading…
Reference in a new issue
No description provided.
Delete branch "r3000a-delay-slot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Three independent, CPU-gated changes that shrink IOP code (PS2-183, PS2-184). Each commit builds on the previous one and has its own lit test.
IsR3000A(new, set only by-mcpu=r3000a)const-addr-fold, implied byr3000aandr5900, switchable with-mattrlui+lw off($r)instead oflui+ori+lw 0($r)delay-slot-succ-fill, implied byr3000aonlydisable-mips-df-succbb-search). The option still overrides it either wayThe delay-slot commit also keeps an instruction with a
%hirelocation from moving across blocks. Without that the search hoistedlui %hi(sym)into a predecessor's slot, away from its%lo, andiopfixup --irx1rejected the module withR_MIPS_LO16 without R_MIPS_HI16.Other CPUs are unchanged unless they request a feature. New tests:
r3000a-sched.ll,r3000a-const-addr.ll,r3000a-delay-slot.ll,r3000a-delay-slot-hi16.ll.Results (-Os, RiptOPL's 313 IOP objects against GCC 15.2): unfilled branch delay slots 8,122 -> 5,563 (GCC 5,598). The 46 IRX files total 765,254 -> 755,046 bytes (GCC 650,850). On 11 sdk-core IOP modules
.textis 3.9% smaller (69,196 -> 66,480). Load-delay nops are still 6,900 against GCC's 3,761 and are not addressed here.Tested
rmreseton hardware.🤖 Generated with Claude Code