[PATCH] D44969: ELF: Place ordered sections in the middle of the unordered section list on targets with limited-range branches.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 30 11:21:22 PDT 2018
pcc added a comment.
Imagine that you have 8MB of hot code and 32MB of cold code. If the layout is:
8MB hot
32MB cold
only the first 8-16MB of the cold code (depending on which hot function it is actually calling) can call the hot code without a range extension thunk. However, if we use this layout:
16MB cold
8MB hot
16MB cold
both the last 8-16MB of the first block of cold code and the first 8-16MB of the second block of cold code can call the hot code without a thunk. So we effectively double the amount of code that could potentially call into the hot code without a thunk, reducing the number of thunks that we need.
https://reviews.llvm.org/D44969
More information about the llvm-commits
mailing list