diff options
author | Fangrui Song <maskray@google.com> | 2020-01-22 12:27:17 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-01-30 17:52:35 -0800 |
commit | 5b22bcc2b70d82c73ce5428170dcc2038a729d74 (patch) | |
tree | 712e97c1d570cafaf38d7507080ae606b765728f /llvm/lib/IR/Module.cpp | |
parent | 980517b3530ffb7faa1a23fdc007d78f5b45ae3c (diff) | |
download | llvm-5b22bcc2b70d82c73ce5428170dcc2038a729d74.zip llvm-5b22bcc2b70d82c73ce5428170dcc2038a729d74.tar.gz llvm-5b22bcc2b70d82c73ce5428170dcc2038a729d74.tar.bz2 |
[X86][ELF] Prefer to lower MC_GlobalAddress operands to .Lfoo$local
For a MC_GlobalAddress reference to a dso_local external GlobalValue with a definition, emit .Lfoo$local to avoid a relocation.
-fno-pic and -fpie can infer dso_local but -fpic cannot. In the future,
we can explore the possibility of inferring dso_local with -fpic. As the
description of D73228 says, LLVM's existing IPO optimization behaviors
(like -fno-semantic-interposition) and a previous assembly behavior give
us enough license to be aggressive here.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D73230
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions