summaryrefslogtreecommitdiff
path: root/unittests/ADT/SparseSetTest.cpp
Commit message (Collapse)AuthorAge
* SparseSet: Add support for key-derived indexes and arbitrary key types.Andrew Trick2012-04-20
| | | | | | | | | | | | | | | | | | | This nicely handles the most common case of virtual register sets, but also handles anticipated cases where we will map pointers to IDs. The goal is not to develop a completely generic SparseSet template. Instead we want to handle the expected uses within llvm without any template antics in the client code. I'm adding a bit of template nastiness here, and some assumption about expected usage in order to make the client code very clean. The expected common uses cases I'm designing for: - integer keys that need to be reindexed, and may map to additional data - densely numbered objects where we want pointer keys because no number->object map exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155227 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos.Jakob Stoklund Olesen2012-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151163 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Briggs and Torczon sparse set implementation.Jakob Stoklund Olesen2012-02-22
For objects that can be identified by small unsigned keys, SparseSet provides constant time clear() and fast deterministic iteration. Insert, erase, and find operations are typically faster than hash tables. SparseSet is useful for keeping information about physical registers, virtual registers, or numbered basic blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151110 91177308-0d34-0410-b5e6-96231b3b80d8