[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:05 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.
+ case AArch64::AUTDA:
+ case AArch64::AUTDB:
+ case AArch64::AUTDZA:
+ case AArch64::AUTDZB:
+ case AArch64::AUTIA:
+ case AArch64::AUTIA1716:
+ case AArch64::AUTIASP:
+ case AArch64::AUTIAZ:
+ case AArch64::AUTIB:
+ case AArch64::AUTIB1716:
+ case AArch64::AUTIBSP:
+ case AArch64::AUTIBZ:
+ case AArch64::AUTIZA:
+ case AArch64::AUTIZB:
+ return true;
+ }
+}
+
+bool isLoadTagMultiple(unsigned Opcode) {
----------------
atrosinenko wrote:
Can be `static`.
https://github.com/llvm/llvm-project/pull/138643
More information about the llvm-commits
mailing list