Remove the Blackfin backend.
[oota-llvm.git] / docs / CommandGuide / bugpoint.pod
index d2b922bd61757aa570cd02e8055a2d6e3b152779..31db62fe2d6b13292bc3fd49c87ece94f11f4520 100644 (file)
@@ -21,7 +21,7 @@ distribution.
 
 =head1 OPTIONS
 
-=over 
+=over
 
 =item B<--additional-so> F<library>
 
@@ -29,6 +29,11 @@ Load the dynamic shared object F<library> into the test program whenever it is
 run.  This is useful if you are debugging programs which depend on non-LLVM
 libraries (such as the X or curses libraries) to run.
 
+=item B<--append-exit-code>=I<{true,false}>
+
+Append the test programs exit code to the output file so that a change in exit
+code is considered a test failure. Defaults to false.
+
 =item B<--args> I<program args>
 
 Pass all arguments specified after -args to the test program whenever it runs.
@@ -52,10 +57,19 @@ The "--" right after the B<--tool-args> option tells B<bugpoint> to consider any
 options starting with C<-> to be part of the B<--tool-args> option, not as
 options to B<bugpoint> itself. (See B<--args>, above.)
 
-=item B<--check-exit-code>=I<{true,false}>
+=item B<--safe-tool-args> I<tool args>
+
+Pass all arguments specified after B<--safe-tool-args> to the "safe" execution
+tool.
+
+=item B<--gcc-tool-args> I<gcc tool args>
+
+Pass all arguments specified after B<--gcc-tool-args> to the invocation of
+B<gcc>.
+
+=item B<--opt-args> I<opt args>
 
-Assume a non-zero exit code or core dump from the test program is a failure.
-Defaults to true.
+Pass all arguments specified after B<--opt-args> to the invocation of B<opt>.
 
 =item B<--disable-{dce,simplifycfg}>
 
@@ -64,7 +78,18 @@ program. By default, B<bugpoint> uses these passes internally when attempting to
 reduce test programs.  If you're trying to find a bug in one of these passes,
 B<bugpoint> may crash.
 
-=item B<--help>
+=item B<--enable-valgrind>
+
+Use valgrind to find faults in the optimization phase. This will allow
+bugpoint to find otherwise asymptomatic problems caused by memory
+mis-management.
+
+=item B<-find-bugs>
+
+Continually randomize the specified passes and run them on the test program
+until a bug is found or the user kills B<bugpoint>.
+
+=item B<-help>
 
 Print a summary of command line options.
 
@@ -78,27 +103,70 @@ it runs, to come from that file.
 Load the dynamic object F<plugin> into B<bugpoint> itself.  This object should
 register new optimization passes.  Once loaded, the object will add new command
 line options to enable various optimizations.  To see the new complete list of
-optimizations, use the B<--help> and B<--load> options together; for example:
+optimizations, use the B<-help> and B<--load> options together; for example:
+
+    bugpoint --load myNewPass.so -help
 
-    bugpoint --load myNewPass.so --help
+=item B<--mlimit> F<megabytes>
+
+Specifies an upper limit on memory usage of the optimization and codegen. Set
+to zero to disable the limit.
 
 =item B<--output> F<filename>
 
 Whenever the test program produces output on its standard output stream, it
 should match the contents of F<filename> (the "reference output"). If you
 do not use this option, B<bugpoint> will attempt to generate a reference output
-by compiling the program with the C backend and running it.
+by compiling the program with the "safe" backend and running it.
 
 =item B<--profile-info-file> F<filename>
 
 Profile file loaded by B<--profile-loader>.
 
-=item B<--run-{int,jit,llc,cbe}>
+=item B<--run-{int,jit,llc,cbe,custom}>
 
 Whenever the test program is compiled, B<bugpoint> should generate code for it
 using the specified code generator.  These options allow you to choose the
-interpreter, the JIT compiler, the static native code compiler, or the C
-backend, respectively.
+interpreter, the JIT compiler, the static native code compiler, the C
+backend, or a custom command (see B<--exec-command>) respectively.
+
+=item B<--safe-{llc,cbe,custom}>
+
+When debugging a code generator, B<bugpoint> should use the specified code
+generator as the "safe" code generator. This is a known-good code generator
+used to generate the "reference output" if it has not been provided, and to
+compile portions of the program that as they are excluded from the testcase.
+These options allow you to choose the
+static native code compiler, the C backend, or a custom command,
+(see B<--exec-command>) respectively. The interpreter and the JIT backends
+cannot currently be used as the "safe" backends.
+
+=item B<--exec-command> I<command>
+
+This option defines the command to use with the B<--run-custom> and
+B<--safe-custom> options to execute the bitcode testcase. This can
+be useful for cross-compilation.
+
+=item B<--compile-command> I<command>
+
+This option defines the command to use with the B<--compile-custom>
+option to compile the bitcode testcase. This can be useful for
+testing compiler output without running any link or execute stages. To
+generate a reduced unit test, you may add CHECK directives to the
+testcase and pass the name of an executable compile-command script in this form:
+
+    #!/bin/sh
+    llc "$@"
+    not FileCheck [bugpoint input file].ll < bugpoint-test-program.s
+
+This script will "fail" as long as FileCheck passes. So the result
+will be the minimum bitcode that passes FileCheck.
+
+=item B<--safe-path> I<path>
+
+This option defines the path to the command to execute with the
+B<--safe-{int,jit,llc,cbe,custom}>
+option.
 
 =back
 
@@ -109,10 +177,10 @@ if an error occurs, it will exit with a non-zero value.
 
 =head1 SEE ALSO
 
-L<opt|opt>, L<analyze|analyze>
+L<opt|opt>
 
 =head1 AUTHOR
 
-Maintained by the LLVM Team (L<http://llvm.org>).
+Maintained by the LLVM Team (L<http://llvm.org/>).
 
 =cut