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