blob: baefce3c8e467cb0d63f1f59ed578ae547d49d76 [file] [log] [blame]
Misha Brukmanff919402003-10-31 18:37:20 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
NAKAMURA Takumib8004d92011-10-31 11:21:59 +00005 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Misha Brukmanff919402003-10-31 18:37:20 +00006 <title>How to submit an LLVM bug report</title>
7 <link rel="stylesheet" href="llvm.css" type="text/css">
8</head>
9<body>
Chris Lattner9525a332003-05-21 22:21:07 +000010
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +000011<h1>
Misha Brukmanff919402003-10-31 18:37:20 +000012 How to submit an LLVM bug report
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +000013</h1>
Chris Lattner9525a332003-05-21 22:21:07 +000014
Reid Spencerc3c4c4f2004-11-01 08:19:36 +000015<table class="layout" style="width: 90%" >
16<tr class="layout">
17 <td class="left">
Chris Lattner9525a332003-05-21 22:21:07 +000018<ol>
Misha Brukmanff919402003-10-31 18:37:20 +000019 <li><a href="#introduction">Introduction - Got bugs?</a></li>
Chris Lattner9525a332003-05-21 22:21:07 +000020 <li><a href="#crashers">Crashing Bugs</a>
21 <ul>
22 <li><a href="#front-end">Front-end bugs</a>
Chris Lattner02cbe032007-02-25 01:11:36 +000023 <li><a href="#ct_optimizer">Compile-time optimization bugs</a>
24 <li><a href="#ct_codegen">Code generator bugs</a>
Misha Brukmanff919402003-10-31 18:37:20 +000025 </ul></li>
26 <li><a href="#miscompilations">Miscompilations</a></li>
27 <li><a href="#codegen">Incorrect code generation (JIT and LLC)</a></li>
Misha Brukmanff919402003-10-31 18:37:20 +000028</ol>
Chris Lattner411eba12004-05-23 21:05:39 +000029<div class="doc_author">
30 <p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a> and
31 <a href="http://misha.brukman.net">Misha Brukman</a></p>
Reid Spencer4d212422004-11-01 08:24:13 +000032</div>
Misha Brukmanff919402003-10-31 18:37:20 +000033</td>
Reid Spencerc3c4c4f2004-11-01 08:19:36 +000034<td class="right">
Misha Brukman3c1f8e72004-05-12 21:26:16 +000035 <img src="img/Debugging.gif" alt="Debugging" width="444" height="314">
Misha Brukmanff919402003-10-31 18:37:20 +000036</td>
37</tr>
Chris Lattner9525a332003-05-21 22:21:07 +000038</table>
39
Chris Lattner9525a332003-05-21 22:21:07 +000040<!-- *********************************************************************** -->
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +000041<h2>
Misha Brukmanff919402003-10-31 18:37:20 +000042 <a name="introduction">Introduction - Got bugs?</a>
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +000043</h2>
Chris Lattner9525a332003-05-21 22:21:07 +000044<!-- *********************************************************************** -->
45
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +000046<div>
Chris Lattner9525a332003-05-21 22:21:07 +000047
Misha Brukmanff919402003-10-31 18:37:20 +000048<p>If you're working with LLVM and run into a bug, we definitely want to know
49about it. This document describes what you can do to increase the odds of
50getting it fixed quickly.</p>
51
52<p>Basically you have to do two things at a minimum. First, decide whether the
53bug <a href="#crashers">crashes the compiler</a> (or an LLVM pass), or if the
Chris Lattner02cbe032007-02-25 01:11:36 +000054compiler is <a href="#miscompilations">miscompiling</a> the program (i.e., the
55compiler successfully produces an executable, but it doesn't run right). Based
56on
Chris Lattner9525a332003-05-21 22:21:07 +000057what type of bug it is, follow the instructions in the linked section to narrow
58down the bug so that the person who fixes it will be able to find the problem
Misha Brukmanff919402003-10-31 18:37:20 +000059more easily.</p>
Chris Lattner9525a332003-05-21 22:21:07 +000060
Misha Brukmanff919402003-10-31 18:37:20 +000061<p>Once you have a reduced test-case, go to <a
Reid Spencerca058542006-03-14 05:39:39 +000062href="http://llvm.org/bugs/enter_bug.cgi">the LLVM Bug Tracking
Chris Lattner02cbe032007-02-25 01:11:36 +000063System</a> and fill out the form with the necessary details (note that you don't
Benjamin Kramer0f420382009-10-12 14:46:08 +000064need to pick a category, just use the "new-bugs" category if you're not sure).
Chris Lattner02cbe032007-02-25 01:11:36 +000065The bug description should contain the following
Misha Brukmanff919402003-10-31 18:37:20 +000066information:</p>
67
John Criswell56a850a2003-10-22 15:06:11 +000068<ul>
Misha Brukmanb00e1062003-10-22 17:01:44 +000069 <li>All information necessary to reproduce the problem.</li>
70 <li>The reduced test-case that triggers the bug.</li>
Reid Spencerc7f87f22007-07-09 08:04:31 +000071 <li>The location where you obtained LLVM (if not from our Subversion
Misha Brukmanb00e1062003-10-22 17:01:44 +000072 repository).</li>
John Criswell56a850a2003-10-22 15:06:11 +000073</ul>
74
Misha Brukmanff919402003-10-31 18:37:20 +000075<p>Thanks for helping us make LLVM better!</p>
Chris Lattner9525a332003-05-21 22:21:07 +000076
Misha Brukmanff919402003-10-31 18:37:20 +000077</div>
Chris Lattner9525a332003-05-21 22:21:07 +000078
79<!-- *********************************************************************** -->
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +000080<h2>
Misha Brukmanff919402003-10-31 18:37:20 +000081 <a name="crashers">Crashing Bugs</a>
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +000082</h2>
Chris Lattner9525a332003-05-21 22:21:07 +000083<!-- *********************************************************************** -->
84
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +000085<div>
Misha Brukmanff919402003-10-31 18:37:20 +000086
Chris Lattner02cbe032007-02-25 01:11:36 +000087<p>More often than not, bugs in the compiler cause it to crash&mdash;often due
88to an assertion failure of some sort. The most important
89piece of the puzzle is to figure out if it is crashing in the GCC front-end
90or if it is one of the LLVM libraries (e.g. the optimizer or code generator)
91that has problems.</p>
Chris Lattner9525a332003-05-21 22:21:07 +000092
Chris Lattner02cbe032007-02-25 01:11:36 +000093<p>To figure out which component is crashing (the front-end,
94optimizer or code generator), run the
Misha Brukmanff919402003-10-31 18:37:20 +000095<tt><b>llvm-gcc</b></tt> command line as you were when the crash occurred, but
Chris Lattner02cbe032007-02-25 01:11:36 +000096with the following extra command line options:</p>
Chris Lattner9525a332003-05-21 22:21:07 +000097
98<ul>
Chris Lattner02cbe032007-02-25 01:11:36 +000099 <li><tt><b>-O0 -emit-llvm</b></tt>: If <tt>llvm-gcc</tt> still crashes when
100 passed these options (which disable the optimizer and code generator), then
101 the crash is in the front-end. Jump ahead to the section on <a
102 href="#front-end">front-end bugs</a>.</li>
Chris Lattner9525a332003-05-21 22:21:07 +0000103
Chris Lattner02cbe032007-02-25 01:11:36 +0000104 <li><tt><b>-emit-llvm</b></tt>: If <tt>llvm-gcc</tt> crashes with this option
105 (which disables the code generator), you found an optimizer bug. Jump ahead
106 to <a href="#ct_optimizer"> compile-time optimization bugs</a>.</li>
Misha Brukmanff919402003-10-31 18:37:20 +0000107
Chris Lattner02cbe032007-02-25 01:11:36 +0000108 <li>Otherwise, you have a code generator crash. Jump ahead to <a
109 href="#ct_codegen">code generator bugs</a>.</li>
Misha Brukmanff919402003-10-31 18:37:20 +0000110
111</ul>
112
Chris Lattner9525a332003-05-21 22:21:07 +0000113<!-- ======================================================================= -->
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000114<h3>
Misha Brukmanff919402003-10-31 18:37:20 +0000115 <a name="front-end">Front-end bugs</a>
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000116</h3>
Chris Lattner9525a332003-05-21 22:21:07 +0000117
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +0000118<div>
Misha Brukmanff919402003-10-31 18:37:20 +0000119
120<p>If the problem is in the front-end, you should re-run the same
Brian Gaeke627b9f42003-05-23 21:03:50 +0000121<tt>llvm-gcc</tt> command that resulted in the crash, but add the
Misha Brukmanff919402003-10-31 18:37:20 +0000122<tt>-save-temps</tt> option. The compiler will crash again, but it will leave
123behind a <tt><i>foo</i>.i</tt> file (containing preprocessed C source code) and
Chris Lattner02cbe032007-02-25 01:11:36 +0000124possibly <tt><i>foo</i>.s</tt> for each
Misha Brukmanff919402003-10-31 18:37:20 +0000125compiled <tt><i>foo</i>.c</tt> file. Send us the <tt><i>foo</i>.i</tt> file,
Chris Lattner02cbe032007-02-25 01:11:36 +0000126along with the options you passed to llvm-gcc, and a brief description of the
127error it caused.</p>
Bill Wendling1ce62bf2007-02-24 03:46:42 +0000128
129<p>The <a href="http://delta.tigris.org/">delta</a> tool helps to reduce the
130preprocessed file down to the smallest amount of code that still replicates the
131problem. You're encouraged to use delta to reduce the code to make the
132developers' lives easier. <a
133href="http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction">This website</a>
134has instructions on the best way to use delta.</p>
Misha Brukmanff919402003-10-31 18:37:20 +0000135
136</div>
Chris Lattner9525a332003-05-21 22:21:07 +0000137
138<!-- ======================================================================= -->
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000139<h3>
Chris Lattner02cbe032007-02-25 01:11:36 +0000140 <a name="ct_optimizer">Compile-time optimization bugs</a>
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000141</h3>
Chris Lattner9525a332003-05-21 22:21:07 +0000142
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +0000143<div>
Misha Brukmanff919402003-10-31 18:37:20 +0000144
Chris Lattner02cbe032007-02-25 01:11:36 +0000145<p>If you find that a bug crashes in the optimizer, compile your test-case to a
146<tt>.bc</tt> file by passing "<tt><b>-emit-llvm -O0 -c -o foo.bc</b></tt>".
147Then run:</p>
Chris Lattner9525a332003-05-21 22:21:07 +0000148
Misha Brukmanc21921c2004-04-15 20:49:32 +0000149<div class="doc_code">
Chris Lattner02cbe032007-02-25 01:11:36 +0000150<p><tt><b>opt</b> -std-compile-opts -debug-pass=Arguments foo.bc
151 -disable-output</tt></p>
Misha Brukmanc21921c2004-04-15 20:49:32 +0000152</div>
Chris Lattner9525a332003-05-21 22:21:07 +0000153
Chris Lattner02cbe032007-02-25 01:11:36 +0000154<p>This command should do two things: it should print out a list of passes, and
Chad Rosierab5ac962011-06-07 20:03:13 +0000155then it should crash in the same way as llvm-gcc. If it doesn't crash, please
Chris Lattner02cbe032007-02-25 01:11:36 +0000156follow the instructions for a <a href="#front-end">front-end bug</a>.</p>
157
158<p>If this does crash, then you should be able to debug this with the following
159bugpoint command:</p>
160
161<div class="doc_code">
162<p><tt><b>bugpoint</b> foo.bc &lt;list of passes printed by
163<b>opt</b>&gt;</tt></p>
164</div>
165
166<p>Please run this, then file a bug with the instructions and reduced .bc files
167that bugpoint emits. If something goes wrong with bugpoint, please submit the
168"foo.bc" file and the list of passes printed by <b>opt</b>.</p>
Chris Lattner9525a332003-05-21 22:21:07 +0000169
Misha Brukmanff919402003-10-31 18:37:20 +0000170</div>
Chris Lattner9525a332003-05-21 22:21:07 +0000171
172<!-- ======================================================================= -->
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000173<h3>
Chris Lattner02cbe032007-02-25 01:11:36 +0000174 <a name="ct_codegen">Code generator bugs</a>
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000175</h3>
Chris Lattner9525a332003-05-21 22:21:07 +0000176
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +0000177<div>
Misha Brukmanff919402003-10-31 18:37:20 +0000178
Chris Lattner02cbe032007-02-25 01:11:36 +0000179<p>If you find a bug that crashes llvm-gcc in the code generator, compile your
180source file to a .bc file by passing "<tt><b>-emit-llvm -c -o foo.bc</b></tt>"
181to llvm-gcc (in addition to the options you already pass). Once your have
182foo.bc, one of the following commands should fail:</p>
Chris Lattner9525a332003-05-21 22:21:07 +0000183
Chris Lattner02cbe032007-02-25 01:11:36 +0000184<ol>
Dan Gohmandd121d52009-08-25 15:54:01 +0000185<li><tt><b>llc</b> foo.bc</tt></li>
186<li><tt><b>llc</b> foo.bc -relocation-model=pic</tt></li>
187<li><tt><b>llc</b> foo.bc -relocation-model=static</tt></li>
Chris Lattner02cbe032007-02-25 01:11:36 +0000188</ol>
Chris Lattner9525a332003-05-21 22:21:07 +0000189
Chris Lattner02cbe032007-02-25 01:11:36 +0000190<p>If none of these crash, please follow the instructions for a
191<a href="#front-end">front-end bug</a>. If one of these do crash, you should
192be able to reduce this with one of the following bugpoint command lines (use
193the one corresponding to the command above that failed):</p>
Misha Brukmanff919402003-10-31 18:37:20 +0000194
Chris Lattner02cbe032007-02-25 01:11:36 +0000195<ol>
Chris Lattner93a71452007-02-25 18:50:48 +0000196<li><tt><b>bugpoint</b> -run-llc foo.bc</tt></li>
Chris Lattner02cbe032007-02-25 01:11:36 +0000197<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args
198 -relocation-model=pic</tt></li>
199<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args
200 -relocation-model=static</tt></li>
201</ol>
Chris Lattner9525a332003-05-21 22:21:07 +0000202
Chris Lattner02cbe032007-02-25 01:11:36 +0000203<p>Please run this, then file a bug with the instructions and reduced .bc file
204that bugpoint emits. If something goes wrong with bugpoint, please submit the
205"foo.bc" file and the option that llc crashes with.</p>
Chris Lattner9525a332003-05-21 22:21:07 +0000206
Misha Brukmanff919402003-10-31 18:37:20 +0000207</div>
Chris Lattner9525a332003-05-21 22:21:07 +0000208
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +0000209</div>
210
Chris Lattner9525a332003-05-21 22:21:07 +0000211<!-- *********************************************************************** -->
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000212<h2>
Misha Brukmanff919402003-10-31 18:37:20 +0000213 <a name="miscompilations">Miscompilations</a>
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000214</h2>
Chris Lattner9525a332003-05-21 22:21:07 +0000215<!-- *********************************************************************** -->
216
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +0000217<div>
Chris Lattner9525a332003-05-21 22:21:07 +0000218
Chris Lattner02cbe032007-02-25 01:11:36 +0000219<p>If llvm-gcc successfully produces an executable, but that executable doesn't
220run right, this is either a bug in the code or a bug in the
221compiler. The first thing to check is to make sure it is not using undefined
222behavior (e.g. reading a variable before it is defined). In particular, check
223to see if the program <a href="http://valgrind.org/">valgrind</a>s clean,
224passes purify, or some other memory checker tool. Many of the "LLVM bugs" that
225we have chased down ended up being bugs in the program being compiled, not
226 LLVM.</p>
Chris Lattner41553242004-05-11 19:34:27 +0000227
228<p>Once you determine that the program itself is not buggy, you should choose
229which code generator you wish to compile the program with (e.g. C backend, the
230JIT, or LLC) and optionally a series of LLVM passes to run. For example:</p>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000231
Misha Brukmanc21921c2004-04-15 20:49:32 +0000232<div class="doc_code">
Chris Lattner411eba12004-05-23 21:05:39 +0000233<p><tt>
234<b>bugpoint</b> -run-cbe [... optzn passes ...] file-to-test.bc --args -- [program arguments]</tt></p>
Misha Brukmanc21921c2004-04-15 20:49:32 +0000235</div>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000236
Misha Brukmanff919402003-10-31 18:37:20 +0000237<p><tt>bugpoint</tt> will try to narrow down your list of passes to the one pass
Gabor Greifa54634a2007-07-06 22:07:22 +0000238that causes an error, and simplify the bitcode file as much as it can to assist
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000239you. It will print a message letting you know how to reproduce the resulting
Misha Brukmanff919402003-10-31 18:37:20 +0000240error.</p>
241
242</div>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000243
244<!-- *********************************************************************** -->
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000245<h2>
Misha Brukmanff919402003-10-31 18:37:20 +0000246 <a name="codegen">Incorrect code generation</a>
NAKAMURA Takumifc8d9302011-04-18 23:59:50 +0000247</h2>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000248<!-- *********************************************************************** -->
249
NAKAMURA Takumiaa3d6242011-04-23 00:30:22 +0000250<div>
Misha Brukmanff919402003-10-31 18:37:20 +0000251
252<p>Similarly to debugging incorrect compilation by mis-behaving passes, you can
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000253debug incorrect code generation by either LLC or the JIT, using
254<tt>bugpoint</tt>. The process <tt>bugpoint</tt> follows in this case is to try
255to narrow the code down to a function that is miscompiled by one or the other
256method, but since for correctness, the entire program must be run,
257<tt>bugpoint</tt> will compile the code it deems to not be affected with the C
Misha Brukmanff919402003-10-31 18:37:20 +0000258Backend, and then link in the shared object it generates.</p>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000259
Misha Brukmanff919402003-10-31 18:37:20 +0000260<p>To debug the JIT:</p>
261
Misha Brukmanc21921c2004-04-15 20:49:32 +0000262<div class="doc_code">
Misha Brukmanc050f9f2004-05-14 18:57:24 +0000263<pre>
Gabor Greifa54634a2007-07-06 22:07:22 +0000264bugpoint -run-jit -output=[correct output file] [bitcode file] \
Bill Wendlingb38e1982009-04-05 00:41:19 +0000265 --tool-args -- [arguments to pass to lli] \
Misha Brukmanc050f9f2004-05-14 18:57:24 +0000266 --args -- [program arguments]
267</pre>
Misha Brukmanc21921c2004-04-15 20:49:32 +0000268</div>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000269
Misha Brukmanff919402003-10-31 18:37:20 +0000270<p>Similarly, to debug the LLC, one would run:</p>
271
Misha Brukmanc21921c2004-04-15 20:49:32 +0000272<div class="doc_code">
Misha Brukmanc050f9f2004-05-14 18:57:24 +0000273<pre>
Gabor Greifa54634a2007-07-06 22:07:22 +0000274bugpoint -run-llc -output=[correct output file] [bitcode file] \
Bill Wendlingb38e1982009-04-05 00:41:19 +0000275 --tool-args -- [arguments to pass to llc] \
Misha Brukmanc050f9f2004-05-14 18:57:24 +0000276 --args -- [program arguments]
277</pre>
Misha Brukmanc21921c2004-04-15 20:49:32 +0000278</div>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000279
Misha Brukman272322e2004-04-15 21:01:21 +0000280<p><b>Special note:</b> if you are debugging MultiSource or SPEC tests that
281already exist in the <tt>llvm/test</tt> hierarchy, there is an easier way to
282debug the JIT, LLC, and CBE, using the pre-written Makefile targets, which
283will pass the program options specified in the Makefiles:</p>
284
285<div class="doc_code">
Chris Lattner411eba12004-05-23 21:05:39 +0000286<p><tt>
287cd llvm/test/../../program<br>
Misha Brukman67abadb2004-05-14 19:04:07 +0000288make bugpoint-jit
Chris Lattner411eba12004-05-23 21:05:39 +0000289</tt></p>
Misha Brukman272322e2004-04-15 21:01:21 +0000290</div>
291
Misha Brukmanff919402003-10-31 18:37:20 +0000292<p>At the end of a successful <tt>bugpoint</tt> run, you will be presented
Gabor Greifa54634a2007-07-06 22:07:22 +0000293with two bitcode files: a <em>safe</em> file which can be compiled with the C
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000294backend and the <em>test</em> file which either LLC or the JIT
Misha Brukmanff919402003-10-31 18:37:20 +0000295mis-codegenerates, and thus causes the error.</p>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000296
Misha Brukmanff919402003-10-31 18:37:20 +0000297<p>To reproduce the error that <tt>bugpoint</tt> found, it is sufficient to do
298the following:</p>
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000299
300<ol>
Misha Brukmanff919402003-10-31 18:37:20 +0000301
Gabor Greifa54634a2007-07-06 22:07:22 +0000302<li><p>Regenerate the shared object from the safe bitcode file:</p>
Misha Brukmanff919402003-10-31 18:37:20 +0000303
Misha Brukman67abadb2004-05-14 19:04:07 +0000304<div class="doc_code">
Chris Lattner411eba12004-05-23 21:05:39 +0000305<p><tt>
306<b>llc</b> -march=c safe.bc -o safe.c<br>
Misha Brukman67abadb2004-05-14 19:04:07 +0000307<b>gcc</b> -shared safe.c -o safe.so
Chris Lattner411eba12004-05-23 21:05:39 +0000308</tt></p>
Misha Brukman67abadb2004-05-14 19:04:07 +0000309</div></li>
Misha Brukmanff919402003-10-31 18:37:20 +0000310
Gabor Greifa54634a2007-07-06 22:07:22 +0000311<li><p>If debugging LLC, compile test bitcode native and link with the shared
Misha Brukman67abadb2004-05-14 19:04:07 +0000312 object:</p>
Misha Brukmanff919402003-10-31 18:37:20 +0000313
Misha Brukman67abadb2004-05-14 19:04:07 +0000314<div class="doc_code">
Chris Lattner411eba12004-05-23 21:05:39 +0000315<p><tt>
Dan Gohmandd121d52009-08-25 15:54:01 +0000316<b>llc</b> test.bc -o test.s<br>
Chris Lattner411eba12004-05-23 21:05:39 +0000317<b>gcc</b> test.s safe.so -o test.llc<br>
Misha Brukman67abadb2004-05-14 19:04:07 +0000318./test.llc [program options]
Chris Lattner411eba12004-05-23 21:05:39 +0000319</tt></p>
Misha Brukman67abadb2004-05-14 19:04:07 +0000320</div></li>
321
322<li><p>If debugging the JIT, load the shared object and supply the test
Gabor Greifa54634a2007-07-06 22:07:22 +0000323 bitcode:</p>
Misha Brukmanff919402003-10-31 18:37:20 +0000324
Misha Brukman67abadb2004-05-14 19:04:07 +0000325<div class="doc_code">
Chris Lattner411eba12004-05-23 21:05:39 +0000326<p><tt><b>lli</b> -load=safe.so test.bc [program options]</tt></p>
Misha Brukman67abadb2004-05-14 19:04:07 +0000327</div></li>
Misha Brukmanff919402003-10-31 18:37:20 +0000328
Misha Brukmana3fc5d92003-09-17 18:51:47 +0000329</ol>
Chris Lattner9525a332003-05-21 22:21:07 +0000330
Misha Brukmanff919402003-10-31 18:37:20 +0000331</div>
332
Chris Lattner9525a332003-05-21 22:21:07 +0000333<!-- *********************************************************************** -->
Misha Brukmanff919402003-10-31 18:37:20 +0000334<hr>
Misha Brukman67db86a2004-01-15 19:03:47 +0000335<address>
336 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +0000337 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman67db86a2004-01-15 19:03:47 +0000338 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman21a63702008-12-11 18:23:24 +0000339 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman67db86a2004-01-15 19:03:47 +0000340
341 <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
NAKAMURA Takumica46f5a2011-04-09 02:13:37 +0000342 <a href="http://llvm.org/">The LLVM Compiler Infrastructure</a>
Misha Brukmanff919402003-10-31 18:37:20 +0000343 <br>
344 Last modified: $Date$
Misha Brukman67db86a2004-01-15 19:03:47 +0000345</address>
Misha Brukmanff919402003-10-31 18:37:20 +0000346
347</body>
348</html>