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

John Mosby ojomojo at gmail.com
Fri Aug 7 08:13:37 PDT 2009


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?

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


More information about the llvm-commits mailing list