[llvm-commits] [llvm] r149398 - /llvm/trunk/lib/CodeGen/RegAllocFast.cpp
Andrew Trick
atrick at apple.com
Tue Jan 31 10:54:19 PST 2012
Author: atrick
Date: Tue Jan 31 12:54:19 2012
New Revision: 149398
URL: http://llvm.org/viewvc/llvm-project?rev=149398&view=rev
Log:
Obvious unnecessary loop removal. Follow through from previous checkin.
Modified:
llvm/trunk/lib/CodeGen/RegAllocFast.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=149398&r1=149397&r2=149398&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Tue Jan 31 12:54:19 2012
@@ -775,17 +775,16 @@
continue;
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;
- }
+ if (!TargetRegisterInfo::isPhysicalRegister(OperReg))
+ 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;
}
}
if (!Found)
More information about the llvm-commits
mailing list