[lld] r257017 - ELF: Improve performance of string table construction.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 19:43:08 PST 2016


On Tue, Jan 19, 2016 at 7:38 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> .
> >
> >
> > You can just hack up StringTableBuilder so that they don't add the same
> string more than once, then the resulting string table contains no
> duplicates, no?
>
> That is exactly what StringTableBuilder does. The add method checks for
> duplicates and returns the index assuming no tail merge. I just need to
> update lld to use the return value of add instead of always calling
> finalize.
>
That's the plumbing work that I avoided in this patch by splitting reserve
and addString. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160119/4f696442/attachment.html>


More information about the llvm-commits mailing list