Add blurb about module flags and reformat a bit.
[oota-llvm.git] / docs / CommandGuide / bugpoint.pod
index 204ea4d3d39a8c653c46a554c06810a7534c3b10..31db62fe2d6b13292bc3fd49c87ece94f11f4520 100644 (file)
@@ -21,7 +21,7 @@ distribution.
 
 =head1 OPTIONS
 
-=over 
+=over
 
 =item B<--additional-so> F<library>
 
@@ -67,6 +67,10 @@ tool.
 Pass all arguments specified after B<--gcc-tool-args> to the invocation of
 B<gcc>.
 
+=item B<--opt-args> I<opt args>
+
+Pass all arguments specified after B<--opt-args> to the invocation of B<opt>.
+
 =item B<--disable-{dce,simplifycfg}>
 
 Do not run the specified passes to clean up and reduce the size of the test
@@ -83,9 +87,9 @@ 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>. 
+until a bug is found or the user kills B<bugpoint>.
 
-=item B<--help>
+=item B<-help>
 
 Print a summary of command line options.
 
@@ -99,9 +103,9 @@ 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>
 
@@ -143,6 +147,21 @@ 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
@@ -162,6 +181,6 @@ L<opt|opt>
 
 =head1 AUTHOR
 
-Maintained by the LLVM Team (L<http://llvm.org>).
+Maintained by the LLVM Team (L<http://llvm.org/>).
 
 =cut