[llvm-commits] [llvm] r48003 - in /llvm/trunk: include/llvm/CodeGen/RegisterScavenging.h lib/CodeGen/RegisterScavenging.cpp
Evan Cheng
evan.cheng at apple.com
Fri Mar 7 16:19:57 PST 2008
On Mar 7, 2008, at 3:44 PM, Bill Wendling wrote:
> On Fri, Mar 7, 2008 at 2:32 PM, Evan Cheng <evan.cheng at apple.com>
> wrote:
>>
>> On Mar 6, 2008, at 3:22 PM, Bill Wendling wrote:
>>
>>> void RegScavenger::enterBasicBlock(MachineBasicBlock *mbb) {
>>> @@ -138,9 +161,12 @@
>>> if (MO.isKill() && !isReserved(Reg)) {
>>> ChangedRegs.set(Reg);
>>>
>>> + // Mark sub-registers as changed if they aren't defined in
>>> the same
>>> + // instruction.
>>> for (const unsigned *SubRegs = TRI->getSubRegisters(Reg);
>>> unsigned SubReg = *SubRegs; ++SubRegs)
>>> - ChangedRegs.set(SubReg);
>>> + if (!RedefinesSuperRegPart(MI, Reg, TRI))
>>
>> Why is this necessary? Something that kills a super-register also
>> kills the sub-register.
>>
> Okay, sure.
Please fix. Thanks.
>
>
>>> @@ -194,7 +224,7 @@
>>> unsigned Reg = MO.getReg();
>>> assert(isUsed(Reg));
>>> if (!isReserved(Reg))
>>> - setUnused(Reg);
>>> + setUnused(Reg, MI);
>>
>> What about the sub-registers?
>>
> The setUnused method sets that information, right?
Ah ok.
Evan
>
>
> -bw
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list