John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <title> |
Chris Lattner | ee43b69 | 2003-09-25 19:50:05 +0000 | [diff] [blame] | 3 | LLVM: opt tool |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 4 | </title> |
| 5 | |
| 6 | <body> |
| 7 | |
| 8 | <center> |
Chris Lattner | ee43b69 | 2003-09-25 19:50:05 +0000 | [diff] [blame] | 9 | <h1>LLVM: opt tool</h1> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 10 | </center> |
| 11 | <HR> |
| 12 | |
| 13 | <h3> |
| 14 | NAME |
| 15 | </h3> |
| 16 | |
| 17 | opt |
| 18 | |
| 19 | <h3> |
| 20 | SYNOPSIS |
| 21 | </h3> |
| 22 | |
John Criswell | 6243534 | 2003-09-26 16:32:00 +0000 | [diff] [blame] | 23 | opt [options] [filename] |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 24 | <h3> |
| 25 | DESCRIPTION |
| 26 | </h3> |
| 27 | |
| 28 | The opt command is the LLVM optimizer. It takes LLVM bytecode as input, runs |
John Criswell | 6243534 | 2003-09-26 16:32:00 +0000 | [diff] [blame] | 29 | the specified optimizations on it, and then outputs the optimized LLVM |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 30 | bytecode. |
John Criswell | 6243534 | 2003-09-26 16:32:00 +0000 | [diff] [blame] | 31 | <p> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 32 | |
John Criswell | 6243534 | 2003-09-26 16:32:00 +0000 | [diff] [blame] | 33 | The optimizations available via opt depend upon what libraries were linked |
| 34 | into it as well as any additional libraries that have been loaded with the |
| 35 | -load option. Use the -help option to determine what optimizations you can use. |
| 36 | <p> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 37 | |
John Criswell | 6243534 | 2003-09-26 16:32:00 +0000 | [diff] [blame] | 38 | If no filename is specified on the command line, opt reads its input from |
| 39 | standard input. |
| 40 | <p> |
| 41 | |
| 42 | If an output filename is not specified with the -o option, opt writes its |
| 43 | output to the standard output. |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 44 | <h3> |
| 45 | OPTIONS |
| 46 | </h3> |
| 47 | |
| 48 | <ul> |
| 49 | <li> -f |
| 50 | <br> |
| 51 | Force overwrite. Normally, opt will refuse to overwrite an output |
| 52 | file that already exists. With this option, opt will overwrite the |
| 53 | output file and replace it with new bytecode. |
| 54 | <p> |
| 55 | |
| 56 | <li> -help |
| 57 | <br> |
| 58 | Print a summary of command line options. |
| 59 | <p> |
| 60 | |
| 61 | <li> -o <filename> |
| 62 | <br> |
| 63 | Specify the output filename. |
| 64 | <p> |
| 65 | |
| 66 | <li> -stats |
| 67 | <br> |
| 68 | Print statistics. |
| 69 | <p> |
| 70 | |
| 71 | <li> -time-passes |
| 72 | <br> |
| 73 | Record the amount of time needed for each pass and print it to standard |
| 74 | error. |
| 75 | <p> |
| 76 | |
| 77 | <li> -internalize-public-api-file <filename> |
| 78 | <br> |
| 79 | Preserve the symbol names listed in the file filename. |
| 80 | <p> |
| 81 | |
| 82 | <li> -internalize-public-api-list=<list> |
| 83 | <br> |
| 84 | Perserve the symbol names specified. |
| 85 | <p> |
| 86 | |
| 87 | <li> -q |
| 88 | <br> |
| 89 | Quiet mode. Do not print messages on whether the program was modified. |
| 90 | <p> |
| 91 | |
| 92 | <li> -load <plugin.so> |
| 93 | <br> |
| 94 | Load the dynamic object plugin.so. This object should register new |
| 95 | optimization passes. Once loaded, the object will add new command line |
| 96 | options to enable various optimizations. To see the new complete list |
| 97 | of optimizations, use the -help and -load options together: |
| 98 | <p> |
| 99 | opt -load <plugin.so> -help |
| 100 | <p> |
| 101 | |
| 102 | <li> -p |
| 103 | <br> |
| 104 | Print module after each transformation. |
| 105 | <p> |
| 106 | </ul> |
| 107 | |
| 108 | <h3> |
| 109 | EXIT STATUS |
| 110 | </h3> |
| 111 | |
| 112 | If opt succeeds, it will exit with 0. Otherwise, if an error occurs, it |
| 113 | will exit with a non-zero value. |
| 114 | |
| 115 | <h3> |
| 116 | SEE ALSO |
| 117 | </h3> |
| 118 | analyze |
| 119 | |
| 120 | <HR> |
John Criswell | 3200330 | 2003-09-11 20:23:52 +0000 | [diff] [blame] | 121 | <a href="http://llvm.cs.uiuc.edu">LLVM Team</a> |
John Criswell | ecf32e5 | 2003-09-11 19:58:03 +0000 | [diff] [blame] | 122 | </body> |
| 123 | </html> |
| 124 | |