Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
| 5 | lli - directly execute programs from LLVM bytecode |
| 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 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame^] | 13 | B<lli> directly executes programs in LLVM bytecode format. It takes a program |
| 14 | in LLVM bytecode format and executes it using a just-in-time compiler, if one is |
| 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 | |
| 19 | If I<filename> is not specified, then B<lli> reads the LLVM bytecode for the |
| 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 | |
| 43 | =item B<-march>=I<arch> |
| 44 | |
| 45 | Use the specified non-default architecture arch when selecting a code generator |
| 46 | for the just-in-time compiler. This may result in a crash if you pick an |
| 47 | architecture which is not compatible with the hardware you are running B<lli> on. |
| 48 | |
| 49 | =item B<-force-interpreter>=I<{false,true}> |
| 50 | |
| 51 | If set to true, use the interpreter even if a just-in-time compiler is available |
| 52 | for this architecture. Defaults to false. |
| 53 | |
| 54 | =item B<-f>=I<name> |
| 55 | |
| 56 | Call the function named I<name> to start the program. Note: The |
| 57 | function is assumed to have the C signature C<int> I<name> C<(int, |
| 58 | char **, char **)>. If you try to use this option to call a function of |
| 59 | incompatible type, undefined behavior may result. Defaults to C<main>. |
| 60 | |
| 61 | =back |
| 62 | |
| 63 | =head1 EXIT STATUS |
| 64 | |
| 65 | If B<lli> fails to load the program, it will exit with an exit code of 1. |
| 66 | Otherwise, it will return the exit code of the program it executes. |
| 67 | |
| 68 | =head1 SEE ALSO |
| 69 | |
Misha Brukman | c08937a | 2004-07-02 16:06:19 +0000 | [diff] [blame^] | 70 | L<llc|llc> |
Brian Gaeke | e993d20 | 2004-05-14 19:50:33 +0000 | [diff] [blame] | 71 | |
| 72 | =head1 AUTHOR |
| 73 | |
| 74 | Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>). |
| 75 | |
| 76 | =cut |