[LLVMdev] Changing number of registers
duraid at octopus.com.au
duraid at octopus.com.au
Sat Jul 22 18:03:30 PDT 2006
>
> Dear llvmers,
>
> I am testing my register allocator, and I want to reduce the number of
> registers in the target architecture, to force spilling. Is there a simple
> way of doing this?
There sure is - inside the <target>RegsterInfo.td file just grep for
'RegisterClass' - the last parameter of which is a list of registers. Just
commenting some out is one dodgy way to avoid them being used. More polite
is to explicitly exclude some registers from the "allocation order" - see
IA64RegisterInfo.td:443 for an example of this (there, "numReservedRegs"
worth of registers are hidden.)
HTH,
Duraid
More information about the llvm-dev
mailing list