[PATCH] D39594: [ELF] - Stop using SectionKey for creating output sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 05:57:46 PDT 2017


grimar created this revision.
Herald added a subscriber: emaste.

Stop using SectionKey for creating output sections.

Initially SectionKey was designed because we merged section with
use of Flags and Alignment fields. Currently LLD merges them by name only,
except the case when -relocatable output is produced. In that case
we still merge sections with the same flags and alignment only.
There is probably no issue at all to stop using Flags and Alignment for -r and
just disable the merging in that case.

After doing that change we can get rid of using SectionKey. That is not only
simplifies the code, but also gives perfomance boost.
I tried to link chrome (used set of objects from lld-speed-test archive shared
by Rafael earlier) and results are next:

- Without patch: 1,666750355 seconds time elapsed ( +-0,10% )
- With patch: 1,551585364 seconds time elapsed ( +-0,12% )

That looks to be 7% difference..


https://reviews.llvm.org/D39594

Files:
  ELF/OutputSections.cpp
  ELF/OutputSections.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39594.121464.patch
Type: text/x-patch
Size: 7170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171103/8ccdfbaa/attachment.bin>


More information about the llvm-commits mailing list