[llvm-commits] [llvm] r121388 - in /llvm/trunk/lib/CodeGen: LiveIntervalUnion.cpp LiveIntervalUnion.h RegAllocBase.h RegAllocBasic.cpp RegAllocGreedy.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Dec 9 23:40:54 PST 2010
On Dec 9, 2010, at 10:49 PM, Evan Cheng wrote:
>
> On Dec 9, 2010, at 10:15 AM, Andrew Trick wrote:
>
>> Author: atrick
>> Date: Thu Dec 9 12:15:21 2010
>> New Revision: 121388
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=121388&view=rev
>> Log:
>> Added register reassignment prototype to RAGreedy. It's a simple
>> heuristic to reshuffle register assignments when we can't find an
>> available reg.
>
> Do you mean to use this to vacate a physical register that's preferred by another virtual register with stricter allocation requirement?
> e.g. vacate r1 in order to form r0 / r1 pair.
I could just be primitive puzzle solving. Suppose we allocate like this:
a=[1;2] --> %R0
b=[6;7] --> %R0
c=[4;10] --> %R1
d=[1;5] --> ?
Assuming other registers are occupied, by reassigning a, we can allocate:
a=[1;2] --> %R1
d=[1;5] --> %R0
But yes, it can also help with allocating register with stricter constraints. An interfering register can be moved to a register outside the class we are allocating from.
/jakob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101209/98801d53/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101209/98801d53/attachment.bin>
More information about the llvm-commits
mailing list