[llvm] [Docs][llvm-exegesis] Clarify AArch64 support (PR #114989)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 05:55:15 PST 2024


https://github.com/sjoerdmeijer created https://github.com/llvm/llvm-project/pull/114989

Claiming AArch64 support for llvm-exegesis is a bit of a stretch in my opinion as only a couple of opcodes with GPR64 operands will work, so I propose to clarify that AArch64 support is very experimental. Also added some clarifications about its libpfm4 dependency.

>From 618d86aa4b50d6b8cf3edb19a4148ec09a88aaa0 Mon Sep 17 00:00:00 2001
From: Sjoerd Meijer <smeijer at nvidia.com>
Date: Sat, 2 Nov 2024 02:47:33 -0700
Subject: [PATCH] [Docs][llvm-exegesis] Clarify AArch64 support

Claiming AArch64 support for llvm-exegesis is a bit of a stretch, so
clarify that that its support is very experimental. Also added some
clarifications about its libpfm4 dependency.
---
 llvm/docs/CommandGuide/llvm-exegesis.rst | 12 +++++++-----
 llvm/tools/llvm-exegesis/README.md       | 14 +++++++++++---
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/llvm/docs/CommandGuide/llvm-exegesis.rst b/llvm/docs/CommandGuide/llvm-exegesis.rst
index fdf17c7fe41285..102c4eb47e9d60 100644
--- a/llvm/docs/CommandGuide/llvm-exegesis.rst
+++ b/llvm/docs/CommandGuide/llvm-exegesis.rst
@@ -33,11 +33,13 @@ snippets.
 SUPPORTED PLATFORMS
 -------------------
 
-:program:`llvm-exegesis` currently only supports X86 (64-bit only), ARM (AArch64
-only), MIPS, and PowerPC (PowerPC64LE only) on Linux for benchmarking. Not all
-benchmarking functionality is guaranteed to work on every platform.
-:program:`llvm-exegesis` also has a separate analysis mode that is supported
-on every platform that LLVM is.
+:program:`llvm-exegesis` currently only supports X86 (64-bit only), ARM
+(AArch64 only and very experimental), MIPS, and PowerPC (PowerPC64LE only) on
+Linux for benchmarking. Not all benchmarking functionality is guaranteed to
+work on every platform. :program:`llvm-exegesis` also has a separate analysis
+mode that is supported on every platform that LLVM is. See README.md for
+more information on the libpfm4 dependency and how to configure and build
+:program:`llvm-exegesis` from source.
 
 SNIPPET ANNOTATIONS
 -------------------
diff --git a/llvm/tools/llvm-exegesis/README.md b/llvm/tools/llvm-exegesis/README.md
index f606fbf8e0eb64..f68a42b05064b4 100644
--- a/llvm/tools/llvm-exegesis/README.md
+++ b/llvm/tools/llvm-exegesis/README.md
@@ -13,8 +13,16 @@ Analysis mode in `llvm-exegesis` is supported on all platforms on which LLVM is.
 #### Currently Supported Operating Systems for Benchmarking
 
 Currently, `llvm-exegesis`  only supports benchmarking on Linux. This is mainly
-due to a dependency on the Linux perf subsystem for reading performance
-counters.
+due to a dependency on the Linux perf subsystem and libpfm4 for reading
+performance counters. For benchmarking, LLVM needs to be configured and build
+with `LLVM_ENABLE_LIBPFM` enabled. Benchmarking might fail if the target cpu is
+not supported by libpfm. This can be checked by putting libpfm in verbose/debug
+mode with environment variables `LIBPFM_VERBOSE` and `LIBFM_DEBUG`. If libpfm
+is installed in a non-standard location, LLVM can be configured to look for the
+libpfm library and header file locations by setting environment variables
+`LIBRARY_PATH`, `C_INCLUDE_PATH`, and `CPLUS_INCLUDE_PATH`. In that case variable
+`LD_LIBRARY_PATH` needs to be set too so that `llvm-exegesis` can find the
+library at execution time.
 
 The subprocess execution mode and memory annotations currently only supports
 Linux due to a heavy reliance on many Linux specific syscalls/syscall
@@ -28,7 +36,7 @@ architectures:
   * 64-bit only due to this being the only implemented calling convention
     in `llvm-exegesis` currently.
 * ARM
-  * AArch64 only
+  * Very experimental AArch64 support only, most opcodes probably won't work.
 * MIPS
 * PowerPC (PowerPC64LE only)
 



More information about the llvm-commits mailing list