2 .\" Man page generated from reStructuredText.
4 .TH "BUGPOINT" "1" "2014-01-01" "3.4" "LLVM"
6 bugpoint \- automatic test case reduction tool
8 .nr rst2man-indent-level 0
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
20 .\" .rstReportMargin pre:
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
36 \fBbugpoint\fP [\fIoptions\fP] [\fIinput LLVM ll/bc files\fP] [\fILLVM passes\fP] \fB\-\-args\fP
37 \fIprogram arguments\fP
40 \fBbugpoint\fP narrows down the source of problems in LLVM tools and passes. It
41 can be used to debug three types of failures: optimizer crashes, miscompilations
42 by optimizers, or bad native code generation (including problems in the static
43 and JIT compilers). It aims to reduce large test cases to small, useful ones.
44 For more information on the design and inner workings of \fBbugpoint\fP, as well as
45 advice for using bugpoint, see \fIllvm/docs/Bugpoint.html\fP in the LLVM
49 \fB\-\-additional\-so\fP \fIlibrary\fP
52 Load the dynamic shared object \fIlibrary\fP into the test program whenever it is
53 run. This is useful if you are debugging programs which depend on non\-LLVM
54 libraries (such as the X or curses libraries) to run.
58 \fB\-\-append\-exit\-code\fP=\fI{true,false}\fP
61 Append the test programs exit code to the output file so that a change in exit
62 code is considered a test failure. Defaults to false.
66 \fB\-\-args\fP \fIprogram args\fP
69 Pass all arguments specified after \fB\-\-args\fP to the test program whenever it runs.
70 Note that if any of the \fIprogram args\fP start with a "\fB\-\fP", you should use:
76 bugpoint [bugpoint args] \-\-args \-\- [program args]
82 The "\fB\-\-\fP" right after the \fB\-\-args\fP option tells \fBbugpoint\fP to consider
83 any options starting with "\fB\-\fP" to be part of the \fB\-\-args\fP option, not as
84 options to \fBbugpoint\fP itself.
88 \fB\-\-tool\-args\fP \fItool args\fP
91 Pass all arguments specified after \fB\-\-tool\-args\fP to the LLVM tool under test
92 (\fBllc\fP, \fBlli\fP, etc.) whenever it runs. You should use this option in the
99 bugpoint [bugpoint args] \-\-tool\-args \-\- [tool args]
105 The "\fB\-\-\fP" right after the \fB\-\-tool\-args\fP option tells \fBbugpoint\fP to
106 consider any options starting with "\fB\-\fP" to be part of the \fB\-\-tool\-args\fP
107 option, not as options to \fBbugpoint\fP itself. (See \fB\-\-args\fP, above.)
111 \fB\-\-safe\-tool\-args\fP \fItool args\fP
114 Pass all arguments specified after \fB\-\-safe\-tool\-args\fP to the "safe" execution
119 \fB\-\-gcc\-tool\-args\fP \fIgcc tool args\fP
122 Pass all arguments specified after \fB\-\-gcc\-tool\-args\fP to the invocation of
127 \fB\-\-opt\-args\fP \fIopt args\fP
130 Pass all arguments specified after \fB\-\-opt\-args\fP to the invocation of \fBopt\fP\&.
134 \fB\-\-disable\-{dce,simplifycfg}\fP
137 Do not run the specified passes to clean up and reduce the size of the test
138 program. By default, \fBbugpoint\fP uses these passes internally when attempting to
139 reduce test programs. If you\(aqre trying to find a bug in one of these passes,
140 \fBbugpoint\fP may crash.
144 \fB\-\-enable\-valgrind\fP
147 Use valgrind to find faults in the optimization phase. This will allow
148 bugpoint to find otherwise asymptomatic problems caused by memory
156 Continually randomize the specified passes and run them on the test program
157 until a bug is found or the user kills \fBbugpoint\fP\&.
164 Print a summary of command line options.
168 \fB\-\-input\fP \fIfilename\fP
171 Open \fIfilename\fP and redirect the standard input of the test program, whenever
172 it runs, to come from that file.
176 \fB\-\-load\fP \fIplugin\fP
179 Load the dynamic object \fIplugin\fP into \fBbugpoint\fP itself. This object should
180 register new optimization passes. Once loaded, the object will add new command
181 line options to enable various optimizations. To see the new complete list of
182 optimizations, use the \fB\-help\fP and \fB\-\-load\fP options together; for example:
188 bugpoint \-\-load myNewPass.so \-help
196 \fB\-\-mlimit\fP \fImegabytes\fP
199 Specifies an upper limit on memory usage of the optimization and codegen. Set
200 to zero to disable the limit.
204 \fB\-\-output\fP \fIfilename\fP
207 Whenever the test program produces output on its standard output stream, it
208 should match the contents of \fIfilename\fP (the "reference output"). If you
209 do not use this option, \fBbugpoint\fP will attempt to generate a reference output
210 by compiling the program with the "safe" backend and running it.
214 \fB\-\-profile\-info\-file\fP \fIfilename\fP
217 Profile file loaded by \fB\-\-profile\-loader\fP\&.
221 \fB\-\-run\-{int,jit,llc,custom}\fP
224 Whenever the test program is compiled, \fBbugpoint\fP should generate code for it
225 using the specified code generator. These options allow you to choose the
226 interpreter, the JIT compiler, the static native code compiler, or a
227 custom command (see \fB\-\-exec\-command\fP) respectively.
231 \fB\-\-safe\-{llc,custom}\fP
234 When debugging a code generator, \fBbugpoint\fP should use the specified code
235 generator as the "safe" code generator. This is a known\-good code generator
236 used to generate the "reference output" if it has not been provided, and to
237 compile portions of the program that as they are excluded from the testcase.
238 These options allow you to choose the
239 static native code compiler, or a custom command, (see \fB\-\-exec\-command\fP)
240 respectively. The interpreter and the JIT backends cannot currently
241 be used as the "safe" backends.
245 \fB\-\-exec\-command\fP \fIcommand\fP
248 This option defines the command to use with the \fB\-\-run\-custom\fP and
249 \fB\-\-safe\-custom\fP options to execute the bitcode testcase. This can
250 be useful for cross\-compilation.
254 \fB\-\-compile\-command\fP \fIcommand\fP
257 This option defines the command to use with the \fB\-\-compile\-custom\fP
258 option to compile the bitcode testcase. This can be useful for
259 testing compiler output without running any link or execute stages. To
260 generate a reduced unit test, you may add CHECK directives to the
261 testcase and pass the name of an executable compile\-command script in this form:
269 not FileCheck [bugpoint input file].ll < bugpoint\-test\-program.s
275 This script will "fail" as long as FileCheck passes. So the result
276 will be the minimum bitcode that passes FileCheck.
280 \fB\-\-safe\-path\fP \fIpath\fP
283 This option defines the path to the command to execute with the
284 \fB\-\-safe\-{int,jit,llc,custom}\fP
290 If \fBbugpoint\fP succeeds in finding a problem, it will exit with 0. Otherwise,
291 if an error occurs, it will exit with a non\-zero value.
296 Maintained by The LLVM Team (http://llvm.org/).
298 2003-2013, LLVM Project
299 .\" Generated by docutils manpage writer.