2003-09-12 15:46:24 +00:00
|
|
|
<html>
|
2003-10-07 20:12:05 +00:00
|
|
|
<title>LLVM: llc tool</title>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
<body bgcolor=white>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
<center><h1>LLVM: <tt>llc</tt> tool</h1></center>
|
2003-09-12 15:46:24 +00:00
|
|
|
<HR>
|
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
<h3>NAME</h3>
|
|
|
|
<tt>llc</tt>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
<h3>SYNOPSIS</h3>
|
|
|
|
<tt>llc [options] [filename]</tt>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
<h3>DESCRIPTION</h3>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
The <tt>llc</tt> command compiles LLVM bytecode into assembly language for a
|
|
|
|
specified architecture. The assembly language output can then be passed through
|
|
|
|
a native assembler and linker to generate native code.
|
2003-09-29 20:10:08 +00:00
|
|
|
<p>
|
|
|
|
The choice of architecture for the output assembly code is determined as
|
|
|
|
follows:
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
If the user has specified an architecture with the -m option, use that
|
|
|
|
architecture.
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
Examine the input LLVM bytecode file:
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
If it specifies little endian and a pointer size of 32 bits, select the
|
|
|
|
x86 architecture.
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
If it specifies big endian and a pointer size of 64 bit pointers,
|
|
|
|
select the SparcV9 architecture.
|
|
|
|
</ul>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<li>
|
2003-10-07 20:12:05 +00:00
|
|
|
If <tt>llc</tt> was compiled on an architecture for which it can
|
|
|
|
generate code, select the architecture upon which <tt>llc</tt> was
|
|
|
|
compiled.
|
2003-09-29 20:10:08 +00:00
|
|
|
<p>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
Print a message to the user asking him or her to specify the output
|
|
|
|
architecture explicitly.
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
If filename is not specified, or if filename is -, <tt>llc</tt> reads its input
|
|
|
|
from standard input. Otherwise, it will read its input from filename.
|
2003-09-29 20:10:08 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
If the -o option is left unspecified, then <tt>llc</tt> will send its output to standard
|
2003-09-29 20:10:08 +00:00
|
|
|
output if the input is from standard input. If the -o option specifies -, then
|
|
|
|
the output will also be sent to standard output.
|
|
|
|
<p>
|
|
|
|
|
|
|
|
If no -o option is specified and an input file other than - is specified, then
|
2003-10-07 20:12:05 +00:00
|
|
|
<tt>llc</tt> creates the output filename as follows:
|
2003-09-29 20:10:08 +00:00
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
If the file ends in .bc, then the .bc suffix is removed, and the .s suffix
|
|
|
|
is appended.
|
|
|
|
<p>
|
|
|
|
<li>
|
|
|
|
Otherwise, the .s suffix is appended to the input filename.
|
|
|
|
</ul>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
|
|
|
<h3>
|
|
|
|
OPTIONS
|
|
|
|
</h3>
|
|
|
|
<ul>
|
2003-10-07 19:42:50 +00:00
|
|
|
<li>-f
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Overwrite output files
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li>-m<arch>
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Specify the architecture for which to generate assembly. Valid
|
|
|
|
architectures are:
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<dl compact>
|
2004-03-02 03:36:10 +00:00
|
|
|
<dt> x86 </dt>
|
2003-10-07 19:42:50 +00:00
|
|
|
<dd>IA-32 (Pentium and above)</dd>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2004-03-02 03:36:10 +00:00
|
|
|
<dt> sparc </dt>
|
2003-10-07 19:42:50 +00:00
|
|
|
<dd>SPARC V9</dd>
|
2004-02-18 23:30:02 +00:00
|
|
|
|
2004-03-02 03:36:10 +00:00
|
|
|
<dt> c </dt>
|
2004-02-18 23:30:02 +00:00
|
|
|
<dd>Emit C code</dd>
|
2003-10-07 19:42:50 +00:00
|
|
|
</dl>
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li>-o <filename>
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Specify the output filename.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li> -help
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Print a summary of command line options.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li> -stats
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Print statistics.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li> -time-passes
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Record the amount of time needed for each pass and print it to standard
|
|
|
|
error.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
</ul>
|
|
|
|
<h4>X86 Specific Options</h4>
|
|
|
|
<ul>
|
|
|
|
<li>-disable-fp-elim
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Disable frame pointer elimination optimization.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li>-disable-pattern-isel
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Use the 'simple' X86 instruction selector (the default).
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li>-print-machineinstrs
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-09-29 20:10:08 +00:00
|
|
|
Print generated machine code.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-02 06:13:19 +00:00
|
|
|
<li>-regalloc=<ra>
|
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Specify the register allocator to use. The default is <i>simple</i>.
|
2003-10-02 06:13:19 +00:00
|
|
|
Valid register allocators are:
|
2004-03-02 03:36:10 +00:00
|
|
|
<p>
|
2003-10-02 06:13:19 +00:00
|
|
|
<dl compact>
|
2004-03-02 03:36:10 +00:00
|
|
|
<dt> simple </dt>
|
2003-10-02 06:13:19 +00:00
|
|
|
<dd>Very simple register allocator</dd>
|
|
|
|
|
2004-03-02 03:36:10 +00:00
|
|
|
<dt> local </dt>
|
2003-10-02 06:13:19 +00:00
|
|
|
<dd>Local register allocator</dd>
|
2004-03-01 23:18:15 +00:00
|
|
|
|
2004-03-02 03:36:10 +00:00
|
|
|
<dt> linearscan </dt>
|
2004-03-01 23:18:15 +00:00
|
|
|
<dd>Linear scan global register allocator (experimental)</dd>
|
2004-03-02 03:36:10 +00:00
|
|
|
</dl>
|
2004-03-01 23:18:15 +00:00
|
|
|
|
|
|
|
<li>-spiller=<sp>
|
|
|
|
<br>
|
|
|
|
Specify the spiller to use for register allocators that support it.
|
|
|
|
Currently this option is used by the linear scan register
|
|
|
|
allocator. The default is <i>local</i>.
|
|
|
|
Valid spillers are:
|
2004-03-02 03:36:10 +00:00
|
|
|
<p>
|
2004-03-01 23:18:15 +00:00
|
|
|
<dl compact>
|
2004-03-02 03:36:10 +00:00
|
|
|
<dt> local </dt>
|
2004-03-01 23:18:15 +00:00
|
|
|
<dd>Local spiller</dd>
|
2003-10-02 06:13:19 +00:00
|
|
|
</dl>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h4>Sparc Specific Options</h4>
|
|
|
|
<ul>
|
|
|
|
<li>-disable-peephole
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Disable peephole optimization pass.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
<li>-disable-sched
|
2003-09-12 15:46:24 +00:00
|
|
|
<br>
|
2003-10-07 19:42:50 +00:00
|
|
|
Disable local scheduling pass.
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<li>-disable-strip
|
|
|
|
<br>
|
|
|
|
Do not strip the LLVM bytecode included in executable.
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<li>-enable-maps
|
|
|
|
<br>
|
|
|
|
Emit LLVM-to-MachineCode mapping info to assembly.
|
2003-09-12 15:46:24 +00:00
|
|
|
<p>
|
|
|
|
</ul>
|
|
|
|
|
2003-10-07 19:42:50 +00:00
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
<h3>EXIT STATUS</h3>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
2003-10-07 20:12:05 +00:00
|
|
|
If <tt>llc</tt> succeeds, it will exit with 0. Otherwise, if an error occurs,
|
|
|
|
it will exit with a non-zero value.
|
2003-09-12 15:46:24 +00:00
|
|
|
|
|
|
|
<h3>
|
|
|
|
SEE ALSO
|
|
|
|
</h3>
|
2003-10-07 20:12:05 +00:00
|
|
|
<a href="lli.html"><tt>lli</tt></a>
|
2003-09-12 15:46:24 +00:00
|
|
|
|
|
|
|
<HR>
|
2003-10-07 20:12:05 +00:00
|
|
|
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
|
2003-09-12 15:46:24 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|