aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-03-30 18:32:24 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-03-30 18:32:24 +0000
commit5e3ee945623c1eff6477ae204b1376a4bd55e793 (patch)
tree20969e461c90ca0f21d8ca52e15a3d7908f05649 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent03f270c900e1f8563419fdd302683a9503e98722 (diff)
downloadllvm-5e3ee945623c1eff6477ae204b1376a4bd55e793.zip
llvm-5e3ee945623c1eff6477ae204b1376a4bd55e793.tar.gz
llvm-5e3ee945623c1eff6477ae204b1376a4bd55e793.tar.bz2
ELF: Try to create last thunk section at ThunkSectionSpacing bytes before the end.
Now that we have the ability to create short thunks, it is beneficial for thunk sections to be surrounded by ThunkSectionSpacing bytes of code on both sides in order to increase the likelihood that the distance from the thunk to the target will be sufficiently small to allow for the creation of a short thunk. This is currently the case for most thunks that we create, except for the last one, which could, depending on the size of the output section, potentially appear near the end and therefore have a relatively small amount of code after it. This patch moves the last thunk section to ThunkSectionSpacing bytes before the end of the output section, as long as the section is larger than 2*ThunkSectionSpacing bytes. It reduces the size of Chromium for Android's .text section by 32KB. Differential Revision: https://reviews.llvm.org/D44966 llvm-svn: 328889
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions