summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/module.modulemap
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-10-26 18:23:16 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-10-26 18:23:16 +0000
commit97aae40880d76765e9fe2c14ccc8734c1f207414 (patch)
treec8ecbe8c2a4e8484d6b362b875c5d9c75d9486e2 /llvm/lib/Bitcode/module.modulemap
parent871d3247999c4c8495e3d39831b88f37d33072b4 (diff)
downloadbcm5719-llvm-97aae40880d76765e9fe2c14ccc8734c1f207414.tar.gz
bcm5719-llvm-97aae40880d76765e9fe2c14ccc8734c1f207414.zip
ARM/ELF: Better codegen for global variable addresses.
In PIC mode we were previously computing global variable addresses (or GOT entry addresses) by adding the PC, the PC-relative GOT displacement and the GOT-relative symbol/GOT entry displacement. Because the latter two displacements are fixed, we ended up performing one more addition than necessary. This change causes us to compute addresses using a single PC-relative displacement, resulting in a shorter code sequence. This reduces code size by about 4% in a recent build of Chromium for Android. As a result of this change we no longer need to compute the GOT base address in the ARM backend, which allows us to remove the Global Base Reg pass and SDAG lowering for the GOT. We also now no longer use the GOT when addressing a symbol which is known to be defined in the same linkage unit. Specifically, the symbol must have either hidden visibility or a strong definition in the current module in order to not use the the GOT. This is a change from the previous behaviour where we would use the GOT to address externally visible symbols defined in the same module. I think the only cases where this could matter are cases involving symbol interposition, but we don't really support that well anyway. Differential Revision: http://reviews.llvm.org/D13650 llvm-svn: 251322
Diffstat (limited to 'llvm/lib/Bitcode/module.modulemap')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud