aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachinePassManager.cpp
diff options
context:
space:
mode:
authorBen Dunbobbin <Ben.Dunbobbin@sony.com>2020-08-13 23:58:40 +0100
committerBen Dunbobbin <Ben.Dunbobbin@sony.com>2020-08-14 00:09:15 +0100
commit4cb016cd2d8467c572b2e5c5d34f376ee79e4ac1 (patch)
tree7c6a05f0abfd73dd10cb7902579921102f0c94d3 /llvm/lib/CodeGen/MachinePassManager.cpp
parent41f49736a9a06650d9d4f1ada21d051585ab7bbe (diff)
downloadllvm-4cb016cd2d8467c572b2e5c5d34f376ee79e4ac1.zip
llvm-4cb016cd2d8467c572b2e5c5d34f376ee79e4ac1.tar.gz
llvm-4cb016cd2d8467c572b2e5c5d34f376ee79e4ac1.tar.bz2
[X86][ELF] Prefer lowering MC_GlobalAddress operands to .Lfoo$local for STV_DEFAULT only
This patch restricts the behaviour of referencing via .Lfoo$local local aliases, introduced in https://reviews.llvm.org/D73230, to STV_DEFAULT globals only. Hidden symbols via --fvisiblity=hidden (https://gcc.gnu.org/wiki/Visibility) is an important scenario. Benefits: - Improves the size of object files by using fewer STT_SECTION symbols. - The code reads a bit better (it was not obvious to me without going back to the code reviews why the canBenefitFromLocalAlias function currently doesn't consider visibility). - There is also a side benefit in restoring the effectiveness of the --wrap linker option and making the behavior of --wrap consistent between LTO and normal builds for references within a translation-unit. Note: this --wrap behavior (which is specific to LLD) should not be considered reliable. See comments on https://reviews.llvm.org/D73230 for more. Differential Revision: https://reviews.llvm.org/D85782
Diffstat (limited to 'llvm/lib/CodeGen/MachinePassManager.cpp')
0 files changed, 0 insertions, 0 deletions