[PATCH] D55234: Do not use a hash table to uniquify mergeable strings.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 10 10:48:56 PST 2018


MaskRay added a comment.

In D55234#1325804 <https://reviews.llvm.org/D55234#1325804>, @dblaikie wrote:

> In D55234#1318754 <https://reviews.llvm.org/D55234#1318754>, @ruiu wrote:
>
> > I think you should focus on large programs. We don't really care about the marginal improvements or regressions for small programs because linking small program is very fast anyway, and we don't care about 10ms improvements or regressions. For large programs, it seems reasonably positive. Also this patch only deletes code.
>
>
> FWIW linking times on smaller (than the very large) programs like Clang are still significant to many folks (including LLVM developers themselves) - for example when running "ninja check-all" many LLVM tools (~30? I forget roughly how many) have to be linked - and saving time on each (or the longest one) means getting out of that very serial step in the check run (massively parallel compiles, serial links, then massively parallel test runs).


I second the point, but see my comment above. If we want to optimize further, I think we should try some one-entry cache and leverage the `getVA()` calling pattern, instead of using a hash table (which has been deleted by this patch). The hash table may actually do worse with some `SHF_MERGE|SHF_STRINGS`.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55234/new/

https://reviews.llvm.org/D55234





More information about the llvm-commits mailing list