From eb373aaa33e3f16d3da8720bfcde4bc72bd1b103 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 18 Feb 2004 23:30:21 +0000 Subject: Document the code generator debugger. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11616 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CommandGuide/bugpoint.html | 50 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'docs/CommandGuide') diff --git a/docs/CommandGuide/bugpoint.html b/docs/CommandGuide/bugpoint.html index 96f7e90b20..e5a92826af 100644 --- a/docs/CommandGuide/bugpoint.html +++ b/docs/CommandGuide/bugpoint.html @@ -47,43 +47,43 @@ any of the passes crash, or if they produce malformed output, bugpoint starts the crash debugger.

Otherwise, if the -output option was not -specified, bugpoint runs the test program with the C backend (which -is assumed to generate good code) to generate a reference output. Once +specified, bugpoint runs the test program with the C backend (which is +assumed to generate good code) to generate a reference output. Once bugpoint has a reference output for the test program, it tries -executing it -with the selected code generator. If -the resulting output differs from the reference output, it assumes the -difference resulted from a code generator failure, and starts the -code generator debugger.

- -Otherwise, bugpoint runs the test program after all of the LLVM passes -have been applied to it. If its output differs from the reference output, -it assumes the difference resulted from a failure in one of the LLVM passes, -and enters the -miscompilation debugger. Otherwise, -there is no problem bugpoint can debug.

+executing it with the selected code generator. If the +selected code generator crashes, bugpoint starts the crash debugger on the code generator. Otherwise, if the +resulting output differs from the reference output, it assumes the difference +resulted from a code generator failure, and starts the code generator debugger.

+ +Finally, if the output of the selected code generator matches the reference +output, bugpoint runs the test program after all of the LLVM passes +have been applied to it. If its output differs from the reference output, it +assumes the difference resulted from a failure in one of the LLVM passes, and +enters the miscompilation +debugger. Otherwise, there is no problem bugpoint can debug.

Crash debugger

-If an optimizer crashes, bugpoint will try as hard as it can to -reduce the list of passes and the size of the test program. First, -bugpoint figures out which combination of passes triggers the bug. This -is useful when debugging a problem exposed by gccas, for example, -because it runs over 25 optimizations.

+If an optimizer or code generator crashes, bugpoint will try as hard as +it can to reduce the list of passes (for optimizer crashes) and the size of the +test program. First, bugpoint figures out which combination of +optimizer passes triggers the bug. This is useful when debugging a problem +exposed by gccas, for example, because it runs over 25 +optimizations.

Next, bugpoint tries removing functions from the test program, to -reduce its -size. Usually it is able to reduce a test program -to a single function, when debugging intraprocedural optimizations. Once the -number of +reduce its size. Usually it is able to reduce a test program to a single +function, when debugging intraprocedural optimizations. Once the number of functions has been reduced, it attempts to delete various edges in the control flow graph, to reduce the size of the function as much as possible. Finally, bugpoint deletes any individual LLVM instructions whose absence does not eliminate the failure. At the end, bugpoint should tell you what passes crash, give you a bytecode file, and give you instructions on how to -reproduce the failure with opt or -analyze.

+reproduce the failure with opt, analyze, or llc.

Code generator debugger

-- cgit v1.2.3-18-g5258