Clement Courbet | ac74acd | 2018-04-04 11:37:06 +0000 | [diff] [blame] | 1 | llvm-exegesis - LLVM Machine Instruction Benchmark |
| 2 | ================================================== |
| 3 | |
| 4 | SYNOPSIS |
| 5 | -------- |
| 6 | |
| 7 | :program:`llvm-exegesis` [*options*] |
| 8 | |
| 9 | DESCRIPTION |
| 10 | ----------- |
| 11 | |
| 12 | :program:`llvm-exegesis` is a benchmarking tool that uses information available |
| 13 | in LLVM to measure host machine instruction characteristics like latency or port |
| 14 | decomposition. |
| 15 | |
| 16 | Given an LLVM opcode name and a benchmarking mode, :program:`llvm-exegesis` |
| 17 | generates a code snippet that makes execution as serial (resp. as parallel) as |
| 18 | possible so that we can measure the latency (resp. uop decomposition) of the |
| 19 | instruction. |
| 20 | The code snippet is jitted and executed on the host subtarget. The time taken |
| 21 | (resp. resource usage) is measured using hardware performance counters. The |
| 22 | result is printed out as YAML to the standard output. |
| 23 | |
| 24 | The main goal of this tool is to automatically (in)validate the LLVM's TableDef |
| 25 | scheduling models. |
| 26 | |
| 27 | OPTIONS |
| 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 | |
| 54 | EXIT STATUS |
| 55 | ----------- |
| 56 | |
| 57 | :program:`llvm-exegesis` returns 0 on success. Otherwise, an error message is |
| 58 | printed to standard error, and the tool returns a non 0 value. |