-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[Docs][llvm-exegesis] Clarify AArch64 support #114989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-llvm-binary-utilities @llvm/pr-subscribers-tools-llvm-exegesis Author: Sjoerd Meijer (sjoerdmeijer) ChangesClaiming 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. Full diff: https://github.com/llvm/llvm-project/pull/114989.diff 2 Files Affected:
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)
|
| :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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would explicitly state here that snippet generation is experimental. In process snippet execution should "just work".
Maybe something like "AArch64 only, snippet generation support is sparse".
llvm/tools/llvm-exegesis/README.md
Outdated
| in `llvm-exegesis` currently. | ||
| * ARM | ||
| * AArch64 only | ||
| * Very experimental AArch64 support only, most opcodes probably won't work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same clarification here.
llvm/tools/llvm-exegesis/README.md
Outdated
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably go in the LLVM CMake documentation. This page isn't intended to provide detailed build directions, and people are more likely to look there.
| (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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference the CMake documentation here. It's a bit odd to reference a README from proper documentation.
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.
618d86a to
b026032
Compare
|
Thanks for the review! I have addressed all comments, I think. |
boomanaiden154
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
davemgreen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches my understanding of the support level in AArch64 at the moment. Thanks
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.