aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-03-10 15:06:26 +0000
committerDale Johannesen <dalej@apple.com>2010-03-10 15:06:26 +0000
commita2f767b1a7ed6aa4edd6dcf65b68bf3a4ed3901e (patch)
treef042547ca2e254b4131881edbe33c33fe3ee418f /lib/CodeGen/LiveIntervalAnalysis.cpp
parenta2cc0613d05f9545947478942811c04f27601649 (diff)
Fix a bug in DEBUG_VALUE handling Devang ran into.
I'll get this loop right yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index ccda66f005..f8b1707459 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -593,13 +593,10 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB,
MachineBasicBlock::iterator E = MBB->end();
while (mi != E) {
- if (mi->isDebugValue()) {
+ while (mi != E && mi->isDebugValue())
++mi;
- if (mi != E && !mi->isDebugValue()) {
- baseIndex = indexes_->getNextNonNullIndex(baseIndex);
- }
- continue;
- }
+ if (mi == E)
+ break;
if (mi->killsRegister(interval.reg, tri_)) {
DEBUG(dbgs() << " killed");
end = baseIndex.getDefIndex();