[PATCH] D71326: [ELF] Move a computeIsPreemptible() pass into ICF. NFC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 22:23:25 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6e513a53824f: [ELF] Move a computeIsPreemptible() pass into ICF. NFC (authored by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71326/new/
https://reviews.llvm.org/D71326
Files:
lld/ELF/Driver.cpp
lld/ELF/ICF.cpp
Index: lld/ELF/ICF.cpp
===================================================================
--- lld/ELF/ICF.cpp
+++ lld/ELF/ICF.cpp
@@ -452,6 +452,12 @@
// The main function of ICF.
template <class ELFT> void ICF<ELFT>::run() {
+ // Compute isPreemptible early. We may add more symbols later, so this loop
+ // cannot be merged with the later computeIsPreemptible() pass which is used
+ // by scanRelocations().
+ for (Symbol *sym : symtab->symbols())
+ sym->isPreemptible = computeIsPreemptible(*sym);
+
// Collect sections to merge.
for (InputSectionBase *sec : inputSections) {
auto *s = cast<InputSection>(sec);
Index: lld/ELF/Driver.cpp
===================================================================
--- lld/ELF/Driver.cpp
+++ lld/ELF/Driver.cpp
@@ -1989,11 +1989,6 @@
// Two input sections with different output sections should not be folded.
// ICF runs after processSectionCommands() so that we know the output sections.
if (config->icf != ICFLevel::None) {
- // Compute isPreemptible early to be used by ICF. We may add more symbols
- // later, so this loop cannot be merged with the later computeIsPreemptible
- // pass which is used by scanRelocations().
- for (Symbol *sym : symtab->symbols())
- sym->isPreemptible = computeIsPreemptible(*sym);
findKeepUniqueSections<ELFT>(args);
doIcf<ELFT>();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71326.233258.patch
Type: text/x-patch
Size: 1375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191211/b68f7529/attachment.bin>
More information about the llvm-commits
mailing list