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