]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - usr.bin/clang/llc/llc.1
MFC r234353:
[FreeBSD/stable/9.git] / usr.bin / clang / llc / llc.1
1 .\" $FreeBSD$
2 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" Set up some character translations and predefined strings.  \*(-- will
20 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
21 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
22 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
23 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
24 .\" nothing in troff, for use with C<>.
25 .tr \(*W-
26 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
27 .ie n \{\
28 .    ds -- \(*W-
29 .    ds PI pi
30 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
31 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
32 .    ds L" ""
33 .    ds R" ""
34 .    ds C` ""
35 .    ds C' ""
36 'br\}
37 .el\{\
38 .    ds -- \|\(em\|
39 .    ds PI \(*p
40 .    ds L" ``
41 .    ds R" ''
42 'br\}
43 .\"
44 .\" Escape single quotes in literal strings from groff's Unicode transform.
45 .ie \n(.g .ds Aq \(aq
46 .el       .ds Aq '
47 .\"
48 .\" If the F register is turned on, we'll generate index entries on stderr for
49 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
50 .\" entries marked with X<> in POD.  Of course, you'll have to process the
51 .\" output yourself in some meaningful fashion.
52 .ie \nF \{\
53 .    de IX
54 .    tm Index:\\$1\t\\n%\t"\\$2"
55 ..
56 .    nr % 0
57 .    rr F
58 .\}
59 .el \{\
60 .    de IX
61 ..
62 .\}
63 .\"
64 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
65 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
66 .    \" fudge factors for nroff and troff
67 .if n \{\
68 .    ds #H 0
69 .    ds #V .8m
70 .    ds #F .3m
71 .    ds #[ \f1
72 .    ds #] \fP
73 .\}
74 .if t \{\
75 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
76 .    ds #V .6m
77 .    ds #F 0
78 .    ds #[ \&
79 .    ds #] \&
80 .\}
81 .    \" simple accents for nroff and troff
82 .if n \{\
83 .    ds ' \&
84 .    ds ` \&
85 .    ds ^ \&
86 .    ds , \&
87 .    ds ~ ~
88 .    ds /
89 .\}
90 .if t \{\
91 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
92 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
93 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
94 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
95 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
96 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
97 .\}
98 .    \" troff and (daisy-wheel) nroff accents
99 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
100 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
101 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
102 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
103 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
104 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
105 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
106 .ds ae a\h'-(\w'a'u*4/10)'e
107 .ds Ae A\h'-(\w'A'u*4/10)'E
108 .    \" corrections for vroff
109 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
110 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
111 .    \" for low resolution devices (crt and lpr)
112 .if \n(.H>23 .if \n(.V>19 \
113 \{\
114 .    ds : e
115 .    ds 8 ss
116 .    ds o a
117 .    ds d- d\h'-1'\(ga
118 .    ds D- D\h'-1'\(hy
119 .    ds th \o'bp'
120 .    ds Th \o'LP'
121 .    ds ae ae
122 .    ds Ae AE
123 .\}
124 .rm #[ #] #H #V #F C
125 .\" ========================================================================
126 .\"
127 .IX Title "LLC 1"
128 .TH LLC 1 "2012-04-06" "LLVM 3.1" "LLVM Command Guide"
129 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
130 .\" way too many mistakes in technical documents.
131 .if n .ad l
132 .nh
133 .SH "NAME"
134 llc \- LLVM static compiler
135 .SH "SYNOPSIS"
136 .IX Header "SYNOPSIS"
137 \&\fBllc\fR [\fIoptions\fR] [\fIfilename\fR]
138 .SH "DESCRIPTION"
139 .IX Header "DESCRIPTION"
140 The \fBllc\fR command compiles \s-1LLVM\s0 source inputs into assembly language for a
141 specified architecture.  The assembly language output can then be passed through
142 a native assembler and linker to generate a native executable.
143 .PP
144 The choice of architecture for the output assembly code is automatically
145 determined from the input file, unless the \fB\-march\fR option is used to override
146 the default.
147 .SH "OPTIONS"
148 .IX Header "OPTIONS"
149 If \fIfilename\fR is \- or omitted, \fBllc\fR reads from standard input.  Otherwise, it
150 will from \fIfilename\fR.  Inputs can be in either the \s-1LLVM\s0 assembly language
151 format (.ll) or the \s-1LLVM\s0 bitcode format (.bc).
152 .PP
153 If the \fB\-o\fR option is omitted, then \fBllc\fR will send its output to standard
154 output if the input is from standard input.  If the \fB\-o\fR option specifies \-,
155 then the output will also be sent to standard output.
156 .PP
157 If no \fB\-o\fR option is specified and an input file other than \- is specified,
158 then \fBllc\fR creates the output filename by taking the input filename,
159 removing any existing \fI.bc\fR extension, and adding a \fI.s\fR suffix.
160 .PP
161 Other \fBllc\fR options are as follows:
162 .SS "End-user Options"
163 .IX Subsection "End-user Options"
164 .IP "\fB\-help\fR" 4
165 .IX Item "-help"
166 Print a summary of command line options.
167 .IP "\fB\-O\fR=\fIuint\fR" 4
168 .IX Item "-O=uint"
169 Generate code at different optimization levels. These correspond to the \fI\-O0\fR,
170 \&\fI\-O1\fR, \fI\-O2\fR, and \fI\-O3\fR optimization levels used by \fBllvm-gcc\fR and
171 \&\fBclang\fR.
172 .IP "\fB\-mtriple\fR=\fItarget triple\fR" 4
173 .IX Item "-mtriple=target triple"
174 Override the target triple specified in the input file with the specified
175 string.
176 .IP "\fB\-march\fR=\fIarch\fR" 4
177 .IX Item "-march=arch"
178 Specify the architecture for which to generate assembly, overriding the target
179 encoded in the input file.  See the output of \fBllc \-help\fR for a list of
180 valid architectures.  By default this is inferred from the target triple or
181 autodetected to the current architecture.
182 .IP "\fB\-mcpu\fR=\fIcpuname\fR" 4
183 .IX Item "-mcpu=cpuname"
184 Specify a specific chip in the current architecture to generate code for.
185 By default this is inferred from the target triple and autodetected to 
186 the current architecture.  For a list of available CPUs, use:
187 \&\fBllvm-as < /dev/null | llc \-march=xyz \-mcpu=help\fR
188 .IP "\fB\-mattr\fR=\fIa1,+a2,\-a3,...\fR" 4
189 .IX Item "-mattr=a1,+a2,-a3,..."
190 Override or control specific attributes of the target, such as whether \s-1SIMD\s0
191 operations are enabled or not.  The default set of attributes is set by the
192 current \s-1CPU\s0.  For a list of available attributes, use:
193 \&\fBllvm-as < /dev/null | llc \-march=xyz \-mattr=help\fR
194 .IP "\fB\-\-disable\-fp\-elim\fR" 4
195 .IX Item "--disable-fp-elim"
196 Disable frame pointer elimination optimization.
197 .IP "\fB\-\-disable\-excess\-fp\-precision\fR" 4
198 .IX Item "--disable-excess-fp-precision"
199 Disable optimizations that may produce excess precision for floating point.
200 Note that this option can dramatically slow down code on some systems
201 (e.g. X86).
202 .IP "\fB\-\-enable\-no\-infs\-fp\-math\fR" 4
203 .IX Item "--enable-no-infs-fp-math"
204 Enable optimizations that assume no Inf values.
205 .IP "\fB\-\-enable\-no\-nans\-fp\-math\fR" 4
206 .IX Item "--enable-no-nans-fp-math"
207 Enable optimizations that assume no \s-1NAN\s0 values.
208 .IP "\fB\-\-enable\-unsafe\-fp\-math\fR" 4
209 .IX Item "--enable-unsafe-fp-math"
210 Enable optimizations that make unsafe assumptions about \s-1IEEE\s0 math (e.g. that
211 addition is associative) or may not work for all input ranges.  These
212 optimizations allow the code generator to make use of some instructions which
213 would otherwise not be usable (such as fsin on X86).
214 .IP "\fB\-\-enable\-correct\-eh\-support\fR" 4
215 .IX Item "--enable-correct-eh-support"
216 Instruct the \fBlowerinvoke\fR pass to insert code for correct exception handling
217 support.  This is expensive and is by default omitted for efficiency.
218 .IP "\fB\-\-stats\fR" 4
219 .IX Item "--stats"
220 Print statistics recorded by code-generation passes.
221 .IP "\fB\-\-time\-passes\fR" 4
222 .IX Item "--time-passes"
223 Record the amount of time needed for each pass and print a report to standard
224 error.
225 .IP "\fB\-\-load\fR=\fIdso_path\fR" 4
226 .IX Item "--load=dso_path"
227 Dynamically load \fIdso_path\fR (a path to a dynamically shared object) that
228 implements an \s-1LLVM\s0 target. This will permit the target name to be used with the
229 \&\fB\-march\fR option so that code can be generated for that target.
230 .SS "Tuning/Configuration Options"
231 .IX Subsection "Tuning/Configuration Options"
232 .IP "\fB\-\-print\-machineinstrs\fR" 4
233 .IX Item "--print-machineinstrs"
234 Print generated machine code between compilation phases (useful for debugging).
235 .IP "\fB\-\-regalloc\fR=\fIallocator\fR" 4
236 .IX Item "--regalloc=allocator"
237 Specify the register allocator to use. The default \fIallocator\fR is \fIlocal\fR.
238 Valid register allocators are:
239 .RS 4
240 .IP "\fIsimple\fR" 4
241 .IX Item "simple"
242 Very simple \*(L"always spill\*(R" register allocator
243 .IP "\fIlocal\fR" 4
244 .IX Item "local"
245 Local register allocator
246 .IP "\fIlinearscan\fR" 4
247 .IX Item "linearscan"
248 Linear scan global register allocator
249 .IP "\fIiterativescan\fR" 4
250 .IX Item "iterativescan"
251 Iterative scan global register allocator
252 .RE
253 .RS 4
254 .RE
255 .IP "\fB\-\-spiller\fR=\fIspiller\fR" 4
256 .IX Item "--spiller=spiller"
257 Specify the spiller to use for register allocators that support it.  Currently
258 this option is used only by the linear scan register allocator. The default
259 \&\fIspiller\fR is \fIlocal\fR.  Valid spillers are:
260 .RS 4
261 .IP "\fIsimple\fR" 4
262 .IX Item "simple"
263 Simple spiller
264 .IP "\fIlocal\fR" 4
265 .IX Item "local"
266 Local spiller
267 .RE
268 .RS 4
269 .RE
270 .SS "Intel IA\-32\-specific Options"
271 .IX Subsection "Intel IA-32-specific Options"
272 .IP "\fB\-\-x86\-asm\-syntax=att|intel\fR" 4
273 .IX Item "--x86-asm-syntax=att|intel"
274 Specify whether to emit assembly code in \s-1AT&T\s0 syntax (the default) or intel
275 syntax.
276 .SH "EXIT STATUS"
277 .IX Header "EXIT STATUS"
278 If \fBllc\fR succeeds, it will exit with 0.  Otherwise, if an error occurs,
279 it will exit with a non-zero value.
280 .SH "SEE ALSO"
281 .IX Header "SEE ALSO"
282 lli
283 .SH "AUTHORS"
284 .IX Header "AUTHORS"
285 Maintained by the \s-1LLVM\s0 Team (<http://llvm.org/>).