summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit7bca670a8bc32c30fd1cc8ec0d807ee9233a46e4 (patch)
treee4bde40741349074fef7b428021e66d6569369c3 /llvm/lib/CodeGen/MachineInstr.cpp
parentb08948399333487e5a194c956fcb251894deefdd (diff)
downloadbcm5719-llvm-7bca670a8bc32c30fd1cc8ec0d807ee9233a46e4.tar.gz
bcm5719-llvm-7bca670a8bc32c30fd1cc8ec0d807ee9233a46e4.zip
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. llvm-svn: 170989
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index f6d8fd850ef..95217765bec 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/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())
OpenPOWER on IntegriCloud