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 | |
| 25 | =head1 OPTIONS |
| 26 | |
| 27 | =over |
| 28 | |
| 29 | =item B<-help> |
| 30 | |
| 31 | Print a summary of command line options. |
| 32 | |
| 33 | =item B<-stats> |
| 34 | |
| 35 | Print statistics from the code-generation passes. This is only meaningful for |
| 36 | the just-in-time compiler, at present. |
| 37 | |
| 38 | =item B<-time-passes> |
| 39 | |
| 40 | Record the amount of time needed for each code-generation pass and print it to |
| 41 | standard error. |
| 42 | |
Chris Lattner | f495536 | 2005-12-16 05:19:35 +0000 | [diff] [blame] | 43 | =item B<-mtriple>=I<target triple> |
Chris Lattner | 4f501bf | 2005-12-16 05:18:53 +0000 | [diff] [blame] | 44 | |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 45 | Override the target triple specified in the input bitcode file with the |
Chris Lattner | 4f501bf | 2005-12-16 05:18:53 +0000 | [diff] [blame] | 46 | specified string. This may result in a crash if you pick an |
| 47 | architecture which is not compatible with the current system. |
| 48 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 49 | =item B<-march>=I<arch> |
| 50 | |
Chris Lattner | 4f501bf | 2005-12-16 05:18:53 +0000 | [diff] [blame] | 51 | Specify the architecture for which to generate assembly, overriding the target |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 52 | 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] | 53 | valid architectures. By default this is inferred from the target triple or |
| 54 | autodetected to the current architecture. |
| 55 | |
| 56 | =item B<-mcpu>=I<cpuname> |
| 57 | |
| 58 | Specify a specific chip in the current architecture to generate code for. |
| 59 | By default this is inferred from the target triple and autodetected to |
| 60 | the current architecture. For a list of available CPUs, use: |
| 61 | B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help> |
| 62 | |
| 63 | =item B<-mattr>=I<a1,+a2,-a3,...> |
| 64 | |
| 65 | Override or control specific attributes of the target, such as whether SIMD |
| 66 | operations are enabled or not. The default set of attributes is set by the |
| 67 | current CPU. For a list of available attributes, use: |
| 68 | B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 69 | |
Reid Spencer | 2c8a748 | 2007-08-07 16:11:57 +0000 | [diff] [blame] | 70 | =item B<-fake-argv0>=I<executable> |
| 71 | |
| 72 | Override the C<argv[0]> value passed into the executing program. |
| 73 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 74 | =item B<-force-interpreter>=I<{false,true}> |
| 75 | |
| 76 | If set to true, use the interpreter even if a just-in-time compiler is available |
| 77 | for this architecture. Defaults to false. |
| 78 | |
Reid Spencer | 2c8a748 | 2007-08-07 16:11:57 +0000 | [diff] [blame] | 79 | =item B<-load>=I<puginfilename> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 80 | |
Reid Spencer | 2c8a748 | 2007-08-07 16:11:57 +0000 | [diff] [blame] | 81 | Causes B<lli> to load the plugin (shared object) named I<pluginfilename> and use |
| 82 | it for optimization. |
| 83 | |
| 84 | =item B<-soft-float> |
| 85 | |
| 86 | Causes B<lli> to generate software floating point library calls instead of |
| 87 | equivalent hardware instructions. |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 88 | |
Reid Spencer | 7223f02 | 2007-08-07 16:21:52 +0000 | [diff] [blame^] | 89 | =item B<-enable-unsafe-fp-math> |
| 90 | |
| 91 | Causes B<lli> to enable optimizations that may decrease floating point |
| 92 | precision. |
| 93 | |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 94 | =back |
| 95 | |
| 96 | =head1 EXIT STATUS |
| 97 | |
| 98 | If B<lli> fails to load the program, it will exit with an exit code of 1. |
| 99 | Otherwise, it will return the exit code of the program it executes. |
| 100 | |
| 101 | =head1 SEE ALSO |
| 102 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame] | 103 | L<llc|llc> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 104 | |
| 105 | =head1 AUTHOR |
| 106 | |
Reid Spencer | cd143fc | 2006-03-14 05:42:07 +0000 | [diff] [blame] | 107 | Maintained by the LLVM Team (L<http://llvm.org>). |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 108 | |
| 109 | =cut |