[llvm-commits] [llvm] r78650 - in /llvm/trunk: include/llvm/CodeGen/RegisterScavenging.h lib/CodeGen/RegisterScavenging.cpp test/CodeGen/Blackfin/2009-08-11-RegScavenger-CSR.ll

John Mosby ojomojo at gmail.com
Wed Aug 12 09:12:25 PDT 2009


On Wed, Aug 12, 2009 at 3:18 AM, Jakob Stoklund Olesen <stoklund at chora.dk>wrote:

> John Mosby <ojomojo at gmail.com> writes:
>
> >     Right now, the scavenger is tracking certain CSRs as available, but
> it
> >     is not allowed to use them. That looks like a clobbered CSR just
> >     waiting to happen. These poison CSRs should be marked as used when
> >     entering the MBB. It does not /have/ to be done through the live-in
> >     lists - that just seems like a natural choice.
> >
> >
> > I committed an RS patch to this effect, but Evan backed it out. I don't
> see
> > CSR clobbering possible, what am I missing here?
>
> Evan backed out your patch because you were clobbering CSRs ;-)


Yes, I know. I allowed unused CSRs to be RS-ed, but I didn't have any of the
code
in place to spill them as necessary. I didn't mean to commit that
experimental code
at that point.


> > Do you mean using FindUnusedReg() with ExCalleeSaved=false? (sorry, it's
> late)
>
> In your patch, you trimmed the regscavenger's CalleeSaved list to not
> include the pristine CSRs. Since pristine CSRs currently track as
> available, FindUnusedReg would return them.


If you exclude CSRs in FindUnusedReg(), all CSRs defined by the target,
whether used or not, are taken out of AvailableRegs, so they can never
be clobbered via RS, or?

It is possible you meant to reduce the CalleeSaved list to /only/ the
> pristine CSRs, treating spilled CSRs as normal registers. That would
> make more sense.


Yes, and I'm trying to make the unused CSRs
available (requiring spilling/restoring)

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


More information about the llvm-commits mailing list