[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?

andrew at sidefx.com andrew at sidefx.com
Thu Jan 6 22:39:09 PST 2011


> 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.
>

Yes it would be ideal to use all virtual registers, but a glance at the
code seemed to indicate the the use of physical registers, spilling, etc.
was pretty ingrained in all the register allocation algorithms, so it
seemed like it would be difficult to extract.  I also still need to
minimize the number of registers and minimize copies as if it were
generating code for more restrictive hardware.

Ideally I'd like something like the linear register allocator but that
never spilled or assigned physical registers, along with other goodies
like coalescing and phi elimination.

On the other hand, just increasing the allowable physical registers would
immediately solve most of my problems.

Andrew




More information about the llvm-dev mailing list