summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-18 04:02:11 +0000
committerChris Lattner <sabre@nondot.org>2004-11-18 04:02:11 +0000
commit7598c316e50602d2612a27f5003412b4b3c71c3b (patch)
treed2886c295a5e3d52716d4144649f9de4c149b86b /llvm/lib/CodeGen
parent850852c789e5b24e5bb1d9dc57233a9a25225922 (diff)
downloadbcm5719-llvm-7598c316e50602d2612a27f5003412b4b3c71c3b.tar.gz
bcm5719-llvm-7598c316e50602d2612a27f5003412b4b3c71c3b.zip
Take another .7 seconds off of linear scan time.
llvm-svn: 17936
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 3c7e8dd7632..4a1720f7013 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud