[PATCH] Add find_as to DenseSet.

Lang Hames lhames at gmail.com
Sun Oct 19 11:56:58 PDT 2014


In case the concrete use-case is of interest: I want to switch PBQP's
pooling CostAllocator from a std::set to a DenseSet*. PBQP::MDMatrices (the
pool values) are more than twice as expensive to construct as the key
values (PBPQ::Matrix).

Cheers,
Lang.

* This change is good for a ~4% reduction in total compile time on the
nightly test suite when using -regalloc=pbqp.


On Sun, Oct 19, 2014 at 11:51 AM, Lang Hames <lhames at gmail.com> wrote:

> Hi All,
>
> This patch adds the find_as operation to DenseSet.
>
> As with the corresponding method in DenseMap, this is useful if you have a
> DenseSet that contains expensive-to-contruct values, but there exists some
> cheap-to-construct type that can be used as a key for lookup.
>
> Unit-test included.
>
> Cheers,
> Lang.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141019/ddf1fbda/attachment.html>


More information about the llvm-commits mailing list