blob: 86dcf7326fa5b88bc1421b7c9d147dc2bc460a09 [file] [log] [blame]
John Criswellecf32e52003-09-11 19:58:03 +00001<html>
2<title>
3opt
4</title>
5
6<body>
7
8<center>
9<h1>Low Level Virtual Machine</h1>
10</center>
11<HR>
12
13<h3>
14NAME
15</h3>
16
17opt
18
19<h3>
20SYNOPSIS
21</h3>
22
23opt [options] &lt; filename&gt;
24<h3>
25DESCRIPTION
26</h3>
27
28The opt command is the LLVM optimizer. It takes LLVM bytecode as input, runs
29the specified optimizations on it, and then outputs the optimized code in LLVM
30bytecode.
31
32The optimizations available via opt depend upon what libraries it was linked
33with, as well as any additional libraries that have been loaded with the -load
34option. Use the -help option to determine what optimizations you can use.
35
36<h3>
37OPTIONS
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>
101EXIT STATUS
102</h3>
103
104If opt succeeds, it will exit with 0. Otherwise, if an error occurs, it
105will exit with a non-zero value.
106
107<h3>
108SEE ALSO
109</h3>
110analyze
111
112<HR>
John Criswell32003302003-09-11 20:23:52 +0000113<a href="http://llvm.cs.uiuc.edu">LLVM Team</a>
John Criswellecf32e52003-09-11 19:58:03 +0000114</body>
115</html>
116