llvm.org GIT mirror llvm / 8436c21
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 Chris Lattner 15 years ago
1 changed file(s) with 9 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
229229 before defining them, etc.) which the verifier will check for after a pass
230230 finishes its run.


To debug a miscompilation, you should choose which program you wish to run

233 the output through, e.g. C backend, the JIT, or LLC, and a selection of passes,
234 one of which may be causing the error, and run, for example:


If it looks like the LLVM compiler is miscompiling a program, the very first

233 thing to check is to make sure it is not using undefined behavior. In
234 particular, check to see if the program valgrinds clean, passes purify, or some
235 other memory checker tool. Many of the "LLVM bugs" that we have chased down
236 ended up being bugs in the program being compiled, not LLVM.


Once you determine that the program itself is not buggy, you should choose

239 which code generator you wish to compile the program with (e.g. C backend, the
240 JIT, or LLC) and optionally a series of LLVM passes to run. For example:


bugpoint -run-cbe [... optimization passes ...] file-to-test.bc