2 .\" Man page generated from reStructuredText.
4 .TH "LLC" "1" "2016-03-03" "3.8" "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 \fB\-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 \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.
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.
60 Other \fBllc\fP options are described below.
65 Print a summary of command line options.
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
76 .B \-mtriple=<target triple>
77 Override the target triple specified in the input file with the specified
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.
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:
99 llvm\-as < /dev/null | llc \-march=xyz \-mcpu=help
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).
112 Note that not all targets support all options.
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:
125 llvm\-as < /dev/null | llc \-march=xyz \-mattr=help
133 .B \-\-disable\-fp\-elim
134 Disable frame pointer elimination optimization.
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
145 .B \-\-enable\-no\-infs\-fp\-math
146 Enable optimizations that assume no Inf values.
150 .B \-\-enable\-no\-nans\-fp\-math
151 Enable optimizations that assume no NAN values.
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).
164 Print statistics recorded by code\-generation passes.
169 Record the amount of time needed for each pass and print a report to standard
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.
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.
185 .SS Tuning/Configuration Options
188 .B \-\-print\-machineinstrs
189 Print generated machine code between compilation phases (useful for debugging).
193 .B \-\-regalloc=<allocator>
194 Specify the register allocator to use.
195 Valid register allocators are:
200 Basic register allocator.
207 Fast register allocator. It is the default for unoptimized code.
214 Greedy register allocator. It is the default for optimized code.
221 Register allocator based on \(aqPartitioned Boolean Quadratic Programming\(aq.
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:
246 .SS Intel IA\-32\-specific Options
249 .B \-\-x86\-asm\-syntax=[att|intel]
250 Specify whether to emit assembly code in AT&T syntax (the default) or Intel
255 If \fBllc\fP succeeds, it will exit with 0. Otherwise, if an error
256 occurs, it will exit with a non\-zero value.
261 Maintained by The LLVM Team (http://llvm.org/).
263 2003-2016, LLVM Project
264 .\" Generated by docutils manpage writer.