[PATCH] D128382: [LLD] Two tweaks to symbol ordering scheme

YongKang Zhu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 17:04:24 PDT 2022


yozhu added a comment.

In D128382#3603513 <https://reviews.llvm.org/D128382#3603513>, @MaskRay wrote:

> Please answer why `executableInputSections > 1` is needed.

If there is zero or only one input section having instructions, the scenario of "hot code calling into cold code" doesn't exist.

In D128382#3603513 <https://reviews.llvm.org/D128382#3603513>, @MaskRay wrote:

> How does it save one page?

Hot code will always be placed together, so where it starts impact how many pages it will occupy.  Moving it towards the beginning of the output section increases the possibility that one less page will be taken.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128382/new/

https://reviews.llvm.org/D128382



More information about the llvm-commits mailing list