The llvm-dis.html page was a little out of date, but this pod file can supersede it.
[oota-llvm.git] / docs / CommandGuide / lli.html
1 <html>
2 <title>
3 LLVM: lli tool
4 </title>
5
6 <body bgcolor=white>
7
8 <center>
9 <h1>LLVM: <tt>lli</tt> tool</h1>
10 </center>
11 <HR>
12
13 <h3>
14 NAME
15 </h3>
16
17 <tt>lli</tt>
18
19 <h3>
20 SYNOPSIS
21 </h3>
22
23 <tt>lli [options] [filename] [args ...]</tt>
24 <h3>
25 DESCRIPTION
26 </h3>
27
28 <tt>lli</tt> directly executes programs in LLVM format. 
29 It takes a program in LLVM
30 bytecode format and executes it using a just-in-time
31 compiler, 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
34 the just-in-time compiler is being used.
35 <p>
36
37 If filename is not specified, then <tt>lli</tt> reads the LLVM bytecode for
38 the program from standard input.
39 <p>
40 The optional "args" specified on the command line are passed to the
41 program as arguments.
42 <p>
43
44
45 <h3>
46 OPTIONS
47 </h3>
48
49 <ul>
50         <li> <tt>-help</tt>
51         <br>
52         Print a summary of command line options.
53         <p>
54
55         <li> <tt>-stats</tt>
56         <br>
57         Print statistics from the code-generation passes. This is only meaningful
58     for the just-in-time compiler, at present.
59         <p>
60
61         <li> <tt>-time-passes</tt>
62         <br>
63         Record the amount of time needed for each code-generation pass and print
64     it to standard error.
65         <p>
66
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
75     <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
81     <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
90 </ul>
91
92 <h3>
93 EXIT STATUS
94 </h3>
95
96 If <tt>lli</tt> fails to load the program, it will exit with an exit code of 1.
97 Otherwise, it will return the exit code of the program it executes.
98
99 <h3>
100 SEE ALSO
101 </h3>
102 <a href="llc.html"><tt>llc</tt></a>
103
104 <HR>
105 Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
106 </body>
107 </html>