[llvm] [BOLT][AArch64] Support for pointer authentication (v2) (PR #120064)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 08:49:00 PST 2025


================
@@ -0,0 +1,25 @@
+#ifndef BOLT_PASSES_INSERT_NEGATE_RA_STATE_PASS
+#define BOLT_PASSES_INSERT_NEGATE_RA_STATE_PASS
+
+#include "bolt/Passes/BinaryPasses.h"
+#include <stack>
+
+namespace llvm {
+namespace bolt {
+
+class InsertNegateRAState : public BinaryFunctionPass {
+public:
+  explicit InsertNegateRAState() : BinaryFunctionPass(false) {}
+
+  const char *getName() const override { return "insert-negate-ra-state-pass"; }
+
+  /// Pass entry point
+  Error runOnFunctions(BinaryContext &BC) override;
+  void runOnFunction(BinaryFunction &BF);
+  bool addNegateRAStateAfterPacOrAuth(BinaryFunction &BF);
----------------
paschalis-mpeis wrote:

Please consider making the below 2 methods private.

You may also add a very brief description, and on `addNegateRAStateAfterPacOrAuth`
explain the `\return`.

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


More information about the llvm-commits mailing list