diff options
author | Chris Lattner <sabre@nondot.org> | 2004-05-11 19:34:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-05-11 19:34:27 +0000 |
commit | 415532491af9b1512338d007820da0101eb4732b (patch) | |
tree | 4c36801eb321f1fcb3efcef59f0fdc7635200766 /llvm/docs/HowToSubmitABug.html | |
parent | 1aaea06cbc46fc254bc082c2064876ced780f5a5 (diff) | |
download | bcm5719-llvm-415532491af9b1512338d007820da0101eb4732b.tar.gz bcm5719-llvm-415532491af9b1512338d007820da0101eb4732b.zip |
Add a note to make sure the program is memory correct
llvm-svn: 13464
Diffstat (limited to 'llvm/docs/HowToSubmitABug.html')
-rw-r--r-- | llvm/docs/HowToSubmitABug.html | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/docs/HowToSubmitABug.html b/llvm/docs/HowToSubmitABug.html index 7c0b21766f0..16e4c24a58b 100644 --- a/llvm/docs/HowToSubmitABug.html +++ b/llvm/docs/HowToSubmitABug.html @@ -230,9 +230,15 @@ from producing invalid LLVM code (i.e., code not in SSA form, using values before defining them, etc.) which the verifier will check for after a pass finishes its run.</p> -<p>To debug a miscompilation, you should choose which program you wish to run -the output through, e.g. C backend, the JIT, or LLC, and a selection of passes, -one of which may be causing the error, and run, for example:</p> +<p>If it looks like the LLVM compiler is miscompiling a program, the very first +thing to check is to make sure it is not using undefined behavior. In +particular, check to see if the program valgrinds clean, passes purify, or some +other memory checker tool. Many of the "LLVM bugs" that we have chased down +ended up being bugs in the program being compiled, not LLVM.</p> + +<p>Once you determine that the program itself is not buggy, you should choose +which code generator you wish to compile the program with (e.g. C backend, the +JIT, or LLC) and optionally a series of LLVM passes to run. For example:</p> <div class="doc_code"> <p><tt><b>bugpoint</b> -run-cbe [... optimization passes ...] file-to-test.bc |