[all-commits] [llvm/llvm-project] eb02ee: [AArch64] Move PAuth codegen down the machine pipe...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Fri Sep 22 04:50:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eb02ee44d32531931af5312cd450779011664eef
      https://github.com/llvm/llvm-project/commit/eb02ee44d32531931af5312cd450779011664eef
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2023-09-22 (Fri, 22 Sep 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64.h
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64FrameLowering.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
    M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    M llvm/lib/Target/AArch64/CMakeLists.txt
    M llvm/test/CodeGen/AArch64/O0-pipeline.ll
    M llvm/test/CodeGen/AArch64/O3-pipeline.ll
    M llvm/test/CodeGen/AArch64/arm64-opt-remarks-lazy-bfi.ll
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-regsave.mir
    M llvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-sp-mod.mir
    M llvm/test/CodeGen/MIR/AArch64/return-address-signing.mir

  Log Message:
  -----------
  [AArch64] Move PAuth codegen down the machine pipeline

To simplify handling PAuth in the machine outliner, introduce a
separate AArch64PointerAuth pass that is executed after both
Prologue/Epilogue Inserter and Machine Outliner passes.

After moving to AArch64PointerAuth, signLR and authenticateLR are
not used outside of their class anymore, so make them private and
simplify accordingly.

The new pass is added via AArch64PassConfig::addPostBBSections(),
so that it can change the code size before branch relaxation occurs.
AArch64BranchTargets is placed there too, so it can take into account
any PACI(A|B)SP instructions and not excessively add BTIs at the start
of functions.

Reviewed By: tmatheson

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




More information about the All-commits mailing list