[llvm-commits] [llvm] r173064 - in /llvm/trunk: include/llvm/ADT/SparseMultiSet.h include/llvm/CodeGen/ScheduleDAGInstrs.h lib/CodeGen/ScheduleDAGInstrs.cpp unittests/ADT/CMakeLists.txt unittests/ADT/SparseMultiSetTest.cpp

Chris Lattner clattner at apple.com
Mon Jan 21 11:12:36 PST 2013


On Jan 21, 2013, at 10:18 AM, Michael Ilseman <milseman at apple.com> wrote:

> Author: milseman
> Date: Mon Jan 21 12:18:53 2013
> New Revision: 173064
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=173064&view=rev
> Log:
> Introduce a new data structure, the SparseMultiSet, and changes to the MI scheduler to use it.
> 
> A SparseMultiSet adds multiset behavior to SparseSet, while retaining SparseSet's desirable properties. Essentially, SparseMultiSet provides multiset behavior by storing its dense data in doubly linked lists that are inlined into the dense vector. This allows it to provide good data locality as well as vector-like constant-time clear() and fast constant time find(), insert(), and erase(). It also allows SparseMultiSet to have a builtin recycler rather than keeping SparseSet's behavior of always swapping upon removal, which allows it to preserve more iterators. It's often a better alternative to a SparseSet of a growable container or vector-of-vector.

Cool, please mention this in the ProgrammersManual.html (describing when it makes sense to use it).

-Chris



More information about the llvm-commits mailing list