| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 1 | <html> | 
|  | 2 | <title> | 
| Chris Lattner | ee43b69 | 2003-09-25 19:50:05 +0000 | [diff] [blame] | 3 | LLVM: llc tool | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 4 | </title> | 
|  | 5 |  | 
|  | 6 | <body> | 
|  | 7 |  | 
|  | 8 | <center> | 
| Chris Lattner | ee43b69 | 2003-09-25 19:50:05 +0000 | [diff] [blame] | 9 | <h1>LLVM: llc tool</h1> | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 10 | </center> | 
|  | 11 | <HR> | 
|  | 12 |  | 
|  | 13 | <h3> | 
|  | 14 | NAME | 
|  | 15 | </h3> | 
|  | 16 |  | 
|  | 17 | llc | 
|  | 18 |  | 
|  | 19 | <h3> | 
|  | 20 | SYNOPSIS | 
|  | 21 | </h3> | 
|  | 22 |  | 
| John Criswell | 511a491 | 2003-09-29 20:10:08 +0000 | [diff] [blame] | 23 | llc [options] [filename] | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 24 | <h3> | 
|  | 25 | DESCRIPTION | 
|  | 26 | </h3> | 
|  | 27 |  | 
|  | 28 | The llc command compiles LLVM bytecode into assembly language for a specified | 
|  | 29 | architecture.  The assembly language output can then be passed through a native | 
|  | 30 | assembler and linker to generate native code. | 
| John Criswell | 511a491 | 2003-09-29 20:10:08 +0000 | [diff] [blame] | 31 | <p> | 
|  | 32 | The choice of architecture for the output assembly code is determined as | 
|  | 33 | follows: | 
|  | 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 |  | 
|  | 67 | If filename is not specified, or if filename is -, llc reads its input from | 
|  | 68 | standard input.  Otherwise, it will read its input from filename. | 
|  | 69 | <p> | 
|  | 70 |  | 
|  | 71 | If the -o option is left unspecified, then llc will send its output to standard | 
|  | 72 | output if the input is from standard input.  If the -o option specifies -, then | 
|  | 73 | the output will also be sent to standard output. | 
|  | 74 | <p> | 
|  | 75 |  | 
|  | 76 | If no -o option is specified and an input file other than - is specified, then | 
|  | 77 | llc 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 Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 87 |  | 
|  | 88 | <h3> | 
|  | 89 | OPTIONS | 
|  | 90 | </h3> | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 91 | <ul> | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 92 | <li>-f | 
|  | 93 | <br> | 
|  | 94 | Overwrite output files | 
|  | 95 | <p> | 
|  | 96 |  | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 97 | <li>-m<arch> | 
|  | 98 | <br> | 
|  | 99 | Specify the architecture for which to generate assembly.  Valid | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 100 | architectures are: | 
|  | 101 |  | 
|  | 102 | <dl compact> | 
| Alkis Evlogimenos | eed462b | 2003-10-02 06:13:19 +0000 | [diff] [blame] | 103 | <di> x86 | 
|  | 104 | <dd>IA-32 (Pentium and above)</dd> | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 105 |  | 
| Alkis Evlogimenos | eed462b | 2003-10-02 06:13:19 +0000 | [diff] [blame] | 106 | <di> sparc | 
|  | 107 | <dd>SPARC V9</dd> | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 108 | </dl> | 
|  | 109 | <p> | 
|  | 110 |  | 
|  | 111 | <li>-o <filename> | 
|  | 112 | <br> | 
| John Criswell | 511a491 | 2003-09-29 20:10:08 +0000 | [diff] [blame] | 113 | Specify the output filename. | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 114 | <p> | 
|  | 115 |  | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 116 | <li> -help | 
|  | 117 | <br> | 
|  | 118 | Print a summary of command line options. | 
|  | 119 | <p> | 
|  | 120 |  | 
|  | 121 | <li> -stats | 
|  | 122 | <br> | 
|  | 123 | Print statistics. | 
|  | 124 | <p> | 
|  | 125 |  | 
|  | 126 | <li> -time-passes | 
|  | 127 | <br> | 
|  | 128 | Record the amount of time needed for each pass and print it to standard | 
|  | 129 | error. | 
|  | 130 | <p> | 
| Chris Lattner | 7a59bc8 | 2003-10-07 19:42:50 +0000 | [diff] [blame^] | 131 |  | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 132 | </ul> | 
| Chris Lattner | 7a59bc8 | 2003-10-07 19:42:50 +0000 | [diff] [blame^] | 133 | <h4>X86 Specific Options</h4> | 
|  | 134 | <ul> | 
|  | 135 | <li>-disable-fp-elim | 
|  | 136 | <br> | 
|  | 137 | Disable frame pointer elimination optimization. | 
|  | 138 | <p> | 
|  | 139 |  | 
|  | 140 | <li>-disable-pattern-isel | 
|  | 141 | <br> | 
|  | 142 | Use the 'simple' X86 instruction selector (the default). | 
|  | 143 | <p> | 
|  | 144 |  | 
|  | 145 | <li>-print-machineinstrs | 
|  | 146 | <br> | 
|  | 147 | Print generated machine code. | 
|  | 148 | <p> | 
|  | 149 |  | 
|  | 150 | <li>-regalloc=<ra> | 
|  | 151 | <br> | 
|  | 152 | Specify the register allocator to use. The default is <i>simple</i>. | 
|  | 153 | Valid register allocators are: | 
|  | 154 | <dl compact> | 
|  | 155 | <di> simple | 
|  | 156 | <dd>Very simple register allocator</dd> | 
|  | 157 |  | 
|  | 158 | <di> local | 
|  | 159 | <dd>Local register allocator</dd> | 
|  | 160 | </dl> | 
|  | 161 | <p> | 
|  | 162 |  | 
|  | 163 | </ul> | 
|  | 164 |  | 
|  | 165 | <h4>Sparc Specific Options</h4> | 
|  | 166 | <ul> | 
|  | 167 | <li>-disable-peephole | 
|  | 168 | <br> | 
|  | 169 | Disable peephole optimization pass. | 
|  | 170 | <p> | 
|  | 171 |  | 
|  | 172 | <li>-disable-preopt | 
|  | 173 | <br> | 
|  | 174 | Disable optimizations prior to instruction selection. | 
|  | 175 | <p> | 
|  | 176 |  | 
|  | 177 | <li>-disable-sched | 
|  | 178 | <br> | 
|  | 179 | Disable local scheduling pass. | 
|  | 180 | <p> | 
|  | 181 |  | 
|  | 182 | <li>-disable-strip | 
|  | 183 | <br> | 
|  | 184 | Do not strip the LLVM bytecode included in executable. | 
|  | 185 | <p> | 
|  | 186 |  | 
|  | 187 | <li>-enable-maps | 
|  | 188 | <br> | 
|  | 189 | Emit LLVM-to-MachineCode mapping info to assembly. | 
|  | 190 | <p> | 
|  | 191 | </ul> | 
|  | 192 |  | 
| John Criswell | 69d903d | 2003-09-12 15:46:24 +0000 | [diff] [blame] | 193 |  | 
|  | 194 | <h3> | 
|  | 195 | EXIT STATUS | 
|  | 196 | </h3> | 
|  | 197 |  | 
|  | 198 | If llc succeeds, it will exit with 0.  Otherwise, if an error occurs, it | 
|  | 199 | will exit with a non-zero value. | 
|  | 200 |  | 
|  | 201 | <h3> | 
|  | 202 | SEE ALSO | 
|  | 203 | </h3> | 
|  | 204 | llvm-dis, lli | 
|  | 205 |  | 
|  | 206 | <HR> | 
|  | 207 | <a href="http://llvm.cs.uiuc.edu">LLVM Team</a> | 
|  | 208 | </body> | 
|  | 209 | </html> | 
|  | 210 |  |