[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

Jakob Stoklund Olesen stoklund at chora.dk
Wed Aug 12 02:18:50 PDT 2009


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 ;-)

> 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.

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.

/jakob




More information about the llvm-commits mailing list