blob: bf00bbe84f594629a7b3bc4d3af3225c8340a22c [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001=pod
2
3=head1 NAME
4
5lli - directly execute programs from LLVM bitcode
6
7=head1 SYNOPSIS
8
9B<lli> [I<options>] [I<filename>] [I<program args>]
10
11=head1 DESCRIPTION
12
13B<lli> directly executes programs in LLVM bitcode format. It takes a program
14in LLVM bitcode format and executes it using a just-in-time compiler, if one is
15available for the current architecture, or an interpreter. B<lli> takes all of
16the same code generator options as L<llc|llc>, but they are only effective when
17B<lli> is using the just-in-time compiler.
18
19If I<filename> is not specified, then B<lli> reads the LLVM bitcode for the
20program from standard input.
21
22The optional I<args> specified on the command line are passed to the program as
23arguments.
24
Reid Spencer0d955612007-08-07 16:29:57 +000025=head1 GENERAL OPTIONS
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026
27=over
28
Reid Spencer0d955612007-08-07 16:29:57 +000029=item B<-fake-argv0>=I<executable>
30
31Override the C<argv[0]> value passed into the executing program.
32
33=item B<-force-interpreter>=I<{false,true}>
34
35If set to true, use the interpreter even if a just-in-time compiler is available
36for this architecture. Defaults to false.
37
Dan Gohmanf17a25c2007-07-18 16:29:46 +000038=item B<-help>
39
40Print a summary of command line options.
41
Reid Spencer0d955612007-08-07 16:29:57 +000042=item B<-load>=I<puginfilename>
43
44Causes B<lli> to load the plugin (shared object) named I<pluginfilename> and use
45it for optimization.
46
Dan Gohmanf17a25c2007-07-18 16:29:46 +000047=item B<-stats>
48
49Print statistics from the code-generation passes. This is only meaningful for
50the just-in-time compiler, at present.
51
52=item B<-time-passes>
53
54Record the amount of time needed for each code-generation pass and print it to
55standard error.
56
Reid Spencer0d955612007-08-07 16:29:57 +000057=back
58
59=head1 TARGET OPTIONS
60
61=over
62
Dan Gohmanf17a25c2007-07-18 16:29:46 +000063=item B<-mtriple>=I<target triple>
64
65Override the target triple specified in the input bitcode file with the
66specified string. This may result in a crash if you pick an
67architecture which is not compatible with the current system.
68
69=item B<-march>=I<arch>
70
71Specify the architecture for which to generate assembly, overriding the target
72encoded in the bitcode file. See the output of B<llc --help> for a list of
73valid architectures. By default this is inferred from the target triple or
74autodetected to the current architecture.
75
76=item B<-mcpu>=I<cpuname>
77
78Specify a specific chip in the current architecture to generate code for.
79By default this is inferred from the target triple and autodetected to
80the current architecture. For a list of available CPUs, use:
81B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help>
82
83=item B<-mattr>=I<a1,+a2,-a3,...>
84
85Override or control specific attributes of the target, such as whether SIMD
86operations are enabled or not. The default set of attributes is set by the
87current CPU. For a list of available attributes, use:
88B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help>
89
Reid Spencer0d955612007-08-07 16:29:57 +000090=back
Reid Spencer666dcb52007-08-07 16:11:57 +000091
Reid Spencer666dcb52007-08-07 16:11:57 +000092
Reid Spencer0d955612007-08-07 16:29:57 +000093=head1 FLOATING POINT OPTIONS
Dan Gohmanf17a25c2007-07-18 16:29:46 +000094
Reid Spencer0d955612007-08-07 16:29:57 +000095=over
Dan Gohmanf17a25c2007-07-18 16:29:46 +000096
Reid Spencer0d955612007-08-07 16:29:57 +000097=item B<-disable-excess-fp-precision>
Dan Gohmanf17a25c2007-07-18 16:29:46 +000098
Reid Spencer0d955612007-08-07 16:29:57 +000099Disable optimizations that may increase floating point precision.
Reid Spencer666dcb52007-08-07 16:11:57 +0000100
Reid Spencer0d955612007-08-07 16:29:57 +0000101=item B<-enable-finite-only-fp-math>
Reid Spencer666dcb52007-08-07 16:11:57 +0000102
Reid Spencer0d955612007-08-07 16:29:57 +0000103Enable optimizations that assumes only finite floating point math. That is,
104there is no NAN or Inf values.
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000105
Reid Spencer26817692007-08-07 16:21:52 +0000106=item B<-enable-unsafe-fp-math>
107
108Causes B<lli> to enable optimizations that may decrease floating point
109precision.
110
Reid Spencer0d955612007-08-07 16:29:57 +0000111=item B<-soft-float>
Reid Spencer98044742007-08-07 16:23:42 +0000112
Reid Spencer0d955612007-08-07 16:29:57 +0000113Causes B<lli> to generate software floating point library calls instead of
114equivalent hardware instructions.
Reid Spencer98044742007-08-07 16:23:42 +0000115
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000116=back
117
Reid Spencerb3948be2007-08-07 17:12:43 +0000118=head1 CODE GENERATION OPTIONS
119
120=over
121
122=item B<-code-model>=I<model>
123
124Choose the code model from:
125
126=over
127
128=item I<default>: Target default code model
129
130=item I<small>: Small code model
131
132=item I<kernel>: Kernel code model
133=item I<medium>: Medium code model
134=item I<large>: Large code model
135
136=back
137
138=item B<-disable-post-RA-scheduler>
139
140Disable scheduling after register allocation.
141
142=item B<-disable-spill-fusing>
143
144Disable fusing of spill code into instructions.
145
146=item B<-enable-correct-eh-support>
147
148Make the -lowerinvoke pass insert expensive, but correct, EH code.
149
150=item B<-enable-eh>
151
152Exception handling should be emitted.
153
154=item B<-join-liveintervals>
155
156Coalesce copies (default=true).
157
158=item B<-nozero-initialized-in-bss>
159Don't place zero-initialized symbols into the BSS section.
160
161=item B<-pre-RA-sched>=I<scheduler>
162
163Instruction schedulers available (before register allocation):
164
165=over
166
167=item I<=default>: Best scheduler for the target
168
169=item I<=none>: No scheduling: breadth first sequencing
170
171=item I<=simple>: Simple two pass scheduling: minimize critical path and maximize processor utilization
172
173=item I<=simple-noitin>: Simple two pass scheduling: Same as simple except using generic latency
174
175=item I<=list-burr>: Bottom-up register reduction list scheduling
176
177=item I<=list-tdrr>: Top-down register reduction list scheduling
178
179=item I<=list-td>: Top-down list scheduler -print-machineinstrs - Print generated machine code
180
181=back
182
183=item B<-regalloc>=I<allocator>
184
185Register allocator to use: (default = linearscan)
186
187=over
188
189=item I<=bigblock>: Big-block register allocator
190
191=item I<=linearscan>: linear scan register allocator =local - local register allocator
192
193=item I<=simple>: simple register allocator
194
195=back
196
197=item B<-relocation-model>=I<model>
198
199Choose relocation model from:
200
201=over
202
203=item I<=default>: Target default relocation model
204
205=item I<=static>: Non-relocatable code =pic - Fully relocatable, position independent code
206
207=item I<=dynamic-no-pic>: Relocatable external references, non-relocatable code
208
209=back
210
211=item B<-spiller>
212
213Spiller to use: (default: local)
214
215=over
216
217=item I<=simple>: simple spiller
218
219=item I<=local>: local spiller
220
221=back
222
223=item B<-x86-asm-syntax>=I<syntax>
224
225Choose style of code to emit from X86 backend:
226
227=over
228
229=item I<=att>: Emit AT&T-style assembly
230
231=item I<=intel>: Emit Intel-style assembly
232
233=back
234
235=back
236
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000237=head1 EXIT STATUS
238
239If B<lli> fails to load the program, it will exit with an exit code of 1.
240Otherwise, it will return the exit code of the program it executes.
241
242=head1 SEE ALSO
243
244L<llc|llc>
245
246=head1 AUTHOR
247
248Maintained by the LLVM Team (L<http://llvm.org>).
249
250=cut