Add LiveInterval::find and use it for most LiveRange searching operations
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 21 Sep 2010 17:12:18 +0000 (17:12 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 21 Sep 2010 17:12:18 +0000 (17:12 +0000)
commitf568b2706e274c7d8081cfd0a7ee9b881e5c313b
tree74c7caa9f2c8d95a90c5c74216073360f5b05872
parent0635ead2c4f2182a480a3281b9b2fff084a10634
Add LiveInterval::find and use it for most LiveRange searching operations
instead of calling lower_bound or upper_bound directly.

This cleans up the search logic a bit because {lower,upper}_bound compare
LR->start by default, and it is usually simpler to search LR->end.

Funnelling all searches through one function also makes it possible to replace
the search algorithm with something faster than binary search.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114448 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LiveInterval.h
lib/CodeGen/LiveInterval.cpp