]> granicus.if.org Git - llvm/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)
commit2c937a13ee04eb37f275b924b38f34306db47eda
tree7ef0bf26fa24f0174bb47ef9dfb91c266e7ae4f3
parent13656b412f6d3095c81dd3916e80c5dcf59b05dc
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/llvm/trunk@284887 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/SetVector.h
utils/TableGen/AsmMatcherEmitter.cpp
utils/TableGen/FixedLenDecoderEmitter.cpp