<p dir="ltr">Yes, I will give it a try a some point since just avoiding duplicates looks like a sweet spot.</p>
<p dir="ltr">But LTO first :-)</p>
<div class="gmail_quote">On Jan 19, 2016 10:43 PM, "Rui Ueyama" <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 19, 2016 at 7:38 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><p dir="ltr">.<br>
><br>
><br>
> 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? </p>
</span><p dir="ltr">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.</p></blockquote><div>That's the plumbing work that I avoided in this patch by splitting reserve and addString. :)</div></div></div></div>
</blockquote></div>