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

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 05:11:22 PST 2024


================
@@ -0,0 +1,33 @@
+#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);
+  bool BBhasAUTH(BinaryContext &BC, BinaryBasicBlock *BB);
----------------
paschalis-mpeis wrote:

Can you use lower-camelcase for some relevant functions below?
like `blockHasAuth` or `blockHasAUTH`, whichever seems more suitable.

Consider making them private if they are not used outiside this pass.

Also it'll be great if you can provide some short description to some of these,
especially for the explore/process, and addNegateRAStateAfterPacOrAuth functions.



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


More information about the llvm-commits mailing list