diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-06-25 13:28:24 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-06-25 13:28:24 +0000 |
| commit | e61cbd1f3a4e1ba32a764826e8a204bbcf6ebdbd (patch) | |
| tree | daa736e635617124656f0ef5de7dbbbb7fe8039f /llvm/lib/Target/ARM | |
| parent | 57d7232f401d664792d8fb44cf6e49d7d601c38d (diff) | |
| download | bcm5719-llvm-e61cbd1f3a4e1ba32a764826e8a204bbcf6ebdbd.tar.gz bcm5719-llvm-e61cbd1f3a4e1ba32a764826e8a204bbcf6ebdbd.zip | |
Replace copy-pasted debug value skipping with MBB::getLastNonDebugInstr
No functional change intended.
llvm-svn: 240639
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index b3329e62977..b1a11d626bd 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -367,14 +367,10 @@ ARMBaseInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB, unsigned ARMBaseInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { - MachineBasicBlock::iterator I = MBB.end(); - if (I == MBB.begin()) return 0; - --I; - while (I->isDebugValue()) { - if (I == MBB.begin()) - return 0; - --I; - } + MachineBasicBlock::iterator I = MBB.getLastNonDebugInstr(); + if (I == MBB.end()) + return 0; + if (!isUncondBranchOpcode(I->getOpcode()) && !isCondBranchOpcode(I->getOpcode())) return 0; |

