[llvm] [llvm-exegesis][AArch64] Check for PAC keys before disabling them (PR #138643)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 09:48:04 PDT 2025


================
@@ -32,6 +39,53 @@
 namespace llvm {
 namespace exegesis {
 
+static cl::opt<bool> AArch64DisablePacControl(
+    "aarch64-disable-pac-control",
+    cl::desc("Disable PAC key control at runtime for benchmarking. Use this if "
+             "llvm-exegesis crashes or instruction timings are affected."),
+    cl::init(false));
+
+bool isPointerAuth(unsigned Opcode) {
+  switch (Opcode) {
+  default:
+    return false;
+
+  // FIXME: Pointer Authentication instructions.
+  // We would like to measure these instructions, but they can behave
+  // differently on different platforms, and maybe the snippets need to look
+  // different for these instructions,
+  // Platform-specific handling:  On Linux, we disable authentication, may
+  // interfere with measurements. On non-Linux platforms, disable opcodes for
+  // now.
----------------
atrosinenko wrote:

It seems the description for non-Linux platforms got out of sync with the implementation.

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


More information about the llvm-commits mailing list