Initial checkin
[oota-llvm.git] / docs / CommandGuide / lli.html
index 2b504472be6c02745494fded351eff322e2e326f..d7a2ad4fcc0300a3e795ed1a5af797f75c24df26 100644 (file)
@@ -3,10 +3,10 @@
 LLVM: lli tool
 </title>
 
-<body>
+<body bgcolor=white>
 
 <center>
-<h1>LLVM: lli tool</h1>
+<h1>LLVM: <tt>lli</tt> tool</h1>
 </center>
 <HR>
 
@@ -14,96 +14,94 @@ LLVM: lli tool
 NAME
 </h3>
 
-lli
+<tt>lli</tt>
 
 <h3>
 SYNOPSIS
 </h3>
 
-lli [options] [filename] [args ...]
+<tt>lli [options] [filename] [args ...]</tt>
 <h3>
 DESCRIPTION
 </h3>
 
-The lli command is the LLVM interpreter.  It takes a program in LLVM bytecode
-format and executes it using an interpreter or a Just In Time (JIT) compiler.
+<tt>lli</tt> directly executes programs in LLVM format. 
+It takes a program in LLVM
+bytecode format and executes it using a just-in-time
+compiler, if one is available for the current architecture, or an interpreter.
+<tt>lli</tt> takes all of the same code generator options as the
+<tt><a href="llc.html">llc</a></tt> tool, but they are only applicable when
+the just-in-time compiler is being used.
 <p>
 
-If filename is not specified, then lli reads its input from standard input.
+If filename is not specified, then <tt>lli</tt> reads the LLVM bytecode for
+the program from standard input.
 <p>
-The optional arguments specified on the command line are passed to the executed
+The optional "args" specified on the command line are passed to the
 program as arguments.
 <p>
 
-<h3>
-MAIN FUNCTION
-</h3>
-
-The main() function of the bytecode program is where execution starts.  It
-is passed three arguments:
-
-<ul>
-    <li>
-    int argc - The number of command line arguments.
-    <p>
-
-    <li>
-    char ** argv - The arguments to the program.
-    <p>
-
-    <li>
-    char ** envp - An array of environment variables used by the program.
-</ul>
-
-The first argument to the program is the name of the executed bytecode file
-(with the .bc suffix removed).
 
 <h3>
 OPTIONS
 </h3>
 
 <ul>
-       <li> -array-checks
-       <br>
-       Enable array bound checks.
-       <p>
-
-       <li> -help
+       <li> <tt>-help</tt>
        <br>
        Print a summary of command line options.
        <p>
 
-       <li> -disable-fp-elim
+       <li> <tt>-stats</tt>
        <br>
-       Disable frame pointer elimination optimization.
+       Print statistics from the code-generation passes. This is only meaningful
+    for the just-in-time compiler, at present.
        <p>
 
-       <li> -stats
+       <li> <tt>-time-passes</tt>
        <br>
-       Print statistics.
+       Record the amount of time needed for each code-generation pass and print
+    it to standard error.
        <p>
 
-       <li> -time-passes
+       <li> <tt>-march=&lt;arch&gt;</tt>
        <br>
-       Record the amount of time needed for each pass and print it to standard
-       error.
+    Use the specified non-default architecture when selecting a code generator
+    for the just-in-time compiler. This may result in a crash if you pick an
+    architecture which is not compatible with the hardware you are running
+    <tt>lli</tt> on.
        <p>
+
+    <li> <tt>-force-interpreter={false,true}</tt>
+    <br>
+    If set to true, use the interpreter even if a just-in-time compiler is
+    available for this architecture. Defaults to false.
+    <p>
+
+    <li> <tt>-f=&lt;name&gt;</tt>
+    <br>
+    Call the function named <tt>&lt;name&gt;</tt> to start the program.
+    Note: The function is assumed to have the C signature <tt>int
+    <tt>&lt;name&gt;</tt> (int, char **, char **)</tt>. 
+    If you try to use this option to call a function of incompatible type,
+    undefined behavior may result. Defaults to "main".
+    <p>
+
 </ul>
 
 <h3>
 EXIT STATUS
 </h3>
 
-If lli succeeds, it will exit with 0.  Otherwise, if an error occurs, it
-will exit with a non-zero value.
+If <tt>lli</tt> fails to load the program, it will exit with an exit code of 1.
+Otherwise, it will return the exit code of the program it executes.
 
 <h3>
 SEE ALSO
 </h3>
-llvm-dis
+<a href="llc.html"><tt>llc</tt></a>
 
 <HR>
-<a href="http://llvm.cs.uiuc.edu">LLVM Team</a>
+Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
 </body>
 </html>
-