blob: 52a2721e7d70b87f8132be022d64837e081c2c7e [file] [log] [blame]
Brian Gaekee993d202004-05-14 19:50:33 +00001=pod
2
3=head1 NAME
4
Gabor Greif3bd6e0d2007-07-09 11:24:05 +00005lli - directly execute programs from LLVM bitcode
Brian Gaekee993d202004-05-14 19:50:33 +00006
7=head1 SYNOPSIS
8
Misha Brukmanc08937a2004-07-02 16:06:19 +00009B<lli> [I<options>] [I<filename>] [I<program args>]
Brian Gaekee993d202004-05-14 19:50:33 +000010
11=head1 DESCRIPTION
12
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000013B<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
Misha Brukmanc08937a2004-07-02 16:06:19 +000015available 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.
Brian Gaekee993d202004-05-14 19:50:33 +000018
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000019If I<filename> is not specified, then B<lli> reads the LLVM bitcode for the
Brian Gaekee993d202004-05-14 19:50:33 +000020program from standard input.
21
22The optional I<args> specified on the command line are passed to the program as
23arguments.
24
Reid Spencer0ecfb592007-08-07 16:29:57 +000025=head1 GENERAL OPTIONS
Brian Gaekee993d202004-05-14 19:50:33 +000026
27=over
28
Reid Spencer0ecfb592007-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
Brian Gaekee993d202004-05-14 19:50:33 +000038=item B<-help>
39
40Print a summary of command line options.
41
Reid Spencer0ecfb592007-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
Brian Gaekee993d202004-05-14 19:50:33 +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 Spencer3baa3aa2007-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 Spencer0ecfb592007-08-07 16:29:57 +000061=back
62
63=head1 TARGET OPTIONS
64
65=over
66
Chris Lattnerf4955362005-12-16 05:19:35 +000067=item B<-mtriple>=I<target triple>
Chris Lattner4f501bf2005-12-16 05:18:53 +000068
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000069Override the target triple specified in the input bitcode file with the
Chris Lattner4f501bf2005-12-16 05:18:53 +000070specified string. This may result in a crash if you pick an
71architecture which is not compatible with the current system.
72
Brian Gaekee993d202004-05-14 19:50:33 +000073=item B<-march>=I<arch>
74
Chris Lattner4f501bf2005-12-16 05:18:53 +000075Specify the architecture for which to generate assembly, overriding the target
Duncan Sands7e7ae5a2010-02-18 14:08:13 +000076encoded in the bitcode file. See the output of B<llc -help> for a list of
Chris Lattner4f501bf2005-12-16 05:18:53 +000077valid 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>
Brian Gaekee993d202004-05-14 19:50:33 +000093
Reid Spencer0ecfb592007-08-07 16:29:57 +000094=back
Reid Spencer2c8a7482007-08-07 16:11:57 +000095
Reid Spencer2c8a7482007-08-07 16:11:57 +000096
Reid Spencer0ecfb592007-08-07 16:29:57 +000097=head1 FLOATING POINT OPTIONS
Brian Gaekee993d202004-05-14 19:50:33 +000098
Reid Spencer0ecfb592007-08-07 16:29:57 +000099=over
Brian Gaekee993d202004-05-14 19:50:33 +0000100
Reid Spencer0ecfb592007-08-07 16:29:57 +0000101=item B<-disable-excess-fp-precision>
Brian Gaekee993d202004-05-14 19:50:33 +0000102
Reid Spencer0ecfb592007-08-07 16:29:57 +0000103Disable optimizations that may increase floating point precision.
Reid Spencer2c8a7482007-08-07 16:11:57 +0000104
Peter Collingbourne5a0a7ce2010-11-16 19:40:13 +0000105=item B<-enable-no-infs-fp-math>
Reid Spencer2c8a7482007-08-07 16:11:57 +0000106
Peter Collingbourne5a0a7ce2010-11-16 19:40:13 +0000107Enable optimizations that assume no Inf values.
108
109=item B<-enable-no-nans-fp-math>
110
111Enable optimizations that assume no NAN values.
Brian Gaekee993d202004-05-14 19:50:33 +0000112
Reid Spencer7223f022007-08-07 16:21:52 +0000113=item B<-enable-unsafe-fp-math>
114
115Causes B<lli> to enable optimizations that may decrease floating point
116precision.
117
Reid Spencer0ecfb592007-08-07 16:29:57 +0000118=item B<-soft-float>
Reid Spencerb7a54b92007-08-07 16:23:42 +0000119
Reid Spencer0ecfb592007-08-07 16:29:57 +0000120Causes B<lli> to generate software floating point library calls instead of
121equivalent hardware instructions.
Reid Spencerb7a54b92007-08-07 16:23:42 +0000122
Brian Gaekee993d202004-05-14 19:50:33 +0000123=back
124
Reid Spenceracafa2d2007-08-07 17:12:43 +0000125=head1 CODE GENERATION OPTIONS
126
Reid Spencer31cac2e2007-08-07 17:57:36 +0000127=over
Reid Spenceracafa2d2007-08-07 17:12:43 +0000128
129=item B<-code-model>=I<model>
130
131Choose the code model from:
132
Reid Spencer31cac2e2007-08-07 17:57:36 +0000133 default: Target default code model
134 small: Small code model
135 kernel: Kernel code model
136 medium: Medium code model
137 large: Large code model
Reid Spencerd5d9e6f2007-08-07 17:48:56 +0000138
Reid Spenceracafa2d2007-08-07 17:12:43 +0000139=item B<-disable-post-RA-scheduler>
140
141Disable scheduling after register allocation.
142
143=item B<-disable-spill-fusing>
144
145Disable fusing of spill code into instructions.
146
147=item B<-enable-correct-eh-support>
148
149Make the -lowerinvoke pass insert expensive, but correct, EH code.
150
Duncan Sands57b6e9e2010-05-02 15:36:26 +0000151=item B<-jit-enable-eh>
Reid Spenceracafa2d2007-08-07 17:12:43 +0000152
Duncan Sands57b6e9e2010-05-02 15:36:26 +0000153Exception handling should be enabled in the just-in-time compiler.
Reid Spenceracafa2d2007-08-07 17:12:43 +0000154
155=item B<-join-liveintervals>
156
157Coalesce copies (default=true).
158
159=item B<-nozero-initialized-in-bss>
160Don't place zero-initialized symbols into the BSS section.
161
162=item B<-pre-RA-sched>=I<scheduler>
163
164Instruction schedulers available (before register allocation):
165
Reid Spencer31cac2e2007-08-07 17:57:36 +0000166 =default: Best scheduler for the target
167 =none: No scheduling: breadth first sequencing
168 =simple: Simple two pass scheduling: minimize critical path and maximize processor utilization
169 =simple-noitin: Simple two pass scheduling: Same as simple except using generic latency
170 =list-burr: Bottom-up register reduction list scheduling
171 =list-tdrr: Top-down register reduction list scheduling
172 =list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code
Reid Spencerd5d9e6f2007-08-07 17:48:56 +0000173
Reid Spenceracafa2d2007-08-07 17:12:43 +0000174=item B<-regalloc>=I<allocator>
175
Duncan Sands18619b22010-02-18 14:37:52 +0000176Register allocator to use (default=linearscan)
Reid Spenceracafa2d2007-08-07 17:12:43 +0000177
Reid Spencer31cac2e2007-08-07 17:57:36 +0000178 =bigblock: Big-block register allocator
179 =linearscan: linear scan register allocator =local - local register allocator
180 =simple: simple register allocator
Reid Spencerd5d9e6f2007-08-07 17:48:56 +0000181
Reid Spenceracafa2d2007-08-07 17:12:43 +0000182=item B<-relocation-model>=I<model>
183
184Choose relocation model from:
185
Reid Spencer31cac2e2007-08-07 17:57:36 +0000186 =default: Target default relocation model
187 =static: Non-relocatable code =pic - Fully relocatable, position independent code
188 =dynamic-no-pic: Relocatable external references, non-relocatable code
Reid Spencerd5d9e6f2007-08-07 17:48:56 +0000189
Reid Spenceracafa2d2007-08-07 17:12:43 +0000190=item B<-spiller>
191
Duncan Sands18619b22010-02-18 14:37:52 +0000192Spiller to use (default=local)
Reid Spenceracafa2d2007-08-07 17:12:43 +0000193
Reid Spencer31cac2e2007-08-07 17:57:36 +0000194 =simple: simple spiller
195 =local: local spiller
Reid Spencerd5d9e6f2007-08-07 17:48:56 +0000196
Reid Spenceracafa2d2007-08-07 17:12:43 +0000197=item B<-x86-asm-syntax>=I<syntax>
198
199Choose style of code to emit from X86 backend:
200
Reid Spencer31cac2e2007-08-07 17:57:36 +0000201 =att: Emit AT&T-style assembly
202 =intel: Emit Intel-style assembly
Reid Spenceracafa2d2007-08-07 17:12:43 +0000203
204=back
205
Brian Gaekee993d202004-05-14 19:50:33 +0000206=head1 EXIT STATUS
207
208If B<lli> fails to load the program, it will exit with an exit code of 1.
209Otherwise, it will return the exit code of the program it executes.
210
211=head1 SEE ALSO
212
Misha Brukmanc08937a2004-07-02 16:06:19 +0000213L<llc|llc>
Brian Gaekee993d202004-05-14 19:50:33 +0000214
215=head1 AUTHOR
216
Reid Spencercd143fc2006-03-14 05:42:07 +0000217Maintained by the LLVM Team (L<http://llvm.org>).
Brian Gaekee993d202004-05-14 19:50:33 +0000218
219=cut