[all-commits] [llvm/llvm-project] 4450a2: [lld][ELF] Add support for ADRP+ADD optimization f...

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Tue Feb 1 22:18:21 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4450a2a23df0e7081ca7fee3ec641774afedc2bc
      https://github.com/llvm/llvm-project/commit/4450a2a23df0e7081ca7fee3ec641774afedc2bc
  Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
  Date:   2022-02-02 (Wed, 02 Feb 2022)

  Changed paths:
    M lld/ELF/Arch/AArch64.cpp
    M lld/ELF/InputSection.cpp
    M lld/ELF/Target.h
    A lld/test/ELF/aarch64-adrp-add.s
    M lld/test/ELF/aarch64-adrp-ldr-got.s
    M lld/test/ELF/aarch64-copy.s
    M lld/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s

  Log Message:
  -----------
  [lld][ELF] Add support for ADRP+ADD optimization for AArch64

This diff adds support for ADRP+ADD optimization for AArch64 described in
https://github.com/ARM-software/abi-aa/commit/d2ca58c54b8e955cfef25c71822f837ae0439d73
i.e. under appropriate constraints

ADRP  x0, symbol
ADD   x0, x0, :lo12: symbol

can be turned into

NOP
ADR   x0, symbol

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D117614




More information about the All-commits mailing list