2 .\" Man page generated from reStructuredText.
4 .TH "LLC" "1" "2020-06-26" "10" "LLVM"
6 llc \- LLVM static compiler
8 .nr rst2man-indent-level 0
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
20 .\" .rstReportMargin pre:
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
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
36 \fBllc\fP [\fIoptions\fP] [\fIfilename\fP]
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.
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
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).
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.
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.
60 Other \fBllc\fP options are described below.
65 Print a summary of command line options.
70 Use \fB<filename>\fP as the output filename. See the summary above for more
76 Generate code at different optimization levels. These correspond to the
77 \fB\-O0\fP, \fB\-O1\fP, \fB\-O2\fP, and \fB\-O3\fP optimization levels used by
82 .B \-mtriple=<target triple>
83 Override the target triple specified in the input file with the specified
89 Specify the architecture for which to generate assembly, overriding the target
90 encoded in the input file. See the output of \fBllc \-help\fP for a list of
91 valid architectures. By default this is inferred from the target triple or
92 autodetected to the current architecture.
97 Specify a specific chip in the current architecture to generate code for.
98 By default this is inferred from the target triple and autodetected to
99 the current architecture. For a list of available CPUs, use:
105 llvm\-as < /dev/null | llc \-march=xyz \-mcpu=help
113 .B \-filetype=<output file type>
114 Specify what kind of output \fBllc\fP should generated. Options are: \fBasm\fP
115 for textual assembly ( \fB\(aq.s\(aq\fP), \fBobj\fP for native object files (\fB\(aq.o\(aq\fP)
116 and \fBnull\fP for not emitting anything (for performance testing).
118 Note that not all targets support all options.
122 .B \-mattr=a1,+a2,\-a3,...
123 Override or control specific attributes of the target, such as whether SIMD
124 operations are enabled or not. The default set of attributes is set by the
125 current CPU. For a list of available attributes, use:
131 llvm\-as < /dev/null | llc \-march=xyz \-mattr=help
139 .B \-\-frame\-pointer
140 Specify effect of frame pointer elimination optimization (all,non\-leaf,none).
144 .B \-\-disable\-excess\-fp\-precision
145 Disable optimizations that may produce excess precision for floating point.
146 Note that this option can dramatically slow down code on some systems
151 .B \-\-enable\-no\-infs\-fp\-math
152 Enable optimizations that assume no Inf values.
156 .B \-\-enable\-no\-nans\-fp\-math
157 Enable optimizations that assume no NAN values.
161 .B \-\-enable\-unsafe\-fp\-math
162 Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
163 addition is associative) or may not work for all input ranges. These
164 optimizations allow the code generator to make use of some instructions which
165 would otherwise not be usable (such as \fBfsin\fP on X86).
170 Print statistics recorded by code\-generation passes.
175 Record the amount of time needed for each pass and print a report to standard
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.
187 .B \-meabi=[default|gnu|4|5]
188 Specify which EABI version should conform to. Valid EABI versions are \fIgnu\fP,
189 \fI4\fP and \fI5\fP\&. Default value (\fIdefault\fP) depends on the triple.
193 .B \-stack\-size\-section
194 Emit the .stack_sizes section which contains stack size metadata. The section
195 contains an array of pairs of function symbol values (pointer size) and stack
196 sizes (unsigned LEB128). The stack size values only include the space allocated
197 in the function prologue. Functions with dynamic stack allocations are not
202 .B \-remarks\-section
203 Emit the __remarks (MachO) section which contains metadata about remark
206 .SS Tuning/Configuration Options
209 .B \-\-print\-machineinstrs
210 Print generated machine code between compilation phases (useful for debugging).
214 .B \-\-regalloc=<allocator>
215 Specify the register allocator to use.
216 Valid register allocators are:
221 Basic register allocator.
228 Fast register allocator. It is the default for unoptimized code.
235 Greedy register allocator. It is the default for optimized code.
242 Register allocator based on \(aqPartitioned Boolean Quadratic Programming\(aq.
248 .B \-\-spiller=<spiller>
249 Specify the spiller to use for register allocators that support it. Currently
250 this option is used only by the linear scan register allocator. The default
251 \fBspiller\fP is \fIlocal\fP\&. Valid spillers are:
267 .SS Intel IA\-32\-specific Options
270 .B \-\-x86\-asm\-syntax=[att|intel]
271 Specify whether to emit assembly code in AT&T syntax (the default) or Intel
276 If \fBllc\fP succeeds, it will exit with 0. Otherwise, if an error
277 occurs, it will exit with a non\-zero value.
282 Maintained by the LLVM Team (https://llvm.org/).
284 2003-2020, LLVM Project
285 .\" Generated by docutils manpage writer.