[PATCH] D13958: Mere SHF_STRING

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 14:35:13 PDT 2015


ruiu added a comment.

Do we have a balance tree or trie in LLVM? Is there any other good data structure to find common string prefix quickly?

Adding strings to the merge section in string length order (insert longer strings first) would help?


================
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.


http://reviews.llvm.org/D13958





More information about the llvm-commits mailing list