summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveDebugValues.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-08-21 09:21:37 +0000
committerFangrui Song <maskray@google.com>2019-08-21 09:21:37 +0000
commit2d337fdc95f651b4b256bb1a73621ee2e737ca5e (patch)
treeb2cca32cc00a634f513fb212072f928b954ec0fa /llvm/lib/CodeGen/LiveDebugValues.cpp
parent4fc1eb55d1973868cc4c1420950ec89e1741bc73 (diff)
downloadbcm5719-llvm-2d337fdc95f651b4b256bb1a73621ee2e737ca5e.tar.gz
bcm5719-llvm-2d337fdc95f651b4b256bb1a73621ee2e737ca5e.zip
Reland D65242 "[ELF] More dynamic relocation packing""
This fixed a bug in r369488. When config->isRela is false, i->r_addend is not initialized (see encodeDynamicReloc). So we should check config->isRela before accessing r_addend: - if (j - i < 3 || i->r_addend) + if (j - i < 3 || (config->isRela && i->r_addend != 0)) Original description: Currently, with Android dynamic relocation packing, only relative relocations are grouped together. This patch implements similar packing for non-relative relocations. The implementation groups non-relative relocations with the same r_info and r_addend, if using RELA. By requiring a minimum group size of 3, this achieves smaller relocation sections. Building Android for an ARM32 device, I see the total size of /system/lib decrease by 392 KB. Grouping by r_info also allows the runtime dynamic linker to implement an 1-entry cache to reduce the number of symbol lookup required. With such 1-entry cache implemented on Android, I'm seeing 10% to 20% reduction in total time spent in runtime linker for several executables that I tested. As a simple correctness check, I've also built x86_64 Android and booted successfully. Differential Revision: https://reviews.llvm.org/D65242 Patch by Vic Yang llvm-svn: 369507
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud