blob: 2f812b991a5b74928c6a25b5e9e4fa79a1fe9577 [file] [log] [blame]
Brian Gaekee993d202004-05-14 19:50:33 +00001
2=pod
3
4=head1 NAME
5
6llc - LLVM static compiler
7
8=head1 SYNOPSIS
9
10llc [options] [filename]
11
12=head1 DESCRIPTION
13
14The B<llc> command compiles LLVM bytecode into assembly language for a
15specified architecture. The assembly language output can then be passed through
16a native assembler and linker to generate native code.
17
18The choice of architecture for the output assembly code is determined as
19follows, by attempting to satisfy each of the following rules in turn (first
20one wins):
21
22=over
23
24=item *
25
26If the user has specified an architecture with the -m option, use that
27architecture.
28
29=item *
30
31Examine the input LLVM bytecode file: if it is little endian and has a
32pointer size of 32 bits, select the Intel IA-32 architecture. If it is big
33endian and has a pointer size of 64 bits, select the SparcV9 architecture.
34
35=item *
36
37If B<llc> was compiled on an architecture for which it can generate code, select
38the architecture upon which B<llc> was compiled.
39
40=item *
41
42Exit with an error message telling the user to specify the output
43architecture explicitly.
44
45=back
46
47=head1 OPTIONS
48
49If I<filename> is - or omitted, B<llc> reads LLVM bytecode from standard input.
50Otherwise, it will read LLVM bytecode from I<filename>.
51
52If the B<-o> option is omitted, then B<llc> will send its output to standard
53output if the input is from standard input. If the B<-o> option specifies -,
54then the output will also be sent to standard output.
55
56If no B<-o> option is specified and an input file other than - is specified,
57then B<llc> creates the output filename by taking the input filename,
58removing any existing F<.bc> extension, and adding a F<.s> suffix.
59
60Other B<llc> options are as follows:
61
62=over
63
64=item B<-f>
65
66Overwrite output files. By default, B<llc> will refuse to overwrite
67an output file which already exists.
68
69=item B<-march>=I<arch>
70
71Specify the architecture for which to generate assembly. Valid
72architectures are:
73
74=over
75
76=item I<x86>
77
78Intel IA-32 (Pentium and above)
79
80=item I<sparcv9>
81
8264-bit SPARC V9
83
84=item I<c>
85
86Emit C code, not assembly
87
88=back
89
90=item B<-enable-correct-eh-support>
91
92Instruct the B<-lowerinvoke> pass to insert code for correct exception handling
93support. This is expensive and is by default omitted for efficiency.
94
95=item B<-help>
96
97Print a summary of command line options.
98
99=item B<-stats>
100
101Print statistics recorded by code-generation passes.
102
103=item B<-time-passes>
104
105Record the amount of time needed for each pass and print a report to standard
106error.
107
108=back
109
110=head2 Intel IA-32-specific Options
111
112=over
113
114=item B<--disable-fp-elim>
115
116Disable frame pointer elimination optimization.
117
118=item B<--disable-pattern-isel>
119
120Use the 'simple' X86 instruction selector (the default).
121
122=item B<--print-machineinstrs>
123
124Print generated machine code.
125
126=item B<--regalloc>=I<allocator>
127
128Specify the register allocator to use. The default I<allocator> is I<local>.
129Valid register allocators are:
130
131=over
132
133=item I<simple>
134
135Very simple "always spill" register allocator
136
137=item I<local>
138
139Local register allocator
140
141=item I<linearscan>
142
143Linear scan global register allocator (experimental)
144
145=back
146
147=item B<--spiller>=I<spiller>
148
149Specify the spiller to use for register allocators that support it. Currently
150this option is used only by the linear scan register allocator. The default
151I<spiller> is I<local>. Valid spillers are:
152
153=over
154
155=item I<simple>
156
157Simple spiller
158
159=item I<local>
160
161Local spiller
162
163=back
164
165=back
166
167=head2 SPARCV9-specific Options
168
169=over
170
171=item B<--disable-peephole>
172
173Disable peephole optimization pass.
174
175=item B<--disable-sched>
176
177Disable local scheduling pass.
178
179=item B<--disable-strip>
180
181The Sparc backend embeds the LLVM bytecode into the assembly output. This
182option requests that symbol names be retained; by default, they are stripped out.
183
184=item B<--enable-maps>
185
186Emit LLVM-to-machine code mapping information into the assembly output.
187
188=back
189
190=head1 EXIT STATUS
191
192If B<llc> succeeds, it will exit with 0. Otherwise, if an error occurs,
193it will exit with a non-zero value.
194
195=head1 SEE ALSO
196
197L<lli>
198
199=head1 AUTHORS
200
201Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
202
203=cut
204