blob: bf2fd305eb6348f4582369a8fe3dd3e227b71e15 [file] [log] [blame]
Misha Brukman500bc302003-11-22 00:38:41 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
Reid Spencer6454ed32004-11-18 18:38:58 +00005 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Misha Brukman500bc302003-11-22 00:38:41 +00006 <link rel="stylesheet" href="llvm.css" type="text/css">
Chris Lattnercaf06342007-05-09 04:58:11 +00007 <title>LLVM 2.0 Release Notes</title>
Misha Brukman500bc302003-11-22 00:38:41 +00008</head>
9<body>
Chris Lattner79c3fe12003-10-02 04:57:28 +000010
Chris Lattnercaf06342007-05-09 04:58:11 +000011<div class="doc_title">LLVM 2.0 Release Notes</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000012
13<ol>
Misha Brukman500bc302003-11-22 00:38:41 +000014 <li><a href="#intro">Introduction</a></li>
15 <li><a href="#whatsnew">What's New?</a></li>
Chris Lattner4b538b92004-04-30 22:17:12 +000016 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Misha Brukman500bc302003-11-22 00:38:41 +000017 <li><a href="#portability">Portability and Supported Platforms</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000018 <li><a href="#knownproblems">Known Problems</a>
Misha Brukman500bc302003-11-22 00:38:41 +000019 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000020</ol>
21
Chris Lattner7911ce22004-05-23 21:07:27 +000022<div class="doc_author">
Chris Lattnerc463b272005-10-29 07:07:09 +000023 <p>Written by the <a href="http://llvm.org">LLVM Team</a><p>
Misha Brukman500bc302003-11-22 00:38:41 +000024</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000025
26<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +000027<div class="doc_section">
28 <a name="intro">Introduction</a>
29</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000030<!-- *********************************************************************** -->
31
Misha Brukman500bc302003-11-22 00:38:41 +000032<div class="doc_text">
33
34<p>This document contains the release notes for the LLVM compiler
Chris Lattnercaf06342007-05-09 04:58:11 +000035infrastructure, release 2.0. Here we describe the status of LLVM, including any
36known problems and major improvements from the previous release. All LLVM
37releases may be downloaded from the <a href="http://llvm.org/releases/">LLVM
38releases web site</a>.
Chris Lattner19092612003-10-02 16:38:05 +000039
Chris Lattner7506b1d2004-12-07 08:04:13 +000040<p>For more information about LLVM, including information about the latest
Chris Lattnerc463b272005-10-29 07:07:09 +000041release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattner47ad72c2003-10-07 21:38:31 +000042web site</a>. If you have questions or comments, the <a
43href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM developer's mailing
Misha Brukman500bc302003-11-22 00:38:41 +000044list</a> is a good place to send them.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +000045
Chris Lattner78bf32b2004-12-09 22:22:58 +000046<p>Note that if you are reading this file from CVS or the main LLVM web page,
47this document applies to the <i>next</i> release, not the current one. To see
48the release notes for the current or previous releases, see the <a
Chris Lattnerc463b272005-10-29 07:07:09 +000049href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman500bc302003-11-22 00:38:41 +000050
51</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000052
53<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +000054<div class="doc_section">
55 <a name="whatsnew">What's New?</a>
56</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000057<!-- *********************************************************************** -->
58
Misha Brukman500bc302003-11-22 00:38:41 +000059<div class="doc_text">
60
Chris Lattnercaf06342007-05-09 04:58:11 +000061<p>This is the eleventh public release of the LLVM Compiler Infrastructure.
Chris Lattnerf01b0b52007-05-09 05:27:05 +000062Being the first major release since 1.0, this release is different in several
63ways from our previous releases:</p>
64
65<ol>
66<li>We took this as an opportunity to
Chris Lattnercaf06342007-05-09 04:58:11 +000067break backwards compatibility with the LLVM 1.x bytecode and .ll file format.
68If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we
Lauro Ramos Venanciobe1b1b12007-05-12 02:36:41 +000069recommend the use of the stand alone <a href="#llvm-upgrade">llvm-upgrade</a>
Chris Lattnerbf8abe32007-05-17 19:58:57 +000070tool (which is included with 2.0). We intend to keep compatibility with .ll
71and .bc formats within the 2.x release series, like we did within the 1.x
72series.</li>
Chris Lattnerf01b0b52007-05-09 05:27:05 +000073<li>There are several significant change to the LLVM IR and internal APIs, such
74 as a major overhaul of the type system, the completely new bitcode file
75 format, etc.</li>
76<li>We designed the release around a 6 month release cycle instead of the usual
77 3-month cycle. This gave us extra time to develop and test some of the
78 more invasive features in this release.</li>
79<li>LLVM 2.0 no longer supports the llvm-gcc3 front-end.</li>
80</ol>
Chris Lattnercaf06342007-05-09 04:58:11 +000081
Chris Lattnerf01b0b52007-05-09 05:27:05 +000082<p>Note that while this is a major version bump, this release has been
83 extensively tested on a wide range of software. It is easy to say that this
84 is our best release yet, in terms of both features and correctness.</p>
Chris Lattnera5099962003-12-06 20:22:41 +000085
Chris Lattner80453c92004-05-24 04:50:25 +000086</div>
87
Chris Lattnera5099962003-12-06 20:22:41 +000088<!--=========================================================================-->
Chris Lattner8a458762005-05-15 05:44:51 +000089<div class="doc_subsection">
Chris Lattnercaf06342007-05-09 04:58:11 +000090<a name="newfeatures">New Features in LLVM 2.0</a>
Chris Lattner44c933e2006-04-18 06:18:36 +000091</div>
92
Chris Lattner738bd302006-04-18 06:32:08 +000093<!--_________________________________________________________________________-->
Chris Lattnerf3e5bc62007-05-14 06:56:09 +000094<div class="doc_subsubsection"><a name="majorchanges">Major Changes</a></div>
95<div class="doc_text">
96<p>blah
97</p>
98
99<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000100
101<li>llvm-gcc3 is now officially unsupported. Users are required to
102 upgrade to llvm-gcc4. llvm-gcc4 includes many features over
103 llvm-gcc3, is faster, and is much easier to build.</li>
104
105<li>Integer types are now completely signless. This means that we
106 have types like i8/i16/i32 instead of ubyte/sbyte/short/ushort/int
107 etc. LLVM operations that depend on sign have been split up into
108 separate instructions (<a href="http://llvm.org/PR950">PR950</a>).</li>
109
110<li>Arbitrary bitwidth integers (e.g. i13, i36, i42, etc) are now
111 supported in the LLVM IR and optimizations. However, neither llvm-gcc nor
112 the native code generators support non-standard width integers
113 (<a href="http://llvm.org/PR1043">PR1043</a>).</li>
114
115<li>'type planes' have been removed (<a href="http://llvm.org/PR411">PR411</a>).
116 It is no longer possible to have two values with the same name in the
117 same symbol table. This simplifies LLVM internals, allowing significant
118 speedups.</li>
119
120<li>Global variables and functions in .ll files are now prefixed with
121 @ instead of % (<a href="http://llvm.org/PR645">PR645</a>).</li>
122
123<li>The LLVM 1.x "bytecode" format has been replaced with a
124 completely new binary representation, named 'bitcode'. Because we
125 plan to maintain binary compatibility between LLVM 2.x ".bc" files,
126 this is an important change to get right. Bitcode brings a number of
127 advantages to the LLVM over the old bytecode format. It is denser
128 (files are smaller), more extensible, requires less memory to read,
129 is easier to keep backwards compatible (so LLVM 2.5 will read 2.0 .bc
130 files), and has many other nice features.</li>
131
132<li>Support was added for alignment values on load and store
133 instructions (<a href="http://www.llvm.org/PR400">PR400</a>). This
134 allows the IR to express loads that are not
135 sufficiently aligned (e.g. due to pragma packed) or to capture extra
136 alignment information. </li>
137
138<li>LLVM now has a new MSIL backend. llc - march=msil will now turn LLVM
139 into MSIL (".net") bytecode. This is still fairly early development
140 with a number of limitations.</li>
141
142<li>Support has been added for 'protected visibility' in ELF.</li>
143
144<li>Thread Local Storage with the __thread keyword was implemented along
145 with added codegen support for Linux on X86 and ARM.</li>
146
147<li>ELF symbol aliases supported has been added.</li>
148
149<li>Added support for 'polymorphic intrinsics', allowing things like
150 llvm.ctpop to work on arbitrary width integers.</li>
151
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000152</ul>
153
154</div>
155
156
157<!--_________________________________________________________________________-->
158<div class="doc_subsubsection"><a name="llvmgccfeatures">llvm-gcc
159Improvements</a></div>
160<div class="doc_text">
161<p>New features include:
162</p>
163
164<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000165<li>Precompiled Headers (PCH) support has been implemented.</li>
166
167<li>Support for external weak linkage and hidden visibility has been added.</li>
168
169<li>Packed structure types are now supported , which allows LLVM to express
170 unaligned data more naturally.</li>
171
172<li>Inline assembly support has been improved and many bugs were fixed.
173 The two large missing features are support for 80-bit floating point stack
174 registers on X86 (<a href="http://llvm.org/PR879">PR879</a>), and support for inline asm in the C backend (<a href="http://llvm.org/PR802">PR802</a>).</li>
175
176<li>Ada support, such as nested functions, has been improved.</li>
177
178<li>Tracking function parameter/result attributes is now possible.</li>
179
180<li>Its is now easier to configure llvm-gcc for linux.</li>
181
182<li>Many enhancements have been added, such as improvements to NON_LVALUE_EXPR,
183 arrays with non-zero base, structs with variable sized fields,
184 VIEW_CONVERT_EXPR, CEIL_DIV_EXPR, and many other things.</li>
185
186<li>Improved "attribute packed" support in the CFE, and handle many
187 other obscure struct layout cases correctly.</li>
188
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000189</ul>
190
191</div>
192
193<!--_________________________________________________________________________-->
Chris Lattner26299222006-11-18 07:51:14 +0000194<div class="doc_subsubsection"><a name="optimizer">Optimizer
195Improvements</a></div>
Chris Lattner738bd302006-04-18 06:32:08 +0000196<div class="doc_text">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000197<p>New features include:
198</p>
Chris Lattner26299222006-11-18 07:51:14 +0000199
200<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000201<li>The pass manager has been entirely rewritten, making it significantly
202 smaller, simpler, and more extensible. Support has been added to run
203 FunctionPasses interlaced with CallGraphSCCPasses.</li>
204
205<li>The -scalarrepl pass can now promote unions containing FP values into
206 a register, it can also handle unions of vectors of the same size.</li>
207
208<li>The predicate simplifier pass has been improved, making it able to do
209 simple value range propagation and eliminate more conditionals.</li>
210
211<li>There is a new new LoopPass class. The passmanager has been
212 modified to support it, and all existing loop xforms have been
213 converted to use it. </li>
214
215<li>There is a new loop rotation pass, which converts "for loops" into
216 "do/while loops", where the condition is at the bottom of the loop.</li>
217
218<li>ModulePasses may now use the result of FunctionPasses.</li>
219
220<li>The [Post]DominatorSet classes have been removed from LLVM and clients switched to use the far-more-efficient ETForest class instead. </li>
221
222<li>The ImmediateDominator class has also been removed, and clients have been switched to use DominatorTree instead.</li>
223
Chris Lattner26299222006-11-18 07:51:14 +0000224</ul>
225
Chris Lattner738bd302006-04-18 06:32:08 +0000226</div>
227
Chris Lattner1c1a85c2006-04-19 04:02:47 +0000228<!--_________________________________________________________________________-->
Chris Lattner26299222006-11-18 07:51:14 +0000229<div class="doc_subsubsection"><a name="codegen">Code
230Generator Enhancements</a></div>
231
Chris Lattner1c1a85c2006-04-19 04:02:47 +0000232<div class="doc_text">
Chris Lattner26299222006-11-18 07:51:14 +0000233<p>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000234New features include:
Chris Lattner26299222006-11-18 07:51:14 +0000235</p>
236
237<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000238<li>Support for Zero-cost DWARF exception handling has been added. It is mostly
239 complete and just in need of continued bug fixes and optimizations at
240 this point.</li>
241
242<li>Progress has been made on a direct Mach-o .o file writer. Many small
243 apps work, but it is not quite complete yet.</li>
244
245<li>Support was added for software floating point routines.</li>
246
247<li>DWARF debug information generation has been improved. LLVM now passes
248 most of the GDB testsuite on MacOS and debug info is more dense.</li>
249
250<li>A new register scavenger has been implemented, which is useful for
251 finding free registers after register allocation. This is useful when
252 rewriting frame references on RISC targets, for example.</li>
253
254<li>Heuristics have been added to avoid coalescing vregs with very large live
255 ranges to physregs.</li>
256
257<li>Support now exists for very simple (but still very useful)
258 rematerialization the register allocator, enough to move
259 instructions like "load immediate" and constant pool loads.</li>
260
261<li>Significantly improved 'switch' lowering, improving codegen for
262 sparse switches that have dense subregions, and implemented support
263 for the shift/and trick.</li>
264
265<li>The code generator now has more accurate and general hooks for
266 describing addressing modes ("isLegalAddressingMode") to
267 optimizations like loop strength reduction and code sinking.</li>
268
269<li>The Loop Strength Reduction pass has been improved, and support added
270 for sinking expressions across blocks to reduce register pressure.</li>
271
272<li>Added support for tracking physreg sub-registers and super-registers
273 in the code generator, as well as extensive register
274 allocator changes to track them.</li>
275
276<li>There is initial support for virtreg sub-registers
277 (<a href="http://llvm.org/PR1350">PR1350</a>).</li>
278
Chris Lattner26299222006-11-18 07:51:14 +0000279</ul>
280
281<p>In addition, the LLVM target description format has itself been extended in
282 several ways:</p>
283
284<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000285<li>Extended TargetData to support better target parameterization in
286 the .ll/.bc files, eliminating the 'pointersize/endianness' attributes
287 in the files (<a href="http://llvm.org/PR761">PR761</a>).</li>
288
289<li>TargetData was generalized for finer grained alignment handling,
290 handling of vector alignment, and handling of preferred alignment</li>
291
292<li>LLVM now supports describing target calling conventions
293 explicitly in .td files, reducing the amount of C++ code that needs
294 to be written for a port.</li>
295
Chris Lattner26299222006-11-18 07:51:14 +0000296</ul>
297
Chris Lattner1c1a85c2006-04-19 04:02:47 +0000298</div>
Chris Lattner44c933e2006-04-18 06:18:36 +0000299
300<!--_________________________________________________________________________-->
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000301<div class="doc_subsubsection"><a name="specifictargets">Target-Specific
302Improvements</a></div>
303
304<div class="doc_text">
305
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000306<p>X86-Specific Code Generator Enhancements:
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000307</p>
308
309<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000310<li>The scheduler was improved to better reduce register pressure on
311 X86 and other targets that are register pressure sensitive</li>
312<li>Linux/x86-64 support has been improved.</li>
313<li>PIC support for linux/x86 has been added.</li>
314<li>Support now exists for the GCC regparm attribute, and code in the X86
315 backend to respect it.</li>
316<li>Various improvements have been made for the X86-64 JIT, allowing it to
317 generate code in the large code model</li>
318<li>LLVM now supports inline asm with multiple constraint letters per operand
319 (like "ri") which is common in X86 inline asms.</li>
320<li>Early support has been added for X86 inline asm in the C backend.</li>
321<li>Added support for the X86 MMX instruction set.</li>
322
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000323</ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000324
325<p>ARM-Specific Code Generator Enhancements:
326</p>
327
328<ul>
329<li>Several improvements have been made to the ARM backend, including basic
330 inline asm support, weak linkage support, static ctor/dtor support and
331 many bug fixes.</li>
332<li>There are major enhancements to the ARM backend, including support for ARM
333 v4-v6, vfp support, soft float, pre/postinc support, load/store multiple
334 generation, constant pool entry motion (to support large functions),
335 and enhancements to ARM constant island pass.
336 </li>
337<li>Added support for Thumb code generation (an ARM subtarget).</li>
338<li>More aggressive size analysis for ARM inline asm strings was
339 implemented.</li>
340</ul>
341
342</div>
343
344<p>Other Target-Specific Code Generator Enhancements:
345</p>
346
347<ul>
348<li>The PowerPC 64 JIT now supports addressing code loaded above the 2G
349 boundary.</li>
350
351<li>Improved support for the Linux/ppc ABI and the linux/ppc JIT is fully
352 functional now. llvm-gcc and static compilation are not fully supported
Chris Lattnerbf8abe32007-05-17 19:58:57 +0000353 yet though.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000354
355<li>Many bugs fixed for PowerPC 64.</li>
356
357<li>Support was added for the ARM AAPCS and EABI ABIs and PIC codegen on
358 arm/linux.</li>
359
360<li>Several bugs in DWARF debug emission on linux and cygwin/mingw were fixed.
361 Debugging basically works on these targets now.</li>
362
363<li>Support has been added for the X86-64 large code model to the JIT,
364 which is useful if JIT'd function bodies are more than 2G away from
365 library functions.</li>
366
367<li>Several bugs were fixed for DWARF debug info generation on arm/linux.</li>
368
369</ul>
370
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000371</div>
372
373
374<!--_________________________________________________________________________-->
Chris Lattnerd9ea0172006-08-08 17:27:28 +0000375<div class="doc_subsubsection"><a name="other">Other Improvements</a></div>
Chris Lattner58504a62006-02-05 06:39:36 +0000376<div class="doc_text">
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000377
378<p>This release includes many other improvements, including
379performance work, specifically designed to tune datastructure
380usage. This makes several critical components faster.</p>
Chris Lattnerd9ea0172006-08-08 17:27:28 +0000381
382<p>More specific changes include:</p>
383
Chris Lattner58504a62006-02-05 06:39:36 +0000384<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000385<li>LLVM no longer relies on static destructors to shut itself down. Instead,
386 it lazily initializes itself and shuts down when llvm_shutdown() is
387 explicitly called.</li>
388
389<li>LLVM now has significantly fewer static constructors, reducing startup time.
390 </li>
391
392<li>Several classes have been refactored to reduce the amount of code that
393 gets linked into apps that use the JIT.</li>
394
395<li>Construction of intrinsic function declarations has been simplified.</li>
396
397<li>The llvm-upgrade tool now exists. This migrates LLVM 1.9 .ll files to
398 LLVM 2.0 syntax.</li>
399
400<li>The gccas/gccld tools have been removed.</li>
401
402<li>Support has been added to llvm-test for running on low-memory
403 or slow machines (make SMALL_PROBLEM_SIZE=1).</li>
404
405<li>llvm-test is now more portable and should build with MS Visual Studio.</li>
406
Chris Lattner58504a62006-02-05 06:39:36 +0000407</ul>
408</div>
John Criswelle531ec52005-06-29 16:22:34 +0000409
Chris Lattnerbfb17ab2007-05-17 21:41:31 +0000410<!--_________________________________________________________________________-->
411<div class="doc_subsubsection"><a name="apichanges">API Changes</a></div>
412<div class="doc_text">
413
414<p>LLVM 2.0 contains a revamp of the type system and several other significant
415internal changes. If you are programming to the C++ API, be aware of the
416following major changes:</p>
417
418<ul>
419<li>Pass registration is slightly different in LLVM 2.0 (you now needs an
420 intptr_t in your constructor), as explained in the <a
421 href="WritingAnLLVMPass.html#basiccode">Writing an LLVM Pass</a>
422 document.</li>
423
424<li><tt>ConstantBool</tt>, <tt>ConstantIntegral</tt> and <tt>ConstantInt</tt>
425 classes have been merged together, we now just have
426 <tt>ConstantInt</tt>.</li>
427
428<li><tt>Type::IntTy</tt>, <tt>Type::UIntTy</tt>, <tt>Type::SByteTy</tt>, ... are
429 replaced by <tt>Type::Int8Ty</tt>, <tt>Type::Int16Ty</tt>, etc. LLVM types
430 have always corresponded to fixed size types
431 (e.g. long was always 64-bits), but the type system no longer includes
432 information about the sign of the type.</li>
433
434<li>Several classes (<tt>CallInst</tt>, <tt>GetElementPtrInst</tt>,
435 <tt>ConstantArray</tt>, etc), that once took <tt>std::vector</tt> as
436 arguments now take ranges instead. For example, you can create a
437 <tt>GetElementPtrInst</tt> with code like:
438
439 <pre>
440 Value *Ops[] = { Op1, Op2, Op3 };
441 GEP = new GetElementPtrInst(BasePtr, Ops, 3);
442 </pre>
443
444 This avoids creation of a temporary vector (and a call to malloc/free). If
445 you have an std::vector, use code like this:
446 <pre>
447 std::vector&lt;Value*&gt; Ops = ...;
448 GEP = new GetElementPtrInst(BasePtr, &amp;Ops[0], Ops.size());
449 </pre>
450
451 </li>
452
453<li>CastInst is now abstract and its functionality is split into several parts,
454 one for each of the <a href="LangRef.html#convertops">new cast
455 instructions</a>.</li>
456
457<li><tt>Instruction::getNext()/getPrev()</tt> are now private (along with
458 <tt>BasicBlock::getNext</tt>, etc), for efficiency reasons (they are now no
459 longer just simple pointers). Please use BasicBlock::iterator, etc instead.
460</li>
461
462<li><tt>Module::getNamedFunction()</tt> is now called
463 <tt>Module::getFunction()</tt>.</li>
464
465<li><tt>SymbolTable.h</tt> has been split into <tt>ValueSymbolTable.h</tt> and
466<tt>TypeSymbolTable.h</tt>.</li>
467</ul>
468</div>
Chris Lattnerc5d658a2006-03-03 00:34:26 +0000469
470
Chris Lattner19092612003-10-02 16:38:05 +0000471<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000472<div class="doc_section">
473 <a name="portability">Portability and Supported Platforms</a>
474</div>
Chris Lattner19092612003-10-02 16:38:05 +0000475<!-- *********************************************************************** -->
476
Misha Brukman500bc302003-11-22 00:38:41 +0000477<div class="doc_text">
478
John Criswell0b5b5e92004-12-08 20:35:47 +0000479<p>LLVM is known to work on the following platforms:</p>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000480
481<ul>
Reid Spencer00812e22005-05-17 02:47:27 +0000482 <li>Intel and AMD machines running Red Hat Linux, Fedora Core and FreeBSD
483 (and probably other unix-like systems).</li>
Chris Lattner7ea41e32006-08-09 04:10:32 +0000484<li>Intel and AMD machines running on Win32 using MinGW libraries (native)</li>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000485<li>Sun UltraSPARC workstations running Solaris 8.</li>
Chris Lattner7506b1d2004-12-07 08:04:13 +0000486<li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
487 support is available for native builds with Visual C++).</li>
Chris Lattner26299222006-11-18 07:51:14 +0000488<li>PowerPC and X86-based Mac OS X systems, running 10.2 and above in 32-bit and
489 64-bit modes.</li>
John Criswell9321fa82005-05-13 20:28:15 +0000490<li>Alpha-based machines running Debian GNU/Linux.</li>
491<li>Itanium-based machines running Linux and HP-UX.</li>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000492</ul>
493
Brian Gaekeb0fd7612004-05-09 05:28:35 +0000494<p>The core LLVM infrastructure uses
495<a href="http://www.gnu.org/software/autoconf/">GNU autoconf</a> to adapt itself
496to the machine and operating system on which it is built. However, minor
497porting may be required to get LLVM to work on new platforms. We welcome your
498portability patches and reports of successful builds or error messages.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000499
Misha Brukman500bc302003-11-22 00:38:41 +0000500</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000501
502<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000503<div class="doc_section">
504 <a name="knownproblems">Known Problems</a>
505</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000506<!-- *********************************************************************** -->
507
Misha Brukman500bc302003-11-22 00:38:41 +0000508<div class="doc_text">
509
510<p>This section contains all known problems with the LLVM system, listed by
Chris Lattner79c3fe12003-10-02 04:57:28 +0000511component. As new problems are discovered, they will be added to these
Chris Lattner5eccca42003-12-12 21:22:16 +0000512sections. If you run into a problem, please check the <a
Chris Lattnerc463b272005-10-29 07:07:09 +0000513href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattner5eccca42003-12-12 21:22:16 +0000514there isn't already one.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000515
Misha Brukman500bc302003-11-22 00:38:41 +0000516</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000517
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000518<!-- ======================================================================= -->
519<div class="doc_subsection">
520 <a name="experimental">Experimental features included with this release</a>
521</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000522
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000523<div class="doc_text">
524
Misha Brukman6df9e2c2004-05-12 21:46:05 +0000525<p>The following components of this LLVM release are either untested, known to
526be broken or unreliable, or are in early development. These components should
527not be relied on, and bugs should not be filed against them, but they may be
528useful to some people. In particular, if you would like to work on one of these
Chris Lattner49e693e2006-08-09 04:08:52 +0000529components, please contact us on the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000530
531<ul>
Chris Lattner44c933e2006-04-18 06:18:36 +0000532<li>The <tt>-cee</tt> pass is known to be buggy, and may be removed in in a
533 future release.</li>
Chris Lattner0d77e052007-05-09 06:23:58 +0000534<li>C++ EH support</li>
Chris Lattner58504a62006-02-05 06:39:36 +0000535<li>The IA64 code generator is experimental.</li>
Chris Lattnerc463b272005-10-29 07:07:09 +0000536<li>The Alpha JIT is experimental.</li>
Chris Lattner44c933e2006-04-18 06:18:36 +0000537<li>"<tt>-filetype=asm</tt>" (the default) is the only supported value for the
538 <tt>-filetype</tt> llc option.</li>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000539</ul>
540
541</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000542
Misha Brukman500bc302003-11-22 00:38:41 +0000543<!-- ======================================================================= -->
544<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000545 <a name="x86-be">Known problems with the X86 back-end</a>
John Criswellc0c186d2005-11-08 21:11:33 +0000546</div>
547
548<div class="doc_text">
549
550<ul>
Chris Lattner26299222006-11-18 07:51:14 +0000551<li>The X86 backend does not yet support <a href="http://llvm.org/PR879">inline
Chris Lattnercaf06342007-05-09 04:58:11 +0000552 assembly that uses the X86 floating point stack</a>.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000553</ul>
554
555</div>
556
557<!-- ======================================================================= -->
558<div class="doc_subsection">
559 <a name="ppc-be">Known problems with the PowerPC back-end</a>
560</div>
561
562<div class="doc_text">
563
564<ul>
565<li><a href="http://llvm.org/PR642">PowerPC backend does not correctly
566implement ordered FP comparisons</a>.</li>
Nicolas Geoffraye4285dc2007-05-15 09:21:28 +0000567<li>The Linux PPC32/ABI support needs testing for the interpreter and static
568compilation, and lacks Dwarf debugging informations.
Chris Lattner26299222006-11-18 07:51:14 +0000569</ul>
570
571</div>
572
573<!-- ======================================================================= -->
574<div class="doc_subsection">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000575 <a name="arm-be">Known problems with the ARM back-end</a>
576</div>
577
578<div class="doc_text">
579
580<ul>
581<li>The Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
582processors, any thumb program compiled with LLVM crashes or produces wrong
583results. (<a href="http://llvm.org/PR1388">PR1388</a>)</li>
584<li>Compilation for ARM Linux OABI (old ABI) is supported, but not fully tested.
585</li>
586<li>QEMU-ARM (<= 0.9.0) wrongly executes programs compiled with LLVM. A non-affected QEMU version must be used or this
587<a href="http://cvs.savannah.nongnu.org/viewcvs/qemu/target-arm/translate.c?root=qemu&r1=1.46&r2=1.47&makepatch=1&diff_format=h">
588patch</a> must be applied on QEMU.</li>
589</ul>
590
591</div>
592
593<!-- ======================================================================= -->
594<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000595 <a name="sparc-be">Known problems with the SPARC back-end</a>
596</div>
597
598<div class="doc_text">
599
600<ul>
601<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32), it does not
602 support the 64-bit SPARC ABI (-m64).</li>
603</ul>
604
605</div>
606
607<!-- ======================================================================= -->
608<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000609 <a name="alpha-be">Known problems with the Alpha back-end</a>
610</div>
611
612<div class="doc_text">
613
614<ul>
615
616<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
617appropriate nops inserted to ensure restartability.</li>
618
John Criswellc0c186d2005-11-08 21:11:33 +0000619</ul>
620</div>
621
Chris Lattner26299222006-11-18 07:51:14 +0000622<!-- ======================================================================= -->
623<div class="doc_subsection">
624 <a name="ia64-be">Known problems with the IA64 back-end</a>
625</div>
626
627<div class="doc_text">
628
629<ul>
630
631<li>C++ programs are likely to fail on IA64, as calls to <tt>setjmp</tt> are
632made where the argument is not 16-byte aligned, as required on IA64. (Strictly
633speaking this is not a bug in the IA64 back-end; it will also be encountered
634when building C++ programs using the C back-end.)</li>
635
636<li>The C++ front-end does not use <a href="http://llvm.org/PR406">IA64
637ABI compliant layout of v-tables</a>. In particular, it just stores function
638pointers instead of function descriptors in the vtable. This bug prevents
639mixing C++ code compiled with LLVM with C++ objects compiled by other C++
640compilers.</li>
641
642<li>There are a few ABI violations which will lead to problems when mixing LLVM
643output with code built with other compilers, particularly for floating-point
644programs.</li>
645
646<li>Defining vararg functions is not supported (but calling them is ok).</li>
647
Chris Lattnercaf06342007-05-09 04:58:11 +0000648<li>The Itanium backend has bitrotted somewhat.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000649</ul>
650
651</div>
652
653<!-- ======================================================================= -->
654<div class="doc_subsection">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000655 <a name="c-be">Known problems with the C back-end</a>
Chris Lattner26299222006-11-18 07:51:14 +0000656</div>
657
658<div class="doc_text">
659
660<ul>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000661<li><a href="http://llvm.org/PR802">The C backend does not support inline
662 assembly code</a>.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000663</ul>
664
665</div>
John Criswellc0c186d2005-11-08 21:11:33 +0000666
Misha Brukman500bc302003-11-22 00:38:41 +0000667
668<!-- ======================================================================= -->
669<div class="doc_subsection">
670 <a name="c-fe">Known problems with the C front-end</a>
671</div>
Chris Lattner47588f92003-10-02 05:07:23 +0000672
Chris Lattner79c3fe12003-10-02 04:57:28 +0000673<!-- _______________________________________________________________________ -->
Chris Lattnerb40efb32003-12-14 05:03:43 +0000674<div class="doc_subsubsection">Bugs</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000675
Misha Brukman500bc302003-11-22 00:38:41 +0000676<div class="doc_text">
Chris Lattnerc5d658a2006-03-03 00:34:26 +0000677
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000678<p>llvm-gcc4 does not currently support <a href="http://llvm.org/PR869">Link-Time
679Optimization</a> on most platforms "out-of-the-box". Please inquire on the
680llvmdev mailing list if you are interested.</p>
Chris Lattnerd9ea0172006-08-08 17:27:28 +0000681
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000682<p>FIXME: the list of supported stuff below needs to be updated. We do support
683tls now, what else??</p>
Misha Brukman500bc302003-11-22 00:38:41 +0000684</div>
685
686<!-- _______________________________________________________________________ -->
687<div class="doc_subsubsection">
688 Notes
689</div>
690
691<div class="doc_text">
692
693<ul>
694
Chris Lattnere01fcfb2003-10-27 18:30:37 +0000695<li>"long double" is transformed by the front-end into "double". There is no
Misha Brukman500bc302003-11-22 00:38:41 +0000696support for floating point data types of any size other than 32 and 64
697bits.</li>
698
Chris Lattner79c3fe12003-10-02 04:57:28 +0000699<li>Although many GCC extensions are supported, some are not. In particular,
700 the following extensions are known to <b>not be</b> supported:
701 <ol>
Misha Brukman500bc302003-11-22 00:38:41 +0000702 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Local-Labels.html#Local%20Labels">Local Labels</a>: Labels local to a block.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000703 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html#Nested%20Functions">Nested Functions</a>: As in Algol and Pascal, lexical scoping of functions.</li>
704 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Constructing-Calls.html#Constructing%20Calls">Constructing Calls</a>: Dispatching a call to another function.</li>
Tanya Lattner014e5f52004-12-08 18:25:34 +0000705 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Thread_002dLocal.html">Thread-Local</a>: Per-thread variables.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000706 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html#Pragmas">Pragmas</a>: Pragmas accepted by GCC.</li>
Misha Brukmane0c891c2003-11-22 01:00:11 +0000707 </ol>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000708
Misha Brukman500bc302003-11-22 00:38:41 +0000709 <p>The following GCC extensions are <b>partially</b> supported. An ignored
Chris Lattner79c3fe12003-10-02 04:57:28 +0000710 attribute means that the LLVM compiler ignores the presence of the attribute,
711 but the code should still work. An unsupported attribute is one which is
John Criswelld000e1d2003-12-18 16:43:17 +0000712 ignored by the LLVM compiler and will cause a different interpretation of
Misha Brukman500bc302003-11-22 00:38:41 +0000713 the program.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000714
715 <ol>
716 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html#Variable%20Length">Variable Length</a>:
717 Arrays whose length is computed at run time.<br>
Misha Brukman500bc302003-11-22 00:38:41 +0000718 Supported, but allocated stack space is not freed until the function returns (noted above).</li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000719
720 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function%20Attributes">Function Attributes</a>:
Misha Brukman500bc302003-11-22 00:38:41 +0000721
John Criswelld000e1d2003-12-18 16:43:17 +0000722 Declaring that functions have no side effects or that they can never
Misha Brukman500bc302003-11-22 00:38:41 +0000723 return.<br>
724
Anton Korobeynikov9ec81372007-05-10 08:26:24 +0000725 <b>Supported:</b> <tt>alias</tt>, <tt>constructor</tt>, <tt>destructor</tt>,
Anton Korobeynikov9413de32006-11-18 08:04:48 +0000726 <tt>deprecated</tt>, <tt>fastcall</tt>, <tt>format</tt>,
Anton Korobeynikov9ec81372007-05-10 08:26:24 +0000727 <tt>format_arg</tt>, <tt>non_null</tt>, <tt>noreturn</tt>, <tt>regparm</tt>
Anton Korobeynikov8cea37b2007-01-23 12:35:46 +0000728 <tt>section</tt>, <tt>stdcall</tt>, <tt>unused</tt>, <tt>used</tt>,
729 <tt>visibility</tt>, <tt>warn_unused_result</tt>, <tt>weak</tt><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000730
John Criswell0b5b5e92004-12-08 20:35:47 +0000731 <b>Ignored:</b> <tt>noinline</tt>,
Misha Brukman500bc302003-11-22 00:38:41 +0000732 <tt>always_inline</tt>, <tt>pure</tt>, <tt>const</tt>, <tt>nothrow</tt>,
733 <tt>malloc</tt>, <tt>no_instrument_function</tt>, <tt>cdecl</tt><br>
734
Anton Korobeynikov9ec81372007-05-10 08:26:24 +0000735 <b>Unsupported:</b> All other target specific attributes</li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000736
737 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html#Variable%20Attributes">Variable Attributes</a>:
738 Specifying attributes of variables.<br>
Anton Korobeynikov9ec81372007-05-10 08:26:24 +0000739 <b>Supported:</b> <tt>alias</tt>, <tt>cleanup</tt>, <tt>common</tt>,
740 <tt>nocommon</tt>, <tt>deprecated</tt>, <tt>dllimport</tt>,
741 <tt>dllexport</tt>, <tt>section</tt>, <tt>transparent_union</tt>,
742 <tt>unused</tt>, <tt>used</tt>, <tt>weak</tt><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000743
Chris Lattner79c3fe12003-10-02 04:57:28 +0000744 <b>Unsupported:</b> <tt>aligned</tt>, <tt>mode</tt>, <tt>packed</tt>,
Anton Korobeynikov8cea37b2007-01-23 12:35:46 +0000745 <tt>shared</tt>, <tt>tls_model</tt>,
746 <tt>vector_size</tt>, all target specific attributes.
Anton Korobeynikov9413de32006-11-18 08:04:48 +0000747 </li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000748
Misha Brukmanc4b7bee2003-12-12 04:37:31 +0000749 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html#Type%20Attributes">Type Attributes</a>: Specifying attributes of types.<br>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000750 <b>Supported:</b> <tt>transparent_union</tt>, <tt>unused</tt>,
Misha Brukmanc4b7bee2003-12-12 04:37:31 +0000751 <tt>deprecated</tt>, <tt>may_alias</tt><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000752
753 <b>Unsupported:</b> <tt>aligned</tt>, <tt>packed</tt>,
754 all target specific attributes.</li>
755
Chris Lattner79c3fe12003-10-02 04:57:28 +0000756 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other%20Builtins">Other Builtins</a>:
757 Other built-in functions.<br>
758 We support all builtins which have a C language equivalent (e.g.,
759 <tt>__builtin_cos</tt>), <tt>__builtin_alloca</tt>,
760 <tt>__builtin_types_compatible_p</tt>, <tt>__builtin_choose_expr</tt>,
Chris Lattnerceebeb62004-06-18 06:26:29 +0000761 <tt>__builtin_constant_p</tt>, and <tt>__builtin_expect</tt>
762 (currently ignored). We also support builtins for ISO C99 floating
Chris Lattner7939b782005-05-07 02:21:21 +0000763 point comparison macros (e.g., <tt>__builtin_islessequal</tt>),
764 <tt>__builtin_prefetch</tt>, <tt>__builtin_popcount[ll]</tt>,
765 <tt>__builtin_clz[ll]</tt>, and <tt>__builtin_ctz[ll]</tt>.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000766 </ol>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000767
Misha Brukman500bc302003-11-22 00:38:41 +0000768 <p>The following extensions <b>are</b> known to be supported:</p>
769
Chris Lattner79c3fe12003-10-02 04:57:28 +0000770 <ol>
Chris Lattner7fe97dd2004-03-16 08:54:07 +0000771 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html#Labels%20as%20Values">Labels as Values</a>: Getting pointers to labels and computed gotos.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000772 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html#Statement%20Exprs">Statement Exprs</a>: Putting statements and declarations inside expressions.</li>
773 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Typeof.html#Typeof">Typeof</a>: <code>typeof</code>: referring to the type of an expression.</li>
Tanya Lattnerca26c3e2004-06-22 03:48:17 +0000774 <li><a href="http://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/Lvalues.html#Lvalues">Lvalues</a>: Using <code>?:</code>, "<code>,</code>" and casts in lvalues.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000775 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals">Conditionals</a>: Omitting the middle operand of a <code>?:</code> expression.</li>
776 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html#Long%20Long">Long Long</a>: Double-word integers.</li>
777 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex">Complex</a>: Data types for complex numbers.</li>
778 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Hex-Floats.html#Hex%20Floats">Hex Floats</a>:Hexadecimal floating-point constants.</li>
779 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html#Zero%20Length">Zero Length</a>: Zero-length arrays.</li>
780 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html#Empty%20Structures">Empty Structures</a>: Structures with no members.</li>
781 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Variadic%20Macros">Variadic Macros</a>: Macros with a variable number of arguments.</li>
782 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Escaped-Newlines.html#Escaped%20Newlines">Escaped Newlines</a>: Slightly looser rules for escaped newlines.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000783 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Extended%20Asm">Extended Asm</a>: Assembler instructions with C expressions as operands.</li>
784 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Constraints.html#Constraints">Constraints</a>: Constraints for asm operands.</li>
785 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Asm-Labels.html#Asm%20Labels">Asm Labels</a>: Specifying the assembler name to use for a C symbol.</li>
786 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Explicit-Reg-Vars.html#Explicit%20Reg%20Vars">Explicit Reg Vars</a>: Defining variables residing in specified registers.</li>
787 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html#Vector%20Extensions">Vector Extensions</a>: Using vector instructions through built-in functions.</li>
788 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Target-Builtins.html#Target%20Builtins">Target Builtins</a>: Built-in functions specific to particular targets.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000789 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Subscripting.html#Subscripting">Subscripting</a>: Any array can be subscripted, even if not an lvalue.</li>
Misha Brukmanc4b7bee2003-12-12 04:37:31 +0000790 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html#Pointer%20Arith">Pointer Arith</a>: Arithmetic on <code>void</code>-pointers and function pointers.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000791 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Initializers.html#Initializers">Initializers</a>: Non-constant initializers.</li>
John Criswelld000e1d2003-12-18 16:43:17 +0000792 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html#Compound%20Literals">Compound Literals</a>: Compound literals give structures, unions,
793or arrays as values.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000794 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html#Designated%20Inits">Designated Inits</a>: Labeling elements of initializers.</li>
Misha Brukmanc4b7bee2003-12-12 04:37:31 +0000795 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Cast-to-Union.html#Cast%20to%20Union">Cast to Union</a>: Casting to union type from any member of the union.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000796 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html#Case%20Ranges">Case Ranges</a>: `case 1 ... 9' and such.</li>
797 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html#Mixed%20Declarations">Mixed Declarations</a>: Mixing declarations and code.</li>
798 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Prototypes.html#Function%20Prototypes">Function Prototypes</a>: Prototype declarations and old-style definitions.</li>
Tanya Lattner78537e42004-12-08 18:29:38 +0000799 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Comments.html#C_002b_002b-Comments">C++ Comments</a>: C++ comments are recognized.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000800 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html#Dollar%20Signs">Dollar Signs</a>: Dollar sign is allowed in identifiers.</li>
801 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Character-Escapes.html#Character%20Escapes">Character Escapes</a>: <code>\e</code> stands for the character &lt;ESC&gt;.</li>
802 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Alignment.html#Alignment">Alignment</a>: Inquiring about the alignment of a type or variable.</li>
803 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline">Inline</a>: Defining inline functions (as fast as macros).</li>
804 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate%20Keywords">Alternate Keywords</a>:<code>__const__</code>, <code>__asm__</code>, etc., for header files.</li>
805 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Incomplete-Enums.html#Incomplete%20Enums">Incomplete Enums</a>: <code>enum foo;</code>, with details to follow.</li>
806 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function%20Names">Function Names</a>: Printable strings which are the name of the current function.</li>
Chris Lattner25795bc2004-02-14 04:08:29 +0000807 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html#Return%20Address">Return Address</a>: Getting the return or frame address of a function.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000808 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed%20Fields">Unnamed Fields</a>: Unnamed struct/union fields within structs/unions.</li>
809 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute%20Syntax">Attribute Syntax</a>: Formal syntax for attributes.</li>
Misha Brukmane0c891c2003-11-22 01:00:11 +0000810 </ol></li>
811
812</ul>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000813
Misha Brukman500bc302003-11-22 00:38:41 +0000814<p>If you run into GCC extensions which have not been included in any of these
815lists, please let us know (also including whether or not they work).</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000816
Misha Brukman500bc302003-11-22 00:38:41 +0000817</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000818
Misha Brukman500bc302003-11-22 00:38:41 +0000819<!-- ======================================================================= -->
820<div class="doc_subsection">
821 <a name="c++-fe">Known problems with the C++ front-end</a>
822</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000823
Misha Brukman500bc302003-11-22 00:38:41 +0000824<div class="doc_text">
825
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000826<p>The C++ front-end is considered to be fully
Chris Lattner7506b1d2004-12-07 08:04:13 +0000827tested and works for a number of non-trivial programs, including LLVM
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000828itself, Qt, Mozilla, etc.</p>
Misha Brukman500bc302003-11-22 00:38:41 +0000829
Misha Brukman500bc302003-11-22 00:38:41 +0000830<ul>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000831<li>llvm-gcc4 only has partial support for <a href="http://llvm.org/PR870">C++
832Exception Handling</a>, and it is not enabled by default.</li>
833
834<!-- NO EH Support!
Chris Lattnere01fcfb2003-10-27 18:30:37 +0000835
Chris Lattner79c3fe12003-10-02 04:57:28 +0000836<li>Destructors for local objects are not always run when a <tt>longjmp</tt> is
Chris Lattner19092612003-10-02 16:38:05 +0000837 performed. In particular, destructors for objects in the <tt>longjmp</tt>ing
Chris Lattner79c3fe12003-10-02 04:57:28 +0000838 function and in the <tt>setjmp</tt> receiver function may not be run.
John Criswelld000e1d2003-12-18 16:43:17 +0000839 Objects in intervening stack frames will be destroyed, however (which is
Misha Brukman500bc302003-11-22 00:38:41 +0000840 better than most compilers).</li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000841
Chris Lattner19092612003-10-02 16:38:05 +0000842<li>The LLVM C++ front-end follows the <a
843 href="http://www.codesourcery.com/cxx-abi">Itanium C++ ABI</a>.
844 This document, which is not Itanium specific, specifies a standard for name
845 mangling, class layout, v-table layout, RTTI formats, and other C++
846 representation issues. Because we use this API, code generated by the LLVM
847 compilers should be binary compatible with machine code generated by other
848 Itanium ABI C++ compilers (such as G++, the Intel and HP compilers, etc).
Chris Lattner26299222006-11-18 07:51:14 +0000849 <i>However</i>, the exception handling mechanism used by llvm-gcc3 is very
Chris Lattner19092612003-10-02 16:38:05 +0000850 different from the model used in the Itanium ABI, so <b>exceptions will not
Misha Brukman500bc302003-11-22 00:38:41 +0000851 interact correctly</b>. </li>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000852-->
Misha Brukman500bc302003-11-22 00:38:41 +0000853</ul>
Chris Lattnerfcc54b32003-10-07 22:14:37 +0000854
Misha Brukman500bc302003-11-22 00:38:41 +0000855</div>
856
Misha Brukman500bc302003-11-22 00:38:41 +0000857
Chris Lattner98a493c2005-05-15 16:01:20 +0000858
Chris Lattner79c3fe12003-10-02 04:57:28 +0000859<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000860<div class="doc_section">
861 <a name="additionalinfo">Additional Information</a>
862</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000863<!-- *********************************************************************** -->
864
Misha Brukman500bc302003-11-22 00:38:41 +0000865<div class="doc_text">
866
Chris Lattner416db102005-05-16 17:13:10 +0000867<p>A wide variety of additional information is available on the <a
Chris Lattnerc463b272005-10-29 07:07:09 +0000868href="http://llvm.org">LLVM web page</a>, including <a
869href="http://llvm.org/docs/">documentation</a> and <a
870href="http://llvm.org/pubs/">publications describing algorithms and
Misha Brukman109d9e82005-03-30 19:14:24 +0000871components implemented in LLVM</a>. The web page also contains versions of the
872API documentation which is up-to-date with the CVS version of the source code.
873You can access versions of these documents specific to this release by going
874into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000875
Misha Brukman500bc302003-11-22 00:38:41 +0000876<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnerc463b272005-10-29 07:07:09 +0000877us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattner5eccca42003-12-12 21:22:16 +0000878lists</a>.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000879
Misha Brukman500bc302003-11-22 00:38:41 +0000880</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000881
882<!-- *********************************************************************** -->
Chris Lattner79c3fe12003-10-02 04:57:28 +0000883
Misha Brukman500bc302003-11-22 00:38:41 +0000884<hr>
Misha Brukman2061e892003-11-22 01:23:39 +0000885<address>
Misha Brukman38847d52003-12-21 22:53:21 +0000886 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman2061e892003-11-22 01:23:39 +0000887 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
888 <a href="http://validator.w3.org/check/referer"><img
889 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
890
Chris Lattnerc463b272005-10-29 07:07:09 +0000891 <a href="http://llvm.org/">The LLVM Compiler Infrastructure</a><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000892 Last modified: $Date$
Misha Brukman2061e892003-11-22 01:23:39 +0000893</address>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000894
Misha Brukman500bc302003-11-22 00:38:41 +0000895</body>
896</html>