[LLVMdev] TargetRegisterInfo and "infinite" register files

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue May 17 11:52:05 PDT 2011


On May 17, 2011, at 11:32 AM, Andrew Clinton wrote:

> On 05/17/2011 12:54 PM, Jakob Stoklund Olesen wrote:
>> What you can do instead is:
>> 
>> 1) Just use virtual registers and skip register allocation, or
>> 
>> 2) Allocate to a small register file, implement memory operand folding, and pretend that spill slots are registers.
>> 
>> /jakob
>> 
> 
> Empirically, 1) is not true.  The linear scan register allocator appears 
> to do a very good job of reusing registers that have been killed.  It 
> also automatically inserts copies for operations that clobber register 
> operands, and coalesces identity register moves.

Good point. The 2-addr, phi-elim, and coalescer passes are definitely helpful.

The final register allocator pass that assigns physical registers probably doesn't help you much.

/jakob




More information about the llvm-dev mailing list