[PATCH] D41993: [ELF] - Change shift2 constant of GNU_HASH from 6->11.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 07:07:59 PST 2018


grimar created this revision.
grimar added reviewers: espindola, ruiu.
Herald added a subscriber: emaste.

This is for PR35536 ("Bug 35536 - lld might be creating DSOs that takes more time to
load for the dynamic loader than those created by gold").

shift2 is shift count used by the Bloom filter.

latest benchmark performed today of fresh configuration
(previous my results are available on bug page)
shows this change reduces run time of "ninja check-llvm"
for LLVM built with and -DBUILD_SHARED_LIBS=ON from ~413.45s to ~401.93s.
gold time is: ~411.1s


https://reviews.llvm.org/D41993

Files:
  ELF/SyntheticSections.h


Index: ELF/SyntheticSections.h
===================================================================
--- ELF/SyntheticSections.h
+++ ELF/SyntheticSections.h
@@ -458,7 +458,7 @@
   void addSymbols(std::vector<SymbolTableEntry> &Symbols);
 
 private:
-  size_t getShift2() const { return Config->Is64 ? 6 : 5; }
+  size_t getShift2() const { return Config->Is64 ? 11 : 5; }
 
   void writeBloomFilter(uint8_t *Buf);
   void writeHashTable(uint8_t *Buf);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41993.129608.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180112/75f4fa09/attachment.bin>


More information about the llvm-commits mailing list