5 llc - LLVM static compiler
9 B<llc> [I<options>] [I<filename>]
13 The B<llc> command compiles LLVM bitcode into assembly language for a
14 specified architecture. The assembly language output can then be passed through
15 a native assembler and linker to generate a native executable.
17 The choice of architecture for the output assembly code is automatically
18 determined from the input bitcode file, unless the B<-march> option is used to
23 If I<filename> is - or omitted, B<llc> reads LLVM bitcode from standard input.
24 Otherwise, it will read LLVM bitcode from I<filename>.
26 If the B<-o> option is omitted, then B<llc> will send its output to standard
27 output if the input is from standard input. If the B<-o> option specifies -,
28 then the output will also be sent to standard output.
30 If no B<-o> option is specified and an input file other than - is specified,
31 then B<llc> creates the output filename by taking the input filename,
32 removing any existing F<.bc> extension, and adding a F<.s> suffix.
34 Other B<llc> options are as follows:
36 =head2 End-user Options
42 Print a summary of command line options.
46 Generate code at different optimization levels. These correspond to the I<-O0>,
47 I<-O1>, I<-O2>, I<-O3>, and I<-O4> optimization levels used by B<llvm-gcc> and
52 Overwrite output files. By default, B<llc> will refuse to overwrite
53 an output file which already exists.
55 =item B<-mtriple>=I<target triple>
57 Override the target triple specified in the input bitcode file with the
60 =item B<-march>=I<arch>
62 Specify the architecture for which to generate assembly, overriding the target
63 encoded in the bitcode file. See the output of B<llc --help> for a list of
64 valid architectures. By default this is inferred from the target triple or
65 autodetected to the current architecture.
67 =item B<-mcpu>=I<cpuname>
69 Specify a specific chip in the current architecture to generate code for.
70 By default this is inferred from the target triple and autodetected to
71 the current architecture. For a list of available CPUs, use:
72 B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help>
74 =item B<-mattr>=I<a1,+a2,-a3,...>
76 Override or control specific attributes of the target, such as whether SIMD
77 operations are enabled or not. The default set of attributes is set by the
78 current CPU. For a list of available attributes, use:
79 B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help>
81 =item B<--disable-fp-elim>
83 Disable frame pointer elimination optimization.
85 =item B<--disable-excess-fp-precision>
87 Disable optimizations that may produce excess precision for floating point.
88 Note that this option can dramatically slow down code on some systems
91 =item B<--enable-unsafe-fp-math>
93 Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
94 addition is associative) or may not work for all input ranges. These
95 optimizations allow the code generator to make use of some instructions which
96 would otherwise not be usable (such as fsin on X86).
98 =item B<--enable-correct-eh-support>
100 Instruct the B<lowerinvoke> pass to insert code for correct exception handling
101 support. This is expensive and is by default omitted for efficiency.
105 Print statistics recorded by code-generation passes.
107 =item B<--time-passes>
109 Record the amount of time needed for each pass and print a report to standard
112 =item B<--load>=F<dso_path>
114 Dynamically load F<dso_path> (a path to a dynamically shared object) that
115 implements an LLVM target. This will permit the target name to be used with the
116 B<-march> option so that code can be generated for that target.
120 =head2 Tuning/Configuration Options
124 =item B<--print-machineinstrs>
126 Print generated machine code between compilation phases (useful for debugging).
128 =item B<--regalloc>=I<allocator>
130 Specify the register allocator to use. The default I<allocator> is I<local>.
131 Valid register allocators are:
137 Very simple "always spill" register allocator
141 Local register allocator
145 Linear scan global register allocator
147 =item I<iterativescan>
149 Iterative scan global register allocator
153 =item B<--spiller>=I<spiller>
155 Specify the spiller to use for register allocators that support it. Currently
156 this option is used only by the linear scan register allocator. The default
157 I<spiller> is I<local>. Valid spillers are:
173 =head2 Intel IA-32-specific Options
177 =item B<--x86-asm-syntax=att|intel>
179 Specify whether to emit assembly code in AT&T syntax (the default) or intel
186 If B<llc> succeeds, it will exit with 0. Otherwise, if an error occurs,
187 it will exit with a non-zero value.
195 Maintained by the LLVM Team (L<http://llvm.org>).