John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <title> |
Chris Lattner | ee43b69 | 2003-09-25 19:50:05 +0000 | [diff] [blame] | 3 | LLVM: lli tool |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 4 | </title> |
| 5 | |
Chris Lattner | 08a04fd | 2003-10-07 20:12:05 +0000 | [diff] [blame] | 6 | <body bgcolor=white> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 7 | |
| 8 | <center> |
Chris Lattner | 090fcc1 | 2003-10-07 19:46:37 +0000 | [diff] [blame] | 9 | <h1>LLVM: <tt>lli</tt> tool</h1> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 10 | </center> |
| 11 | <HR> |
| 12 | |
| 13 | <h3> |
| 14 | NAME |
| 15 | </h3> |
| 16 | |
Chris Lattner | 090fcc1 | 2003-10-07 19:46:37 +0000 | [diff] [blame] | 17 | <tt>lli</tt> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 18 | |
| 19 | <h3> |
| 20 | SYNOPSIS |
| 21 | </h3> |
| 22 | |
Chris Lattner | 090fcc1 | 2003-10-07 19:46:37 +0000 | [diff] [blame] | 23 | <tt>lli [options] [filename] [args ...]</tt> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 24 | <h3> |
| 25 | DESCRIPTION |
| 26 | </h3> |
| 27 | |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 28 | <tt>lli</tt> directly executes programs in LLVM format. |
| 29 | It takes a program in LLVM |
| 30 | bytecode format and executes it using a just-in-time |
| 31 | compiler, if one is available for the current architecture, or an interpreter. |
| 32 | <tt>lli</tt> takes all of the same code generator options as the |
| 33 | <tt><a href="llc.html">llc</a></tt> tool, but they are only applicable when |
| 34 | the just-in-time compiler is being used. |
John Criswell | 511a491 | 2003-09-29 20:10:08 +0000 | [diff] [blame] | 35 | <p> |
| 36 | |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 37 | If filename is not specified, then <tt>lli</tt> reads the LLVM bytecode for |
| 38 | the program from standard input. |
John Criswell | 511a491 | 2003-09-29 20:10:08 +0000 | [diff] [blame] | 39 | <p> |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 40 | The optional "args" specified on the command line are passed to the |
John Criswell | 511a491 | 2003-09-29 20:10:08 +0000 | [diff] [blame] | 41 | program as arguments. |
| 42 | <p> |
| 43 | |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 44 | |
| 45 | <h3> |
| 46 | OPTIONS |
| 47 | </h3> |
| 48 | |
| 49 | <ul> |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 50 | <li> <tt>-array-checks</tt> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 51 | <br> |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 52 | Enable array bound checks. If an LLVM program attempts to access an |
| 53 | element of an array which is not within the size of that array, |
| 54 | <tt>lli</tt> will print an error message and call <tt>abort(3)</tt>. |
| 55 | This is presently only applicable to the interpreter. |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 56 | <p> |
| 57 | |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 58 | <li> <tt>-help</tt> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 59 | <br> |
| 60 | Print a summary of command line options. |
| 61 | <p> |
| 62 | |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 63 | <li> <tt>-stats</tt> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 64 | <br> |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 65 | Print statistics from the code-generation passes. This is only meaningful |
| 66 | for the just-in-time compiler, at present. |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 67 | <p> |
| 68 | |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 69 | <li> <tt>-time-passes</tt> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 70 | <br> |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 71 | Record the amount of time needed for each code-generation pass and print |
| 72 | it to standard error. |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 73 | <p> |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 74 | |
| 75 | <li> <tt>-march=<arch></tt> |
| 76 | <br> |
| 77 | Use the specified non-default architecture when selecting a code generator |
| 78 | for the just-in-time compiler. This may result in a crash if you pick an |
| 79 | architecture which is not compatible with the hardware you are running |
| 80 | <tt>lli</tt> on. |
| 81 | <p> |
| 82 | |
| 83 | <li> <tt>-quiet, -q</tt> |
| 84 | <br> |
| 85 | Do not print any output about the return values of functions. |
| 86 | This is presently only applicable to the interpreter. |
| 87 | <p> |
| 88 | |
| 89 | <li> <tt>-force-interpreter={false,true}</tt> |
| 90 | <br> |
| 91 | If set to true, use the interpreter even if a just-in-time compiler is |
| 92 | available for this architecture. Defaults to false. |
| 93 | <p> |
| 94 | |
| 95 | <li> <tt>-trace</tt> |
| 96 | <br> |
| 97 | Print an LLVM-instruction-level dynamic execution trace. This is |
| 98 | presently only applicable to the interpreter. |
| 99 | <p> |
| 100 | |
| 101 | <li> <tt>-f=<name></tt> |
| 102 | <br> |
| 103 | Call the function named <tt><name></tt> to start the program. |
| 104 | Note: The function is assumed to have the C signature <tt>int |
| 105 | <tt><name></tt> (int, char **, char **)</tt>. |
| 106 | If you try to use this option to call a function of incompatible type, |
| 107 | undefined behavior may result. Defaults to "main". |
| 108 | <p> |
| 109 | |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 110 | </ul> |
| 111 | |
| 112 | <h3> |
| 113 | EXIT STATUS |
| 114 | </h3> |
| 115 | |
Brian Gaeke | 51b2ab8 | 2003-10-19 18:03:11 +0000 | [diff] [blame^] | 116 | If <tt>lli</tt> fails to load the program, it will exit with an exit code of 1. |
| 117 | Otherwise, it will return the exit code of the program it executes. |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 118 | |
| 119 | <h3> |
| 120 | SEE ALSO |
| 121 | </h3> |
Chris Lattner | 090fcc1 | 2003-10-07 19:46:37 +0000 | [diff] [blame] | 122 | <a href="llc.html"><tt>llc</tt></a> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 123 | |
| 124 | <HR> |
Chris Lattner | 08a04fd | 2003-10-07 20:12:05 +0000 | [diff] [blame] | 125 | Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>. |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 126 | </body> |
| 127 | </html> |