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