[all-commits] [llvm/llvm-project] ecb14f: [lld-macho] Add LOH_ARM64_ADRP_LDR_GOT_LDR optimiz...
Daniel Bertalan via All-commits
all-commits at lists.llvm.org
Wed Jul 13 03:23:59 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ecb14fd87207203971517564ff0353e129091071
https://github.com/llvm/llvm-project/commit/ecb14fd87207203971517564ff0353e129091071
Author: Daniel Bertalan <dani at danielbertalan.dev>
Date: 2022-07-13 (Wed, 13 Jul 2022)
Changed paths:
M lld/MachO/Arch/ARM64.cpp
A lld/test/MachO/loh-adrp-ldr-got-ldr.s
Log Message:
-----------
[lld-macho] Add LOH_ARM64_ADRP_LDR_GOT_LDR optimization hint support
This hint instructs the linker to relax a GOT-indirect load.
If the referenced symbol is external and its GOT entry is within +/- 1
MiB, the GOT entry can be loaded with a single literal ldr instruction.
If the referenced symbol is local, its address may be loaded directly if
it's close enough, or with an adr(p) + ldr pair if it's not.
This type accounts for more than half of all LOHs in chromium_framework.
This commit moves the eligibility checks into helper functions to
improve the readability of the LOH processing code. Ho functional
changes are intended to the previously implemented LOH types.
Differential Revision: https://reviews.llvm.org/D129427
More information about the All-commits
mailing list