Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 5 | lli - directly execute programs from LLVM bitcode |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 6 | |
| 7 | =head1 SYNOPSIS |
| 8 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame] | 9 | B<lli> [I<options>] [I<filename>] [I<program args>] |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 10 | |
| 11 | =head1 DESCRIPTION |
| 12 | |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 13 | B<lli> directly executes programs in LLVM bitcode format. It takes a program |
| 14 | in LLVM bitcode format and executes it using a just-in-time compiler, if one is |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame] | 15 | available for the current architecture, or an interpreter. B<lli> takes all of |
| 16 | the same code generator options as L<llc|llc>, but they are only effective when |
| 17 | B<lli> is using the just-in-time compiler. |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 18 | |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 19 | If I<filename> is not specified, then B<lli> reads the LLVM bitcode for the |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 20 | program from standard input. |
| 21 | |
| 22 | The optional I<args> specified on the command line are passed to the program as |
| 23 | arguments. |
| 24 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 25 | =head1 GENERAL OPTIONS |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 26 | |
| 27 | =over |
| 28 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 29 | =item B<-fake-argv0>=I<executable> |
| 30 | |
| 31 | Override the C<argv[0]> value passed into the executing program. |
| 32 | |
| 33 | =item B<-force-interpreter>=I<{false,true}> |
| 34 | |
| 35 | If set to true, use the interpreter even if a just-in-time compiler is available |
| 36 | for this architecture. Defaults to false. |
| 37 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 38 | =item B<-help> |
| 39 | |
| 40 | Print a summary of command line options. |
| 41 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 42 | =item B<-load>=I<puginfilename> |
| 43 | |
| 44 | Causes B<lli> to load the plugin (shared object) named I<pluginfilename> and use |
| 45 | it for optimization. |
| 46 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 47 | =item B<-stats> |
| 48 | |
| 49 | Print statistics from the code-generation passes. This is only meaningful for |
| 50 | the just-in-time compiler, at present. |
| 51 | |
| 52 | =item B<-time-passes> |
| 53 | |
| 54 | Record the amount of time needed for each code-generation pass and print it to |
| 55 | standard error. |
| 56 | |
Reid Spencer | 3baa3aa | 2007-08-07 17:43:48 +0000 | [diff] [blame] | 57 | =item B<-version> |
| 58 | |
| 59 | Print out the version of B<lli> and exit without doing anything else. |
| 60 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 61 | =back |
| 62 | |
| 63 | =head1 TARGET OPTIONS |
| 64 | |
| 65 | =over |
| 66 | |
Chris Lattner | f495536 | 2005-12-16 05:19:35 +0000 | [diff] [blame] | 67 | =item B<-mtriple>=I<target triple> |
Chris Lattner | 4f501bf | 2005-12-16 05:18:53 +0000 | [diff] [blame] | 68 | |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 69 | Override the target triple specified in the input bitcode file with the |
Chris Lattner | 4f501bf | 2005-12-16 05:18:53 +0000 | [diff] [blame] | 70 | specified string. This may result in a crash if you pick an |
| 71 | architecture which is not compatible with the current system. |
| 72 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 73 | =item B<-march>=I<arch> |
| 74 | |
Chris Lattner | 4f501bf | 2005-12-16 05:18:53 +0000 | [diff] [blame] | 75 | Specify the architecture for which to generate assembly, overriding the target |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 76 | encoded in the bitcode file. See the output of B<llc --help> for a list of |
Chris Lattner | 4f501bf | 2005-12-16 05:18:53 +0000 | [diff] [blame] | 77 | valid architectures. By default this is inferred from the target triple or |
| 78 | autodetected to the current architecture. |
| 79 | |
| 80 | =item B<-mcpu>=I<cpuname> |
| 81 | |
| 82 | Specify a specific chip in the current architecture to generate code for. |
| 83 | By default this is inferred from the target triple and autodetected to |
| 84 | the current architecture. For a list of available CPUs, use: |
| 85 | B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help> |
| 86 | |
| 87 | =item B<-mattr>=I<a1,+a2,-a3,...> |
| 88 | |
| 89 | Override or control specific attributes of the target, such as whether SIMD |
| 90 | operations are enabled or not. The default set of attributes is set by the |
| 91 | current CPU. For a list of available attributes, use: |
| 92 | B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 93 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 94 | =back |
Reid Spencer | 2c8a748 | 2007-08-07 16:11:57 +0000 | [diff] [blame] | 95 | |
Reid Spencer | 2c8a748 | 2007-08-07 16:11:57 +0000 | [diff] [blame] | 96 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 97 | =head1 FLOATING POINT OPTIONS |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 98 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 99 | =over |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 100 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 101 | =item B<-disable-excess-fp-precision> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 102 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 103 | Disable optimizations that may increase floating point precision. |
Reid Spencer | 2c8a748 | 2007-08-07 16:11:57 +0000 | [diff] [blame] | 104 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 105 | =item B<-enable-finite-only-fp-math> |
Reid Spencer | 2c8a748 | 2007-08-07 16:11:57 +0000 | [diff] [blame] | 106 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 107 | Enable optimizations that assumes only finite floating point math. That is, |
| 108 | there is no NAN or Inf values. |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 109 | |
Reid Spencer | 7223f02 | 2007-08-07 16:21:52 +0000 | [diff] [blame] | 110 | =item B<-enable-unsafe-fp-math> |
| 111 | |
| 112 | Causes B<lli> to enable optimizations that may decrease floating point |
| 113 | precision. |
| 114 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 115 | =item B<-soft-float> |
Reid Spencer | b7a54b9 | 2007-08-07 16:23:42 +0000 | [diff] [blame] | 116 | |
Reid Spencer | 0ecfb59 | 2007-08-07 16:29:57 +0000 | [diff] [blame] | 117 | Causes B<lli> to generate software floating point library calls instead of |
| 118 | equivalent hardware instructions. |
Reid Spencer | b7a54b9 | 2007-08-07 16:23:42 +0000 | [diff] [blame] | 119 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 120 | =back |
| 121 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 122 | =head1 CODE GENERATION OPTIONS |
| 123 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 124 | =over 4 |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 125 | |
| 126 | =item B<-code-model>=I<model> |
| 127 | |
| 128 | Choose the code model from: |
| 129 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 130 | =back |
| 131 | |
| 132 | =over 8 |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 133 | |
| 134 | =item I<default>: Target default code model |
| 135 | |
| 136 | =item I<small>: Small code model |
| 137 | |
| 138 | =item I<kernel>: Kernel code model |
Reid Spencer | 3baa3aa | 2007-08-07 17:43:48 +0000 | [diff] [blame] | 139 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 140 | =item I<medium>: Medium code model |
Reid Spencer | 3baa3aa | 2007-08-07 17:43:48 +0000 | [diff] [blame] | 141 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 142 | =item I<large>: Large code model |
| 143 | |
| 144 | =back |
| 145 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 146 | =over 4 |
| 147 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 148 | =item B<-disable-post-RA-scheduler> |
| 149 | |
| 150 | Disable scheduling after register allocation. |
| 151 | |
| 152 | =item B<-disable-spill-fusing> |
| 153 | |
| 154 | Disable fusing of spill code into instructions. |
| 155 | |
| 156 | =item B<-enable-correct-eh-support> |
| 157 | |
| 158 | Make the -lowerinvoke pass insert expensive, but correct, EH code. |
| 159 | |
| 160 | =item B<-enable-eh> |
| 161 | |
| 162 | Exception handling should be emitted. |
| 163 | |
| 164 | =item B<-join-liveintervals> |
| 165 | |
| 166 | Coalesce copies (default=true). |
| 167 | |
| 168 | =item B<-nozero-initialized-in-bss> |
| 169 | Don't place zero-initialized symbols into the BSS section. |
| 170 | |
| 171 | =item B<-pre-RA-sched>=I<scheduler> |
| 172 | |
| 173 | Instruction schedulers available (before register allocation): |
| 174 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 175 | =back |
| 176 | |
| 177 | =over 8 |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 178 | |
| 179 | =item I<=default>: Best scheduler for the target |
| 180 | |
| 181 | =item I<=none>: No scheduling: breadth first sequencing |
| 182 | |
| 183 | =item I<=simple>: Simple two pass scheduling: minimize critical path and maximize processor utilization |
| 184 | |
| 185 | =item I<=simple-noitin>: Simple two pass scheduling: Same as simple except using generic latency |
| 186 | |
| 187 | =item I<=list-burr>: Bottom-up register reduction list scheduling |
| 188 | |
| 189 | =item I<=list-tdrr>: Top-down register reduction list scheduling |
| 190 | |
| 191 | =item I<=list-td>: Top-down list scheduler -print-machineinstrs - Print generated machine code |
| 192 | |
| 193 | =back |
| 194 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 195 | =over 4 |
| 196 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 197 | =item B<-regalloc>=I<allocator> |
| 198 | |
| 199 | Register allocator to use: (default = linearscan) |
| 200 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 201 | =back |
| 202 | |
| 203 | =over 8 |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 204 | |
| 205 | =item I<=bigblock>: Big-block register allocator |
| 206 | |
| 207 | =item I<=linearscan>: linear scan register allocator =local - local register allocator |
| 208 | |
| 209 | =item I<=simple>: simple register allocator |
| 210 | |
| 211 | =back |
| 212 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 213 | =over 4 |
| 214 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 215 | =item B<-relocation-model>=I<model> |
| 216 | |
| 217 | Choose relocation model from: |
| 218 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 219 | =back |
| 220 | |
| 221 | =over 8 |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 222 | |
| 223 | =item I<=default>: Target default relocation model |
| 224 | |
| 225 | =item I<=static>: Non-relocatable code =pic - Fully relocatable, position independent code |
| 226 | |
| 227 | =item I<=dynamic-no-pic>: Relocatable external references, non-relocatable code |
| 228 | |
| 229 | =back |
| 230 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 231 | =over 4 |
| 232 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 233 | =item B<-spiller> |
| 234 | |
| 235 | Spiller to use: (default: local) |
| 236 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 237 | =back |
| 238 | |
| 239 | =over 8 |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 240 | |
| 241 | =item I<=simple>: simple spiller |
| 242 | |
| 243 | =item I<=local>: local spiller |
| 244 | |
| 245 | =back |
| 246 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 247 | =over 4 |
| 248 | |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 249 | =item B<-x86-asm-syntax>=I<syntax> |
| 250 | |
| 251 | Choose style of code to emit from X86 backend: |
| 252 | |
Reid Spencer | d5d9e6f | 2007-08-07 17:48:56 +0000 | [diff] [blame^] | 253 | =back |
| 254 | |
| 255 | =over 8 |
Reid Spencer | acafa2d | 2007-08-07 17:12:43 +0000 | [diff] [blame] | 256 | |
| 257 | =item I<=att>: Emit AT&T-style assembly |
| 258 | |
| 259 | =item I<=intel>: Emit Intel-style assembly |
| 260 | |
| 261 | =back |
| 262 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 263 | =head1 EXIT STATUS |
| 264 | |
| 265 | If B<lli> fails to load the program, it will exit with an exit code of 1. |
| 266 | Otherwise, it will return the exit code of the program it executes. |
| 267 | |
| 268 | =head1 SEE ALSO |
| 269 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame] | 270 | L<llc|llc> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 271 | |
| 272 | =head1 AUTHOR |
| 273 | |
Reid Spencer | cd143fc | 2006-03-14 05:42:07 +0000 | [diff] [blame] | 274 | Maintained by the LLVM Team (L<http://llvm.org>). |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 275 | |
| 276 | =cut |