[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?

Chris Lattner clattner at apple.com
Thu Jan 6 22:18:48 PST 2011


On Jan 6, 2011, at 10:11 PM, andrew at sidefx.com wrote:

> Would it be possible to increase TargetRegisterInfo::FirstVirtualRegister
> to something quite a bit larger - such as 2^31?  I'm working on a target
> where all SSA values need to be assigned physical registers, and the
> current limit of 16384 may limit the size of programs that I'm able to
> handle.  2^31 is a nice value since there are equal numbers of possible
> physical and virtual registers, and registers can just inspect the high
> bit to determine if it's a virtual register.  My only concern is that
> there may be data structures using FirstVirtualRegister to size tables
> rather than using the MachineRegisterInfo limit.

If you're interested in doing this, I'd suggest hacking up the backend to not run register allocation, and represent all your "physical" registers are virtual registers.  This gives you an unlimited number.

-Chris



More information about the llvm-dev mailing list