blob: e9fdf74fe53ea7e849c8741717df34da089ff7ba [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 Spencer00ebd032007-08-07 17:43:48 +000057=item B<-version>
58
59Print out the version of B<lli> and exit without doing anything else.
60
Reid Spencer0d955612007-08-07 16:29:57 +000061=back
62
63=head1 TARGET OPTIONS
64
65=over
66
Dan Gohmanf17a25c2007-07-18 16:29:46 +000067=item B<-mtriple>=I<target triple>
68
69Override the target triple specified in the input bitcode file with the
70specified string. This may result in a crash if you pick an
71architecture which is not compatible with the current system.
72
73=item B<-march>=I<arch>
74
75Specify the architecture for which to generate assembly, overriding the target
76encoded in the bitcode file. See the output of B<llc --help> for a list of
77valid architectures. By default this is inferred from the target triple or
78autodetected to the current architecture.
79
80=item B<-mcpu>=I<cpuname>
81
82Specify a specific chip in the current architecture to generate code for.
83By default this is inferred from the target triple and autodetected to
84the current architecture. For a list of available CPUs, use:
85B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help>
86
87=item B<-mattr>=I<a1,+a2,-a3,...>
88
89Override or control specific attributes of the target, such as whether SIMD
90operations are enabled or not. The default set of attributes is set by the
91current CPU. For a list of available attributes, use:
92B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help>
93
Reid Spencer0d955612007-08-07 16:29:57 +000094=back
Reid Spencer666dcb52007-08-07 16:11:57 +000095
Reid Spencer666dcb52007-08-07 16:11:57 +000096
Reid Spencer0d955612007-08-07 16:29:57 +000097=head1 FLOATING POINT OPTIONS
Dan Gohmanf17a25c2007-07-18 16:29:46 +000098
Reid Spencer0d955612007-08-07 16:29:57 +000099=over
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000100
Reid Spencer0d955612007-08-07 16:29:57 +0000101=item B<-disable-excess-fp-precision>
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000102
Reid Spencer0d955612007-08-07 16:29:57 +0000103Disable optimizations that may increase floating point precision.
Reid Spencer666dcb52007-08-07 16:11:57 +0000104
Reid Spencer0d955612007-08-07 16:29:57 +0000105=item B<-enable-finite-only-fp-math>
Reid Spencer666dcb52007-08-07 16:11:57 +0000106
Reid Spencer0d955612007-08-07 16:29:57 +0000107Enable optimizations that assumes only finite floating point math. That is,
108there is no NAN or Inf values.
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000109
Reid Spencer26817692007-08-07 16:21:52 +0000110=item B<-enable-unsafe-fp-math>
111
112Causes B<lli> to enable optimizations that may decrease floating point
113precision.
114
Reid Spencer0d955612007-08-07 16:29:57 +0000115=item B<-soft-float>
Reid Spencer98044742007-08-07 16:23:42 +0000116
Reid Spencer0d955612007-08-07 16:29:57 +0000117Causes B<lli> to generate software floating point library calls instead of
118equivalent hardware instructions.
Reid Spencer98044742007-08-07 16:23:42 +0000119
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000120=back
121
Reid Spencerb3948be2007-08-07 17:12:43 +0000122=head1 CODE GENERATION OPTIONS
123
Reid Spencer262fb352007-08-07 17:57:36 +0000124=over
Reid Spencerb3948be2007-08-07 17:12:43 +0000125
126=item B<-code-model>=I<model>
127
128Choose the code model from:
129
Reid Spencer262fb352007-08-07 17:57:36 +0000130 default: Target default code model
131 small: Small code model
132 kernel: Kernel code model
133 medium: Medium code model
134 large: Large code model
Reid Spencerb28580092007-08-07 17:48:56 +0000135
Reid Spencerb3948be2007-08-07 17:12:43 +0000136=item B<-disable-post-RA-scheduler>
137
138Disable scheduling after register allocation.
139
140=item B<-disable-spill-fusing>
141
142Disable fusing of spill code into instructions.
143
144=item B<-enable-correct-eh-support>
145
146Make the -lowerinvoke pass insert expensive, but correct, EH code.
147
148=item B<-enable-eh>
149
150Exception handling should be emitted.
151
152=item B<-join-liveintervals>
153
154Coalesce copies (default=true).
155
156=item B<-nozero-initialized-in-bss>
157Don't place zero-initialized symbols into the BSS section.
158
159=item B<-pre-RA-sched>=I<scheduler>
160
161Instruction schedulers available (before register allocation):
162
Reid Spencer262fb352007-08-07 17:57:36 +0000163 =default: Best scheduler for the target
164 =none: No scheduling: breadth first sequencing
165 =simple: Simple two pass scheduling: minimize critical path and maximize processor utilization
166 =simple-noitin: Simple two pass scheduling: Same as simple except using generic latency
167 =list-burr: Bottom-up register reduction list scheduling
168 =list-tdrr: Top-down register reduction list scheduling
169 =list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code
Reid Spencerb28580092007-08-07 17:48:56 +0000170
Reid Spencerb3948be2007-08-07 17:12:43 +0000171=item B<-regalloc>=I<allocator>
172
173Register allocator to use: (default = linearscan)
174
Reid Spencer262fb352007-08-07 17:57:36 +0000175 =bigblock: Big-block register allocator
176 =linearscan: linear scan register allocator =local - local register allocator
177 =simple: simple register allocator
Reid Spencerb28580092007-08-07 17:48:56 +0000178
Reid Spencerb3948be2007-08-07 17:12:43 +0000179=item B<-relocation-model>=I<model>
180
181Choose relocation model from:
182
Reid Spencer262fb352007-08-07 17:57:36 +0000183 =default: Target default relocation model
184 =static: Non-relocatable code =pic - Fully relocatable, position independent code
185 =dynamic-no-pic: Relocatable external references, non-relocatable code
Reid Spencerb28580092007-08-07 17:48:56 +0000186
Reid Spencerb3948be2007-08-07 17:12:43 +0000187=item B<-spiller>
188
189Spiller to use: (default: local)
190
Reid Spencer262fb352007-08-07 17:57:36 +0000191 =simple: simple spiller
192 =local: local spiller
Reid Spencerb28580092007-08-07 17:48:56 +0000193
Reid Spencerb3948be2007-08-07 17:12:43 +0000194=item B<-x86-asm-syntax>=I<syntax>
195
196Choose style of code to emit from X86 backend:
197
Reid Spencer262fb352007-08-07 17:57:36 +0000198 =att: Emit AT&T-style assembly
199 =intel: Emit Intel-style assembly
Reid Spencerb3948be2007-08-07 17:12:43 +0000200
201=back
202
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000203=head1 EXIT STATUS
204
205If B<lli> fails to load the program, it will exit with an exit code of 1.
206Otherwise, it will return the exit code of the program it executes.
207
208=head1 SEE ALSO
209
210L<llc|llc>
211
212=head1 AUTHOR
213
214Maintained by the LLVM Team (L<http://llvm.org>).
215
216=cut