blob: 6004beccc191eda846b1b4246f83160d6ff2c5a3 [file] [log] [blame]
Misha Brukman94082392003-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 Takumi5c6e4df2011-10-31 11:21:59 +00005 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Misha Brukman94082392003-10-31 18:37:20 +00006 <title>How to submit an LLVM bug report</title>
Daniel Dunbaradea4972012-04-19 20:20:34 +00007 <link rel="stylesheet" href="_static/llvm.css" type="text/css">
Misha Brukman94082392003-10-31 18:37:20 +00008</head>
9<body>
Chris Lattner8b6be362003-05-21 22:21:07 +000010
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000011<h1>
Misha Brukman94082392003-10-31 18:37:20 +000012 How to submit an LLVM bug report
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000013</h1>
Chris Lattner8b6be362003-05-21 22:21:07 +000014
Reid Spencerd3f876c2004-11-01 08:19:36 +000015<table class="layout" style="width: 90%" >
16<tr class="layout">
17 <td class="left">
Chris Lattner8b6be362003-05-21 22:21:07 +000018<ol>
Misha Brukman94082392003-10-31 18:37:20 +000019 <li><a href="#introduction">Introduction - Got bugs?</a></li>
Chris Lattner8b6be362003-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 Lattner1a5ed972007-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 Brukman94082392003-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 Brukman94082392003-10-31 18:37:20 +000028</ol>
Chris Lattner4129b2a2004-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 Spencer97510e72004-11-01 08:24:13 +000032</div>
Misha Brukman94082392003-10-31 18:37:20 +000033</td>
Reid Spencerd3f876c2004-11-01 08:19:36 +000034<td class="right">
Misha Brukmane849a1a2004-05-12 21:26:16 +000035 <img src="img/Debugging.gif" alt="Debugging" width="444" height="314">
Misha Brukman94082392003-10-31 18:37:20 +000036</td>
37</tr>
Chris Lattner8b6be362003-05-21 22:21:07 +000038</table>
39
Chris Lattner8b6be362003-05-21 22:21:07 +000040<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000041<h2>
Misha Brukman94082392003-10-31 18:37:20 +000042 <a name="introduction">Introduction - Got bugs?</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000043</h2>
Chris Lattner8b6be362003-05-21 22:21:07 +000044<!-- *********************************************************************** -->
45
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +000046<div>
Chris Lattner8b6be362003-05-21 22:21:07 +000047
Misha Brukman94082392003-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 Lattner1a5ed972007-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 Lattner8b6be362003-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 Brukman94082392003-10-31 18:37:20 +000059more easily.</p>
Chris Lattner8b6be362003-05-21 22:21:07 +000060
Misha Brukman94082392003-10-31 18:37:20 +000061<p>Once you have a reduced test-case, go to <a
Reid Spencer05fe4b02006-03-14 05:39:39 +000062href="http://llvm.org/bugs/enter_bug.cgi">the LLVM Bug Tracking
Chris Lattner1a5ed972007-02-25 01:11:36 +000063System</a> and fill out the form with the necessary details (note that you don't
Benjamin Kramer8040cd32009-10-12 14:46:08 +000064need to pick a category, just use the "new-bugs" category if you're not sure).
Chris Lattner1a5ed972007-02-25 01:11:36 +000065The bug description should contain the following
Misha Brukman94082392003-10-31 18:37:20 +000066information:</p>
67
John Criswell4d37c7b2003-10-22 15:06:11 +000068<ul>
Misha Brukmanafac73e2003-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 Spencer669ed452007-07-09 08:04:31 +000071 <li>The location where you obtained LLVM (if not from our Subversion
Misha Brukmanafac73e2003-10-22 17:01:44 +000072 repository).</li>
John Criswell4d37c7b2003-10-22 15:06:11 +000073</ul>
74
Misha Brukman94082392003-10-31 18:37:20 +000075<p>Thanks for helping us make LLVM better!</p>
Chris Lattner8b6be362003-05-21 22:21:07 +000076
Misha Brukman94082392003-10-31 18:37:20 +000077</div>
Chris Lattner8b6be362003-05-21 22:21:07 +000078
79<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000080<h2>
Misha Brukman94082392003-10-31 18:37:20 +000081 <a name="crashers">Crashing Bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000082</h2>
Chris Lattner8b6be362003-05-21 22:21:07 +000083<!-- *********************************************************************** -->
84
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +000085<div>
Misha Brukman94082392003-10-31 18:37:20 +000086
Chris Lattner1a5ed972007-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 Lattner8b6be362003-05-21 22:21:07 +000092
Chris Lattner1a5ed972007-02-25 01:11:36 +000093<p>To figure out which component is crashing (the front-end,
94optimizer or code generator), run the
Misha Brukman94082392003-10-31 18:37:20 +000095<tt><b>llvm-gcc</b></tt> command line as you were when the crash occurred, but
Chris Lattner1a5ed972007-02-25 01:11:36 +000096with the following extra command line options:</p>
Chris Lattner8b6be362003-05-21 22:21:07 +000097
98<ul>
Chris Lattner1a5ed972007-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 Lattner8b6be362003-05-21 22:21:07 +0000103
Chris Lattner1a5ed972007-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 Brukman94082392003-10-31 18:37:20 +0000107
Chris Lattner1a5ed972007-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 Brukman94082392003-10-31 18:37:20 +0000110
111</ul>
112
Chris Lattner8b6be362003-05-21 22:21:07 +0000113<!-- ======================================================================= -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000114<h3>
Misha Brukman94082392003-10-31 18:37:20 +0000115 <a name="front-end">Front-end bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000116</h3>
Chris Lattner8b6be362003-05-21 22:21:07 +0000117
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000118<div>
Misha Brukman94082392003-10-31 18:37:20 +0000119
120<p>If the problem is in the front-end, you should re-run the same
Brian Gaekeeefe9792003-05-23 21:03:50 +0000121<tt>llvm-gcc</tt> command that resulted in the crash, but add the
Misha Brukman94082392003-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 Lattner1a5ed972007-02-25 01:11:36 +0000124possibly <tt><i>foo</i>.s</tt> for each
Misha Brukman94082392003-10-31 18:37:20 +0000125compiled <tt><i>foo</i>.c</tt> file. Send us the <tt><i>foo</i>.i</tt> file,
Chris Lattner1a5ed972007-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 Wendlingfa8a0e52007-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 Brukman94082392003-10-31 18:37:20 +0000135
136</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000137
138<!-- ======================================================================= -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000139<h3>
Chris Lattner1a5ed972007-02-25 01:11:36 +0000140 <a name="ct_optimizer">Compile-time optimization bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000141</h3>
Chris Lattner8b6be362003-05-21 22:21:07 +0000142
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000143<div>
Misha Brukman94082392003-10-31 18:37:20 +0000144
Chris Lattner1a5ed972007-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 Lattner8b6be362003-05-21 22:21:07 +0000148
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000149<div class="doc_code">
Chris Lattner1a5ed972007-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 Brukmanf4e4feb2004-04-15 20:49:32 +0000152</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000153
Chris Lattner1a5ed972007-02-25 01:11:36 +0000154<p>This command should do two things: it should print out a list of passes, and
Chad Rosier7b5c20b2011-06-07 20:03:13 +0000155then it should crash in the same way as llvm-gcc. If it doesn't crash, please
Chris Lattner1a5ed972007-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 Lattner8b6be362003-05-21 22:21:07 +0000169
Misha Brukman94082392003-10-31 18:37:20 +0000170</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000171
172<!-- ======================================================================= -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000173<h3>
Chris Lattner1a5ed972007-02-25 01:11:36 +0000174 <a name="ct_codegen">Code generator bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000175</h3>
Chris Lattner8b6be362003-05-21 22:21:07 +0000176
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000177<div>
Misha Brukman94082392003-10-31 18:37:20 +0000178
Chris Lattner1a5ed972007-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 Lattner8b6be362003-05-21 22:21:07 +0000183
Chris Lattner1a5ed972007-02-25 01:11:36 +0000184<ol>
Dan Gohman0cabaa52009-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 Lattner1a5ed972007-02-25 01:11:36 +0000188</ol>
Chris Lattner8b6be362003-05-21 22:21:07 +0000189
Chris Lattner1a5ed972007-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 Brukman94082392003-10-31 18:37:20 +0000194
Chris Lattner1a5ed972007-02-25 01:11:36 +0000195<ol>
Chris Lattnerc25904f2007-02-25 18:50:48 +0000196<li><tt><b>bugpoint</b> -run-llc foo.bc</tt></li>
Chris Lattner1a5ed972007-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 Lattner8b6be362003-05-21 22:21:07 +0000202
Chris Lattner1a5ed972007-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 Lattner8b6be362003-05-21 22:21:07 +0000206
Misha Brukman94082392003-10-31 18:37:20 +0000207</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000208
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000209</div>
210
Chris Lattner8b6be362003-05-21 22:21:07 +0000211<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000212<h2>
Misha Brukman94082392003-10-31 18:37:20 +0000213 <a name="miscompilations">Miscompilations</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000214</h2>
Chris Lattner8b6be362003-05-21 22:21:07 +0000215<!-- *********************************************************************** -->
216
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000217<div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000218
Chris Lattner1a5ed972007-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 Lattner8436c212004-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 Brukmanf1d01fb2003-09-17 18:51:47 +0000231
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000232<div class="doc_code">
Chris Lattner4129b2a2004-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 Brukmanf4e4feb2004-04-15 20:49:32 +0000235</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000236
Misha Brukman94082392003-10-31 18:37:20 +0000237<p><tt>bugpoint</tt> will try to narrow down your list of passes to the one pass
Gabor Greif04367bf2007-07-06 22:07:22 +0000238that causes an error, and simplify the bitcode file as much as it can to assist
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000239you. It will print a message letting you know how to reproduce the resulting
Misha Brukman94082392003-10-31 18:37:20 +0000240error.</p>
241
242</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000243
244<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000245<h2>
Misha Brukman94082392003-10-31 18:37:20 +0000246 <a name="codegen">Incorrect code generation</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000247</h2>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000248<!-- *********************************************************************** -->
249
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000250<div>
Misha Brukman94082392003-10-31 18:37:20 +0000251
252<p>Similarly to debugging incorrect compilation by mis-behaving passes, you can
Misha Brukmanf1d01fb2003-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 Brukman94082392003-10-31 18:37:20 +0000258Backend, and then link in the shared object it generates.</p>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000259
Misha Brukman94082392003-10-31 18:37:20 +0000260<p>To debug the JIT:</p>
261
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000262<div class="doc_code">
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000263<pre>
Gabor Greif04367bf2007-07-06 22:07:22 +0000264bugpoint -run-jit -output=[correct output file] [bitcode file] \
Bill Wendling4a2bca82009-04-05 00:41:19 +0000265 --tool-args -- [arguments to pass to lli] \
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000266 --args -- [program arguments]
267</pre>
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000268</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000269
Misha Brukman94082392003-10-31 18:37:20 +0000270<p>Similarly, to debug the LLC, one would run:</p>
271
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000272<div class="doc_code">
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000273<pre>
Gabor Greif04367bf2007-07-06 22:07:22 +0000274bugpoint -run-llc -output=[correct output file] [bitcode file] \
Bill Wendling4a2bca82009-04-05 00:41:19 +0000275 --tool-args -- [arguments to pass to llc] \
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000276 --args -- [program arguments]
277</pre>
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000278</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000279
Misha Brukman180e8af2004-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 Lattner4129b2a2004-05-23 21:05:39 +0000286<p><tt>
287cd llvm/test/../../program<br>
Misha Brukman3c687a02004-05-14 19:04:07 +0000288make bugpoint-jit
Chris Lattner4129b2a2004-05-23 21:05:39 +0000289</tt></p>
Misha Brukman180e8af2004-04-15 21:01:21 +0000290</div>
291
Misha Brukman94082392003-10-31 18:37:20 +0000292<p>At the end of a successful <tt>bugpoint</tt> run, you will be presented
Gabor Greif04367bf2007-07-06 22:07:22 +0000293with two bitcode files: a <em>safe</em> file which can be compiled with the C
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000294backend and the <em>test</em> file which either LLC or the JIT
Misha Brukman94082392003-10-31 18:37:20 +0000295mis-codegenerates, and thus causes the error.</p>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000296
Misha Brukman94082392003-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 Brukmanf1d01fb2003-09-17 18:51:47 +0000299
300<ol>
Misha Brukman94082392003-10-31 18:37:20 +0000301
Gabor Greif04367bf2007-07-06 22:07:22 +0000302<li><p>Regenerate the shared object from the safe bitcode file:</p>
Misha Brukman94082392003-10-31 18:37:20 +0000303
Misha Brukman3c687a02004-05-14 19:04:07 +0000304<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000305<p><tt>
306<b>llc</b> -march=c safe.bc -o safe.c<br>
Misha Brukman3c687a02004-05-14 19:04:07 +0000307<b>gcc</b> -shared safe.c -o safe.so
Chris Lattner4129b2a2004-05-23 21:05:39 +0000308</tt></p>
Misha Brukman3c687a02004-05-14 19:04:07 +0000309</div></li>
Misha Brukman94082392003-10-31 18:37:20 +0000310
Gabor Greif04367bf2007-07-06 22:07:22 +0000311<li><p>If debugging LLC, compile test bitcode native and link with the shared
Misha Brukman3c687a02004-05-14 19:04:07 +0000312 object:</p>
Misha Brukman94082392003-10-31 18:37:20 +0000313
Misha Brukman3c687a02004-05-14 19:04:07 +0000314<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000315<p><tt>
Dan Gohman0cabaa52009-08-25 15:54:01 +0000316<b>llc</b> test.bc -o test.s<br>
Chris Lattner4129b2a2004-05-23 21:05:39 +0000317<b>gcc</b> test.s safe.so -o test.llc<br>
Misha Brukman3c687a02004-05-14 19:04:07 +0000318./test.llc [program options]
Chris Lattner4129b2a2004-05-23 21:05:39 +0000319</tt></p>
Misha Brukman3c687a02004-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 Greif04367bf2007-07-06 22:07:22 +0000323 bitcode:</p>
Misha Brukman94082392003-10-31 18:37:20 +0000324
Misha Brukman3c687a02004-05-14 19:04:07 +0000325<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000326<p><tt><b>lli</b> -load=safe.so test.bc [program options]</tt></p>
Misha Brukman3c687a02004-05-14 19:04:07 +0000327</div></li>
Misha Brukman94082392003-10-31 18:37:20 +0000328
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000329</ol>
Chris Lattner8b6be362003-05-21 22:21:07 +0000330
Misha Brukman94082392003-10-31 18:37:20 +0000331</div>
332
Chris Lattner8b6be362003-05-21 22:21:07 +0000333<!-- *********************************************************************** -->
Misha Brukman94082392003-10-31 18:37:20 +0000334<hr>
Misha Brukman637cab02004-01-15 19:03:47 +0000335<address>
336 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000337 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman637cab02004-01-15 19:03:47 +0000338 <a href="http://validator.w3.org/check/referer"><img
Misha Brukmanf00ddb02008-12-11 18:23:24 +0000339 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman637cab02004-01-15 19:03:47 +0000340
341 <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
NAKAMURA Takumib9a33632011-04-09 02:13:37 +0000342 <a href="http://llvm.org/">The LLVM Compiler Infrastructure</a>
Misha Brukman94082392003-10-31 18:37:20 +0000343 <br>
344 Last modified: $Date$
Misha Brukman637cab02004-01-15 19:03:47 +0000345</address>
Misha Brukman94082392003-10-31 18:37:20 +0000346
347</body>
348</html>