mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-27 12:26:08 +00:00
Add a note to make sure the program is memory correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
before defining them, etc.) which the verifier will check for after a pass
|
||||||
finishes its run.</p>
|
finishes its run.</p>
|
||||||
|
|
||||||
<p>To debug a miscompilation, you should choose which program you wish to run
|
<p>If it looks like the LLVM compiler is miscompiling a program, the very first
|
||||||
the output through, e.g. C backend, the JIT, or LLC, and a selection of passes,
|
thing to check is to make sure it is not using undefined behavior. In
|
||||||
one of which may be causing the error, and run, for example:</p>
|
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">
|
<div class="doc_code">
|
||||||
<p><tt><b>bugpoint</b> -run-cbe [... optimization passes ...] file-to-test.bc
|
<p><tt><b>bugpoint</b> -run-cbe [... optimization passes ...] file-to-test.bc
|
||||||
|
Reference in New Issue
Block a user