[PATCH] D59709: [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 13:40:26 PST 2022
int3 added a comment.
Herald added a subscriber: ormris.
Sorry to necro and old diff, but I'm trying to implement this behavior in LLD's Mach-O backend right now, and I'm running into some issues with ThinLTO not hiding the symbols that I expect it to. D119767: [lld-macho] Improve hiding of unnamed_addr symbols <https://reviews.llvm.org/D119767> and https://discourse.llvm.org/t/mach-o-lto-handling-of-linkonce-odr-unnamed-addr/60015 have a bit more context
================
Comment at: llvm/trunk/lib/Analysis/ModuleSummaryAnalysis.cpp:423
+ /* Live = */ false, V.isDSOLocal(),
+ V.hasLinkOnceODRLinkage() && V.hasGlobalUnnamedAddr());
----------------
@tejohnson should we account for `local_unnamed_addr` constants here too? `canBeOmittedFromSymbolTable()` checks for both: https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/Globals.cpp#L354
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59709/new/
https://reviews.llvm.org/D59709
More information about the llvm-commits
mailing list