CodeGen: Avoid iterator conversion in UnreachableBlockElim, NFC

Avoid an unnecessary (and implicit) iterator to pointer conversion in
UnreachableBlockElim by using the post-increment operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274355 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2016-07-01 15:13:09 +00:00
parent effa4cc200
commit 2cafa0233a

View File

@ -184,9 +184,7 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) {
unsigned Input = phi->getOperand(1).getReg();
unsigned Output = phi->getOperand(0).getReg();
MachineInstr* temp = phi;
++phi;
temp->eraseFromParent();
phi++->eraseFromParent();
ModifiedPHI = true;
if (Input != Output) {