blob: fc48f7ad62d4e232dc8eac6d25a8a357e948523c [file] [log] [blame]
Chris Lattner1213bc72003-10-07 20:33:30 +00001<html>
2<title>LLVM: bugpoint tool</title>
3
4<body bgcolor=white>
5
6<center><h1>LLVM: <tt>bugpoint</tt> tool</h1></center>
7<HR>
8
9<h3>NAME</h3>
10<tt>bugpoint</tt>
11
12<h3>SYNOPSIS</h3>
Chris Lattner83273d52003-10-07 20:33:52 +000013<tt>bugpoint [options] [input llvm ll/bc files] [LLVM passes] --args &lt;program arguments&gt;...</tt>
Chris Lattner1213bc72003-10-07 20:33:30 +000014
15<img src="../Debugging.gif" width=444 height=314 align=right>
16<h3>DESCRIPTION</h3>
17
18The <tt>bugpoint</tt> tool is a generally useful tool for narrowing down
19problems in LLVM tools and passes.<p>
20
21<tt>bugpoint</tt> reads the specified list of .bc or .ll files specified on the
22command-line and links them together. It then runs the specified LLVM passes on
23the resultant bytecode file. If any of the passes crash, or if they produce an
24LLVM module which is not verifiable, bugpoint enters "crash debugging mode".
25Otherwise, <tt>bugpoint</tt> tries to run the resultant program with a code
26generator. If the code generated program does not match the reference output,
27it enters "miscompilation debugging mode". If the <tt>-mode</tt> option is
28specified, <tt>bugpoint</tt> enters "code generator debugging mode".
29
30<h4>Crash debugging mode</h4>
31
32TODO
33
34<h4>Miscompilation debugging mode</h4>
35
36TODO
37
38<h4>Code generator debugging mode</h4>
39
40TODO
41
42
43<h3>OPTIONS</h3>
44
45<ul>
46 <li><tt>-args &lt;arguments&gt;</tt>
47 <br>
48 All arguments specified after <tt>-args</tt> are passed into the
49 executed program when the program must be executed.
50 <p>
51
52 <li><tt>-disable-(adce,dce,final-cleanup,simplifycfg)</tt>
53 <br>
54 <tt>bugpoint</tt> uses several passes internally for cleanup routines to
55 reduce the size of the program. If you're trying to find a bug in out
56 of these passes, <tt>bugpoint</tt> may crash. These options tell
57 <tt>bugpoint</tt> not use the specified passes.
58 <p>
59
60 <li> <tt>-help</tt>
61 <br>
62 Print a summary of command line options.
63 <p>
64
65 <li> <tt>-input &lt;filename&gt;</tt>
66 <br>
67 Specify the contents of &lt;stdin&gt; when the program must be executed.
68 <p>
69
70 <li> <tt>-load &lt;plugin.so&gt;</tt>
71 <br>
72 Load the dynamic object plugin.so. This object should register new
73 optimization passes. Once loaded, the object will add new command line
74 options to enable various optimizations. To see the new complete list
75 of optimizations, use the -help and -load options together:
76 <p>
77 <tt>opt -load &lt;plugin.so&gt; -help</tt>
78 <p>
79
80 <li> <tt>-mode=(compile|codegen)</tt>
81 <br>
82 Specify whether <tt>bugpoint</tt> should operate in compilation
83 debugging mode (detecting miscompilations and optimizer crashes), or in
84 code generator debugging mode.
85 <p>
86
87 <li> <tt>-output &lt;filename&gt;</tt>
88 <br>
89 Specify a reference output for the &lt;stdout&gt; file stream.
90 <p>
91
92 <li> <tt>-run-(lli|jit|llc|cbe)</tt>
93 <br>
94 Specify which code generator <tt>bugpoint</tt> should use to run the
95 program with.
96 <p>
97
98</ul>
99
100<h3>EXIT STATUS</h3>
101
102If <tt>bugpoint</tt> succeeds in finding a problem, it will exit with 0.
103Otherwise, if an error occurs, it will exit with a non-zero value.
104
105<h3>SEE ALSO</h3>
106<a href="opt.html"><tt>opt</tt></a>
107<a href="analyze.html"><tt>analyze</tt></a>
108
109<HR>
110Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
111</body>
112</html>
113