[lld] 3bc1527 - [ELF] Parallelize computeIsPreemptible
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 26 23:45:10 PST 2022
Author: Fangrui Song
Date: 2022-01-26T23:45:04-08:00
New Revision: 3bc152769d3e8e48b25103637e49d24f019f8bd0
URL: https://github.com/llvm/llvm-project/commit/3bc152769d3e8e48b25103637e49d24f019f8bd0
DIFF: https://github.com/llvm/llvm-project/commit/3bc152769d3e8e48b25103637e49d24f019f8bd0.diff
LOG: [ELF] Parallelize computeIsPreemptible
Added:
Modified:
lld/ELF/Writer.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 848db1f04b42..69fcad390d61 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1890,9 +1890,11 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
finalizeSynthetic(part.ehFrame.get());
}
- if (config->hasDynSymTab)
- for (Symbol *sym : symtab->symbols())
+ if (config->hasDynSymTab) {
+ parallelForEach(symtab->symbols(), [](Symbol *sym) {
sym->isPreemptible = computeIsPreemptible(*sym);
+ });
+ }
// Change values of linker-script-defined symbols from placeholders (assigned
// by declareSymbols) to actual definitions.
More information about the llvm-commits
mailing list