blob: d7a2ad4fcc0300a3e795ed1a5af797f75c24df26 [file] [log] [blame]
John Criswellecf32e52003-09-11 19:58:03 +00001<html>
2<title>
Chris Lattneree43b692003-09-25 19:50:05 +00003LLVM: lli tool
John Criswellecf32e52003-09-11 19:58:03 +00004</title>
5
Chris Lattner08a04fd2003-10-07 20:12:05 +00006<body bgcolor=white>
John Criswellecf32e52003-09-11 19:58:03 +00007
8<center>
Chris Lattner090fcc12003-10-07 19:46:37 +00009<h1>LLVM: <tt>lli</tt> tool</h1>
John Criswellecf32e52003-09-11 19:58:03 +000010</center>
11<HR>
12
13<h3>
14NAME
15</h3>
16
Chris Lattner090fcc12003-10-07 19:46:37 +000017<tt>lli</tt>
John Criswellecf32e52003-09-11 19:58:03 +000018
19<h3>
20SYNOPSIS
21</h3>
22
Chris Lattner090fcc12003-10-07 19:46:37 +000023<tt>lli [options] [filename] [args ...]</tt>
John Criswellecf32e52003-09-11 19:58:03 +000024<h3>
25DESCRIPTION
26</h3>
27
Brian Gaeke51b2ab82003-10-19 18:03:11 +000028<tt>lli</tt> directly executes programs in LLVM format.
29It takes a program in LLVM
30bytecode format and executes it using a just-in-time
31compiler, if one is available for the current architecture, or an interpreter.
32<tt>lli</tt> takes all of the same code generator options as the
33<tt><a href="llc.html">llc</a></tt> tool, but they are only applicable when
34the just-in-time compiler is being used.
John Criswell511a4912003-09-29 20:10:08 +000035<p>
36
Brian Gaeke51b2ab82003-10-19 18:03:11 +000037If filename is not specified, then <tt>lli</tt> reads the LLVM bytecode for
38the program from standard input.
John Criswell511a4912003-09-29 20:10:08 +000039<p>
Brian Gaeke51b2ab82003-10-19 18:03:11 +000040The optional "args" specified on the command line are passed to the
John Criswell511a4912003-09-29 20:10:08 +000041program as arguments.
42<p>
43
John Criswellecf32e52003-09-11 19:58:03 +000044
45<h3>
46OPTIONS
47</h3>
48
49<ul>
Brian Gaeke51b2ab82003-10-19 18:03:11 +000050 <li> <tt>-help</tt>
John Criswellecf32e52003-09-11 19:58:03 +000051 <br>
52 Print a summary of command line options.
53 <p>
54
Brian Gaeke51b2ab82003-10-19 18:03:11 +000055 <li> <tt>-stats</tt>
John Criswellecf32e52003-09-11 19:58:03 +000056 <br>
Brian Gaeke51b2ab82003-10-19 18:03:11 +000057 Print statistics from the code-generation passes. This is only meaningful
58 for the just-in-time compiler, at present.
John Criswellecf32e52003-09-11 19:58:03 +000059 <p>
60
Brian Gaeke51b2ab82003-10-19 18:03:11 +000061 <li> <tt>-time-passes</tt>
John Criswellecf32e52003-09-11 19:58:03 +000062 <br>
Brian Gaeke51b2ab82003-10-19 18:03:11 +000063 Record the amount of time needed for each code-generation pass and print
64 it to standard error.
John Criswellecf32e52003-09-11 19:58:03 +000065 <p>
Brian Gaeke51b2ab82003-10-19 18:03:11 +000066
67 <li> <tt>-march=&lt;arch&gt;</tt>
68 <br>
69 Use the specified non-default architecture when selecting a code generator
70 for the just-in-time compiler. This may result in a crash if you pick an
71 architecture which is not compatible with the hardware you are running
72 <tt>lli</tt> on.
73 <p>
74
Brian Gaeke51b2ab82003-10-19 18:03:11 +000075 <li> <tt>-force-interpreter={false,true}</tt>
76 <br>
77 If set to true, use the interpreter even if a just-in-time compiler is
78 available for this architecture. Defaults to false.
79 <p>
80
Brian Gaeke51b2ab82003-10-19 18:03:11 +000081 <li> <tt>-f=&lt;name&gt;</tt>
82 <br>
83 Call the function named <tt>&lt;name&gt;</tt> to start the program.
84 Note: The function is assumed to have the C signature <tt>int
85 <tt>&lt;name&gt;</tt> (int, char **, char **)</tt>.
86 If you try to use this option to call a function of incompatible type,
87 undefined behavior may result. Defaults to "main".
88 <p>
89
John Criswellecf32e52003-09-11 19:58:03 +000090</ul>
91
92<h3>
93EXIT STATUS
94</h3>
95
Brian Gaeke51b2ab82003-10-19 18:03:11 +000096If <tt>lli</tt> fails to load the program, it will exit with an exit code of 1.
97Otherwise, it will return the exit code of the program it executes.
John Criswellecf32e52003-09-11 19:58:03 +000098
99<h3>
100SEE ALSO
101</h3>
Chris Lattner090fcc12003-10-07 19:46:37 +0000102<a href="llc.html"><tt>llc</tt></a>
John Criswellecf32e52003-09-11 19:58:03 +0000103
104<HR>
Chris Lattner08a04fd2003-10-07 20:12:05 +0000105Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswellecf32e52003-09-11 19:58:03 +0000106</body>
107</html>