blob: 64062ec49df4eca2c7c20b6431e65c3f4a5a05d3 [file] [log] [blame]
Misha Brukman69985172004-07-01 15:25:04 +00001=pod
2
3=head1 NAME
4
5opt - LLVM optimizer
6
7=head1 SYNOPSIS
8
Misha Brukmanc08937a2004-07-02 16:06:19 +00009B<opt> [I<options>] [I<filename>]
Misha Brukman69985172004-07-01 15:25:04 +000010
11=head1 DESCRIPTION
12
13The B<opt> command is the modular LLVM optimizer. It takes LLVM
14bytecode as input, runs the specified optimizations on it, and then
15outputs the optimized LLVM bytecode.
16
17The optimizations available via B<opt> depend upon what libraries
18were linked into it as well as any additional libraries that have
19been loaded with the B<-load> option. Use the B<-help> option to
20determine what optimizations you can use.
21
22If no filename is specified on the command line, B<opt> reads its
23input from standard input.
24
25If an output filename is not specified with the B<-o> option, B<opt>
26writes its output to the standard output.
27
28=head1 OPTIONS
29
30=over
31
32=item B<-f>
33
34Force overwrite. Normally, B<opt> will refuse to overwrite an
35output file that already exists. With this option, B<opt> will
36overwrite the output file and replace it with new bytecode.
37
38=item B<-help>
39
40Print a summary of command line options.
41
42=item B<-o> I<filename>
43
44Specify the output filename.
45
46=item B<-profile-info-file> I<filename>
47
48Specify the name of the file loaded by the -profile-loader option.
49
50=item B<-stats>
51
52Print statistics.
53
54=item B<-time-passes>
55
56Record the amount of time needed for each pass and print it to standard
57error.
58
59=item B<-debug>
60
61If this is a debug build, this option will enable debug printouts
62from passes which use the I<DEBUG()> macro. See the B<LLVM Programmer's
63Manual>, section I<#DEBUG> for more information.
64
65=item B<-load>=I<plugin>
66
67Load the dynamic object I<plugin>. This object should register new
68optimization passes. Once loaded, the object will add new command line
69options to enable various optimizations. To see the new complete list
70of optimizations, use the B<-help> and B<-load> options together:
71
72=over
73
74B<opt -load>=I<plugin> B<-help>
75
76=back
77
78=item B<-p>
79
80Print module after each transformation.
81
82=back
83
84=head1 EXIT STATUS
85
86If B<opt> succeeds, it will exit with 0. Otherwise, if an error
87occurs, it will exit with a non-zero value.
88
89=head1 SEE ALSO
90
Misha Brukmanc08937a2004-07-02 16:06:19 +000091L<analyze|analyze>
Misha Brukman69985172004-07-01 15:25:04 +000092
93=head1 AUTHORS
94
95Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
96
97=cut