]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/llc/llc.1
sys/{x86,amd64}: remove one of doubled ;s
[FreeBSD/FreeBSD.git] / usr.bin / clang / llc / llc.1
1 .\" $FreeBSD$
2 .\" Man page generated from reStructuredText.
3 .
4 .TH "LLC" "1" "2018-08-02" "7" "LLVM"
5 .SH NAME
6 llc \- LLVM static compiler
7 .
8 .nr rst2man-indent-level 0
9 .
10 .de1 rstReportMargin
11 \\$1 \\n[an-margin]
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
14 -
15 \\n[rst2man-indent0]
16 \\n[rst2man-indent1]
17 \\n[rst2man-indent2]
18 ..
19 .de1 INDENT
20 .\" .rstReportMargin pre:
21 . RS \\$1
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
25 ..
26 .de UNINDENT
27 . RE
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
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 \fB\-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 \fB\-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 \fB\-o\fP
54 option specifies "\fB\-\fP", 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 "\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 \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 \-\-stats
164 Print statistics recorded by code\-generation passes.
165 .UNINDENT
166 .INDENT 0.0
167 .TP
168 .B \-\-time\-passes
169 Record the amount of time needed for each pass and print a report to standard
170 error.
171 .UNINDENT
172 .INDENT 0.0
173 .TP
174 .B \-\-load=<dso_path>
175 Dynamically load \fBdso_path\fP (a path to a dynamically shared object) that
176 implements an LLVM target.  This will permit the target name to be used with
177 the \fB\-march\fP option so that code can be generated for that target.
178 .UNINDENT
179 .INDENT 0.0
180 .TP
181 .B \-meabi=[default|gnu|4|5]
182 Specify which EABI version should conform to.  Valid EABI versions are \fIgnu\fP,
183 \fI4\fP and \fI5\fP\&.  Default value (\fIdefault\fP) depends on the triple.
184 .UNINDENT
185 .INDENT 0.0
186 .TP
187 .B \-stack\-size\-section
188 Emit the .stack_sizes section which contains stack size metadata. The section
189 contains an array of pairs of function symbol values (pointer size) and stack
190 sizes (unsigned LEB128). The stack size values only include the space allocated
191 in the function prologue. Functions with dynamic stack allocations are not
192 included.
193 .UNINDENT
194 .SS Tuning/Configuration Options
195 .INDENT 0.0
196 .TP
197 .B \-\-print\-machineinstrs
198 Print generated machine code between compilation phases (useful for debugging).
199 .UNINDENT
200 .INDENT 0.0
201 .TP
202 .B \-\-regalloc=<allocator>
203 Specify the register allocator to use.
204 Valid register allocators are:
205 .sp
206 \fIbasic\fP
207 .INDENT 7.0
208 .INDENT 3.5
209 Basic register allocator.
210 .UNINDENT
211 .UNINDENT
212 .sp
213 \fIfast\fP
214 .INDENT 7.0
215 .INDENT 3.5
216 Fast register allocator. It is the default for unoptimized code.
217 .UNINDENT
218 .UNINDENT
219 .sp
220 \fIgreedy\fP
221 .INDENT 7.0
222 .INDENT 3.5
223 Greedy register allocator. It is the default for optimized code.
224 .UNINDENT
225 .UNINDENT
226 .sp
227 \fIpbqp\fP
228 .INDENT 7.0
229 .INDENT 3.5
230 Register allocator based on \(aqPartitioned Boolean Quadratic Programming\(aq.
231 .UNINDENT
232 .UNINDENT
233 .UNINDENT
234 .INDENT 0.0
235 .TP
236 .B \-\-spiller=<spiller>
237 Specify the spiller to use for register allocators that support it.  Currently
238 this option is used only by the linear scan register allocator.  The default
239 \fBspiller\fP is \fIlocal\fP\&.  Valid spillers are:
240 .sp
241 \fIsimple\fP
242 .INDENT 7.0
243 .INDENT 3.5
244 Simple spiller
245 .UNINDENT
246 .UNINDENT
247 .sp
248 \fIlocal\fP
249 .INDENT 7.0
250 .INDENT 3.5
251 Local spiller
252 .UNINDENT
253 .UNINDENT
254 .UNINDENT
255 .SS Intel IA\-32\-specific Options
256 .INDENT 0.0
257 .TP
258 .B \-\-x86\-asm\-syntax=[att|intel]
259 Specify whether to emit assembly code in AT&T syntax (the default) or Intel
260 syntax.
261 .UNINDENT
262 .SH EXIT STATUS
263 .sp
264 If \fBllc\fP succeeds, it will exit with 0.  Otherwise, if an error
265 occurs, it will exit with a non\-zero value.
266 .SH SEE ALSO
267 .sp
268 lli
269 .SH AUTHOR
270 Maintained by The LLVM Team (http://llvm.org/).
271 .SH COPYRIGHT
272 2003-2018, LLVM Project
273 .\" Generated by docutils manpage writer.
274 .