[llvm] [BOLT][AArch64] Handle OpNegateRAState to enable optimizing binaries with pac-ret hardening (PR #120064)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 22:56:56 PDT 2025


================
@@ -273,6 +275,12 @@ static cl::opt<bool> ShortenInstructions("shorten-instructions",
                                          cl::desc("shorten instructions"),
                                          cl::init(true),
                                          cl::cat(BoltOptCategory));
+
+cl::opt<bool>
+    UpdateBranchProtection("update-branch-protection",
+                           cl::desc("Rewrites pac-ret DWARF CFI instructions "
+                                    "(AArch64-only, on by default)"),
+                           cl::init(true), cl::cat(BoltOptCategory));
----------------
maksfb wrote:

The category should be a more general `BoltCatergory`. Since we don't anticipate people disabling it, it's also good to make it a "hidden" option.

https://github.com/llvm/llvm-project/pull/120064


More information about the llvm-commits mailing list