blob: f14c4f7980ab343c46cc293f81ad59bc38dfe8a8 [file] [log] [blame]
Clement Courbetac74acd2018-04-04 11:37:06 +00001llvm-exegesis - LLVM Machine Instruction Benchmark
2==================================================
3
4SYNOPSIS
5--------
6
7:program:`llvm-exegesis` [*options*]
8
9DESCRIPTION
10-----------
11
12:program:`llvm-exegesis` is a benchmarking tool that uses information available
13in LLVM to measure host machine instruction characteristics like latency or port
14decomposition.
15
16Given an LLVM opcode name and a benchmarking mode, :program:`llvm-exegesis`
17generates a code snippet that makes execution as serial (resp. as parallel) as
18possible so that we can measure the latency (resp. uop decomposition) of the
19instruction.
20The code snippet is jitted and executed on the host subtarget. The time taken
21(resp. resource usage) is measured using hardware performance counters. The
22result is printed out as YAML to the standard output.
23
24The main goal of this tool is to automatically (in)validate the LLVM's TableDef
25scheduling models.
26
27OPTIONS
28-------
29
30.. option:: -help
31
32 Print a summary of command line options.
33
34.. option:: -opcode-index=<LLVM opcode index>
35
36 Specify the opcode to measure, by index.
37 Either `opcode-index` or `opcode-name` must be set.
38
39.. option:: -opcode-name=<LLVM opcode name>
40
41 Specify the opcode to measure, by name.
42 Either `opcode-index` or `opcode-name` must be set.
43
44.. option:: -benchmark-mode=[Latency|Uops]
45
46 Specify which characteristic of the opcode to measure.
47
48.. option:: -num-repetitions=<Number of repetition>
49
50 Specify the number of repetitions of the asm snippet.
51 Higher values lead to more accurate measurements but lengthen the benchmark.
52
53
54EXIT STATUS
55-----------
56
57:program:`llvm-exegesis` returns 0 on success. Otherwise, an error message is
58printed to standard error, and the tool returns a non 0 value.