]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.bin/clang/llc/llc.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.bin / clang / llc / llc.1
1 .\" $FreeBSD$
2 .TH "LLC" "1" "2013-06-10" "3.3" "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
40 for a specified architecture.  The assembly language output can then be passed
41 through 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 \fI\%-march\fP option is used to
45 override the default.
46 .SH OPTIONS
47 .sp
48 If \fBfilename\fP is "\fB\-\fP" or omitted, \fBllc\fP reads from standard input.
49 Otherwise, it will from \fBfilename\fP.  Inputs can be in either the LLVM assembly
50 language format (\fB.ll\fP) or the LLVM bitcode format (\fB.bc\fP).
51 .sp
52 If the \fI\-o\fP option is omitted, then \fBllc\fP will send its output
53 to standard output if the input is from standard input.  If the \fI\-o\fP
54 option specifies "\fB\-\fP", then the output will also be sent to standard output.
55 .sp
56 If no \fI\-o\fP option is specified and an input file other than "\fB\-\fP" is
57 specified, then \fBllc\fP creates the output filename by taking the input
58 filename, removing any existing \fB.bc\fP extension, and adding a \fB.s\fP suffix.
59 .sp
60 Other \fBllc\fP options are described below.
61 .SS End\-user Options
62 .INDENT 0.0
63 .TP
64 .B \-help
65 Print a summary of command line options.
66 .UNINDENT
67 .INDENT 0.0
68 .TP
69 .B \-O=uint
70 Generate code at different optimization levels.  These correspond to the
71 \fB\-O0\fP, \fB\-O1\fP, \fB\-O2\fP, and \fB\-O3\fP optimization levels used by
72 \fBllvm\-gcc\fP and \fBclang\fP.
73 .UNINDENT
74 .INDENT 0.0
75 .TP
76 .B \-mtriple=<target triple>
77 Override the target triple specified in the input file with the specified
78 string.
79 .UNINDENT
80 .INDENT 0.0
81 .TP
82 .B \-march=<arch>
83 Specify the architecture for which to generate assembly, overriding the target
84 encoded in the input file.  See the output of \fBllc \-help\fP for a list of
85 valid architectures.  By default this is inferred from the target triple or
86 autodetected to the current architecture.
87 .UNINDENT
88 .INDENT 0.0
89 .TP
90 .B \-mcpu=<cpuname>
91 Specify a specific chip in the current architecture to generate code for.
92 By default this is inferred from the target triple and autodetected to
93 the current architecture.  For a list of available CPUs, use:
94 .INDENT 7.0
95 .INDENT 3.5
96 .sp
97 .nf
98 .ft C
99 llvm\-as < /dev/null | llc \-march=xyz \-mcpu=help
100 .ft P
101 .fi
102 .UNINDENT
103 .UNINDENT
104 .UNINDENT
105 .INDENT 0.0
106 .TP
107 .B \-filetype=<output file type>
108 Specify what kind of output \fBllc\fP should generated.  Options are: \fBasm\fP
109 for textual assembly ( \fB\(aq.s\(aq\fP), \fBobj\fP for native object files (\fB\(aq.o\(aq\fP)
110 and \fBnull\fP for not emitting anything (for performance testing).
111 .sp
112 Note that not all targets support all options.
113 .UNINDENT
114 .INDENT 0.0
115 .TP
116 .B \-mattr=a1,+a2,\-a3,...
117 Override or control specific attributes of the target, such as whether SIMD
118 operations are enabled or not.  The default set of attributes is set by the
119 current CPU.  For a list of available attributes, use:
120 .INDENT 7.0
121 .INDENT 3.5
122 .sp
123 .nf
124 .ft C
125 llvm\-as < /dev/null | llc \-march=xyz \-mattr=help
126 .ft P
127 .fi
128 .UNINDENT
129 .UNINDENT
130 .UNINDENT
131 .INDENT 0.0
132 .TP
133 .B \-\-disable\-fp\-elim
134 Disable frame pointer elimination optimization.
135 .UNINDENT
136 .INDENT 0.0
137 .TP
138 .B \-\-disable\-excess\-fp\-precision
139 Disable optimizations that may produce excess precision for floating point.
140 Note that this option can dramatically slow down code on some systems
141 (e.g. X86).
142 .UNINDENT
143 .INDENT 0.0
144 .TP
145 .B \-\-enable\-no\-infs\-fp\-math
146 Enable optimizations that assume no Inf values.
147 .UNINDENT
148 .INDENT 0.0
149 .TP
150 .B \-\-enable\-no\-nans\-fp\-math
151 Enable optimizations that assume no NAN values.
152 .UNINDENT
153 .INDENT 0.0
154 .TP
155 .B \-\-enable\-unsafe\-fp\-math
156 Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
157 addition is associative) or may not work for all input ranges.  These
158 optimizations allow the code generator to make use of some instructions which
159 would otherwise not be usable (such as \fBfsin\fP on X86).
160 .UNINDENT
161 .INDENT 0.0
162 .TP
163 .B \-\-enable\-correct\-eh\-support
164 Instruct the \fBlowerinvoke\fP pass to insert code for correct exception
165 handling support.  This is expensive and is by default omitted for efficiency.
166 .UNINDENT
167 .INDENT 0.0
168 .TP
169 .B \-\-stats
170 Print statistics recorded by code\-generation passes.
171 .UNINDENT
172 .INDENT 0.0
173 .TP
174 .B \-\-time\-passes
175 Record the amount of time needed for each pass and print a report to standard
176 error.
177 .UNINDENT
178 .INDENT 0.0
179 .TP
180 .B \-\-load=<dso_path>
181 Dynamically load \fBdso_path\fP (a path to a dynamically shared object) that
182 implements an LLVM target.  This will permit the target name to be used with
183 the \fI\%-march\fP option so that code can be generated for that target.
184 .UNINDENT
185 .SS Tuning/Configuration Options
186 .INDENT 0.0
187 .TP
188 .B \-\-print\-machineinstrs
189 Print generated machine code between compilation phases (useful for debugging).
190 .UNINDENT
191 .INDENT 0.0
192 .TP
193 .B \-\-regalloc=<allocator>
194 Specify the register allocator to use.  The default \fBallocator\fP is \fIlocal\fP.
195 Valid register allocators are:
196 .sp
197 \fIsimple\fP
198 .INDENT 7.0
199 .INDENT 3.5
200 Very simple "always spill" register allocator
201 .UNINDENT
202 .UNINDENT
203 .sp
204 \fIlocal\fP
205 .INDENT 7.0
206 .INDENT 3.5
207 Local register allocator
208 .UNINDENT
209 .UNINDENT
210 .sp
211 \fIlinearscan\fP
212 .INDENT 7.0
213 .INDENT 3.5
214 Linear scan global register allocator
215 .UNINDENT
216 .UNINDENT
217 .sp
218 \fIiterativescan\fP
219 .INDENT 7.0
220 .INDENT 3.5
221 Iterative scan global register allocator
222 .UNINDENT
223 .UNINDENT
224 .UNINDENT
225 .INDENT 0.0
226 .TP
227 .B \-\-spiller=<spiller>
228 Specify the spiller to use for register allocators that support it.  Currently
229 this option is used only by the linear scan register allocator.  The default
230 \fBspiller\fP is \fIlocal\fP.  Valid spillers are:
231 .sp
232 \fIsimple\fP
233 .INDENT 7.0
234 .INDENT 3.5
235 Simple spiller
236 .UNINDENT
237 .UNINDENT
238 .sp
239 \fIlocal\fP
240 .INDENT 7.0
241 .INDENT 3.5
242 Local spiller
243 .UNINDENT
244 .UNINDENT
245 .UNINDENT
246 .SS Intel IA\-32\-specific Options
247 .INDENT 0.0
248 .TP
249 .B \-\-x86\-asm\-syntax=[att|intel]
250 Specify whether to emit assembly code in AT&T syntax (the default) or Intel
251 syntax.
252 .UNINDENT
253 .SH EXIT STATUS
254 .sp
255 If \fBllc\fP succeeds, it will exit with 0.  Otherwise, if an error
256 occurs, it will exit with a non\-zero value.
257 .SH SEE ALSO
258 .sp
259 lli
260 .SH AUTHOR
261 Maintained by The LLVM Team (http://llvm.org/).
262 .SH COPYRIGHT
263 2003-2013, LLVM Project
264 .\" Generated by docutils manpage writer.
265 .