[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?

Chris Lattner clattner at apple.com
Thu Jan 6 23:07:16 PST 2011


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

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

Unless your goal is to merge this work onto LLVM mainline, the best thing to do is a local hack in your tree.

-Chris



More information about the llvm-dev mailing list