2 .\" Man page generated from reStructuredText.
4 .TH "BUGPOINT" "1" "2016-03-03" "3.8" "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\-\-run\-{int,jit,llc,custom}\fP
217 Whenever the test program is compiled, \fBbugpoint\fP should generate code for it
218 using the specified code generator. These options allow you to choose the
219 interpreter, the JIT compiler, the static native code compiler, or a
220 custom command (see \fB\-\-exec\-command\fP) respectively.
224 \fB\-\-safe\-{llc,custom}\fP
227 When debugging a code generator, \fBbugpoint\fP should use the specified code
228 generator as the "safe" code generator. This is a known\-good code generator
229 used to generate the "reference output" if it has not been provided, and to
230 compile portions of the program that as they are excluded from the testcase.
231 These options allow you to choose the
232 static native code compiler, or a custom command, (see \fB\-\-exec\-command\fP)
233 respectively. The interpreter and the JIT backends cannot currently
234 be used as the "safe" backends.
238 \fB\-\-exec\-command\fP \fIcommand\fP
241 This option defines the command to use with the \fB\-\-run\-custom\fP and
242 \fB\-\-safe\-custom\fP options to execute the bitcode testcase. This can
243 be useful for cross\-compilation.
247 \fB\-\-compile\-command\fP \fIcommand\fP
250 This option defines the command to use with the \fB\-\-compile\-custom\fP
251 option to compile the bitcode testcase. This can be useful for
252 testing compiler output without running any link or execute stages. To
253 generate a reduced unit test, you may add CHECK directives to the
254 testcase and pass the name of an executable compile\-command script in this form:
262 not FileCheck [bugpoint input file].ll < bugpoint\-test\-program.s
268 This script will "fail" as long as FileCheck passes. So the result
269 will be the minimum bitcode that passes FileCheck.
273 \fB\-\-safe\-path\fP \fIpath\fP
276 This option defines the path to the command to execute with the
277 \fB\-\-safe\-{int,jit,llc,custom}\fP
283 If \fBbugpoint\fP succeeds in finding a problem, it will exit with 0. Otherwise,
284 if an error occurs, it will exit with a non\-zero value.
289 Maintained by The LLVM Team (http://llvm.org/).
291 2003-2016, LLVM Project
292 .\" Generated by docutils manpage writer.