aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/SparseSetTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-03-14[ADT] Add a pop_back_val method to the SparseSet container.Quentin Colombet1-0/+20
The next commit will use it. llvm-svn: 263455
2012-04-20SparseSet: Add support for key-derived indexes and arbitrary key types.Andrew Trick1-1/+1
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. llvm-svn: 155227
2012-02-22Fix typos.Jakob Stoklund Olesen1-4/+4
llvm-svn: 151163
2012-02-22Add a Briggs and Torczon sparse set implementation.Jakob Stoklund Olesen1-0/+186
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. llvm-svn: 151110