[llvm-commits] [llvm] r170989 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Sat Dec 22 09:33:22 PST 2012
Author: stoklund
Date: Sat Dec 22 11:33:22 2012
New Revision: 170989
URL: http://llvm.org/viewvc/llvm-project?rev=170989&view=rev
Log:
Remove a special case that doesn't seem necessary any longer.
Back when this exception was added, it was skipping a lot more code, but
now it just looks like a premature optimization.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=170989&r1=170988&r2=170989&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Sat Dec 22 11:33:22 2012
@@ -711,19 +711,8 @@
untieRegOperand(OpNo);
MachineRegisterInfo *RegInfo = getRegInfo();
- // Special case removing the last one.
- if (OpNo == getNumOperands()-1) {
- // If needed, remove from the reg def/use list.
- if (RegInfo && Operands.back().isReg() && Operands.back().isOnRegUseList())
- RegInfo->removeRegOperandFromUseList(&Operands.back());
-
- Operands.pop_back();
- return;
- }
-
- // Otherwise, we are removing an interior operand. If we have reginfo to
- // update, remove all operands that will be shifted down from their reg lists,
- // move everything down, then re-add them.
+ // If we have reginfo to update, remove all operands that will be shifted
+ // down from their reg lists, move everything down, then re-add them.
if (RegInfo) {
for (unsigned i = OpNo, e = getNumOperands(); i != e; ++i) {
if (Operands[i].isReg())
More information about the llvm-commits
mailing list