diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-18 04:02:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-18 04:02:11 +0000 |
commit | 8c68b6a226ce46b35eafda972e04bf53128c2615 (patch) | |
tree | 0b2b7665aad0404b7bbe3871e7a4ecc867af9cf8 /lib/CodeGen/LiveInterval.cpp | |
parent | 19828d46f665e24b26c2a5d603c961abfd84cd0f (diff) |
Take another .7 seconds off of linear scan time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | lib/CodeGen/LiveInterval.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 3c7e8dd763..4a1720f701 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -68,14 +68,16 @@ bool LiveInterval::overlapsFrom(const LiveInterval& other, const_iterator je = other.end(); assert((StartPos->start <= i->start || StartPos == other.begin()) && - "Bogus start position hint!"); + StartPos != other.end() && "Bogus start position hint!"); if (i->start < j->start) { i = std::upper_bound(i, ie, j->start); if (i != ranges.begin()) --i; } else if (j->start < i->start) { - j = std::upper_bound(j, je, i->start); - if (j != other.ranges.begin()) --j; + if ((++StartPos)->start <= i->start) { + j = std::upper_bound(j, je, i->start); + if (j != other.ranges.begin()) --j; + } } else { return true; } |