summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-06-25 13:28:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-06-25 13:28:24 +0000
commite61cbd1f3a4e1ba32a764826e8a204bbcf6ebdbd (patch)
treedaa736e635617124656f0ef5de7dbbbb7fe8039f /llvm/lib/Target/ARM
parent57d7232f401d664792d8fb44cf6e49d7d601c38d (diff)
downloadbcm5719-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.cpp12
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;
OpenPOWER on IntegriCloud