Now that DeadMachineInstructionElim is basically working
authorDan Gohman <gohman@apple.com>
Tue, 23 Sep 2008 22:04:18 +0000 (22:04 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 23 Sep 2008 22:04:18 +0000 (22:04 +0000)
correctly, it's not necessary to explicitly remove registers
from their use-def lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56509 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DeadMachineInstructionElim.cpp

index 8f4162f5f23134d450acbae91efcb5d484e285f2..c3cdbf02597f6d812038ab6d386fd020a3299091 100644 (file)
@@ -97,12 +97,6 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
 
         // If there are no defs with uses, the instruction is dead.
         if (AllDefsDead) {
-          // Clear out the operands to take the registers out of their
-          // use chains.
-          while (unsigned Num = MI->getNumOperands())
-            MI->RemoveOperand(Num-1);
-
-          // Delete the actual instruction.
           AnyChanges = true;
           MI->eraseFromParent();
           MIE = MBB->rend();