blob: 0a441c7ccee48184211b23f6aa497f0048b882ca [file] [log] [blame]
Brian Gaekee993d202004-05-14 19:50:33 +00001=pod
2
3=head1 NAME
4
5lli - directly execute programs from LLVM bytecode
6
7=head1 SYNOPSIS
8
Misha Brukmanc08937a2004-07-02 16:06:19 +00009B<lli> [I<options>] [I<filename>] [I<program args>]
Brian Gaekee993d202004-05-14 19:50:33 +000010
11=head1 DESCRIPTION
12
Misha Brukmanc08937a2004-07-02 16:06:19 +000013B<lli> directly executes programs in LLVM bytecode format. It takes a program
14in LLVM bytecode format and executes it using a just-in-time compiler, if one is
15available for the current architecture, or an interpreter. B<lli> takes all of
16the same code generator options as L<llc|llc>, but they are only effective when
17B<lli> is using the just-in-time compiler.
Brian Gaekee993d202004-05-14 19:50:33 +000018
19If I<filename> is not specified, then B<lli> reads the LLVM bytecode for the
20program from standard input.
21
22The optional I<args> specified on the command line are passed to the program as
23arguments.
24
25=head1 OPTIONS
26
27=over
28
29=item B<-help>
30
31Print a summary of command line options.
32
33=item B<-stats>
34
35Print statistics from the code-generation passes. This is only meaningful for
36the just-in-time compiler, at present.
37
38=item B<-time-passes>
39
40Record the amount of time needed for each code-generation pass and print it to
41standard error.
42
Chris Lattnerf4955362005-12-16 05:19:35 +000043=item B<-mtriple>=I<target triple>
Chris Lattner4f501bf2005-12-16 05:18:53 +000044
45Override the target triple specified in the input bytecode file with the
46specified string. This may result in a crash if you pick an
47architecture which is not compatible with the current system.
48
Brian Gaekee993d202004-05-14 19:50:33 +000049=item B<-march>=I<arch>
50
Chris Lattner4f501bf2005-12-16 05:18:53 +000051Specify the architecture for which to generate assembly, overriding the target
52encoded in the bytecode file. See the output of B<llc --help> for a list of
53valid architectures. By default this is inferred from the target triple or
54autodetected to the current architecture.
55
56=item B<-mcpu>=I<cpuname>
57
58Specify a specific chip in the current architecture to generate code for.
59By default this is inferred from the target triple and autodetected to
60the current architecture. For a list of available CPUs, use:
61B<llvm-as E<lt> /dev/null | llc -march=xyz -mcpu=help>
62
63=item B<-mattr>=I<a1,+a2,-a3,...>
64
65Override or control specific attributes of the target, such as whether SIMD
66operations are enabled or not. The default set of attributes is set by the
67current CPU. For a list of available attributes, use:
68B<llvm-as E<lt> /dev/null | llc -march=xyz -mattr=help>
Brian Gaekee993d202004-05-14 19:50:33 +000069
70=item B<-force-interpreter>=I<{false,true}>
71
72If set to true, use the interpreter even if a just-in-time compiler is available
73for this architecture. Defaults to false.
74
75=item B<-f>=I<name>
76
77Call the function named I<name> to start the program. Note: The
78function is assumed to have the C signature C<int> I<name> C<(int,
79char **, char **)>. If you try to use this option to call a function of
80incompatible type, undefined behavior may result. Defaults to C<main>.
81
82=back
83
84=head1 EXIT STATUS
85
86If B<lli> fails to load the program, it will exit with an exit code of 1.
87Otherwise, it will return the exit code of the program it executes.
88
89=head1 SEE ALSO
90
Misha Brukmanc08937a2004-07-02 16:06:19 +000091L<llc|llc>
Brian Gaekee993d202004-05-14 19:50:33 +000092
93=head1 AUTHOR
94
95Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
96
97=cut