diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-01 15:13:09 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-01 15:13:09 +0000 |
commit | eda8f5d592d8462891c05a8639d1b18e91f8c559 (patch) | |
tree | 7a1bc16ab48ea256befddf600e416464f071f724 | |
parent | ef105caea93dad6087b4e91a6eaf7ea113de55ee (diff) | |
download | bcm5719-llvm-eda8f5d592d8462891c05a8639d1b18e91f8c559.tar.gz bcm5719-llvm-eda8f5d592d8462891c05a8639d1b18e91f8c559.zip |
CodeGen: Avoid iterator conversion in UnreachableBlockElim, NFC
Avoid an unnecessary (and implicit) iterator to pointer conversion in
UnreachableBlockElim by using the post-increment operator.
llvm-svn: 274355
-rw-r--r-- | llvm/lib/CodeGen/UnreachableBlockElim.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp index 8c9631e435b..39aa1e4919a 100644 --- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp +++ b/llvm/lib/CodeGen/UnreachableBlockElim.cpp @@ -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) { |