]> granicus.if.org Git - clang/commit
Switch SmallSetVector to use DenseSet when it overflows its inline space.
authorJustin Lebar <jlebar@google.com>
Fri, 21 Oct 2016 21:45:01 +0000 (21:45 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 21 Oct 2016 21:45:01 +0000 (21:45 +0000)
commita663b0aee8fef8552996f03415d3e48ee72e838f
tree59951dbf7f3e01d930d7e1a14dac87cd40e40870
parentd18ea6642f4cf9ef2e0836355aab5f54a23863df
Switch SmallSetVector to use DenseSet when it overflows its inline space.

Summary:
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.

Reviewers: timshen

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25648

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284887 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/HeaderSearchOptions.h
lib/CodeGen/CGObjCMac.cpp
lib/Frontend/CompilerInstance.cpp
lib/Frontend/CompilerInvocation.cpp