[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervals.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Jan 13 18:21:01 PST 2004
Changes in directory llvm/lib/CodeGen:
LiveIntervals.cpp updated: 1.24 -> 1.25
---
Log message:
Fix bug in LiveIntervals::Interval::overlaps and
LiveIntervals::Interval::liveAt. Both were considering the live ranges
closed in the end, when they are actually open.
---
Diffs of the changes: (+3 -3)
Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.24 llvm/lib/CodeGen/LiveIntervals.cpp:1.25
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.24 Tue Jan 13 16:26:14 2004
+++ llvm/lib/CodeGen/LiveIntervals.cpp Tue Jan 13 18:20:09 2004
@@ -366,7 +366,7 @@
bool LiveIntervals::Interval::liveAt(unsigned index) const
{
Ranges::const_iterator r = ranges.begin();
- while (r != ranges.end() && index < r->second) {
+ while (r != ranges.end() && index < (r->second - 1)) {
if (index >= r->first)
return true;
++r;
@@ -381,7 +381,7 @@
while (i != ranges.end() && j != other.ranges.end()) {
if (i->first < j->first) {
- if (i->second > j->first) {
+ if ((i->second - 1) > j->first) {
return true;
}
else {
@@ -389,7 +389,7 @@
}
}
else if (j->first < i->first) {
- if (j->second > i->first) {
+ if ((j->second - 1) > i->first) {
return true;
}
else {
More information about the llvm-commits
mailing list