]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - usr.bin/clang/llc/llc.1
MFC r244628:
[FreeBSD/stable/9.git] / usr.bin / clang / llc / llc.1
1 .\" $FreeBSD$
2 .TH "LLC" "1" "2012-08-16" "3.2" "LLVM"
3 .SH NAME
4 llc \- LLVM static compiler
5 .
6 .nr rst2man-indent-level 0
7 .
8 .de1 rstReportMargin
9 \\$1 \\n[an-margin]
10 level \\n[rst2man-indent-level]
11 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
12 -
13 \\n[rst2man-indent0]
14 \\n[rst2man-indent1]
15 \\n[rst2man-indent2]
16 ..
17 .de1 INDENT
18 .\" .rstReportMargin pre:
19 . RS \\$1
20 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
21 . nr rst2man-indent-level +1
22 .\" .rstReportMargin post:
23 ..
24 .de UNINDENT
25 . RE
26 .\" indent \\n[an-margin]
27 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .nr rst2man-indent-level -1
29 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 ..
32 .\" Man page generated from reStructuredText.
33 .
34 .SH SYNOPSIS
35 .sp
36 \fBllc\fP [\fIoptions\fP] [\fIfilename\fP]
37 .SH DESCRIPTION
38 .sp
39 The \fBllc\fP command compiles LLVM source inputs into assembly language for a
40 specified architecture.  The assembly language output can then be passed through
41 a native assembler and linker to generate a native executable.
42 .sp
43 The choice of architecture for the output assembly code is automatically
44 determined from the input file, unless the \fB\-march\fP option is used to override
45 the default.
46 .SH OPTIONS
47 .sp
48 If \fIfilename\fP is \- or omitted, \fBllc\fP reads from standard input.  Otherwise, it
49 will from \fIfilename\fP.  Inputs can be in either the LLVM assembly language
50 format (.ll) or the LLVM bitcode format (.bc).
51 .sp
52 If the \fB\-o\fP option is omitted, then \fBllc\fP will send its output to standard
53 output if the input is from standard input.  If the \fB\-o\fP option specifies \-,
54 then the output will also be sent to standard output.
55 .sp
56 If no \fB\-o\fP option is specified and an input file other than \- is specified,
57 then \fBllc\fP creates the output filename by taking the input filename,
58 removing any existing \fI.bc\fP extension, and adding a \fI.s\fP suffix.
59 .sp
60 Other \fBllc\fP options are as follows:
61 .SS End\-user Options
62 .sp
63 \fB\-help\fP
64 .INDENT 0.0
65 .INDENT 3.5
66 Print a summary of command line options.
67 .UNINDENT
68 .UNINDENT
69 .sp
70 \fB\-O\fP=\fIuint\fP
71 .INDENT 0.0
72 .INDENT 3.5
73 Generate code at different optimization levels. These correspond to the \fI\-O0\fP,
74 \fI\-O1\fP, \fI\-O2\fP, and \fI\-O3\fP optimization levels used by \fBllvm\-gcc\fP and
75 \fBclang\fP.
76 .UNINDENT
77 .UNINDENT
78 .sp
79 \fB\-mtriple\fP=\fItarget triple\fP
80 .INDENT 0.0
81 .INDENT 3.5
82 Override the target triple specified in the input file with the specified
83 string.
84 .UNINDENT
85 .UNINDENT
86 .sp
87 \fB\-march\fP=\fIarch\fP
88 .INDENT 0.0
89 .INDENT 3.5
90 Specify the architecture for which to generate assembly, overriding the target
91 encoded in the input file.  See the output of \fBllc \-help\fP for a list of
92 valid architectures.  By default this is inferred from the target triple or
93 autodetected to the current architecture.
94 .UNINDENT
95 .UNINDENT
96 .sp
97 \fB\-mcpu\fP=\fIcpuname\fP
98 .INDENT 0.0
99 .INDENT 3.5
100 Specify a specific chip in the current architecture to generate code for.
101 By default this is inferred from the target triple and autodetected to
102 the current architecture.  For a list of available CPUs, use:
103 \fBllvm\-as < /dev/null | llc \-march=xyz \-mcpu=help\fP
104 .UNINDENT
105 .UNINDENT
106 .sp
107 \fB\-mattr\fP=\fIa1,+a2,\-a3,...\fP
108 .INDENT 0.0
109 .INDENT 3.5
110 Override or control specific attributes of the target, such as whether SIMD
111 operations are enabled or not.  The default set of attributes is set by the
112 current CPU.  For a list of available attributes, use:
113 \fBllvm\-as < /dev/null | llc \-march=xyz \-mattr=help\fP
114 .UNINDENT
115 .UNINDENT
116 .sp
117 \fB\-\-disable\-fp\-elim\fP
118 .INDENT 0.0
119 .INDENT 3.5
120 Disable frame pointer elimination optimization.
121 .UNINDENT
122 .UNINDENT
123 .sp
124 \fB\-\-disable\-excess\-fp\-precision\fP
125 .INDENT 0.0
126 .INDENT 3.5
127 Disable optimizations that may produce excess precision for floating point.
128 Note that this option can dramatically slow down code on some systems
129 (e.g. X86).
130 .UNINDENT
131 .UNINDENT
132 .sp
133 \fB\-\-enable\-no\-infs\-fp\-math\fP
134 .INDENT 0.0
135 .INDENT 3.5
136 Enable optimizations that assume no Inf values.
137 .UNINDENT
138 .UNINDENT
139 .sp
140 \fB\-\-enable\-no\-nans\-fp\-math\fP
141 .INDENT 0.0
142 .INDENT 3.5
143 Enable optimizations that assume no NAN values.
144 .UNINDENT
145 .UNINDENT
146 .sp
147 \fB\-\-enable\-unsafe\-fp\-math\fP
148 .INDENT 0.0
149 .INDENT 3.5
150 Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
151 addition is associative) or may not work for all input ranges.  These
152 optimizations allow the code generator to make use of some instructions which
153 would otherwise not be usable (such as fsin on X86).
154 .UNINDENT
155 .UNINDENT
156 .sp
157 \fB\-\-enable\-correct\-eh\-support\fP
158 .INDENT 0.0
159 .INDENT 3.5
160 Instruct the \fBlowerinvoke\fP pass to insert code for correct exception handling
161 support.  This is expensive and is by default omitted for efficiency.
162 .UNINDENT
163 .UNINDENT
164 .sp
165 \fB\-\-stats\fP
166 .INDENT 0.0
167 .INDENT 3.5
168 Print statistics recorded by code\-generation passes.
169 .UNINDENT
170 .UNINDENT
171 .sp
172 \fB\-\-time\-passes\fP
173 .INDENT 0.0
174 .INDENT 3.5
175 Record the amount of time needed for each pass and print a report to standard
176 error.
177 .UNINDENT
178 .UNINDENT
179 .sp
180 \fB\-\-load\fP=\fIdso_path\fP
181 .INDENT 0.0
182 .INDENT 3.5
183 Dynamically load \fIdso_path\fP (a path to a dynamically shared object) that
184 implements an LLVM target. This will permit the target name to be used with the
185 \fB\-march\fP option so that code can be generated for that target.
186 .UNINDENT
187 .UNINDENT
188 .SS Tuning/Configuration Options
189 .sp
190 \fB\-\-print\-machineinstrs\fP
191 .INDENT 0.0
192 .INDENT 3.5
193 Print generated machine code between compilation phases (useful for debugging).
194 .UNINDENT
195 .UNINDENT
196 .sp
197 \fB\-\-regalloc\fP=\fIallocator\fP
198 .INDENT 0.0
199 .INDENT 3.5
200 Specify the register allocator to use. The default \fIallocator\fP is \fIlocal\fP.
201 Valid register allocators are:
202 .sp
203 \fIsimple\fP
204 .INDENT 0.0
205 .INDENT 3.5
206 Very simple "always spill" register allocator
207 .UNINDENT
208 .UNINDENT
209 .sp
210 \fIlocal\fP
211 .INDENT 0.0
212 .INDENT 3.5
213 Local register allocator
214 .UNINDENT
215 .UNINDENT
216 .sp
217 \fIlinearscan\fP
218 .INDENT 0.0
219 .INDENT 3.5
220 Linear scan global register allocator
221 .UNINDENT
222 .UNINDENT
223 .sp
224 \fIiterativescan\fP
225 .INDENT 0.0
226 .INDENT 3.5
227 Iterative scan global register allocator
228 .UNINDENT
229 .UNINDENT
230 .UNINDENT
231 .UNINDENT
232 .sp
233 \fB\-\-spiller\fP=\fIspiller\fP
234 .INDENT 0.0
235 .INDENT 3.5
236 Specify the spiller to use for register allocators that support it.  Currently
237 this option is used only by the linear scan register allocator. The default
238 \fIspiller\fP is \fIlocal\fP.  Valid spillers are:
239 .sp
240 \fIsimple\fP
241 .INDENT 0.0
242 .INDENT 3.5
243 Simple spiller
244 .UNINDENT
245 .UNINDENT
246 .sp
247 \fIlocal\fP
248 .INDENT 0.0
249 .INDENT 3.5
250 Local spiller
251 .UNINDENT
252 .UNINDENT
253 .UNINDENT
254 .UNINDENT
255 .SS Intel IA\-32\-specific Options
256 .sp
257 \fB\-\-x86\-asm\-syntax=att|intel\fP
258 .INDENT 0.0
259 .INDENT 3.5
260 Specify whether to emit assembly code in AT&T syntax (the default) or intel
261 syntax.
262 .UNINDENT
263 .UNINDENT
264 .SH EXIT STATUS
265 .sp
266 If \fBllc\fP succeeds, it will exit with 0.  Otherwise, if an error occurs,
267 it will exit with a non\-zero value.
268 .SH SEE ALSO
269 .sp
270 lli|lli
271 .SH AUTHOR
272 Maintained by The LLVM Team (http://llvm.org/).
273 .SH COPYRIGHT
274 2012, LLVM Project
275 .\" Generated by docutils manpage writer.
276 .