9 <h1>LLVM: opt tool</h1>
23 opt [options] < filename>
28 The opt command is the LLVM optimizer. It takes LLVM bytecode as input, runs
29 the specified optimizations on it, and then outputs the optimized code in LLVM
32 The optimizations available via opt depend upon what libraries it was linked
33 with, as well as any additional libraries that have been loaded with the -load
34 option. Use the -help option to determine what optimizations you can use.
43 Force overwrite. Normally, opt will refuse to overwrite an output
44 file that already exists. With this option, opt will overwrite the
45 output file and replace it with new bytecode.
50 Print a summary of command line options.
53 <li> -o <filename>
55 Specify the output filename.
65 Record the amount of time needed for each pass and print it to standard
69 <li> -internalize-public-api-file <filename>
71 Preserve the symbol names listed in the file filename.
74 <li> -internalize-public-api-list=<list>
76 Perserve the symbol names specified.
81 Quiet mode. Do not print messages on whether the program was modified.
84 <li> -load <plugin.so>
86 Load the dynamic object plugin.so. This object should register new
87 optimization passes. Once loaded, the object will add new command line
88 options to enable various optimizations. To see the new complete list
89 of optimizations, use the -help and -load options together:
91 opt -load <plugin.so> -help
96 Print module after each transformation.
104 If opt succeeds, it will exit with 0. Otherwise, if an error occurs, it
105 will exit with a non-zero value.
113 <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>