[PATCH] D159357: [AArch64] Move PAuth codegen down the machine pipeline

Anatoly Trosinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 06:50:34 PDT 2023


atrosinenko created this revision.
atrosinenko added reviewers: ab, kristof.beyls, apazos, pcc, psmith, t.p.northover.
Herald added a subscriber: hiraditya.
Herald added a project: All.
atrosinenko requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159357

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159357.555362.patch
Type: text/x-patch
Size: 30905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230901/dc270dd7/attachment.bin>


More information about the llvm-commits mailing list