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 | 4244d12769ff19cc917ac39ee450a12bbcfeccfb (patch) | |
tree | a73cbf2711c72627e31eee0ca4e370c63a0a177b /llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp | |
parent | 8d6d0d4c5866268c202389487e49626181a340f1 (diff) | |
download | bcm5719-llvm-4244d12769ff19cc917ac39ee450a12bbcfeccfb.tar.gz bcm5719-llvm-4244d12769ff19cc917ac39ee450a12bbcfeccfb.zip |
Teach AnalyzeBranch, RemoveBranch and the branch
folder to be tolerant of debug info following the
branch(es) at the end of a block.
llvm-svn: 100168
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp index 5fa7e8cec17..06f01e7b32b 100644 --- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp +++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp @@ -424,6 +424,8 @@ bool SystemZInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock::iterator I = MBB.end(); while (I != MBB.begin()) { --I; + if (I->isDebugValue()) + continue; // Working from the bottom, when we see a non-terminator // instruction, we're done. if (!isUnpredicatedTerminator(I)) @@ -500,6 +502,8 @@ unsigned SystemZInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { while (I != MBB.begin()) { --I; + if (I->isDebugValue()) + continue; if (I->getOpcode() != SystemZ::JMP && getCondFromBranchOpc(I->getOpcode()) == SystemZCC::INVALID) break; |