2 <title>LLVM: bugpoint tool</title>
6 <center><h1>LLVM: <tt>bugpoint</tt> tool</h1></center>
13 <tt>bugpoint [options] [input llvm ll/bc files] [LLVM passes] --args <program arguments>...</tt>
15 <img src="../Debugging.gif" width=444 height=314 align=right>
18 The <tt>bugpoint</tt> tool is a generally useful tool for narrowing down
19 problems in LLVM tools and passes.<p>
21 <tt>bugpoint</tt> reads the specified list of .bc or .ll files specified on the
22 command-line and links them together. It then runs the specified LLVM passes on
23 the resultant bytecode file. If any of the passes crash, or if they produce an
24 LLVM module which is not verifiable, bugpoint enters "crash debugging mode".
25 Otherwise, <tt>bugpoint</tt> tries to run the resultant program with a code
26 generator. If the code generated program does not match the reference output,
27 it enters "miscompilation debugging mode".
29 <h4>Crash debugging mode</h4>
31 If a pass crashes, bugpoint will try to narrow down the list of passes and the
32 code to a more manageable amount. Using a sophisticated binary-search algorithm,
33 <tt>bugpoint</tt> pares down the list of passes to a minimum set.
37 <h4>Miscompilation debugging mode</h4>
41 <h4>Code generator debugging mode</h4>
49 <li><tt>-args <arguments></tt>
51 All arguments specified after <tt>-args</tt> are passed into the
52 executed program when the program must be executed.
55 <li><tt>-disable-(adce,dce,final-cleanup,simplifycfg)</tt>
57 <tt>bugpoint</tt> uses several passes internally for cleanup routines to
58 reduce the size of the program. If you're trying to find a bug in one
59 of these passes, <tt>bugpoint</tt> may crash. These options tell
60 <tt>bugpoint</tt> not use the specified passes.
65 Print a summary of command line options.
68 <li> <tt>-input <filename></tt>
70 Specify the contents of <stdin> when the program must be executed.
73 <li> <tt>-load <plugin.so></tt>
75 Load the dynamic object plugin.so. This object should register new
76 optimization passes. Once loaded, the object will add new command line
77 options to enable various optimizations. To see the new complete list
78 of optimizations, use the -help and -load options together:
80 <tt>opt -load <plugin.so> -help</tt>
83 <li> <tt>-output <filename></tt>
85 Specify a reference output for the <stdout> file stream.
88 <li> <tt>-run-(lli|jit|llc|cbe)</tt>
90 Specify which code generator <tt>bugpoint</tt> should use to run the
98 If <tt>bugpoint</tt> succeeds in finding a problem, it will exit with 0.
99 Otherwise, if an error occurs, it will exit with a non-zero value.
102 <a href="opt.html"><tt>opt</tt></a>,
103 <a href="analyze.html"><tt>analyze</tt></a>
106 Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.