[llvm-commits] [llvm] r130896 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun May 8 10:19:03 PDT 2011


On May 8, 2011, at 6:47 AM, Chris Lattner wrote:

> On May 4, 2011, at 4:59 PM, Jakob Stoklund Olesen wrote:
> 
>> Author: stoklund
>> Date: Wed May  4 18:59:00 2011
>> New Revision: 130896
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=130896&view=rev
>> Log:
>> Disable physical register coalescing by default.
>> 
>> Joining physregs is inherently dangerous because it uses a heuristic to avoid
>> creating invalid code. Linear scan had an emergency spilling mechanism to deal
>> with those rare cases. The new greedy allocator does not.
>> 
>> The greedy register allocator is much better at taking hints, so this has almost
>> no impact on code size and quality. The few cases where it matters show up as
>> unit tests that now have -join-physregs enabled explicitly.
> 
> Do you plan to remove this code entirely, or wait until LinScan disappears?

Yes and yes.

Linear scan depends on -join-physregs to produce decent code, so it stays in as long as we keep linear scan around.

I do want to delete it, though. It would simplify the coalescer a great deal.

/jakob





More information about the llvm-commits mailing list