[llvm-dev] RFC: Reducing the number of set classes in ADT

Justin Lebar via llvm-dev llvm-dev at lists.llvm.org
Sat Oct 15 15:59:03 PDT 2016

> Can we use std::unordered_set instead?

We could, but my preference is just to remove SmallSet, if possible.
std::unordered_set is still worse than llvm::DenseSet for most
purposes, I expect.

FYI I've just sent out a patch queue for part (1) of this plan.

D25628 [ADT] Add SmallDenseSet.
D25629 [ADT] Add an initializer_list constructor to {Small,}DenseSet.
D25643 [IR] Add DenseMapInfo<CallSite>.
D25644 [ADT] Move CachedHashString to a own header in ADT, and rename
to CachedHashStringRef.
D25645 [ADT] Add CachedHashString.
D25646 Use CachedHashStringRef instead of CachedHash<StringRef>.
D25630 [ADT] Remove CachedHash, which is unused.
D25647 [clang-tidy] Don't use a SmallSetVector of an enum.
D25648 Switch SmallSetVector to use DenseSet when it overflows its inline space.

On Fri, Oct 14, 2016 at 12:55 PM, Krzysztof Parzyszek via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> On 10/14/2016 1:58 PM, Justin Lebar via llvm-dev wrote:
>> * SmallSet falls back to std::set<T> when it runs out of inline storage
>> (which
>>   itself is pretty bad because std::set will pwn your caches).
> Can we use std::unordered_set instead?
> -Krzysztof
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
> The Linux Foundation
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

More information about the llvm-dev mailing list