forked from OSchip/llvm-project
Take another .7 seconds off of linear scan time.
llvm-svn: 17936
This commit is contained in:
parent
850852c789
commit
7598c316e5
|
@ -68,14 +68,16 @@ bool LiveInterval::overlapsFrom(const LiveInterval& other,
|
||||||
const_iterator je = other.end();
|
const_iterator je = other.end();
|
||||||
|
|
||||||
assert((StartPos->start <= i->start || StartPos == other.begin()) &&
|
assert((StartPos->start <= i->start || StartPos == other.begin()) &&
|
||||||
"Bogus start position hint!");
|
StartPos != other.end() && "Bogus start position hint!");
|
||||||
|
|
||||||
if (i->start < j->start) {
|
if (i->start < j->start) {
|
||||||
i = std::upper_bound(i, ie, j->start);
|
i = std::upper_bound(i, ie, j->start);
|
||||||
if (i != ranges.begin()) --i;
|
if (i != ranges.begin()) --i;
|
||||||
} else if (j->start < i->start) {
|
} else if (j->start < i->start) {
|
||||||
j = std::upper_bound(j, je, i->start);
|
if ((++StartPos)->start <= i->start) {
|
||||||
if (j != other.ranges.begin()) --j;
|
j = std::upper_bound(j, je, i->start);
|
||||||
|
if (j != other.ranges.begin()) --j;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue