llvm.org GIT mirror llvm / 0215368
Documentation: improve formatting and remove unneeded empty lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168817 91177308-0d34-0410-b5e6-96231b3b80d8 Dmitri Gribenko 6 years ago
2 changed file(s) with 9 addition(s) and 70 deletion(s). Raw diff Collapse all Expand all
0 bugpoint - automatic test case reduction tool
11 =============================================
2
32
43 SYNOPSIS
54 --------
65
7
86 **bugpoint** [*options*] [*input LLVM ll/bc files*] [*LLVM passes*] **--args**
97 *program arguments*
108
11
129 DESCRIPTION
1310 -----------
14
1511
1612 **bugpoint** narrows down the source of problems in LLVM tools and passes. It
1713 can be used to debug three types of failures: optimizer crashes, miscompilations
2117 advice for using bugpoint, see *llvm/docs/Bugpoint.html* in the LLVM
2218 distribution.
2319
24
2520 OPTIONS
2621 -------
27
28
2922
3023 **--additional-so** *library*
3124
3326 run. This is useful if you are debugging programs which depend on non-LLVM
3427 libraries (such as the X or curses libraries) to run.
3528
36
37
3829 **--append-exit-code**\ =\ *{true,false}*
3930
4031 Append the test programs exit code to the output file so that a change in exit
4132 code is considered a test failure. Defaults to false.
4233
43
44
4534 **--args** *program args*
4635
47 Pass all arguments specified after -args to the test program whenever it runs.
48 Note that if any of the *program args* start with a '-', you should use:
49
36 Pass all arguments specified after **--args** to the test program whenever it runs.
37 Note that if any of the *program args* start with a "``-``", you should use:
5038
5139 .. code-block:: perl
5240
5341 bugpoint [bugpoint args] --args -- [program args]
5442
55
56 The "--" right after the **--args** option tells **bugpoint** to consider any
57 options starting with ``-`` to be part of the **--args** option, not as options to
58 **bugpoint** itself.
59
60
43 The "``--``" right after the **--args** option tells **bugpoint** to consider
44 any options starting with "``-``" to be part of the **--args** option, not as
45 options to **bugpoint** itself.
6146
6247 **--tool-args** *tool args*
6348
64 Pass all arguments specified after --tool-args to the LLVM tool under test
49 Pass all arguments specified after **--tool-args** to the LLVM tool under test
6550 (**llc**, **lli**, etc.) whenever it runs. You should use this option in the
6651 following way:
67
6852
6953 .. code-block:: perl
7054
7155 bugpoint [bugpoint args] --tool-args -- [tool args]
7256
73
74 The "--" right after the **--tool-args** option tells **bugpoint** to consider any
75 options starting with ``-`` to be part of the **--tool-args** option, not as
76 options to **bugpoint** itself. (See **--args**, above.)
77
78
57 The "``--``" right after the **--tool-args** option tells **bugpoint** to
58 consider any options starting with "``-``" to be part of the **--tool-args**
59 option, not as options to **bugpoint** itself. (See **--args**, above.)
7960
8061 **--safe-tool-args** *tool args*
8162
8263 Pass all arguments specified after **--safe-tool-args** to the "safe" execution
8364 tool.
8465
85
86
8766 **--gcc-tool-args** *gcc tool args*
8867
8968 Pass all arguments specified after **--gcc-tool-args** to the invocation of
9069 **gcc**.
9170
92
93
9471 **--opt-args** *opt args*
9572
9673 Pass all arguments specified after **--opt-args** to the invocation of **opt**.
97
98
9974
10075 **--disable-{dce,simplifycfg}**
10176
10479 reduce test programs. If you're trying to find a bug in one of these passes,
10580 **bugpoint** may crash.
10681
107
108
10982 **--enable-valgrind**
11083
11184 Use valgrind to find faults in the optimization phase. This will allow
11285 bugpoint to find otherwise asymptomatic problems caused by memory
11386 mis-management.
11487
115
116
11788 **-find-bugs**
11889
11990 Continually randomize the specified passes and run them on the test program
12091 until a bug is found or the user kills **bugpoint**.
12192
122
123
12493 **-help**
12594
12695 Print a summary of command line options.
127
128
12996
13097 **--input** *filename*
13198
13299 Open *filename* and redirect the standard input of the test program, whenever
133100 it runs, to come from that file.
134
135
136101
137102 **--load** *plugin*
138103
146111
147112 bugpoint --load myNewPass.so -help
148113
149
150
151
152114 **--mlimit** *megabytes*
153115
154116 Specifies an upper limit on memory usage of the optimization and codegen. Set
155117 to zero to disable the limit.
156
157
158118
159119 **--output** *filename*
160120
163123 do not use this option, **bugpoint** will attempt to generate a reference output
164124 by compiling the program with the "safe" backend and running it.
165125
166
167
168126 **--profile-info-file** *filename*
169127
170128 Profile file loaded by **--profile-loader**.
171
172
173129
174130 **--run-{int,jit,llc,custom}**
175131
177133 using the specified code generator. These options allow you to choose the
178134 interpreter, the JIT compiler, the static native code compiler, or a
179135 custom command (see **--exec-command**) respectively.
180
181
182136
183137 **--safe-{llc,custom}**
184138
191145 respectively. The interpreter and the JIT backends cannot currently
192146 be used as the "safe" backends.
193147
194
195
196148 **--exec-command** *command*
197149
198150 This option defines the command to use with the **--run-custom** and
199151 **--safe-custom** options to execute the bitcode testcase. This can
200152 be useful for cross-compilation.
201
202
203153
204154 **--compile-command** *command*
205155
209159 generate a reduced unit test, you may add CHECK directives to the
210160 testcase and pass the name of an executable compile-command script in this form:
211161
212
213162 .. code-block:: sh
214163
215164 #!/bin/sh
216165 llc "$@"
217166 not FileCheck [bugpoint input file].ll < bugpoint-test-program.s
218167
219
220168 This script will "fail" as long as FileCheck passes. So the result
221169 will be the minimum bitcode that passes FileCheck.
222
223
224170
225171 **--safe-path** *path*
226172
228174 **--safe-{int,jit,llc,custom}**
229175 option.
230176
231
232
233
234177 EXIT STATUS
235178 -----------
236
237179
238180 If **bugpoint** succeeds in finding a problem, it will exit with 0. Otherwise,
239181 if an error occurs, it will exit with a non-zero value.
240182
241
242183 SEE ALSO
243184 --------
244185
245
246186 opt|opt
55
66 Abstract
77 ========
8
98
109 This document provides some details on LLVM's System Library, located in the
1110 source at ``lib/System`` and ``include/llvm/System``. The library's purpose is