blob: 8788a7a608a6cd2219a50046751c860214a9c3cb [file] [log] [blame]
John Criswell69d903d2003-09-12 15:46:24 +00001<html>
2<title>
Chris Lattneree43b692003-09-25 19:50:05 +00003LLVM: llc tool
John Criswell69d903d2003-09-12 15:46:24 +00004</title>
5
6<body>
7
8<center>
Chris Lattneree43b692003-09-25 19:50:05 +00009<h1>LLVM: llc tool</h1>
John Criswell69d903d2003-09-12 15:46:24 +000010</center>
11<HR>
12
13<h3>
14NAME
15</h3>
16
17llc
18
19<h3>
20SYNOPSIS
21</h3>
22
John Criswell511a4912003-09-29 20:10:08 +000023llc [options] [filename]
John Criswell69d903d2003-09-12 15:46:24 +000024<h3>
25DESCRIPTION
26</h3>
27
28The llc command compiles LLVM bytecode into assembly language for a specified
29architecture. The assembly language output can then be passed through a native
30assembler and linker to generate native code.
John Criswell511a4912003-09-29 20:10:08 +000031<p>
32The choice of architecture for the output assembly code is determined as
33follows:
34
35<ul>
36 <li>
37 If the user has specified an architecture with the -m option, use that
38 architecture.
39 <p>
40
41 <li>
42 Examine the input LLVM bytecode file:
43 <ul>
44 <li>
45 If it specifies little endian and a pointer size of 32 bits, select the
46 x86 architecture.
47 <p>
48
49 <li>
50 If it specifies big endian and a pointer size of 64 bit pointers,
51 select the SparcV9 architecture.
52 </ul>
53 <p>
54
55 <li>
56 If llc was compiled on an architecture for which it can generate code,
57 select the architecture upon which llc was compiled.
58 <p>
59
60 <li>
61 Print a message to the user asking him or her to specify the output
62 architecture explicitly.
63</ul>
64
65<p>
66
67If filename is not specified, or if filename is -, llc reads its input from
68standard input. Otherwise, it will read its input from filename.
69<p>
70
71If the -o option is left unspecified, then llc will send its output to standard
72output if the input is from standard input. If the -o option specifies -, then
73the output will also be sent to standard output.
74<p>
75
76If no -o option is specified and an input file other than - is specified, then
77llc creates the output filename as follows:
78
79<ul>
80 <li>
81 If the file ends in .bc, then the .bc suffix is removed, and the .s suffix
82 is appended.
83 <p>
84 <li>
85 Otherwise, the .s suffix is appended to the input filename.
86</ul>
John Criswell69d903d2003-09-12 15:46:24 +000087
88<h3>
89OPTIONS
90</h3>
91
92<ul>
93 <li>-disable-fp-elim
94 <br>
John Criswell511a4912003-09-29 20:10:08 +000095 Disable frame pointer elimination optimization.
John Criswell69d903d2003-09-12 15:46:24 +000096 <p>
97
John Criswell69d903d2003-09-12 15:46:24 +000098 <li>-disable-pattern-isel
99 <br>
John Criswell511a4912003-09-29 20:10:08 +0000100 Use the 'simple' X86 instruction selector.
John Criswell69d903d2003-09-12 15:46:24 +0000101 <p>
102
103 <li>-disable-peephole
104 <br>
John Criswell511a4912003-09-29 20:10:08 +0000105 Disable peephole optimization pass.
John Criswell69d903d2003-09-12 15:46:24 +0000106 <p>
107
108 <li>-disable-preopt
109 <br>
John Criswell511a4912003-09-29 20:10:08 +0000110 Disable optimizations prior to instruction selection.
John Criswell69d903d2003-09-12 15:46:24 +0000111 <p>
112
113 <li>-disable-sched
114 <br>
John Criswell511a4912003-09-29 20:10:08 +0000115 Disable local scheduling pass.
John Criswell69d903d2003-09-12 15:46:24 +0000116 <p>
117
118 <li>-disable-strip
119 <br>
John Criswell511a4912003-09-29 20:10:08 +0000120 Do not strip the LLVM bytecode included in executable.
John Criswell69d903d2003-09-12 15:46:24 +0000121 <p>
122
123 <li>-enable-maps
124 <br>
John Criswell511a4912003-09-29 20:10:08 +0000125 Emit LLVM-to-MachineCode mapping info to assembly.
John Criswell69d903d2003-09-12 15:46:24 +0000126 <p>
127
128 <li>-f
129 <br>
130 Overwrite output files
131 <p>
132
133 <li>-load=&lt;plugin.so&gt;
134 <br>
John Criswell511a4912003-09-29 20:10:08 +0000135 Load the specified plugin.
John Criswell69d903d2003-09-12 15:46:24 +0000136 <p>
137
138 <li>-m&lt;arch&gt;
139 <br>
140 Specify the architecture for which to generate assembly. Valid
John Criswell69d903d2003-09-12 15:46:24 +0000141 architectures are:
142
143 <dl compact>
Alkis Evlogimenoseed462b2003-10-02 06:13:19 +0000144 <di> x86
145 <dd>IA-32 (Pentium and above)</dd>
John Criswell69d903d2003-09-12 15:46:24 +0000146
Alkis Evlogimenoseed462b2003-10-02 06:13:19 +0000147 <di> sparc
148 <dd>SPARC V9</dd>
John Criswell69d903d2003-09-12 15:46:24 +0000149 </dl>
150 <p>
151
152 <li>-o &lt;filename&gt;
153 <br>
John Criswell511a4912003-09-29 20:10:08 +0000154 Specify the output filename.
John Criswell69d903d2003-09-12 15:46:24 +0000155 <p>
156
157 <li>-print-machineinstrs
158 <br>
John Criswell511a4912003-09-29 20:10:08 +0000159 Print generated machine code.
John Criswell69d903d2003-09-12 15:46:24 +0000160 <p>
161
Alkis Evlogimenoseed462b2003-10-02 06:13:19 +0000162 <li>-regalloc=&lt;ra&gt;
163 <br>
164 Specify the register allocator to use. The default is <i>simple<i>.
165 Valid register allocators are:
166 <dl compact>
167 <di> simple
168 <dd>Very simple register allocator</dd>
169
170 <di> local
171 <dd>Local register allocator</dd>
172 </dl>
173 <p>
174
John Criswell69d903d2003-09-12 15:46:24 +0000175 <li> -help
176 <br>
177 Print a summary of command line options.
178 <p>
179
180 <li> -stats
181 <br>
182 Print statistics.
183 <p>
184
185 <li> -time-passes
186 <br>
187 Record the amount of time needed for each pass and print it to standard
188 error.
189 <p>
190</ul>
191
192<h3>
193EXIT STATUS
194</h3>
195
196If llc succeeds, it will exit with 0. Otherwise, if an error occurs, it
197will exit with a non-zero value.
198
199<h3>
200SEE ALSO
201</h3>
202llvm-dis, lli
203
204<HR>
205<a href="http://llvm.cs.uiuc.edu">LLVM Team</a>
206</body>
207</html>
208