aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-22 17:33:22 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-22 17:33:22 +0000
commit037435d114f77d96417ec0151443056accb0c050 (patch)
tree700adf41fd773630f812936c58cd726d245ee324 /lib/CodeGen/MachineInstr.cpp
parent021e3b6444e9179751002db7b20de96455e03171 (diff)
downloadexternal_llvm-037435d114f77d96417ec0151443056accb0c050.zip
external_llvm-037435d114f77d96417ec0151443056accb0c050.tar.gz
external_llvm-037435d114f77d96417ec0151443056accb0c050.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index f6d8fd8..9521776 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -711,19 +711,8 @@ void MachineInstr::RemoveOperand(unsigned OpNo) {
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())