[PATCH] D25648: Switch SmallSetVector to use DenseSet when it overflows its inline space.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 15 15:56:15 PDT 2016


jlebar created this revision.
jlebar added a reviewer: timshen.
jlebar added a subscriber: llvm-commits.

SetVector already used DenseSet, but SmallSetVector used std::set.  This
leads to surprising performance differences.  Moreover, it means that
the set of key types accepted by SetVector and SmallSetVector are
quite different!

In order to make this change, we had to convert some callsites that used
SmallSetVector<std::string, N> to use SmallSetVector<CachedHashString, N>
instead.


https://reviews.llvm.org/D25648

Files:
  clang/include/clang/Lex/HeaderSearchOptions.h
  clang/lib/CodeGen/CGObjCMac.cpp
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  llvm/include/llvm/ADT/SetVector.h
  llvm/utils/TableGen/AsmMatcherEmitter.cpp
  llvm/utils/TableGen/FixedLenDecoderEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25648.74781.patch
Type: text/x-patch
Size: 10207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161015/037c7bd0/attachment.bin>


More information about the llvm-commits mailing list