xref: /llvm-project/llvm/tools/llvm-exegesis/README.md (revision 6720ce75f61a306a3ed26b2205f09a7099e978e7)
1# llvm-exegesis
2
3`llvm-exegesis` is a benchmarking tool that accepts or generates snippets and
4can measure characteristics of those snippets by executing it while keeping track
5of performance counters.
6
7### Currently Supported Platforms
8
9`llvm-exegesis` is quite platform-dependent and currently only supports a couple
10platform configurations for benchmarking. The limitations are listed below.
11Analysis mode in `llvm-exegesis` is supported on all platforms on which LLVM is.
12
13#### Currently Supported Operating Systems for Benchmarking
14
15Currently, `llvm-exegesis`  only supports benchmarking on Linux. This is mainly
16due to a dependency on the Linux perf subsystem for reading
17performance counters.
18
19The subprocess execution mode and memory annotations currently only supports
20Linux due to a heavy reliance on many Linux specific syscalls/syscall
21implementations.
22
23#### Currently Supported Architectures for Benchmarking
24
25Currently, using `llvm-exegesis` for benchmarking is supported on the following
26architectures:
27* x86
28  * 64-bit only due to this being the only implemented calling convention
29    in `llvm-exegesis` currently.
30* ARM
31  * Very experimental AArch64 support only: most opcodes probably won't work as
32    e.g. pseudo instructions and most register classes are not supported.
33* MIPS
34* PowerPC (PowerPC64LE only)
35
36Note that not all benchmarking functionality is guaranteed to work on all platforms.
37
38Memory annotations are currently only supported on 64-bit X86. There is no
39inherent limitations for porting memory annotations to other architectures, but
40parts of the test harness are implemented as MCJITed assembly that is generated
41in `./lib/X86/Target.cpp` that would need to be implemented on other architectures
42to bring up support.
43