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
// 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();