[all-commits] [llvm/llvm-project] d1e40f: [lld-macho] Add LOH_ARM64_ADRP_ADD_LDR optimizatio...

Daniel Bertalan via All-commits all-commits at lists.llvm.org
Thu Jul 28 01:46:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1e40f4d584fc6dd032938c6c5fb079f6b8121bd
      https://github.com/llvm/llvm-project/commit/d1e40f4d584fc6dd032938c6c5fb079f6b8121bd
  Author: Daniel Bertalan <dani at danielbertalan.dev>
  Date:   2022-07-28 (Thu, 28 Jul 2022)

  Changed paths:
    M lld/MachO/Arch/ARM64.cpp
    A lld/test/MachO/loh-adrp-add-ldr.s

  Log Message:
  -----------
  [lld-macho] Add LOH_ARM64_ADRP_ADD_LDR optimization hint support

This hint instructs the linker to optimize an adrp+add+ldr sequence used
for loading from a local symbol's address by loading directly if it's
close enough, or with an adrp(p)+ldr sequence if it's not.

This transformation is the same as what's done for ADRP_LDR_GOT_LDR when
the symbol is local. The logic for acting on this hint is therefore
moved to a new function which will be called from the existing
applyAdrpLdrGotLdr() function.

Differential Revision: https://reviews.llvm.org/D130505




More information about the All-commits mailing list