[llvm-commits] [llvm] r149360 - /llvm/trunk/lib/CodeGen/RegAllocFast.cpp
Andrew Trick
atrick at apple.com
Tue Jan 31 10:29:30 PST 2012
On Jan 31, 2012, at 10:27 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
> On Jan 30, 2012, at 9:55 PM, Andrew Trick wrote:
>
>> + unsigned OperReg = MO.getReg();
>> + for (const unsigned *AS = TRI->getOverlaps(Reg); *AS; ++AS) {
>> + if (OperReg != *AS)
>> + continue;
>> + if (OperReg == Reg || TRI->isSuperRegister(OperReg, Reg)) {
>> + // If the ret already has an operand for this physreg or a superset,
>> + // don't duplicate it. Set the kill flag if the value is defined.
>> + if (hasDef && !MO.isKill())
>> + MO.setIsKill();
>> + Found = true;
>> + break;
>> + }
>> + }
>
> This loop looks weird. Can't you just go:
>
>> + if (OperReg == Reg || TRI->isSuperRegister(OperReg, Reg)) {
>> + // If the ret already has an operand for this physreg or a superset,
>> + // don't duplicate it. Set the kill flag if the value is defined.
>> + if (hasDef && !MO.isKill())
>> + MO.setIsKill();
>> + Found = true;
>> + break;
>> + }
>
>
Thanks. Some last minute cleanup gone awry here.
-Andy
More information about the llvm-commits
mailing list