5 llc - LLVM static compiler
9 B<llc> [I<options>] [I<filename>]
13 The B<llc> command compiles LLVM bytecode 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 bytecode file, unless the B<-march> option is used to
23 If I<filename> is - or omitted, B<llc> reads LLVM bytecode from standard input.
24 Otherwise, it will read LLVM bytecode 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 Overwrite output files. By default, B<llc> will refuse to overwrite
47 an output file which already exists.
49 =item B<-march>=I<arch>
51 Specify the architecture for which to generate assembly, overriding the target
52 encoded in the bytecode file. See the output of B<llc --help> for a list of
55 =item B<--disable-fp-elim>
57 Disable frame pointer elimination optimization.
59 =item B<--disable-excess-fp-precision>
61 Disable optimizations that may produce excess precision for floating point.
62 Note that this option can dramatically slow down code on some systems
65 =item B<--enable-unsafe-fp-math>
67 Enable optimizations that make unsafe assumptions about IEEE math (e.g. that
68 addition is associative) or may not work for all input ranges. These
69 optimizations allow the code generator to make use of some instructions which
70 would otherwise not be usable (such as fsin on X86).
72 =item B<--enable-correct-eh-support>
74 Instruct the B<lowerinvoke> pass to insert code for correct exception handling
75 support. This is expensive and is by default omitted for efficiency.
79 Print statistics recorded by code-generation passes.
81 =item B<--time-passes>
83 Record the amount of time needed for each pass and print a report to standard
86 =item B<--load>=F<dso_path>
88 Dynamically load F<dso_path> (a path to a dynamically shared object) that
89 implements an LLVM target. This will permit the target name to be used with the
90 B<-march> option so that code can be generated for that target.
94 =head2 Tuning/Configuration Options
98 =item B<--print-machineinstrs>
100 Print generated machine code between compilation phases (useful for debugging).
102 =item B<--regalloc>=I<allocator>
104 Specify the register allocator to use. The default I<allocator> is I<local>.
105 Valid register allocators are:
111 Very simple "always spill" register allocator
115 Local register allocator
119 Linear scan global register allocator
121 =item I<iterativescan>
123 Iterative scan global register allocator
127 =item B<--spiller>=I<spiller>
129 Specify the spiller to use for register allocators that support it. Currently
130 this option is used only by the linear scan register allocator. The default
131 I<spiller> is I<local>. Valid spillers are:
147 =head2 Intel IA-32-specific Options
151 =item B<--x86-asm-syntax=att|intel>
153 Specify whether to emit assembly code in AT&T syntax (the default) or intel
158 =head2 SPARCV9-specific Options
162 =item B<--disable-peephole>
164 Disable peephole optimization pass.
166 =item B<--disable-sched>
168 Disable local scheduling pass.
174 If B<llc> succeeds, it will exit with 0. Otherwise, if an error occurs,
175 it will exit with a non-zero value.
183 Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).