llvm.org GIT mirror llvm / e4b1efe
Docs for SparseMultiSet git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173092 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Ilseman 7 years ago
1 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
10511051 and fast iteration over small sets. It is not intended for building composite
10521052 data structures.
10531053
1054 .. _dss_sparsemultiset:
1055
1056 llvm/ADT/SparseMultiSet.h
1057 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1058
1059 SparseMultiSet adds multiset behavior to SparseSet, while retaining SparseSet's
1060 desirable attributes. Like SparseSet, it typically uses a lot of memory, but
1061 provides operations that are almost as fast as a vector. Typical keys are
1062 physical registers, virtual registers, or numbered basic blocks.
1063
1064 SparseMultiSet is useful for algorithms that need very fast
1065 clear/find/insert/erase of the entire collection, and iteration over sets of
1066 elements sharing a key. It is often a more efficient choice than using composite
1067 data structures (e.g. vector-of-vectors, map-of-vectors). It is not intended for
1068 building composite data structures.
1069
10541070 .. _dss_FoldingSet:
10551071
10561072 llvm/ADT/FoldingSet.h