[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?

andrew at sidefx.com andrew at sidefx.com
Thu Jan 6 22:11:10 PST 2011


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.

Along with this change, I would also propose subtracting
FirstVirtualRegister from the printed values of virtual registers, so that
what used to be "reg16384" would now show up as "reg0".

Andrew




More information about the llvm-dev mailing list