2 <title>LLVM: llc tool</title>
6 <center><h1>LLVM: <tt>llc</tt> tool</h1></center>
13 <tt>llc [options] [filename]</tt>
17 The <tt>llc</tt> command compiles LLVM bytecode into assembly language for a
18 specified architecture. The assembly language output can then be passed through
19 a native assembler and linker to generate native code.
21 The choice of architecture for the output assembly code is determined as
26 If the user has specified an architecture with the -m option, use that
31 Examine the input LLVM bytecode file:
34 If it specifies little endian and a pointer size of 32 bits, select the
39 If it specifies big endian and a pointer size of 64 bit pointers,
40 select the SparcV9 architecture.
45 If <tt>llc</tt> was compiled on an architecture for which it can
46 generate code, select the architecture upon which <tt>llc</tt> was
51 Print a message to the user asking him or her to specify the output
52 architecture explicitly.
57 If filename is not specified, or if filename is -, <tt>llc</tt> reads its input
58 from standard input. Otherwise, it will read its input from filename.
61 If the -o option is left unspecified, then <tt>llc</tt> will send its output to standard
62 output if the input is from standard input. If the -o option specifies -, then
63 the output will also be sent to standard output.
66 If no -o option is specified and an input file other than - is specified, then
67 <tt>llc</tt> creates the output filename as follows:
71 If the file ends in .bc, then the .bc suffix is removed, and the .s suffix
75 Otherwise, the .s suffix is appended to the input filename.
84 Overwrite output files
89 Specify the architecture for which to generate assembly. Valid
94 <dd>IA-32 (Pentium and above)</dd>
104 <li>-o <filename>
106 Specify the output filename.
109 <li>-enable-correct-eh-support
111 Instruct the -lowerinvoke pass to insert code for correct exception handling
112 support. This is expensive and is by default omitted for efficiency.
117 Print a summary of command line options.
127 Record the amount of time needed for each pass and print it to standard
132 <h4>X86 Specific Options</h4>
136 Disable frame pointer elimination optimization.
139 <li>-disable-pattern-isel
141 Use the 'simple' X86 instruction selector (the default).
144 <li>-print-machineinstrs
146 Print generated machine code.
149 <li>-regalloc=<ra>
151 Specify the register allocator to use. The default is <i>local</i>.
152 Valid register allocators are:
156 <dd>Very simple register allocator</dd>
159 <dd>Local register allocator</dd>
161 <dt> linearscan </dt>
162 <dd>Linear scan global register allocator (experimental)</dd>
165 <li>-spiller=<sp>
167 Specify the spiller to use for register allocators that support it.
168 Currently this option is used by the linear scan register
169 allocator. The default is <i>local</i>.
174 <dd>Simple spiller</dd>
177 <dd>Local spiller</dd>
182 <h4>Sparc Specific Options</h4>
184 <li>-disable-peephole
186 Disable peephole optimization pass.
191 Disable local scheduling pass.
196 Do not strip the LLVM bytecode included in executable.
201 Emit LLVM-to-MachineCode mapping info to assembly.
208 If <tt>llc</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
209 it will exit with a non-zero value.
214 <a href="lli.html"><tt>lli</tt></a>
217 Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.