Change addRange and join to be a little bit smarter. In particular, we don't
authorChris Lattner <sabre@nondot.org>
Fri, 23 Jul 2004 19:38:44 +0000 (19:38 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 23 Jul 2004 19:38:44 +0000 (19:38 +0000)
commitb26c215c059d4674bd6a9a8b94da86e497e64844
tree24746a652ac0942ef35e7f48a7494dae83437401
parent7ff4006f82e0ff65d1ab43c8a50a38da2860cfac
Change addRange and join to be a little bit smarter.  In particular, we don't
want to insert a new range into the middle of the vector, then delete ranges
one at a time next to the inserted one as they are merged.

Instead, if the inserted interval overlaps, just start merging.  The only time
we insert into the middle of the vector is when we don't overlap at all.  Also
delete blocks of live ranges if we overlap with many of them.

This patch speeds up joining by .7 seconds on a large testcase, but more
importantly gets all of the range adding code into addRangeFrom.

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