3ef9b2a400de65e24e928ca7755dc779308e911f
[oota-llvm.git] / docs / CommandGuide / lli.pod
1 =pod
2
3 =head1 NAME
4
5 lli - directly execute programs from LLVM bitcode
6
7 =head1 SYNOPSIS
8
9 B<lli> [I<options>] [I<filename>] [I<program args>]
10
11 =head1 DESCRIPTION
12
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
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.
18
19 If I<filename> is not specified, then B<lli> reads the LLVM bitcode 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 GENERAL OPTIONS
26
27 =over
28
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
38 =item B<-help>
39
40 Print a summary of command line options.
41
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
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
57 =back 
58
59 =head1 TARGET OPTIONS
60
61 =over 
62
63 =item B<-mtriple>=I<target triple>
64
65 Override the target triple specified in the input bitcode file with the 
66 specified string.  This may result in a crash if you pick an
67 architecture which is not compatible with the current system.
68
69 =item B<-march>=I<arch>
70
71 Specify the architecture for which to generate assembly, overriding the target
72 encoded in the bitcode file.  See the output of B<llc --help> for a list of
73 valid architectures.  By default this is inferred from the target triple or
74 autodetected to the current architecture.
75
76 =item B<-mcpu>=I<cpuname>
77
78 Specify a specific chip in the current architecture to generate code for.
79 By default this is inferred from the target triple and autodetected to 
80 the current architecture.  For a list of available CPUs, use:
81 B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help>
82
83 =item B<-mattr>=I<a1,+a2,-a3,...>
84
85 Override or control specific attributes of the target, such as whether SIMD
86 operations are enabled or not.  The default set of attributes is set by the
87 current CPU.  For a list of available attributes, use:
88 B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help>
89
90 =back
91
92
93 =head1 FLOATING POINT OPTIONS
94
95 =over 
96
97 =item B<-disable-excess-fp-precision>
98
99 Disable optimizations that may increase floating point precision.
100
101 =item B<-enable-finite-only-fp-math>
102
103 Enable optimizations that assumes only finite floating point math. That is,
104 there is no NAN or Inf values.
105
106 =item B<-enable-unsafe-fp-math>
107
108 Causes B<lli> to enable optimizations that may decrease floating point
109 precision.
110
111 =item B<-soft-float>
112
113 Causes B<lli> to generate software floating point library calls instead of
114 equivalent hardware instructions.
115
116 =back
117
118 =head1 EXIT STATUS
119
120 If B<lli> fails to load the program, it will exit with an exit code of 1.
121 Otherwise, it will return the exit code of the program it executes.
122
123 =head1 SEE ALSO
124
125 L<llc|llc>
126
127 =head1 AUTHOR
128
129 Maintained by the LLVM Team (L<http://llvm.org>).
130
131 =cut