Change the heading of the page to reflect the tool name
[oota-llvm.git] / docs / CommandGuide / opt.html
1 <html>
2 <title>
3 LLVM: opt tool
4 </title>
5
6 <body>
7
8 <center>
9 <h1>LLVM: opt tool</h1>
10 </center>
11 <HR>
12
13 <h3>
14 NAME
15 </h3>
16
17 opt
18
19 <h3>
20 SYNOPSIS
21 </h3>
22
23 opt [options] &lt; filename&gt;
24 <h3>
25 DESCRIPTION
26 </h3>
27
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
30 bytecode.
31
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.
35
36 <h3>
37 OPTIONS
38 </h3>
39
40 <ul>
41         <li> -f
42         <br>
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.
46         <p>
47
48         <li> -help
49         <br>
50         Print a summary of command line options.
51         <p>
52
53         <li> -o &lt;filename&gt;
54         <br>
55         Specify the output filename.
56         <p>
57
58         <li> -stats
59         <br>
60         Print statistics.
61         <p>
62
63         <li> -time-passes
64         <br>
65         Record the amount of time needed for each pass and print it to standard
66         error.
67         <p>
68
69         <li> -internalize-public-api-file &lt;filename&gt;
70         <br>
71         Preserve the symbol names listed in the file filename.
72         <p>
73
74         <li> -internalize-public-api-list=&lt;list&gt;
75         <br>
76         Perserve the symbol names specified.
77         <p>
78
79         <li> -q
80         <br>
81         Quiet mode.  Do not print messages on whether the program was modified.
82         <p>
83
84         <li> -load &lt;plugin.so&gt;
85         <br>
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:
90         <p>
91         opt -load  &lt;plugin.so&gt; -help
92         <p>
93
94         <li> -p
95         <br>
96         Print module after each transformation.
97         <p>
98 </ul>
99
100 <h3>
101 EXIT STATUS
102 </h3>
103
104 If opt succeeds, it will exit with 0.  Otherwise, if an error occurs, it
105 will exit with a non-zero value.
106
107 <h3>
108 SEE ALSO
109 </h3>
110 analyze
111
112 <HR>
113 <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>
114 </body>
115 </html>
116