LLVM-EXEGESIS(1) LLVM LLVM-EXEGESIS(1) (NAME) llvm-exegesis - LLVM (SYNOPSIS) llvm-exegesis [options] (DESCRIPTION) llvm-exegesis () LLVM (latency) (throughput) (port decomposition) . (opcode) LLVM llvm-exegesis ( ) ( / uop) . (JIT) (subtarget) . ( ) (performance counters) . YAML . ( ) TableDef LLVM . . llvm-exegesis . (SUPPORTED PLATFORMS) llvm-exegesis X86 ( ) ARM ( AArch64 ) MIPS PowerPC ( PowerPC64LE) RISC-V ( RV64I/E RV32I/E) . . llvm-exegesis LLVM . llvm-exegesis LLVM LLVM_ENABLE_LIBPFM llvm-exegesis libpfm4 . libpfm . LIBPFM_VERBOSE LIBPFM_DEBUG (verbose) (debug) libpfm . libpfm LLVM LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH . LD_LIBRARY_PATH llvm-exegesis libpfm . (SNIPPET ANNOTATIONS) llvm-exegesis . . llvm-exegesis (annotation) . o LLVM-EXEGESIS-DEFREG - (register) . (hex) . LLVM-EXEGESIS-DEFREG . . (sign extended) . o LLVM-EXEGESIS-LIVEIN - . . LLVM-EXEGESIS-LIVEIN : o (Scratch memory register) - ( X86 Linux RDI ). live in ( ) . o LLVM-EXEGESIS-MEM-DEF - LLVM-EXEGESIS-MEM-MAP (map) . . () () . . (subprocess execution mode) . o LLVM-EXEGESIS-MEM-MAP
- (execution context) . . . . o LLVM-EXEGESIS-SNIPPET-ADDRESS
- . () . . . RIP (RIP-relative addressing). o LLVM-EXEGESIS-LOOP-REGISTER - (loop repetition mode) . llvm-exegesis ( ) . ( R8 X86) . . X86-64 . (latency) : $ llvm-exegesis --mode=latency --opcode-name=ADD64rr uop (inverse throughput) : $ llvm-exegesis --mode=uops --opcode-name=ADD64rr $ llvm-exegesis --mode=inverse_throughput --opcode-name=ADD64rr YAML ( stdout --benchmarks-file ): --- key: opcode_name: ADD64rr mode: latency config: '' cpu_name: haswell llvm_triple: x86_64-unknown-linux-gnu num_repetitions: 10000 measurements: - { key: latency, value: 1.0058, debug_string: '' } error: '' info: 'explicit self cycles, selecting one aliasing configuration. Snippet: ADD64rr R8, R8, R10 ' ... : $ llvm-exegesis --mode=latency --opcode-index=-1 : (EXAMPLE 2: BENCHMARKING A CUSTOM CODE SNIPPET) /uops snippets-file (- ). $ echo "vzeroupper" | llvm-exegesis --mode=uops --snippets-file=- . llvm-exegesis (liveliness) ( (def) "live in" ). (snippet annotations) . XMM1 ( ) RDI ( live in) . # LLVM-EXEGESIS-LIVEIN RDI # LLVM-EXEGESIS-DEFREG XMM1 42 vmulps (%rdi), %xmm1, %xmm2 vhaddps %xmm2, %xmm2, %xmm3 addq $0x10, %rdi (crash) . LLVM-EXEGESIS-MEM-DEF LLVM-EXEGESIS-MEM-MAP . : movq $8192, %rax movq (%rax), %rdi 0x2000 . : # LLVM-EXEGESIS-MEM-DEF test1 4096 7fffffff # LLVM-EXEGESIS-MEM-MAP test1 8192 movq $8192, %rax movq (%rax), %rdi : (EXAMPLE 4: ANALYSIS) ( latency uops) YAML /tmp/benchmarks.yaml : $ llvm-exegesis --mode=analysis \ --benchmarks-file=/tmp/benchmarks.yaml \ --analysis-clusters-output-file=/tmp/clusters.csv \ --analysis-inconsistencies-output-file=/tmp/inconsistencies.html . /tmp/clusters.csv : cluster_id,opcode_name,config,sched_class ... 2,ADD32ri8_DB,,WriteALU,1.00 2,ADD32ri_DB,,WriteALU,1.01 2,ADD32rr,,WriteALU,1.01 2,ADD32rr_DB,,WriteALU,1.00 2,ADD32rr_REV,,WriteALU,1.00 2,ADD64i32,,WriteALU,1.01 2,ADD64ri32,,WriteALU,1.01 2,MOVSX64rr32,,BSWAP32r_BSWAP64r_MOVSX64rr32,1.00 2,VPADDQYrr,,VPADDBYrr_VPADDDYrr_VPADDQYrr_VPADDWYrr_VPSUBBYrr_VPSUBDYrr_VPSUBQYrr_VPSUBWYrr,1.02 2,VPSUBQYrr,,VPADDBYrr_VPADDDYrr_VPADDQYrr_VPADDWYrr_VPSUBBYrr_VPSUBDYrr_VPSUBQYrr_VPSUBWYrr,1.01 2,ADD64ri8,,WriteALU,1.00 2,SETBr,,WriteSETCC,1.01 ... llvm-exegesis (scheduling) . html . /tmp/inconsistencies.html : [] llvm-exegesis (debug) (class id) . ..SH " (OPTIONS)" --help . --opcode-index= opcode . -1 opcode . . opcode-index opcode-name snippets-file . --opcode-name=,,... opcode . opcode . . opcode-index opcode-name snippets-file . --snippets-file= . . opcode-index opcode-name snippets-file . --mode=[latency|uops|inverse_throughput|analysis] . . latency RDTSC LBR . latency[LBR] X86 ( Skylake) . latency x86-lbr-sample-period --repetition-mode=loop . analysis -analysis-clusters-output-file= -analysis-inconsistencies-output-file= . --benchmark-phase=[prepare-snippet|prepare-and-assemble-snippet|assemble-measured-code|measure] -mode= . . : * prepare-snippet: . * prepare-and-assemble-snippet: prepare-snippet (hex encoded) . * assemble-measured-code: prepare-and-assemble-snippet --dump-object-to-disk . * measure: assemble-measured-code . --x86-lbr-sample-period= LBR - . latency LBR . "" (throttling) . . --x86-disable-upper-sse-registers xmm ( xmm8-xmm15) (fetch) (decode) frontend (dispatch) backend . frontend (latency) (throughput) . --repetition-mode=[duplicate|loop|min|middle-half-duplicate|middle-half-loop] . duplicate (basic block) min-instructions ( min-instructions/snippet size ). loop loop-body-size min-instructions ( min-instructions/snippet size ). loop (loop unrolling) frontend . opcode min . middle half . (overhead) . --min-instructions= . min-instructions/snippet size . . --loop-body-size= -repetition-mode=[loop|min] . . (Op Cache / Loop Cache) . --max-configs-per-opcode= opcode . 1 opcode . LEA X86 (immediates) . 1 -max-configs-per-opcode llvm-exegesis . --benchmarks-file= ( analysis) ( latency/uops/inverse_throughput) . "-" stdin/stdout . --analysis-clusters-output-file= CSV . "-" stdout . . --analysis-inconsistencies-output-file= . - stdout . . --analysis-filter=[all|reg-only|mem-only] . ( ) . --analysis-clustering=[dbscan,naive] . DBSCAN . Naive -analysis-inconsistencies-output-file= opcode ( ). --analysis-numpoints= numPoints DBSCAN ( analysis DBSCAN). --analysis-clustering-epsilon= epsilon ( analysis). --analysis-inconsistency-epsilon= epsilon LLVM ( analysis). --analysis-display-unstable-clusters opcode . opcode . opcode . --ignore-invalid-sched-class=false (sched class) (class idx = 0) . --mtriple= (Target triple). -version . --mcpu= . ( LLVM ) . ( -mcpu=help ) --analysis-override-benchmark-triple-and-cpu llvm-exegesis (benchmarks) / ( -mtriple/-mcpu ) . --dump-object-to-disk= llvm-exegesis . . --use-dummy-perf-counters llvm-exegesis . (snippet) llvm-exegesis . --execution-mode=[inprocess,subprocess] . inprocess . subprocess (memory annotations) X86-64 . --benchmark-repeat-count= (latency) . llvm-exegesis . --validation-counter=[instructions-retired,l1d-cache-load-misses, l1d-cache-store-misses,l1i-cache-load-misses,data-tlb-load-misses, data-tld-store-misses,instruction-tlb-load-misses] (cache misses) . perf . . . --benchmark-process-cpu= . llvm-exegesis (affinity) . subprocess . (EXIT STATUS) llvm-exegesis 0 . 0 . (AUTHORS) LLVM (https://llvm.org)..SH " (COPYRIGHT)" 2003-2026, LLVM Project 22 2026-07-15 LLVM-EXEGESIS(1)