1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>llvm-exegesis - LLVM Machine Instruction Benchmark — LLVM 13 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="llvm-locstats - calculate statistics on DWARF debug location" href="llvm-locstats.html" />
<link rel="prev" title="lit - LLVM Integrated Tester" href="lit.html" />
<style type="text/css">
table.right { float: right; margin-left: 20px; }
table.right td { border: 1px solid #ccc; }
</style>
</head><body>
<div class="logo">
<a href="../index.html">
<img src="../_static/logo.png"
alt="LLVM Logo" width="250" height="88"/></a>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="llvm-locstats.html" title="llvm-locstats - calculate statistics on DWARF debug location"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="lit.html" title="lit - LLVM Integrated Tester"
accesskey="P">previous</a> |</li>
<li><a href="https://llvm.org/">LLVM Home</a> | </li>
<li><a href="../index.html">Documentation</a>»</li>
<li class="nav-item nav-item-1"><a href="../Reference.html" >Reference</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">LLVM Command Guide</a> »</li>
<li class="nav-item nav-item-this"><a href="">llvm-exegesis - LLVM Machine Instruction Benchmark</a></li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3>Documentation</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/GettingStartedTutorials.html">Getting Started/Tutorials</a></li>
<li><a href="https://llvm.org/docs/UserGuides.html">User Guides</a></li>
<li><a href="https://llvm.org/docs/Reference.html">Reference</a></li>
</ul>
<h3>Getting Involved</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/Contributing.html">Contributing to LLVM</a></li>
<li><a href="https://llvm.org/docs/HowToSubmitABug.html">Submitting Bug Reports</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#mailing-lists">Mailing Lists</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#irc">IRC</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#meetups-and-social-events">Meetups and Social Events</a></li>
</ul>
<h3>Additional Links</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/FAQ.html">FAQ</a></li>
<li><a href="https://llvm.org/docs/Lexicon.html">Glossary</a></li>
<li><a href="https://llvm.org/pubs">Publications</a></li>
<li><a href="https://github.com/llvm/llvm-project//">Github Repository</a></li>
</ul>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/CommandGuide/llvm-exegesis.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="llvm-exegesis-llvm-machine-instruction-benchmark">
<h1>llvm-exegesis - LLVM Machine Instruction Benchmark<a class="headerlink" href="#llvm-exegesis-llvm-machine-instruction-benchmark" title="Permalink to this headline">¶</a></h1>
<div class="section" id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-exegesis</strong> [<em>options</em>]</p>
</div>
<div class="section" id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-exegesis</strong> is a benchmarking tool that uses information available
in LLVM to measure host machine instruction characteristics like latency,
throughput, or port decomposition.</p>
<p>Given an LLVM opcode name and a benchmarking mode, <strong class="program">llvm-exegesis</strong>
generates a code snippet that makes execution as serial (resp. as parallel) as
possible so that we can measure the latency (resp. inverse throughput/uop decomposition)
of the instruction.
The code snippet is jitted and executed on the host subtarget. The time taken
(resp. resource usage) is measured using hardware performance counters. The
result is printed out as YAML to the standard output.</p>
<p>The main goal of this tool is to automatically (in)validate the LLVM’s TableDef
scheduling models. To that end, we also provide analysis of the results.</p>
<p><strong class="program">llvm-exegesis</strong> can also benchmark arbitrary user-provided code
snippets.</p>
</div>
<div class="section" id="example-1-benchmarking-instructions">
<h2>EXAMPLE 1: benchmarking instructions<a class="headerlink" href="#example-1-benchmarking-instructions" title="Permalink to this headline">¶</a></h2>
<p>Assume you have an X86-64 machine. To measure the latency of a single
instruction, run:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ llvm-exegesis -mode<span class="o">=</span>latency -opcode-name<span class="o">=</span>ADD64rr
</pre></div>
</div>
<p>Measuring the uop decomposition or inverse throughput of an instruction works similarly:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ llvm-exegesis -mode<span class="o">=</span>uops -opcode-name<span class="o">=</span>ADD64rr
$ llvm-exegesis -mode<span class="o">=</span>inverse_throughput -opcode-name<span class="o">=</span>ADD64rr
</pre></div>
</div>
<p>The output is a YAML document (the default is to write to stdout, but you can
redirect the output to a file using <cite>-benchmarks-file</cite>):</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>---
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
'
...
</pre></div>
</div>
<p>To measure the latency of all instructions for the host architecture, run:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ llvm-exegesis -mode<span class="o">=</span>latency -opcode-index<span class="o">=</span>-1
</pre></div>
</div>
</div>
<div class="section" id="example-2-benchmarking-a-custom-code-snippet">
<h2>EXAMPLE 2: benchmarking a custom code snippet<a class="headerlink" href="#example-2-benchmarking-a-custom-code-snippet" title="Permalink to this headline">¶</a></h2>
<p>To measure the latency/uops of a custom piece of code, you can specify the
<cite>snippets-file</cite> option (<cite>-</cite> reads from standard input).</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">echo</span> <span class="s2">"vzeroupper"</span> <span class="p">|</span> llvm-exegesis -mode<span class="o">=</span>uops -snippets-file<span class="o">=</span>-
</pre></div>
</div>
<p>Real-life code snippets typically depend on registers or memory.
<strong class="program">llvm-exegesis</strong> checks the liveliness of registers (i.e. any register
use has a corresponding def or is a “live in”). If your code depends on the
value of some registers, you have two options:</p>
<ul class="simple">
<li><p>Mark the register as requiring a definition. <strong class="program">llvm-exegesis</strong> will
automatically assign a value to the register. This can be done using the
directive <cite>LLVM-EXEGESIS-DEFREG <reg name> <hex_value></cite>, where <cite><hex_value></cite>
is a bit pattern used to fill <cite><reg_name></cite>. If <cite><hex_value></cite> is smaller than
the register width, it will be sign-extended.</p></li>
<li><p>Mark the register as a “live in”. <strong class="program">llvm-exegesis</strong> will benchmark
using whatever value was in this registers on entry. This can be done using
the directive <cite>LLVM-EXEGESIS-LIVEIN <reg name></cite>.</p></li>
</ul>
<p>For example, the following code snippet depends on the values of XMM1 (which
will be set by the tool) and the memory buffer passed in RDI (live in).</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span># LLVM-EXEGESIS-LIVEIN RDI
# LLVM-EXEGESIS-DEFREG XMM1 42
vmulps (%rdi), %xmm1, %xmm2
vhaddps %xmm2, %xmm2, %xmm3
addq $0x10, %rdi
</pre></div>
</div>
</div>
<div class="section" id="example-3-analysis">
<h2>EXAMPLE 3: analysis<a class="headerlink" href="#example-3-analysis" title="Permalink to this headline">¶</a></h2>
<p>Assuming you have a set of benchmarked instructions (either latency or uops) as
YAML in file <cite>/tmp/benchmarks.yaml</cite>, you can analyze the results using the
following command:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> $ llvm-exegesis -mode<span class="o">=</span>analysis <span class="se">\</span>
-benchmarks-file<span class="o">=</span>/tmp/benchmarks.yaml <span class="se">\</span>
-analysis-clusters-output-file<span class="o">=</span>/tmp/clusters.csv <span class="se">\</span>
-analysis-inconsistencies-output-file<span class="o">=</span>/tmp/inconsistencies.html
</pre></div>
</div>
<p>This will group the instructions into clusters with the same performance
characteristics. The clusters will be written out to <cite>/tmp/clusters.csv</cite> in the
following format:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>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
...
</pre></div>
</div>
<p><strong class="program">llvm-exegesis</strong> will also analyze the clusters to point out
inconsistencies in the scheduling information. The output is an html file. For
example, <cite>/tmp/inconsistencies.html</cite> will contain messages like the following :</p>
<img alt="../_images/llvm-exegesis-analysis.png" class="align-center" src="../_images/llvm-exegesis-analysis.png" />
<p>Note that the scheduling class names will be resolved only when
<strong class="program">llvm-exegesis</strong> is compiled in debug mode, else only the class id will
be shown. This does not invalidate any of the analysis results though.</p>
</div>
<div class="section" id="options">
<h2>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-help">
<code class="sig-name descname"><span class="pre">-help</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-exegesis-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a summary of command line options.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-opcode-index">
<code class="sig-name descname"><span class="pre">-opcode-index</span></code><code class="sig-prename descclassname"><span class="pre">=<LLVM</span> <span class="pre">opcode</span> <span class="pre">index></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-opcode-index" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the opcode to measure, by index. Specifying <cite>-1</cite> will result
in measuring every existing opcode. See example 1 for details.
Either <cite>opcode-index</cite>, <cite>opcode-name</cite> or <cite>snippets-file</cite> must be set.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-opcode-name">
<code class="sig-name descname"><span class="pre">-opcode-name</span></code><code class="sig-prename descclassname"><span class="pre">=<opcode</span> <span class="pre">name</span> <span class="pre">1>,<opcode</span> <span class="pre">name</span> <span class="pre">2>,...</span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-opcode-name" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the opcode to measure, by name. Several opcodes can be specified as
a comma-separated list. See example 1 for details.
Either <cite>opcode-index</cite>, <cite>opcode-name</cite> or <cite>snippets-file</cite> must be set.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-snippets-file">
<code class="sig-name descname"><span class="pre">-snippets-file</span></code><code class="sig-prename descclassname"><span class="pre">=<filename></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-snippets-file" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the custom code snippet to measure. See example 2 for details.
Either <cite>opcode-index</cite>, <cite>opcode-name</cite> or <cite>snippets-file</cite> must be set.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-mode">
<code class="sig-name descname"><span class="pre">-mode</span></code><code class="sig-prename descclassname"><span class="pre">=[latency|uops|inverse_throughput|analysis]</span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the run mode. Note that some modes have additional requirements and options.</p>
<p><cite>latency</cite> mode can be make use of either RDTSC or LBR.
<cite>latency[LBR]</cite> is only available on X86 (at least <cite>Skylake</cite>).
To run in <cite>latency</cite> mode, a positive value must be specified
for <cite>x86-lbr-sample-period</cite> and <cite>–repetition-mode=loop</cite>.</p>
<p>In <cite>analysis</cite> mode, you also need to specify at least one of the
<cite>-analysis-clusters-output-file=</cite> and <cite>-analysis-inconsistencies-output-file=</cite>.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-x86-lbr-sample-period">
<code class="sig-name descname"><span class="pre">-x86-lbr-sample-period</span></code><code class="sig-prename descclassname"><span class="pre">=<nBranches/sample></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-x86-lbr-sample-period" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the LBR sampling period - how many branches before we take a sample.
When a positive value is specified for this option and when the mode is <cite>latency</cite>,
we will use LBRs for measuring.
On choosing the “right” sampling period, a small value is preferred, but throttling
could occur if the sampling is too frequent. A prime number should be used to
avoid consistently skipping certain blocks.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-repetition-mode">
<code class="sig-name descname"><span class="pre">-repetition-mode</span></code><code class="sig-prename descclassname"><span class="pre">=[duplicate|loop|min]</span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-repetition-mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the repetition mode. <cite>duplicate</cite> will create a large, straight line
basic block with <cite>num-repetitions</cite> instructions (repeating the snippet
<cite>num-repetitions</cite>/<cite>snippet size</cite> times). <cite>loop</cite> will, optionally, duplicate the
snippet until the loop body contains at least <cite>loop-body-size</cite> instructions,
and then wrap the result in a loop which will execute <cite>num-repetitions</cite>
instructions (thus, again, repeating the snippet
<cite>num-repetitions</cite>/<cite>snippet size</cite> times). The <cite>loop</cite> mode, especially with loop
unrolling tends to better hide the effects of the CPU frontend on architectures
that cache decoded instructions, but consumes a register for counting
iterations. If performing an analysis over many opcodes, it may be best to
instead use the <cite>min</cite> mode, which will run each other mode,
and produce the minimal measured result.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-num-repetitions">
<code class="sig-name descname"><span class="pre">-num-repetitions</span></code><code class="sig-prename descclassname"><span class="pre">=<Number</span> <span class="pre">of</span> <span class="pre">repetitions></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-num-repetitions" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the target number of executed instructions. Note that the actual
repetition count of the snippet will be <cite>num-repetitions</cite>/<cite>snippet size</cite>.
Higher values lead to more accurate measurements but lengthen the benchmark.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-loop-body-size">
<code class="sig-name descname"><span class="pre">-loop-body-size</span></code><code class="sig-prename descclassname"><span class="pre">=<Preferred</span> <span class="pre">loop</span> <span class="pre">body</span> <span class="pre">size></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-loop-body-size" title="Permalink to this definition">¶</a></dt>
<dd><p>Only effective for <cite>-repetition-mode=[loop|min]</cite>.
Instead of looping over the snippet directly, first duplicate it so that the
loop body contains at least this many instructions. This potentially results
in loop body being cached in the CPU Op Cache / Loop Cache, which allows to
which may have higher throughput than the CPU decoders.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-max-configs-per-opcode">
<code class="sig-name descname"><span class="pre">-max-configs-per-opcode</span></code><code class="sig-prename descclassname"><span class="pre">=<value></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-max-configs-per-opcode" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the maximum configurations that can be generated for each opcode.
By default this is <cite>1</cite>, meaning that we assume that a single measurement is
enough to characterize an opcode. This might not be true of all instructions:
for example, the performance characteristics of the LEA instruction on X86
depends on the value of assigned registers and immediates. Setting a value of
<cite>-max-configs-per-opcode</cite> larger than <cite>1</cite> allows <cite>llvm-exegesis</cite> to explore
more configurations to discover if some register or immediate assignments
lead to different performance characteristics.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-benchmarks-file">
<code class="sig-name descname"><span class="pre">-benchmarks-file</span></code><code class="sig-prename descclassname"><span class="pre">=</path/to/file></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-benchmarks-file" title="Permalink to this definition">¶</a></dt>
<dd><p>File to read (<cite>analysis</cite> mode) or write (<cite>latency</cite>/<cite>uops</cite>/<cite>inverse_throughput</cite>
modes) benchmark results. “-” uses stdin/stdout.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-analysis-clusters-output-file">
<code class="sig-name descname"><span class="pre">-analysis-clusters-output-file</span></code><code class="sig-prename descclassname"><span class="pre">=</path/to/file></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-analysis-clusters-output-file" title="Permalink to this definition">¶</a></dt>
<dd><p>If provided, write the analysis clusters as CSV to this file. “-” prints to
stdout. By default, this analysis is not run.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-analysis-inconsistencies-output-file">
<code class="sig-name descname"><span class="pre">-analysis-inconsistencies-output-file</span></code><code class="sig-prename descclassname"><span class="pre">=</path/to/file></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-analysis-inconsistencies-output-file" title="Permalink to this definition">¶</a></dt>
<dd><p>If non-empty, write inconsistencies found during analysis to this file. <cite>-</cite>
prints to stdout. By default, this analysis is not run.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-analysis-clustering">
<code class="sig-name descname"><span class="pre">-analysis-clustering</span></code><code class="sig-prename descclassname"><span class="pre">=[dbscan,naive]</span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-analysis-clustering" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the clustering algorithm to use. By default DBSCAN will be used.
Naive clustering algorithm is better for doing further work on the
<cite>-analysis-inconsistencies-output-file=</cite> output, it will create one cluster
per opcode, and check that the cluster is stable (all points are neighbours).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-analysis-numpoints">
<code class="sig-name descname"><span class="pre">-analysis-numpoints</span></code><code class="sig-prename descclassname"><span class="pre">=<dbscan</span> <span class="pre">numPoints</span> <span class="pre">parameter></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-analysis-numpoints" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the numPoints parameters to be used for DBSCAN clustering
(<cite>analysis</cite> mode, DBSCAN only).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-analysis-clustering-epsilon">
<code class="sig-name descname"><span class="pre">-analysis-clustering-epsilon</span></code><code class="sig-prename descclassname"><span class="pre">=<dbscan</span> <span class="pre">epsilon</span> <span class="pre">parameter></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-analysis-clustering-epsilon" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the epsilon parameter used for clustering of benchmark points
(<cite>analysis</cite> mode).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-analysis-inconsistency-epsilon">
<code class="sig-name descname"><span class="pre">-analysis-inconsistency-epsilon</span></code><code class="sig-prename descclassname"><span class="pre">=<epsilon></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-analysis-inconsistency-epsilon" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the epsilon parameter used for detection of when the cluster
is different from the LLVM schedule profile values (<cite>analysis</cite> mode).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-analysis-display-unstable-clusters">
<code class="sig-name descname"><span class="pre">-analysis-display-unstable-clusters</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-exegesis-analysis-display-unstable-clusters" title="Permalink to this definition">¶</a></dt>
<dd><p>If there is more than one benchmark for an opcode, said benchmarks may end up
not being clustered into the same cluster if the measured performance
characteristics are different. by default all such opcodes are filtered out.
This flag will instead show only such unstable opcodes.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-ignore-invalid-sched-class">
<code class="sig-name descname"><span class="pre">-ignore-invalid-sched-class</span></code><code class="sig-prename descclassname"><span class="pre">=false</span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-ignore-invalid-sched-class" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, ignore instructions that do not have a sched class (class idx = 0).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-mcpu">
<code class="sig-name descname"><span class="pre">-mcpu</span></code><code class="sig-prename descclassname"><span class="pre">=<cpu</span> <span class="pre">name></span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-mcpu" title="Permalink to this definition">¶</a></dt>
<dd><p>If set, measure the cpu characteristics using the counters for this CPU. This
is useful when creating new sched models (the host CPU is unknown to LLVM).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-exegesis-dump-object-to-disk">
<code class="sig-name descname"><span class="pre">--dump-object-to-disk</span></code><code class="sig-prename descclassname"><span class="pre">=true</span></code><a class="headerlink" href="#cmdoption-llvm-exegesis-dump-object-to-disk" title="Permalink to this definition">¶</a></dt>
<dd><p>By default, llvm-exegesis will dump the generated code to a temporary file to
enable code inspection. You may disable it to speed up the execution and save
disk space.</p>
</dd></dl>
</div>
<div class="section" id="exit-status">
<h2>EXIT STATUS<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-exegesis</strong> returns 0 on success. Otherwise, an error message is
printed to standard error, and the tool returns a non 0 value.</p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="llvm-locstats.html" title="llvm-locstats - calculate statistics on DWARF debug location"
>next</a> |</li>
<li class="right" >
<a href="lit.html" title="lit - LLVM Integrated Tester"
>previous</a> |</li>
<li><a href="https://llvm.org/">LLVM Home</a> | </li>
<li><a href="../index.html">Documentation</a>»</li>
<li class="nav-item nav-item-1"><a href="../Reference.html" >Reference</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" >LLVM Command Guide</a> »</li>
<li class="nav-item nav-item-this"><a href="">llvm-exegesis - LLVM Machine Instruction Benchmark</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2003-2021, LLVM Project.
Last updated on 2021-09-18.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.5.4.
</div>
</body>
</html>
|