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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>lli - directly execute programs from LLVM bitcode — 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-as - LLVM assembler" href="llvm-as.html" />
<link rel="prev" title="llc - LLVM static compiler" href="llc.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-as.html" title="llvm-as - LLVM assembler"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="llc.html" title="llc - LLVM static compiler"
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="">lli - directly execute programs from LLVM bitcode</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/lli.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="lli-directly-execute-programs-from-llvm-bitcode">
<h1>lli - directly execute programs from LLVM bitcode<a class="headerlink" href="#lli-directly-execute-programs-from-llvm-bitcode" 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">lli</strong> [<em>options</em>] [<em>filename</em>] [<em>program args</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">lli</strong> directly executes programs in LLVM bitcode format. It takes a program
in LLVM bitcode format and executes it using a just-in-time compiler or an
interpreter.</p>
<p><strong class="program">lli</strong> is <em>not</em> an emulator. It will not execute IR of different architectures
and it can only interpret (or JIT-compile) for the host architecture.</p>
<p>The JIT compiler takes the same arguments as other tools, like <strong class="program">llc</strong>,
but they don’t necessarily work for the interpreter.</p>
<p>If <cite>filename</cite> is not specified, then <strong class="program">lli</strong> reads the LLVM bitcode for the
program from standard input.</p>
<p>The optional <em>args</em> specified on the command line are passed to the program as
arguments.</p>
</div>
<div class="section" id="general-options">
<h2>GENERAL OPTIONS<a class="headerlink" href="#general-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-fake-argv0">
<code class="sig-name descname"><span class="pre">-fake-argv0</span></code><code class="sig-prename descclassname"><span class="pre">=executable</span></code><a class="headerlink" href="#cmdoption-lli-fake-argv0" title="Permalink to this definition">¶</a></dt>
<dd><p>Override the <code class="docutils literal notranslate"><span class="pre">argv[0]</span></code> value passed into the executing program.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-force-interpreter">
<code class="sig-name descname"><span class="pre">-force-interpreter</span></code><code class="sig-prename descclassname"><span class="pre">={false,true}</span></code><a class="headerlink" href="#cmdoption-lli-force-interpreter" title="Permalink to this definition">¶</a></dt>
<dd><p>If set to true, use the interpreter even if a just-in-time compiler is available
for this architecture. Defaults to false.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-help">
<code class="sig-name descname"><span class="pre">-help</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-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-lli-load">
<code class="sig-name descname"><span class="pre">-load</span></code><code class="sig-prename descclassname"><span class="pre">=pluginfilename</span></code><a class="headerlink" href="#cmdoption-lli-load" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">lli</strong> to load the plugin (shared object) named <em>pluginfilename</em> and use
it for optimization.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-stats">
<code class="sig-name descname"><span class="pre">-stats</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-stats" title="Permalink to this definition">¶</a></dt>
<dd><p>Print statistics from the code-generation passes. This is only meaningful for
the just-in-time compiler, at present.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-time-passes">
<code class="sig-name descname"><span class="pre">-time-passes</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-time-passes" title="Permalink to this definition">¶</a></dt>
<dd><p>Record the amount of time needed for each code-generation pass and print it to
standard error.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-version">
<code class="sig-name descname"><span class="pre">-version</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-version" title="Permalink to this definition">¶</a></dt>
<dd><p>Print out the version of <strong class="program">lli</strong> and exit without doing anything else.</p>
</dd></dl>
</div>
<div class="section" id="target-options">
<h2>TARGET OPTIONS<a class="headerlink" href="#target-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-mtriple">
<code class="sig-name descname"><span class="pre">-mtriple</span></code><code class="sig-prename descclassname"><span class="pre">=target</span> <span class="pre">triple</span></code><a class="headerlink" href="#cmdoption-lli-mtriple" title="Permalink to this definition">¶</a></dt>
<dd><p>Override the target triple specified in the input bitcode file with the
specified string. This may result in a crash if you pick an
architecture which is not compatible with the current system.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-march">
<code class="sig-name descname"><span class="pre">-march</span></code><code class="sig-prename descclassname"><span class="pre">=arch</span></code><a class="headerlink" href="#cmdoption-lli-march" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the architecture for which to generate assembly, overriding the target
encoded in the bitcode file. See the output of <strong>llc -help</strong> for a list of
valid architectures. By default this is inferred from the target triple or
autodetected to the current architecture.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-mcpu">
<code class="sig-name descname"><span class="pre">-mcpu</span></code><code class="sig-prename descclassname"><span class="pre">=cpuname</span></code><a class="headerlink" href="#cmdoption-lli-mcpu" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify a specific chip in the current architecture to generate code for.
By default this is inferred from the target triple and autodetected to
the current architecture. For a list of available CPUs, use:
<strong>llvm-as < /dev/null | llc -march=xyz -mcpu=help</strong></p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-mattr">
<code class="sig-name descname"><span class="pre">-mattr</span></code><code class="sig-prename descclassname"><span class="pre">=a1,+a2,-a3,...</span></code><a class="headerlink" href="#cmdoption-lli-mattr" title="Permalink to this definition">¶</a></dt>
<dd><p>Override or control specific attributes of the target, such as whether SIMD
operations are enabled or not. The default set of attributes is set by the
current CPU. For a list of available attributes, use:
<strong>llvm-as < /dev/null | llc -march=xyz -mattr=help</strong></p>
</dd></dl>
</div>
<div class="section" id="floating-point-options">
<h2>FLOATING POINT OPTIONS<a class="headerlink" href="#floating-point-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-disable-excess-fp-precision">
<code class="sig-name descname"><span class="pre">-disable-excess-fp-precision</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-disable-excess-fp-precision" title="Permalink to this definition">¶</a></dt>
<dd><p>Disable optimizations that may increase floating point precision.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-enable-no-infs-fp-math">
<code class="sig-name descname"><span class="pre">-enable-no-infs-fp-math</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-enable-no-infs-fp-math" title="Permalink to this definition">¶</a></dt>
<dd><p>Enable optimizations that assume no Inf values.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-enable-no-nans-fp-math">
<code class="sig-name descname"><span class="pre">-enable-no-nans-fp-math</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-enable-no-nans-fp-math" title="Permalink to this definition">¶</a></dt>
<dd><p>Enable optimizations that assume no NAN values.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-enable-unsafe-fp-math">
<code class="sig-name descname"><span class="pre">-enable-unsafe-fp-math</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-enable-unsafe-fp-math" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">lli</strong> to enable optimizations that may decrease floating point
precision.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-soft-float">
<code class="sig-name descname"><span class="pre">-soft-float</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-soft-float" title="Permalink to this definition">¶</a></dt>
<dd><p>Causes <strong class="program">lli</strong> to generate software floating point library calls instead of
equivalent hardware instructions.</p>
</dd></dl>
</div>
<div class="section" id="code-generation-options">
<h2>CODE GENERATION OPTIONS<a class="headerlink" href="#code-generation-options" title="Permalink to this headline">¶</a></h2>
<dl class="std option">
<dt id="cmdoption-lli-code-model">
<code class="sig-name descname"><span class="pre">-code-model</span></code><code class="sig-prename descclassname"><span class="pre">=model</span></code><a class="headerlink" href="#cmdoption-lli-code-model" title="Permalink to this definition">¶</a></dt>
<dd><p>Choose the code model from:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>default: Target default code model
tiny: Tiny code model
small: Small code model
kernel: Kernel code model
medium: Medium code model
large: Large code model
</pre></div>
</div>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-disable-post-RA-scheduler">
<span id="cmdoption-lli-disable-post-ra-scheduler"></span><code class="sig-name descname"><span class="pre">-disable-post-RA-scheduler</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-disable-post-RA-scheduler" title="Permalink to this definition">¶</a></dt>
<dd><p>Disable scheduling after register allocation.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-disable-spill-fusing">
<code class="sig-name descname"><span class="pre">-disable-spill-fusing</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-disable-spill-fusing" title="Permalink to this definition">¶</a></dt>
<dd><p>Disable fusing of spill code into instructions.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-jit-enable-eh">
<code class="sig-name descname"><span class="pre">-jit-enable-eh</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-jit-enable-eh" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception handling should be enabled in the just-in-time compiler.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-join-liveintervals">
<code class="sig-name descname"><span class="pre">-join-liveintervals</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-join-liveintervals" title="Permalink to this definition">¶</a></dt>
<dd><p>Coalesce copies (default=true).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-nozero-initialized-in-bss">
<code class="sig-name descname"><span class="pre">-nozero-initialized-in-bss</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-nozero-initialized-in-bss" title="Permalink to this definition">¶</a></dt>
<dd><p>Don’t place zero-initialized symbols into the BSS section.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-pre-RA-sched">
<span id="cmdoption-lli-pre-ra-sched"></span><code class="sig-name descname"><span class="pre">-pre-RA-sched</span></code><code class="sig-prename descclassname"><span class="pre">=scheduler</span></code><a class="headerlink" href="#cmdoption-lli-pre-RA-sched" title="Permalink to this definition">¶</a></dt>
<dd><p>Instruction schedulers available (before register allocation):</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=default: Best scheduler for the target
=none: No scheduling: breadth first sequencing
=simple: Simple two pass scheduling: minimize critical path and maximize processor utilization
=simple-noitin: Simple two pass scheduling: Same as simple except using generic latency
=list-burr: Bottom-up register reduction list scheduling
=list-tdrr: Top-down register reduction list scheduling
=list-td: Top-down list scheduler
</pre></div>
</div>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-regalloc">
<code class="sig-name descname"><span class="pre">-regalloc</span></code><code class="sig-prename descclassname"><span class="pre">=allocator</span></code><a class="headerlink" href="#cmdoption-lli-regalloc" title="Permalink to this definition">¶</a></dt>
<dd><p>Register allocator to use (default=linearscan)</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=bigblock: Big-block register allocator
=linearscan: linear scan register allocator =local - local register allocator
=simple: simple register allocator
</pre></div>
</div>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-relocation-model">
<code class="sig-name descname"><span class="pre">-relocation-model</span></code><code class="sig-prename descclassname"><span class="pre">=model</span></code><a class="headerlink" href="#cmdoption-lli-relocation-model" title="Permalink to this definition">¶</a></dt>
<dd><p>Choose relocation model from:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=default: Target default relocation model
=static: Non-relocatable code =pic - Fully relocatable, position independent code
=dynamic-no-pic: Relocatable external references, non-relocatable code
</pre></div>
</div>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-spiller">
<code class="sig-name descname"><span class="pre">-spiller</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-lli-spiller" title="Permalink to this definition">¶</a></dt>
<dd><p>Spiller to use (default=local)</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=simple: simple spiller
=local: local spiller
</pre></div>
</div>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-lli-x86-asm-syntax">
<code class="sig-name descname"><span class="pre">-x86-asm-syntax</span></code><code class="sig-prename descclassname"><span class="pre">=syntax</span></code><a class="headerlink" href="#cmdoption-lli-x86-asm-syntax" title="Permalink to this definition">¶</a></dt>
<dd><p>Choose style of code to emit from X86 backend:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>=att: Emit AT&T-style assembly
=intel: Emit Intel-style assembly
</pre></div>
</div>
</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>If <strong class="program">lli</strong> fails to load the program, it will exit with an exit code of 1.
Otherwise, it will return the exit code of the program it executes.</p>
</div>
<div class="section" id="see-also">
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<p><em class="manpage"><a class="manpage reference external" href="https://llvm.org/docs/CommandGuide/llc.html">llc(1)</a></em></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-as.html" title="llvm-as - LLVM assembler"
>next</a> |</li>
<li class="right" >
<a href="llc.html" title="llc - LLVM static compiler"
>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="">lli - directly execute programs from LLVM bitcode</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>
|