[all-commits] [llvm/llvm-project] 573c7e: [lld-macho] Handle LOH_ARM64_ADRP_LDR linker optim...
Daniel Bertalan via All-commits
all-commits at lists.llvm.org
Fri Jul 1 00:48:27 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 573c7e6b3c79c7ce80a2221e000fab7dd20c0bb4
https://github.com/llvm/llvm-project/commit/573c7e6b3c79c7ce80a2221e000fab7dd20c0bb4
Author: Daniel Bertalan <dani at danielbertalan.dev>
Date: 2022-07-01 (Fri, 01 Jul 2022)
Changed paths:
M lld/MachO/Arch/ARM64.cpp
A lld/test/MachO/loh-adrp-ldr.s
Log Message:
-----------
[lld-macho] Handle LOH_ARM64_ADRP_LDR linker optimization hints
This linker optimization hint transforms a pair of adrp+ldr (immediate)
instructions into an ldr (literal) load from a PC-relative address if
it is 4-byte aligned and within +/- 1 MiB, as ldr can encode a signed
19-bit offset that gets multiplied by 4.
In the wild, only a small number of these hints are applicable because
not many loads end up close enough to the data segment. However, the
added helper functions will be useful in implementing the rest of the
LOH types.
Differential Revision: https://reviews.llvm.org/D128942
More information about the All-commits
mailing list