[llvm-commits] [llvm] r117174 - in /llvm/trunk: include/llvm/CodeGen/LinkAllCodegenComponents.h include/llvm/CodeGen/Passes.h lib/CodeGen/CMakeLists.txt lib/CodeGen/LiveIntervalUnion.cpp lib/CodeGen/LiveIntervalUnion.h lib/CodeGen/RegAllocBase.h lib/CodeGen/RegAllocBasic.cpp lib/CodeGen/SplitKit.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Oct 26 14:03:56 PDT 2010


On Oct 26, 2010, at 1:44 PM, Andrew Trick wrote:

>> 4. What's your plan for more efficient LiveSegments implementation?
> 
> I'll let Jakob answer that. I haven't thought of anything better than a B-btree. 

There is a lot of fancy data structures for storing overlapping intervals, but for disjoint intervals, I don't think anything beats a B+tree for the operations we need.

So far, I am looking at using a node size of 3 cache lines which can store 8 entries in the leaf nodes and 12 branches in the inner nodes with minimal waste.

B+tree iterators support a biased lower_bound() that is very fast when only moving a little bit forward while still being logarithmic for longer searches. That is very handy for calculating overlaps as well as inserting sorted lists of intervals (LiveIntervals).

/jakob





More information about the llvm-commits mailing list