aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-02 05:52:23 +0000
committerChris Lattner <sabre@nondot.org>2004-07-02 05:52:23 +0000
commit230b4fb8a0d7b2b0e0d533cf37b05a084d140a5c (patch)
treebe1c6745038bcf8654a4c5aad5e745c0d56d1e12 /lib/CodeGen/LiveIntervalAnalysis.cpp
parenta9a582fbb6f0c9e24bebda73f0a13e560f2d3c5e (diff)
Revert patches 1.79 and 1.80 which had to do with dead MBB's. Now that they
don't exist, we don't have to pretend to handle them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index f687675c72..9c10805644 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -356,7 +356,8 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb,
}
// a variable can only be killed by subsequent instructions
- for (++mi; mi != e; ++mi) {
+ do {
+ ++mi;
baseIndex += InstrSlots::NUM;
for (KillIter ki = lv_->killed_begin(mi), ke = lv_->killed_end(mi);
ki != ke; ++ki) {
@@ -366,13 +367,10 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb,
goto exit;
}
}
- }
+ } while (mi != e);
- // LiveVariables does not compute information for dead basic blocks.
- DEBUG(std::cerr << "Didn't find the end of the interval. Must be in a "
- "dead block.");
- end = getDefIndex(start)+1;
exit:
+ assert(start < end && "did not find end of interval?");
interval.addRange(start, end);
DEBUG(std::cerr << '\n');
}