From 5cd840c047ab05d345d9b9a92a853b18e784a3dd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 18 Oct 2003 20:54:37 +0000 Subject: [PATCH] * Add the -additional-so option * Add info about codegen and miscompilation mode git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9240 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CommandGuide/bugpoint.html | 88 +++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/docs/CommandGuide/bugpoint.html b/docs/CommandGuide/bugpoint.html index 885a0e77bcf..78e3ebdbd97 100644 --- a/docs/CommandGuide/bugpoint.html +++ b/docs/CommandGuide/bugpoint.html @@ -23,12 +23,22 @@ if gccas crashes while optimizing a file, it will identify the optimization (or combination of optimizations) that causes the crash, and reduce the file down to a small example which triggers the crash.

+bugpoint has been designed to be a useful tool without requiring any +hooks into the LLVM intrastructure at all. It works with any and all LLVM +passes and code generators, and does not need to "know" how they work. Because +of this, it may appear to do a lot of stupid things or miss obvious +simplifications. Remember, however, that computer time is much cheaper than +programmer time, so if it takes a long time to reduce a testcase it is still +worth it. :)

+ + +

Automatic Mode Selection

+ bugpoint reads the specified list of .bc or .ll files specified on the command-line and links them together. If any LLVM passes are specified on the command line, it runs these passes on the resultant module. If -any of the passes crash, or if they produce an LLVM module which is not -verifiable, bugpoint enters crash debugging -mode.

+any of the passes crash, or if they produce a malformed LLVM module, +bugpoint enters crash debugging mode.

Otherwise, if the -output option was not specified, bugpoint runs the initial program with the C backend (which @@ -66,43 +76,63 @@ reproduce the failure with opt or

Code generator debugging mode

-TODO +The code generator debugger attempts to narrow down the amount of code that is +being miscompiled by the selected code generator. To do +this, it takes the LLVM program and partitions it into two pieces: one piece +which it compiles with the C backend (into a shared object), and one piece which +it runs with either the JIT or the static LLC compiler. It uses several +techniques to reduce the amount of code pushed through the LLVM code generator, +to reduce the potential scope of the problem. After it is finished, it emits +two bytecode files (the "test" [to be compiled with the code generator] and +"safe" [to be compiled with the C backend] modules), and instructions for +reproducing the problem. This module assume the C backend produces good +code.

+ +If you are using this mode and get an error message that says "Non-instruction +is using an external function!", try using the -run-llc option instead +of the -run-jit option. This is due to an unimplemented feature in the +code generator debugging mode.

Miscompilation debugging mode

-TODO +The miscompilation debugging mode works similarly to the code generator +debugging mode. It works by splitting the program into two pieces, running the +optimizations specified on one piece, relinking the program, then executing it. +It attempts to narrow down the list of passes to the one (or few) which are +causing the miscompilation, then reduce the portion of the program which is +being miscompiled. This module assumes that the selected code generator is +working properly.

OPTIONS

EXIT STATUS