[PATCH] D13958: Mere SHF_STRING

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 08:03:02 PDT 2015


> Comment at: ELF/InputSection.cpp:166
> @@ +165,3 @@
> +
> +static size_t findNull(StringRef S, unsigned EntSize) {
> +  for (unsigned I = 0, N = S.size(); I != N; I += EntSize) {
> ----------------
> I think we really don't have to support SHF_MERGE string section whose entry size is not 1 because almost all string literals are in ASCII or in UTF-8.

They do show up. When linking clang the sizes/times I get now are

gold:          77092512 1.584946846
master:        87482424 0.491110448
merge str 1:   77213816 0.658822729
merge all str: 77209848 0.656403298

All I had to do to get good performance when merging all strings was
add one special case. Uploading the patch.

Cheers,
Rafael


More information about the llvm-commits mailing list