[PATCH] D38266: Parallelize string merging.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 15:30:39 PDT 2017
ruiu created this revision.
Herald added a subscriber: emaste.
String merging is one of the most time-consuming functions in lld.
This patch parallelize it to speed it up. On my 2-socket 20-core
40-threads Xeon E5-2680 @ 2.8 GHz machine, this patch shorten the
clang debug build link time from 8.77s to 7.05s. It's a 20%
improvement and actually pretty noticeable. In this test condition,
lld is now 3x faster than gold.
When I limit the number of available cores to 2 using taskset command,
lld with or without this patch takes 11.74s or 11.71s, respectively,
to link the same executable. When I limit it to 1, they takes 16.66s
or 13.89s, respectively. So, as long as you have two available cores,
this patch seems a overall win.
https://reviews.llvm.org/D38266
Files:
lld/ELF/InputSection.h
lld/ELF/SyntheticSections.cpp
lld/ELF/SyntheticSections.h
lld/test/ELF/comment-gc.s
lld/test/ELF/compressed-debug-input.s
lld/test/ELF/debug-gc.s
lld/test/ELF/gc-sections-merge.s
lld/test/ELF/merge-string-align.s
lld/test/ELF/merge.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38266.116627.patch
Type: text/x-patch
Size: 12988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170926/23ac8aaf/attachment.bin>
More information about the llvm-commits
mailing list