diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-13 21:28:52 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-01-13 21:28:52 +0000 |
commit | 4bc5e389600f8c6f03e7b37e105d8ea9a02cb583 (patch) | |
tree | c8dd6b12f7e5d8191f28dbffcf3c71856209ee8f /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | e1175b7c67ad577e2023e2e3c7ce18e4ec71d855 (diff) | |
download | bcm5719-llvm-4bc5e389600f8c6f03e7b37e105d8ea9a02cb583.tar.gz bcm5719-llvm-4bc5e389600f8c6f03e7b37e105d8ea9a02cb583.zip |
Teach frame lowering to ignore debug values after the terminators.
llvm-svn: 123399
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 813fad288e8..ad1ab287e34 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -162,6 +162,18 @@ MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() { return I; } +MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr() { + iterator B = begin(), I = end(); + while (I != B) { + --I; + if (I->isDebugValue()) + continue; + return I; + } + // The block is all debug values. + return end(); +} + void MachineBasicBlock::dump() const { print(dbgs()); } |