Fix docs typo regarding lit.local.cfg files
[oota-llvm.git] / docs / CommandGuide / lli.rst
1 lli - directly execute programs from LLVM bitcode
2 =================================================
3
4
5 SYNOPSIS
6 --------
7
8
9 **lli** [*options*] [*filename*] [*program args*]
10
11
12 DESCRIPTION
13 -----------
14
15
16 **lli** directly executes programs in LLVM bitcode format.  It takes a program
17 in LLVM bitcode format and executes it using a just-in-time compiler, if one is
18 available for the current architecture, or an interpreter.  **lli** takes all of
19 the same code generator options as llc|llc, but they are only effective when
20 **lli** is using the just-in-time compiler.
21
22 If *filename* is not specified, then **lli** reads the LLVM bitcode for the
23 program from standard input.
24
25 The optional *args* specified on the command line are passed to the program as
26 arguments.
27
28
29 GENERAL OPTIONS
30 ---------------
31
32
33
34 **-fake-argv0**\ =\ *executable*
35
36  Override the ``argv[0]`` value passed into the executing program.
37
38
39
40 **-force-interpreter**\ =\ *{false,true}*
41
42  If set to true, use the interpreter even if a just-in-time compiler is available
43  for this architecture. Defaults to false.
44
45
46
47 **-help**
48
49  Print a summary of command line options.
50
51
52
53 **-load**\ =\ *pluginfilename*
54
55  Causes **lli** to load the plugin (shared object) named *pluginfilename* and use
56  it for optimization.
57
58
59
60 **-stats**
61
62  Print statistics from the code-generation passes. This is only meaningful for
63  the just-in-time compiler, at present.
64
65
66
67 **-time-passes**
68
69  Record the amount of time needed for each code-generation pass and print it to
70  standard error.
71
72
73
74 **-version**
75
76  Print out the version of **lli** and exit without doing anything else.
77
78
79
80
81 TARGET OPTIONS
82 --------------
83
84
85
86 **-mtriple**\ =\ *target triple*
87
88  Override the target triple specified in the input bitcode file with the
89  specified string.  This may result in a crash if you pick an
90  architecture which is not compatible with the current system.
91
92
93
94 **-march**\ =\ *arch*
95
96  Specify the architecture for which to generate assembly, overriding the target
97  encoded in the bitcode file.  See the output of **llc -help** for a list of
98  valid architectures.  By default this is inferred from the target triple or
99  autodetected to the current architecture.
100
101
102
103 **-mcpu**\ =\ *cpuname*
104
105  Specify a specific chip in the current architecture to generate code for.
106  By default this is inferred from the target triple and autodetected to
107  the current architecture.  For a list of available CPUs, use:
108  **llvm-as < /dev/null | llc -march=xyz -mcpu=help**
109
110
111
112 **-mattr**\ =\ *a1,+a2,-a3,...*
113
114  Override or control specific attributes of the target, such as whether SIMD
115  operations are enabled or not.  The default set of attributes is set by the
116  current CPU.  For a list of available attributes, use:
117  **llvm-as < /dev/null | llc -march=xyz -mattr=help**
118
119
120
121
122 FLOATING POINT OPTIONS
123 ----------------------
124
125
126
127 **-disable-excess-fp-precision**
128
129  Disable optimizations that may increase floating point precision.
130
131
132
133 **-enable-no-infs-fp-math**
134
135  Enable optimizations that assume no Inf values.
136
137
138
139 **-enable-no-nans-fp-math**
140
141  Enable optimizations that assume no NAN values.
142
143
144
145 **-enable-unsafe-fp-math**
146
147  Causes **lli** to enable optimizations that may decrease floating point
148  precision.
149
150
151
152 **-soft-float**
153
154  Causes **lli** to generate software floating point library calls instead of
155  equivalent hardware instructions.
156
157
158
159
160 CODE GENERATION OPTIONS
161 -----------------------
162
163
164
165 **-code-model**\ =\ *model*
166
167  Choose the code model from:
168
169
170  .. code-block:: perl
171
172       default: Target default code model
173       small: Small code model
174       kernel: Kernel code model
175       medium: Medium code model
176       large: Large code model
177
178
179
180
181 **-disable-post-RA-scheduler**
182
183  Disable scheduling after register allocation.
184
185
186
187 **-disable-spill-fusing**
188
189  Disable fusing of spill code into instructions.
190
191
192
193 **-jit-enable-eh**
194
195  Exception handling should be enabled in the just-in-time compiler.
196
197
198
199 **-join-liveintervals**
200
201  Coalesce copies (default=true).
202
203
204
205 **-nozero-initialized-in-bss** Don't place zero-initialized symbols into the BSS section.
206
207
208
209 **-pre-RA-sched**\ =\ *scheduler*
210
211  Instruction schedulers available (before register allocation):
212
213
214  .. code-block:: perl
215
216       =default: Best scheduler for the target
217       =none: No scheduling: breadth first sequencing
218       =simple: Simple two pass scheduling: minimize critical path and maximize processor utilization
219       =simple-noitin: Simple two pass scheduling: Same as simple except using generic latency
220       =list-burr: Bottom-up register reduction list scheduling
221       =list-tdrr: Top-down register reduction list scheduling
222       =list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code
223
224
225
226
227 **-regalloc**\ =\ *allocator*
228
229  Register allocator to use (default=linearscan)
230
231
232  .. code-block:: perl
233
234       =bigblock: Big-block register allocator
235       =linearscan: linear scan register allocator =local -   local register allocator
236       =simple: simple register allocator
237
238
239
240
241 **-relocation-model**\ =\ *model*
242
243  Choose relocation model from:
244
245
246  .. code-block:: perl
247
248       =default: Target default relocation model
249       =static: Non-relocatable code =pic -   Fully relocatable, position independent code
250       =dynamic-no-pic: Relocatable external references, non-relocatable code
251
252
253
254
255 **-spiller**
256
257  Spiller to use (default=local)
258
259
260  .. code-block:: perl
261
262       =simple: simple spiller
263       =local: local spiller
264
265
266
267
268 **-x86-asm-syntax**\ =\ *syntax*
269
270  Choose style of code to emit from X86 backend:
271
272
273  .. code-block:: perl
274
275       =att: Emit AT&T-style assembly
276       =intel: Emit Intel-style assembly
277
278
279
280
281
282 EXIT STATUS
283 -----------
284
285
286 If **lli** fails to load the program, it will exit with an exit code of 1.
287 Otherwise, it will return the exit code of the program it executes.
288
289
290 SEE ALSO
291 --------
292
293
294 llc|llc