blob: 0fa8329921d66938ccc8de1865e5e6f04a43115d [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>
Misha Brukman94082392003-10-31 18:37:20 +000034</tr>
Chris Lattner8b6be362003-05-21 22:21:07 +000035</table>
36
Chris Lattner8b6be362003-05-21 22:21:07 +000037<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000038<h2>
Misha Brukman94082392003-10-31 18:37:20 +000039 <a name="introduction">Introduction - Got bugs?</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000040</h2>
Chris Lattner8b6be362003-05-21 22:21:07 +000041<!-- *********************************************************************** -->
42
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +000043<div>
Chris Lattner8b6be362003-05-21 22:21:07 +000044
Misha Brukman94082392003-10-31 18:37:20 +000045<p>If you're working with LLVM and run into a bug, we definitely want to know
46about it. This document describes what you can do to increase the odds of
47getting it fixed quickly.</p>
48
49<p>Basically you have to do two things at a minimum. First, decide whether the
50bug <a href="#crashers">crashes the compiler</a> (or an LLVM pass), or if the
Chris Lattner1a5ed972007-02-25 01:11:36 +000051compiler is <a href="#miscompilations">miscompiling</a> the program (i.e., the
52compiler successfully produces an executable, but it doesn't run right). Based
53on
Chris Lattner8b6be362003-05-21 22:21:07 +000054what type of bug it is, follow the instructions in the linked section to narrow
55down the bug so that the person who fixes it will be able to find the problem
Misha Brukman94082392003-10-31 18:37:20 +000056more easily.</p>
Chris Lattner8b6be362003-05-21 22:21:07 +000057
Misha Brukman94082392003-10-31 18:37:20 +000058<p>Once you have a reduced test-case, go to <a
Reid Spencer05fe4b02006-03-14 05:39:39 +000059href="http://llvm.org/bugs/enter_bug.cgi">the LLVM Bug Tracking
Chris Lattner1a5ed972007-02-25 01:11:36 +000060System</a> and fill out the form with the necessary details (note that you don't
Benjamin Kramer8040cd32009-10-12 14:46:08 +000061need to pick a category, just use the "new-bugs" category if you're not sure).
Chris Lattner1a5ed972007-02-25 01:11:36 +000062The bug description should contain the following
Misha Brukman94082392003-10-31 18:37:20 +000063information:</p>
64
John Criswell4d37c7b2003-10-22 15:06:11 +000065<ul>
Misha Brukmanafac73e2003-10-22 17:01:44 +000066 <li>All information necessary to reproduce the problem.</li>
67 <li>The reduced test-case that triggers the bug.</li>
Reid Spencer669ed452007-07-09 08:04:31 +000068 <li>The location where you obtained LLVM (if not from our Subversion
Misha Brukmanafac73e2003-10-22 17:01:44 +000069 repository).</li>
John Criswell4d37c7b2003-10-22 15:06:11 +000070</ul>
71
Misha Brukman94082392003-10-31 18:37:20 +000072<p>Thanks for helping us make LLVM better!</p>
Chris Lattner8b6be362003-05-21 22:21:07 +000073
Misha Brukman94082392003-10-31 18:37:20 +000074</div>
Chris Lattner8b6be362003-05-21 22:21:07 +000075
76<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000077<h2>
Misha Brukman94082392003-10-31 18:37:20 +000078 <a name="crashers">Crashing Bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +000079</h2>
Chris Lattner8b6be362003-05-21 22:21:07 +000080<!-- *********************************************************************** -->
81
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +000082<div>
Misha Brukman94082392003-10-31 18:37:20 +000083
Chris Lattner1a5ed972007-02-25 01:11:36 +000084<p>More often than not, bugs in the compiler cause it to crash&mdash;often due
85to an assertion failure of some sort. The most important
86piece of the puzzle is to figure out if it is crashing in the GCC front-end
87or if it is one of the LLVM libraries (e.g. the optimizer or code generator)
88that has problems.</p>
Chris Lattner8b6be362003-05-21 22:21:07 +000089
Chris Lattner1a5ed972007-02-25 01:11:36 +000090<p>To figure out which component is crashing (the front-end,
91optimizer or code generator), run the
Misha Brukman94082392003-10-31 18:37:20 +000092<tt><b>llvm-gcc</b></tt> command line as you were when the crash occurred, but
Chris Lattner1a5ed972007-02-25 01:11:36 +000093with the following extra command line options:</p>
Chris Lattner8b6be362003-05-21 22:21:07 +000094
95<ul>
Chris Lattner1a5ed972007-02-25 01:11:36 +000096 <li><tt><b>-O0 -emit-llvm</b></tt>: If <tt>llvm-gcc</tt> still crashes when
97 passed these options (which disable the optimizer and code generator), then
98 the crash is in the front-end. Jump ahead to the section on <a
99 href="#front-end">front-end bugs</a>.</li>
Chris Lattner8b6be362003-05-21 22:21:07 +0000100
Chris Lattner1a5ed972007-02-25 01:11:36 +0000101 <li><tt><b>-emit-llvm</b></tt>: If <tt>llvm-gcc</tt> crashes with this option
102 (which disables the code generator), you found an optimizer bug. Jump ahead
103 to <a href="#ct_optimizer"> compile-time optimization bugs</a>.</li>
Misha Brukman94082392003-10-31 18:37:20 +0000104
Chris Lattner1a5ed972007-02-25 01:11:36 +0000105 <li>Otherwise, you have a code generator crash. Jump ahead to <a
106 href="#ct_codegen">code generator bugs</a>.</li>
Misha Brukman94082392003-10-31 18:37:20 +0000107
108</ul>
109
Chris Lattner8b6be362003-05-21 22:21:07 +0000110<!-- ======================================================================= -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000111<h3>
Misha Brukman94082392003-10-31 18:37:20 +0000112 <a name="front-end">Front-end bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000113</h3>
Chris Lattner8b6be362003-05-21 22:21:07 +0000114
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000115<div>
Misha Brukman94082392003-10-31 18:37:20 +0000116
117<p>If the problem is in the front-end, you should re-run the same
Brian Gaekeeefe9792003-05-23 21:03:50 +0000118<tt>llvm-gcc</tt> command that resulted in the crash, but add the
Misha Brukman94082392003-10-31 18:37:20 +0000119<tt>-save-temps</tt> option. The compiler will crash again, but it will leave
120behind a <tt><i>foo</i>.i</tt> file (containing preprocessed C source code) and
Chris Lattner1a5ed972007-02-25 01:11:36 +0000121possibly <tt><i>foo</i>.s</tt> for each
Misha Brukman94082392003-10-31 18:37:20 +0000122compiled <tt><i>foo</i>.c</tt> file. Send us the <tt><i>foo</i>.i</tt> file,
Chris Lattner1a5ed972007-02-25 01:11:36 +0000123along with the options you passed to llvm-gcc, and a brief description of the
124error it caused.</p>
Bill Wendlingfa8a0e52007-02-24 03:46:42 +0000125
126<p>The <a href="http://delta.tigris.org/">delta</a> tool helps to reduce the
127preprocessed file down to the smallest amount of code that still replicates the
128problem. You're encouraged to use delta to reduce the code to make the
129developers' lives easier. <a
130href="http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction">This website</a>
131has instructions on the best way to use delta.</p>
Misha Brukman94082392003-10-31 18:37:20 +0000132
133</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000134
135<!-- ======================================================================= -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000136<h3>
Chris Lattner1a5ed972007-02-25 01:11:36 +0000137 <a name="ct_optimizer">Compile-time optimization bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000138</h3>
Chris Lattner8b6be362003-05-21 22:21:07 +0000139
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000140<div>
Misha Brukman94082392003-10-31 18:37:20 +0000141
Chris Lattner1a5ed972007-02-25 01:11:36 +0000142<p>If you find that a bug crashes in the optimizer, compile your test-case to a
143<tt>.bc</tt> file by passing "<tt><b>-emit-llvm -O0 -c -o foo.bc</b></tt>".
144Then run:</p>
Chris Lattner8b6be362003-05-21 22:21:07 +0000145
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000146<div class="doc_code">
Chris Lattner1a5ed972007-02-25 01:11:36 +0000147<p><tt><b>opt</b> -std-compile-opts -debug-pass=Arguments foo.bc
148 -disable-output</tt></p>
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000149</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000150
Chris Lattner1a5ed972007-02-25 01:11:36 +0000151<p>This command should do two things: it should print out a list of passes, and
Chad Rosier7b5c20b2011-06-07 20:03:13 +0000152then it should crash in the same way as llvm-gcc. If it doesn't crash, please
Chris Lattner1a5ed972007-02-25 01:11:36 +0000153follow the instructions for a <a href="#front-end">front-end bug</a>.</p>
154
155<p>If this does crash, then you should be able to debug this with the following
156bugpoint command:</p>
157
158<div class="doc_code">
159<p><tt><b>bugpoint</b> foo.bc &lt;list of passes printed by
160<b>opt</b>&gt;</tt></p>
161</div>
162
163<p>Please run this, then file a bug with the instructions and reduced .bc files
164that bugpoint emits. If something goes wrong with bugpoint, please submit the
165"foo.bc" file and the list of passes printed by <b>opt</b>.</p>
Chris Lattner8b6be362003-05-21 22:21:07 +0000166
Misha Brukman94082392003-10-31 18:37:20 +0000167</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000168
169<!-- ======================================================================= -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000170<h3>
Chris Lattner1a5ed972007-02-25 01:11:36 +0000171 <a name="ct_codegen">Code generator bugs</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000172</h3>
Chris Lattner8b6be362003-05-21 22:21:07 +0000173
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000174<div>
Misha Brukman94082392003-10-31 18:37:20 +0000175
Chris Lattner1a5ed972007-02-25 01:11:36 +0000176<p>If you find a bug that crashes llvm-gcc in the code generator, compile your
177source file to a .bc file by passing "<tt><b>-emit-llvm -c -o foo.bc</b></tt>"
178to llvm-gcc (in addition to the options you already pass). Once your have
179foo.bc, one of the following commands should fail:</p>
Chris Lattner8b6be362003-05-21 22:21:07 +0000180
Chris Lattner1a5ed972007-02-25 01:11:36 +0000181<ol>
Dan Gohman0cabaa52009-08-25 15:54:01 +0000182<li><tt><b>llc</b> foo.bc</tt></li>
183<li><tt><b>llc</b> foo.bc -relocation-model=pic</tt></li>
184<li><tt><b>llc</b> foo.bc -relocation-model=static</tt></li>
Chris Lattner1a5ed972007-02-25 01:11:36 +0000185</ol>
Chris Lattner8b6be362003-05-21 22:21:07 +0000186
Chris Lattner1a5ed972007-02-25 01:11:36 +0000187<p>If none of these crash, please follow the instructions for a
188<a href="#front-end">front-end bug</a>. If one of these do crash, you should
189be able to reduce this with one of the following bugpoint command lines (use
190the one corresponding to the command above that failed):</p>
Misha Brukman94082392003-10-31 18:37:20 +0000191
Chris Lattner1a5ed972007-02-25 01:11:36 +0000192<ol>
Chris Lattnerc25904f2007-02-25 18:50:48 +0000193<li><tt><b>bugpoint</b> -run-llc foo.bc</tt></li>
Chris Lattner1a5ed972007-02-25 01:11:36 +0000194<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args
195 -relocation-model=pic</tt></li>
196<li><tt><b>bugpoint</b> -run-llc foo.bc --tool-args
197 -relocation-model=static</tt></li>
198</ol>
Chris Lattner8b6be362003-05-21 22:21:07 +0000199
Chris Lattner1a5ed972007-02-25 01:11:36 +0000200<p>Please run this, then file a bug with the instructions and reduced .bc file
201that bugpoint emits. If something goes wrong with bugpoint, please submit the
202"foo.bc" file and the option that llc crashes with.</p>
Chris Lattner8b6be362003-05-21 22:21:07 +0000203
Misha Brukman94082392003-10-31 18:37:20 +0000204</div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000205
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000206</div>
207
Chris Lattner8b6be362003-05-21 22:21:07 +0000208<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000209<h2>
Misha Brukman94082392003-10-31 18:37:20 +0000210 <a name="miscompilations">Miscompilations</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000211</h2>
Chris Lattner8b6be362003-05-21 22:21:07 +0000212<!-- *********************************************************************** -->
213
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000214<div>
Chris Lattner8b6be362003-05-21 22:21:07 +0000215
Chris Lattner1a5ed972007-02-25 01:11:36 +0000216<p>If llvm-gcc successfully produces an executable, but that executable doesn't
217run right, this is either a bug in the code or a bug in the
218compiler. The first thing to check is to make sure it is not using undefined
219behavior (e.g. reading a variable before it is defined). In particular, check
220to see if the program <a href="http://valgrind.org/">valgrind</a>s clean,
221passes purify, or some other memory checker tool. Many of the "LLVM bugs" that
222we have chased down ended up being bugs in the program being compiled, not
223 LLVM.</p>
Chris Lattner8436c212004-05-11 19:34:27 +0000224
225<p>Once you determine that the program itself is not buggy, you should choose
226which code generator you wish to compile the program with (e.g. C backend, the
227JIT, or LLC) and optionally a series of LLVM passes to run. For example:</p>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000228
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000229<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000230<p><tt>
231<b>bugpoint</b> -run-cbe [... optzn passes ...] file-to-test.bc --args -- [program arguments]</tt></p>
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000232</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000233
Misha Brukman94082392003-10-31 18:37:20 +0000234<p><tt>bugpoint</tt> will try to narrow down your list of passes to the one pass
Gabor Greif04367bf2007-07-06 22:07:22 +0000235that causes an error, and simplify the bitcode file as much as it can to assist
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000236you. It will print a message letting you know how to reproduce the resulting
Misha Brukman94082392003-10-31 18:37:20 +0000237error.</p>
238
239</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000240
241<!-- *********************************************************************** -->
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000242<h2>
Misha Brukman94082392003-10-31 18:37:20 +0000243 <a name="codegen">Incorrect code generation</a>
NAKAMURA Takumi05d02652011-04-18 23:59:50 +0000244</h2>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000245<!-- *********************************************************************** -->
246
NAKAMURA Takumif5af6ad2011-04-23 00:30:22 +0000247<div>
Misha Brukman94082392003-10-31 18:37:20 +0000248
249<p>Similarly to debugging incorrect compilation by mis-behaving passes, you can
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000250debug incorrect code generation by either LLC or the JIT, using
251<tt>bugpoint</tt>. The process <tt>bugpoint</tt> follows in this case is to try
252to narrow the code down to a function that is miscompiled by one or the other
253method, but since for correctness, the entire program must be run,
254<tt>bugpoint</tt> will compile the code it deems to not be affected with the C
Misha Brukman94082392003-10-31 18:37:20 +0000255Backend, and then link in the shared object it generates.</p>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000256
Misha Brukman94082392003-10-31 18:37:20 +0000257<p>To debug the JIT:</p>
258
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000259<div class="doc_code">
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000260<pre>
Gabor Greif04367bf2007-07-06 22:07:22 +0000261bugpoint -run-jit -output=[correct output file] [bitcode file] \
Bill Wendling4a2bca82009-04-05 00:41:19 +0000262 --tool-args -- [arguments to pass to lli] \
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000263 --args -- [program arguments]
264</pre>
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000265</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000266
Misha Brukman94082392003-10-31 18:37:20 +0000267<p>Similarly, to debug the LLC, one would run:</p>
268
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000269<div class="doc_code">
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000270<pre>
Gabor Greif04367bf2007-07-06 22:07:22 +0000271bugpoint -run-llc -output=[correct output file] [bitcode file] \
Bill Wendling4a2bca82009-04-05 00:41:19 +0000272 --tool-args -- [arguments to pass to llc] \
Misha Brukman1e4ae2b2004-05-14 18:57:24 +0000273 --args -- [program arguments]
274</pre>
Misha Brukmanf4e4feb2004-04-15 20:49:32 +0000275</div>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000276
Misha Brukman180e8af2004-04-15 21:01:21 +0000277<p><b>Special note:</b> if you are debugging MultiSource or SPEC tests that
278already exist in the <tt>llvm/test</tt> hierarchy, there is an easier way to
279debug the JIT, LLC, and CBE, using the pre-written Makefile targets, which
280will pass the program options specified in the Makefiles:</p>
281
282<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000283<p><tt>
284cd llvm/test/../../program<br>
Misha Brukman3c687a02004-05-14 19:04:07 +0000285make bugpoint-jit
Chris Lattner4129b2a2004-05-23 21:05:39 +0000286</tt></p>
Misha Brukman180e8af2004-04-15 21:01:21 +0000287</div>
288
Misha Brukman94082392003-10-31 18:37:20 +0000289<p>At the end of a successful <tt>bugpoint</tt> run, you will be presented
Gabor Greif04367bf2007-07-06 22:07:22 +0000290with two bitcode files: a <em>safe</em> file which can be compiled with the C
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000291backend and the <em>test</em> file which either LLC or the JIT
Misha Brukman94082392003-10-31 18:37:20 +0000292mis-codegenerates, and thus causes the error.</p>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000293
Misha Brukman94082392003-10-31 18:37:20 +0000294<p>To reproduce the error that <tt>bugpoint</tt> found, it is sufficient to do
295the following:</p>
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000296
297<ol>
Misha Brukman94082392003-10-31 18:37:20 +0000298
Gabor Greif04367bf2007-07-06 22:07:22 +0000299<li><p>Regenerate the shared object from the safe bitcode file:</p>
Misha Brukman94082392003-10-31 18:37:20 +0000300
Misha Brukman3c687a02004-05-14 19:04:07 +0000301<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000302<p><tt>
303<b>llc</b> -march=c safe.bc -o safe.c<br>
Misha Brukman3c687a02004-05-14 19:04:07 +0000304<b>gcc</b> -shared safe.c -o safe.so
Chris Lattner4129b2a2004-05-23 21:05:39 +0000305</tt></p>
Misha Brukman3c687a02004-05-14 19:04:07 +0000306</div></li>
Misha Brukman94082392003-10-31 18:37:20 +0000307
Gabor Greif04367bf2007-07-06 22:07:22 +0000308<li><p>If debugging LLC, compile test bitcode native and link with the shared
Misha Brukman3c687a02004-05-14 19:04:07 +0000309 object:</p>
Misha Brukman94082392003-10-31 18:37:20 +0000310
Misha Brukman3c687a02004-05-14 19:04:07 +0000311<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000312<p><tt>
Dan Gohman0cabaa52009-08-25 15:54:01 +0000313<b>llc</b> test.bc -o test.s<br>
Chris Lattner4129b2a2004-05-23 21:05:39 +0000314<b>gcc</b> test.s safe.so -o test.llc<br>
Misha Brukman3c687a02004-05-14 19:04:07 +0000315./test.llc [program options]
Chris Lattner4129b2a2004-05-23 21:05:39 +0000316</tt></p>
Misha Brukman3c687a02004-05-14 19:04:07 +0000317</div></li>
318
319<li><p>If debugging the JIT, load the shared object and supply the test
Gabor Greif04367bf2007-07-06 22:07:22 +0000320 bitcode:</p>
Misha Brukman94082392003-10-31 18:37:20 +0000321
Misha Brukman3c687a02004-05-14 19:04:07 +0000322<div class="doc_code">
Chris Lattner4129b2a2004-05-23 21:05:39 +0000323<p><tt><b>lli</b> -load=safe.so test.bc [program options]</tt></p>
Misha Brukman3c687a02004-05-14 19:04:07 +0000324</div></li>
Misha Brukman94082392003-10-31 18:37:20 +0000325
Misha Brukmanf1d01fb2003-09-17 18:51:47 +0000326</ol>
Chris Lattner8b6be362003-05-21 22:21:07 +0000327
Misha Brukman94082392003-10-31 18:37:20 +0000328</div>
329
Chris Lattner8b6be362003-05-21 22:21:07 +0000330<!-- *********************************************************************** -->
Misha Brukman94082392003-10-31 18:37:20 +0000331<hr>
Misha Brukman637cab02004-01-15 19:03:47 +0000332<address>
333 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000334 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman637cab02004-01-15 19:03:47 +0000335 <a href="http://validator.w3.org/check/referer"><img
Misha Brukmanf00ddb02008-12-11 18:23:24 +0000336 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman637cab02004-01-15 19:03:47 +0000337
338 <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
NAKAMURA Takumib9a33632011-04-09 02:13:37 +0000339 <a href="http://llvm.org/">The LLVM Compiler Infrastructure</a>
Misha Brukman94082392003-10-31 18:37:20 +0000340 <br>
341 Last modified: $Date$
Misha Brukman637cab02004-01-15 19:03:47 +0000342</address>
Misha Brukman94082392003-10-31 18:37:20 +0000343
344</body>
345</html>