How to submit an LLVM bug report
</div>
-<table border="0" width="100%">
-<tr>
-<td valign="top">
-
+<table class="layout" style="width: 90%" >
+<tr class="layout">
+ <td class="left">
<ol>
<li><a href="#introduction">Introduction - Got bugs?</a></li>
<li><a href="#crashers">Crashing Bugs</a>
</ul></li>
<li><a href="#miscompilations">Miscompilations</a></li>
<li><a href="#codegen">Incorrect code generation (JIT and LLC)</a></li>
-
</ol>
-
-<div class="doc_text">
- <p><b>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a> and
- <a href="http://misha.brukman.net">Misha Brukman</a></b></p>
+<div class="doc_author">
+ <p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a> and
+ <a href="http://misha.brukman.net">Misha Brukman</a></p>
</div>
-
</td>
-<td align="right">
- <img src="Debugging.gif" alt="Debugging" width="444" height="314">
+<td class="right">
+ <img src="img/Debugging.gif" alt="Debugging" width="444" height="314">
</td>
</tr>
</table>
<tt>-save-temps</tt> option to <tt><b>llvm-gcc</b></tt>. Then run:</p>
<div class="doc_code">
-<p><tt><b>gccas</b> -debug-pass=Arguments < /dev/null -o - > /dev/null
-</tt></p>
+<p><tt><b>gccas</b> -debug-pass=Arguments < /dev/null -o - > /dev/null</tt></p>
</div>
<p>... which will print a list of arguments, indicating the list of passes that
the full list of objects linked). Then run:</p>
<div class="doc_code">
-<p><tt><b>llvm-as</b> < /dev/null > null.bc
- <b>gccld</b> -debug-pass=Arguments null.bc</tt></p>
+<p><tt><b>llvm-as</b> < /dev/null > null.bc<br>
+<b>gccld</b> -debug-pass=Arguments null.bc</tt>
+</p>
</div>
<p>... which will print a list of arguments, indicating the list of passes that
test-case, but it should eventually print something like this:</p>
<div class="doc_code">
-<pre>
-...
-Emitted bytecode to 'bugpoint-reduced-simplified.bc'
-
-*** You can reproduce the problem with: opt bugpoint-reduced-simplified.bc -licm
-</pre>
+<p><tt>
+...<br>
+Emitted bytecode to 'bugpoint-reduced-simplified.bc'<br>
+<br>
+*** You can reproduce the problem with: opt bugpoint-reduced-simplified.bc -licm<br>
+</tt></p>
</div>
<p>Once you complete this, please send the LLVM bytecode file and the command
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
---args -- [program arguments]</tt></p>
+<p><tt>
+<b>bugpoint</b> -run-cbe [... optzn passes ...] file-to-test.bc --args -- [program arguments]</tt></p>
</div>
<p><tt>bugpoint</tt> will try to narrow down your list of passes to the one pass
<p>To debug the JIT:</p>
<div class="doc_code">
-<p><tt><b>bugpoint</b> -run-jit -output=[correct output file] [bytecode file]
---args -- [program arguments]</tt></p>
+<pre>
+bugpoint -run-jit -output=[correct output file] [bytecode file] \
+ --tool-args -- [arguments to pass to lli] \
+ --args -- [program arguments]
+</pre>
</div>
<p>Similarly, to debug the LLC, one would run:</p>
<div class="doc_code">
-<p><tt><b>bugpoint</b> -run-llc -output=[correct output file] [bytecode file]
---args -- [program arguments]</tt></p>
+<pre>
+bugpoint -run-llc -output=[correct output file] [bytecode file] \
+ --tool-args -- [arguments to pass to llc] \
+ --args -- [program arguments]
+</pre>
</div>
<p><b>Special note:</b> if you are debugging MultiSource or SPEC tests that
will pass the program options specified in the Makefiles:</p>
<div class="doc_code">
-<p><tt>cd llvm/test/../../program<br>
- make bugpoint-jit</tt></p>
+<p><tt>
+cd llvm/test/../../program<br>
+make bugpoint-jit
+</tt></p>
</div>
<p>At the end of a successful <tt>bugpoint</tt> run, you will be presented
<ol>
- <li><p>Regenerate the shared object from the safe bytecode file:</p>
+<li><p>Regenerate the shared object from the safe bytecode file:</p>
- <div class="doc_code">
- <p><tt><b>llc</b> -march=c safe.bc -o safe.c<br>
- <b>gcc</b> -shared safe.c -o safe.so</tt></p>
- </div></li>
+<div class="doc_code">
+<p><tt>
+<b>llc</b> -march=c safe.bc -o safe.c<br>
+<b>gcc</b> -shared safe.c -o safe.so
+</tt></p>
+</div></li>
- <li><p>If debugging LLC, compile test bytecode native and link with the shared
- object:</p>
+<li><p>If debugging LLC, compile test bytecode native and link with the shared
+ object:</p>
- <div class="doc_code">
- <p><tt><b>llc</b> test.bc -o test.s -f<br>
- <b>gcc</b> test.s safe.so -o test.llc<br>
- ./test.llc [program options]</tt></p>
- </div></li>
-
- <li><p>If debugging the JIT, load the shared object and supply the test
- bytecode:</p>
+<div class="doc_code">
+<p><tt>
+<b>llc</b> test.bc -o test.s -f<br>
+<b>gcc</b> test.s safe.so -o test.llc<br>
+./test.llc [program options]
+</tt></p>
+</div></li>
+
+<li><p>If debugging the JIT, load the shared object and supply the test
+ bytecode:</p>
- <div class="doc_code">
- <p><tt><b>lli</b> -load=safe.so test.bc [program options]</tt></p>
- </div></li>
+<div class="doc_code">
+<p><tt><b>lli</b> -load=safe.so test.bc [program options]</tt></p>
+</div></li>
</ol>