1BUGPOINT(1) LLVM Command Guide BUGPOINT(1)
2
3
4
6 bugpoint - automatic test case reduction tool
7
9 bugpoint [options] [input LLVM ll/bc files] [LLVM passes] --args
10 program arguments
11
13 bugpoint narrows down the source of problems in LLVM tools and passes.
14 It can be used to debug three types of failures: optimizer crashes,
15 miscompilations by optimizers, or bad native code generation (including
16 problems in the static and JIT compilers). It aims to reduce large
17 test cases to small, useful ones. For more information on the design
18 and inner workings of bugpoint, as well as advice for using bugpoint,
19 see llvm/docs/Bugpoint.html in the LLVM distribution.
20
22 --additional-so library
23 Load the dynamic shared object library into the test program
24 whenever it is run. This is useful if you are debugging programs
25 which depend on non-LLVM libraries (such as the X or curses
26 libraries) to run.
27
28 --append-exit-code={true,false}
29 Append the test programs exit code to the output file so that a
30 change in exit code is considered a test failure. Defaults to
31 false.
32
33 --args program args
34 Pass all arguments specified after -args to the test program
35 whenever it runs. Note that if any of the program args start with
36 a '-', you should use:
37
38 bugpoint [bugpoint args] --args -- [program args]
39
40 The "--" right after the --args option tells bugpoint to consider
41 any options starting with "-" to be part of the --args option, not
42 as options to bugpoint itself.
43
44 --tool-args tool args
45 Pass all arguments specified after --tool-args to the LLVM tool
46 under test (llc, lli, etc.) whenever it runs. You should use this
47 option in the following way:
48
49 bugpoint [bugpoint args] --tool-args -- [tool args]
50
51 The "--" right after the --tool-args option tells bugpoint to
52 consider any options starting with "-" to be part of the
53 --tool-args option, not as options to bugpoint itself. (See --args,
54 above.)
55
56 --safe-tool-args tool args
57 Pass all arguments specified after --safe-tool-args to the "safe"
58 execution tool.
59
60 --gcc-tool-args gcc tool args
61 Pass all arguments specified after --gcc-tool-args to the
62 invocation of gcc.
63
64 --opt-args opt args
65 Pass all arguments specified after --opt-args to the invocation of
66 opt.
67
68 --disable-{dce,simplifycfg}
69 Do not run the specified passes to clean up and reduce the size of
70 the test program. By default, bugpoint uses these passes internally
71 when attempting to reduce test programs. If you're trying to find
72 a bug in one of these passes, bugpoint may crash.
73
74 --enable-valgrind
75 Use valgrind to find faults in the optimization phase. This will
76 allow bugpoint to find otherwise asymptomatic problems caused by
77 memory mis-management.
78
79 -find-bugs
80 Continually randomize the specified passes and run them on the test
81 program until a bug is found or the user kills bugpoint.
82
83 -help
84 Print a summary of command line options.
85
86 --input filename
87 Open filename and redirect the standard input of the test program,
88 whenever it runs, to come from that file.
89
90 --load plugin
91 Load the dynamic object plugin into bugpoint itself. This object
92 should register new optimization passes. Once loaded, the object
93 will add new command line options to enable various optimizations.
94 To see the new complete list of optimizations, use the -help and
95 --load options together; for example:
96
97 bugpoint --load myNewPass.so -help
98
99 --mlimit megabytes
100 Specifies an upper limit on memory usage of the optimization and
101 codegen. Set to zero to disable the limit.
102
103 --output filename
104 Whenever the test program produces output on its standard output
105 stream, it should match the contents of filename (the "reference
106 output"). If you do not use this option, bugpoint will attempt to
107 generate a reference output by compiling the program with the
108 "safe" backend and running it.
109
110 --profile-info-file filename
111 Profile file loaded by --profile-loader.
112
113 --run-{int,jit,llc,cbe,custom}
114 Whenever the test program is compiled, bugpoint should generate
115 code for it using the specified code generator. These options
116 allow you to choose the interpreter, the JIT compiler, the static
117 native code compiler, the C backend, or a custom command (see
118 --exec-command) respectively.
119
120 --safe-{llc,cbe,custom}
121 When debugging a code generator, bugpoint should use the specified
122 code generator as the "safe" code generator. This is a known-good
123 code generator used to generate the "reference output" if it has
124 not been provided, and to compile portions of the program that as
125 they are excluded from the testcase. These options allow you to
126 choose the static native code compiler, the C backend, or a custom
127 command, (see --exec-command) respectively. The interpreter and the
128 JIT backends cannot currently be used as the "safe" backends.
129
130 --exec-command command
131 This option defines the command to use with the --run-custom and
132 --safe-custom options to execute the bitcode testcase. This can be
133 useful for cross-compilation.
134
135 --safe-path path
136 This option defines the path to the command to execute with the
137 --safe-{int,jit,llc,cbe,custom} option.
138
140 If bugpoint succeeds in finding a problem, it will exit with 0.
141 Otherwise, if an error occurs, it will exit with a non-zero value.
142
144 opt
145
147 Maintained by the LLVM Team (<http://llvm.org>).
148
149
150
151CVS 2010-08-08 BUGPOINT(1)