[llvm-commits] [llvm] r78318 - in /llvm/trunk: include/llvm/CodeGen/RegisterScavenging.h lib/CodeGen/RegisterScavenging.cpp

Evan Cheng evan.cheng at apple.com
Fri Aug 7 14:55:20 PDT 2009


On Aug 7, 2009, at 8:13 AM, John Mosby wrote:

> On Fri, Aug 7, 2009 at 12:35 AM, Evan Cheng <evan.cheng at apple.com>  
> wrote:
>
> On Aug 6, 2009, at 2:59 PM, John Mosby wrote:
>
>> On Thu, Aug 6, 2009 at 2:41 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk 
>> > wrote:
>>
>> The RS can get you a register in two ways:
>>
>> 1. FindUnusedReg() tries to find a register that is currently not
>> being used, and so can be used _for free_.
>> 2. scavengeRegister() will create a free register by saving it to the
>> emergency spill slot.
>>
>> Indeed.
>
> Thanks John for your work.
>
> I think we should consider changing the scavenger. I think it's  
> getting a bit too complicated. I don't think it should be the  
> scavenger's responsibility to track what callee save registers have  
> been used or not. The caller should be the one that determines what  
> registers should not be scavenged. That is, this FindUnusedReg
> unsigned RegScavenger::FindUnusedReg(const TargetRegisterClass  
> *RegClass,
>                                      bool ExCalleeSaved)
>
> probably ought to be eliminated.
>
> What a relief, that was my initial reaction to that method! The  
> method with a candidate list arg is useful and should stay, correct?

Yes.

BTW, I'm going to disable your changes related to callee-saved  
registers. It's breaking some of the SPEC tests.

Thanks,

Evan

>
> John
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090807/cfa238ae/attachment.html>


More information about the llvm-commits mailing list