X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FHowToSubmitABug.html;h=f01c5c72a10064052668051dbb11722a764f5589;hb=14fbcbfa2b7146569c588c451825206906c3b55a;hp=16e4c24a58b72590ca90f00c63ee2f922cb445a8;hpb=8436c21ad1a85ca1e68bca2e332fd45f024b478a;p=oota-llvm.git diff --git a/docs/HowToSubmitABug.html b/docs/HowToSubmitABug.html index 16e4c24a58b..f01c5c72a10 100644 --- a/docs/HowToSubmitABug.html +++ b/docs/HowToSubmitABug.html @@ -11,10 +11,9 @@ How to submit an LLVM bug report -
-
+
Once you have a reduced test-case, go to the LLVM Bug Tracking +href="http://llvm.org/bugs/enter_bug.cgi">the LLVM Bug Tracking System, select the category in which the bug falls, and fill out the form with the necessary details. The bug description should contain the following information: @@ -86,8 +82,8 @@ information:More often than not, bugs in the compiler cause it to crash - often due to an -assertion failure of some sort. If you are running opt or -analyze directly, and something crashes, jump to the section on +assertion failure of some sort. If you are running opt +directly, and something crashes, jump to the section on bugs in LLVM passes. Otherwise, the most important piece of the puzzle is to figure out if it is the GCC-based front-end that is buggy or if it's one of the LLVM tools that has problems. @@ -132,7 +128,10 @@ bunch of stuff, and should end with telling you that one of behind a foo.i file (containing preprocessed C source code) and possibly foo.s (containing LLVM assembly code), for each compiled foo.c file. Send us the foo.i file, -along with a brief description of the error it caused. +along with a brief description of the error it caused. A tool that might help +you reduce a front-end testcase to a more manageable size is +delta. +
-
gccas -debug-pass=Arguments < /dev/null -o - > /dev/null - +gccas -debug-pass=Arguments < /dev/null -o - > /dev/null ... which will print a list of arguments, indicating the list of passes that @@ -172,8 +170,9 @@ being linked together (the "llvm-gcc -v" output should include the full list of objects linked). Then run:
-
llvm-as < /dev/null > null.bc - gccld -debug-pass=Arguments null.bc +llvm-as < /dev/null > null.bc ... which will print a list of arguments, indicating the list of passes that @@ -203,12 +202,12 @@ something tractable, use the bugpoint tool as follows: test-case, but it should eventually print something like this:
-
-... -Emitted bytecode to 'bugpoint-reduced-simplified.bc' - -*** You can reproduce the problem with: opt bugpoint-reduced-simplified.bc -licm -+
+... Once you complete this, please send the LLVM bytecode file and the command @@ -231,8 +230,9 @@ before defining them, etc.) which the verifier will check for after a pass finishes its run. 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 +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. @@ -241,8 +241,8 @@ 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:
-
bugpoint -run-cbe [... optimization passes ...] file-to-test.bc ---args -- [program arguments] ++bugpoint -run-cbe [... optzn passes ...] file-to-test.bc --args -- [program arguments] bugpoint will try to narrow down your list of passes to the one pass @@ -271,15 +271,21 @@ Backend, and then link in the shared object it generates. To debug the JIT:
-
bugpoint -run-jit -output=[correct output file] [bytecode file] ---args -- [program arguments] ++bugpoint -run-jit -output=[correct output file] [bytecode file] \ + --tool-args -- [arguments to pass to lli] \ + --args -- [program arguments] + Similarly, to debug the LLC, one would run:
-
bugpoint -run-llc -output=[correct output file] [bytecode file] ---args -- [program arguments] ++bugpoint -run-llc -output=[correct output file] [bytecode file] \ + --tool-args -- [arguments to pass to llc] \ + --args -- [program arguments] + Special note: if you are debugging MultiSource or SPEC tests that @@ -288,8 +294,10 @@ debug the JIT, LLC, and CBE, using the pre-written Makefile targets, which will pass the program options specified in the Makefiles:
-
cd llvm/test/../../program
+cd llvm/test/../../program At the end of a successful bugpoint run, you will be presented @@ -302,28 +310,32 @@ the following:
+
-
+llc -march=c safe.bc -o safe.c
+
lli -load=safe.so test.bc [program options] +- The LLVM Compiler Infrastructure + The LLVM Compiler Infrastructure Last modified: $Date$ |