aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp
diff options
context:
space:
mode:
authorGergely Bálint <gergely.balint@arm.com>2025-10-08 11:05:41 +0200
committerGitHub <noreply@github.com>2025-10-08 11:05:41 +0200
commit889bfd91728a8ca8d27d3f0e5605464201bf5b3e (patch)
treefb2d51158fb7532714b051a8b544f9a34b92be44 /llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp
parent4967bc17dfbfdd6fe38b4444a2e9379c6474ce55 (diff)
downloadllvm-889bfd91728a8ca8d27d3f0e5605464201bf5b3e.zip
llvm-889bfd91728a8ca8d27d3f0e5605464201bf5b3e.tar.gz
llvm-889bfd91728a8ca8d27d3f0e5605464201bf5b3e.tar.bz2
Reapply "[BOLT][AArch64] Handle OpNegateRAState to enable optimizing binaries with pac-ret hardening" (#162353) (#162435)
Reapply "[BOLT][AArch64] Handle OpNegateRAState to enable optimizing binaries with pac-ret hardening (#120064)" (#162353) This reverts commit c7d776b06897567e2d698e447d80279664b67d47. #120064 was reverted for breaking builders. Fix: changed the mismatched type in MarkRAStates.cpp to `auto`. --- Original message: OpNegateRAState is an AArch64-specific DWARF CFI used to change the value of the RA_SIGN_STATE pseudoregister. The RA_SIGN_STATE register records whether the current return address has been signed with PAC. OpNegateRAState requires special handling in BOLT because its placement depends on the function layout. Since BOLT reorders basic blocks during optimization, these CFIs must be regenerated after layout is finalized. This patch introduces two new passes: - MarkRAStates (runs before optimizations): assigns a signedness annotation to each instruction based on OpNegateRAState CFIs in the input binary. - InsertNegateRAStates (runs after optimizations): reads the annotations and emits new OpNegateRAState CFIs where RA state changes between instructions. Design details are described in: `bolt/docs/PacRetDesign.md`.
Diffstat (limited to 'llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp')
0 files changed, 0 insertions, 0 deletions