diff options
author | Dale Johannesen <dalej@apple.com> | 2010-04-02 01:38:09 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-04-02 01:38:09 +0000 |
commit | 139dcd7aa428c188facd672b1c5a0e299b298390 (patch) | |
tree | 28f6ac48c327e656e147cb2c4b2b1ecf73ce3dbe /lib/Target/PIC16 | |
parent | d2bb6716c3e2e7c9d47a208034367e25b9333595 (diff) | |
download | external_llvm-139dcd7aa428c188facd672b1c5a0e299b298390.zip external_llvm-139dcd7aa428c188facd672b1c5a0e299b298390.tar.gz external_llvm-139dcd7aa428c188facd672b1c5a0e299b298390.tar.bz2 |
Teach AnalyzeBranch, RemoveBranch and the branch
folder to be tolerant of debug info following the
branch(es) at the end of a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r-- | lib/Target/PIC16/PIC16InstrInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/PIC16/PIC16InstrInfo.cpp b/lib/Target/PIC16/PIC16InstrInfo.cpp index 2fb405e..da16e83 100644 --- a/lib/Target/PIC16/PIC16InstrInfo.cpp +++ b/lib/Target/PIC16/PIC16InstrInfo.cpp @@ -226,6 +226,11 @@ bool PIC16InstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, // Get the terminator instruction. --I; + while (I->isDebugValue()) { + if (I == MBB.begin()) + return true; + --I; + } // Handle unconditional branches. If the unconditional branch's target is // successor basic block then remove the unconditional branch. if (I->getOpcode() == PIC16::br_uncond && AllowModify) { |