[PATCH] D49030: Add OrderedSet, with constant-time insertion and removal, and random access iteration.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 08:44:18 PDT 2018


labrinea created this revision.
labrinea added reviewers: llvm-commits, george.burgess.iv, efriedma.
Herald added subscribers: dexonsmith, mgorny.

Implements a hash table with constant-time insertion and removal, and iteration in some consistent order across runs. Two copies of each element are kept, one is stored in a std::vector for random access iteration, and one is used as a key in a DenseMap, which contains indexes to the vector.


https://reviews.llvm.org/D49030

Files:
  include/llvm/ADT/OrderedSet.h
  unittests/ADT/CMakeLists.txt
  unittests/ADT/OrderedSetTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49030.154417.patch
Type: text/x-patch
Size: 5804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180706/2538acf4/attachment.bin>


More information about the llvm-commits mailing list