[llvm-commits] [llvm] r77904 - in /llvm/trunk: include/llvm/CodeGen/RegisterScavenging.h lib/CodeGen/RegisterScavenging.cpp test/CodeGen/Blackfin/load-intr.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Sun Aug 2 22:28:33 PDT 2009
On 03/08/2009, at 04.03, Evan Cheng wrote:
>
> On Aug 2, 2009, at 11:28 AM, Jakob Stoklund Olesen wrote:
>
>>
>> /// setUsed - Set the register and its sub-registers as being used.
>> void RegScavenger::setUsed(unsigned Reg) {
>> RegsAvailable.reset(Reg);
>> @@ -218,7 +226,7 @@
>> const MachineOperand MO = *UseMOs[i].first;
>> unsigned Reg = MO.getReg();
>>
>> - assert(isUsed(Reg) && "Using an undefined register!");
>> + assert((MO.isImplicit() || isUsed(Reg)) && "Using an undefined
>> register!");
>
> Hi Jakob,
>
> I don't understand why this is necessary. It's seems like it will end
> up letting a lot of real errors go through.
Clearly I was too quick to commit this part. Sorry about that.
I will try to make it work with the stricter rule. Then I can back out
this part.
>> @@ -269,7 +277,8 @@
>>
>> // Implicit def is allowed to "re-define" any register. Similarly,
>> // implicitly defined registers can be clobbered.
>> - assert((isReserved(Reg) || isUnused(Reg) ||
>> + assert((MO.isImplicit() || isReserved(Reg) || isUnused(Reg) ||
>> + isSuperRegUsed(Reg) ||
>> isLiveInButUnusedBefore(Reg, MI, MBB, TRI, MRI)) &&
>> "Re-defining a live register!");
>> setUsed(Reg);
But this part is OK, right? <imp-def> can redefine a live register.
/jakob
More information about the llvm-commits
mailing list