[PATCH] D71163: [ELF] --icf: do not fold preemptible symbols

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 21:28:40 PST 2019


ruiu added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1992-1996
+    // 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);
----------------
This seems like a logic that should belong to ICF, so maybe you can move this to doICF, so that this logic is hidden from others?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71163/new/

https://reviews.llvm.org/D71163





More information about the llvm-commits mailing list