Chris Lattner | 1213bc7 | 2003-10-07 20:33:30 +0000 | [diff] [blame] | 1 | <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 Lattner | 83273d5 | 2003-10-07 20:33:52 +0000 | [diff] [blame] | 13 | <tt>bugpoint [options] [input llvm ll/bc files] [LLVM passes] --args <program arguments>...</tt> |
Chris Lattner | 1213bc7 | 2003-10-07 20:33:30 +0000 | [diff] [blame] | 14 | |
| 15 | <img src="../Debugging.gif" width=444 height=314 align=right> |
| 16 | <h3>DESCRIPTION</h3> |
| 17 | |
| 18 | The <tt>bugpoint</tt> tool is a generally useful tool for narrowing down |
| 19 | problems in LLVM tools and passes.<p> |
| 20 | |
| 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". If the <tt>-mode</tt> option is |
| 28 | specified, <tt>bugpoint</tt> enters "code generator debugging mode". |
| 29 | |
| 30 | <h4>Crash debugging mode</h4> |
| 31 | |
| 32 | TODO |
| 33 | |
| 34 | <h4>Miscompilation debugging mode</h4> |
| 35 | |
| 36 | TODO |
| 37 | |
| 38 | <h4>Code generator debugging mode</h4> |
| 39 | |
| 40 | TODO |
| 41 | |
| 42 | |
| 43 | <h3>OPTIONS</h3> |
| 44 | |
| 45 | <ul> |
| 46 | <li><tt>-args <arguments></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 <filename></tt> |
| 66 | <br> |
| 67 | Specify the contents of <stdin> when the program must be executed. |
| 68 | <p> |
| 69 | |
| 70 | <li> <tt>-load <plugin.so></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 <plugin.so> -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 <filename></tt> |
| 88 | <br> |
| 89 | Specify a reference output for the <stdout> 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 | |
| 102 | If <tt>bugpoint</tt> succeeds in finding a problem, it will exit with 0. |
| 103 | Otherwise, 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> |
| 110 | Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>. |
| 111 | </body> |
| 112 | </html> |
| 113 | |