Adjust how LLVM names are produced:
[oota-llvm.git] / docs / ReleaseNotes.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2                       "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6   <link rel="stylesheet" href="llvm.css" type="text/css">
7   <title>LLVM 2.0 Release Notes</title>
8 </head>
9 <body>
10
11 <div class="doc_title">LLVM 2.0 Release Notes</div>
12  
13 <ol>
14   <li><a href="#intro">Introduction</a></li>
15   <li><a href="#whatsnew">What's New?</a></li>
16   <li><a href="GettingStarted.html">Installation Instructions</a></li>
17   <li><a href="#portability">Portability and Supported Platforms</a></li>
18   <li><a href="#knownproblems">Known Problems</a>
19   <li><a href="#additionalinfo">Additional Information</a></li>
20 </ol>
21
22 <div class="doc_author">
23   <p>Written by the <a href="http://llvm.org">LLVM Team</a><p>
24 </div>
25
26 <!-- *********************************************************************** -->
27 <div class="doc_section">
28   <a name="intro">Introduction</a>
29 </div>
30 <!-- *********************************************************************** -->
31
32 <div class="doc_text">
33
34 <p>This document contains the release notes for the LLVM compiler
35 infrastructure, release 2.0.  Here we describe the status of LLVM, including any
36 known problems and major improvements from the previous release.  All LLVM
37 releases may be downloaded from the <a href="http://llvm.org/releases/">LLVM
38 releases web site</a>.
39
40 <p>For more information about LLVM, including information about the latest
41 release, please check out the <a href="http://llvm.org/">main LLVM
42 web site</a>.  If you have questions or comments, the <a
43 href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM developer's mailing
44 list</a> is a good place to send them.</p>
45
46 <p>Note that if you are reading this file from CVS or the main LLVM web page,
47 this document applies to the <i>next</i> release, not the current one.  To see
48 the release notes for the current or previous releases, see the <a
49 href="http://llvm.org/releases/">releases page</a>.</p>
50
51 </div>
52
53 <!-- *********************************************************************** -->
54 <div class="doc_section">
55   <a name="whatsnew">What's New?</a>
56 </div>
57 <!-- *********************************************************************** -->
58
59 <div class="doc_text">
60
61 <p>This is the eleventh public release of the LLVM Compiler Infrastructure. 
62 Being the first major release since 1.0, this release is different in several
63 ways from our previous releases:</p>
64
65 <ol>
66 <li>We took this as an opportunity to
67 break backwards compatibility with the LLVM 1.x bytecode and .ll file format.
68 If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we 
69 recommend the use of the stand alone <a href="#llvm-upgrade">llvm-upgrade</a>
70 tool (which is included with 2.0).  We intend to keep compatibility with .ll 
71 and .bc formats within the 2.x release series, like we did within the 1.x 
72 series.</li>
73 <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 (described below).</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.  Users are required to
80     upgrade to llvm-gcc4.  llvm-gcc4 includes many features over
81     llvm-gcc3, is faster, and is <a href="CFEBuildInstrs.html">much easier to
82     build from source</a>.</li>
83 </ol>
84
85 <p>Note that while this is a major version bump, this release has been
86    extensively tested on a wide range of software.  It is easy to say that this
87    is our best release yet, in terms of both features and correctness.  This is
88    the first LLVM release to correctly compile and optimize major software like
89    LLVM itself, Mozilla/Seamonkey, Qt 4.3rc1, kOffice, etc out of the box on
90    linux/x86.
91    </p>
92
93 </div>
94
95 <!--=========================================================================-->
96 <div class="doc_subsection">
97 <a name="newfeatures">New Features in LLVM 2.0</a>
98 </div>
99
100 <!--_________________________________________________________________________-->
101 <div class="doc_subsubsection"><a name="majorchanges">Major Changes</a></div>
102 <div class="doc_text">
103
104 <p>Changes to the LLVM IR itself:</p>
105
106 <ul>
107
108 <li>Integer types are now completely signless. This means that we
109     have types like i8/i16/i32 instead of ubyte/sbyte/short/ushort/int
110     etc. LLVM operations that depend on sign have been split up into 
111     separate instructions (<a href="http://llvm.org/PR950">PR950</a>).  This
112     eliminates cast instructions that just change the sign of the operands (e.g.
113     int -> uint), which reduces the size of the IR and makes optimizers
114     simpler to write.</li>
115
116 <li>Integer types with arbitrary bitwidths (e.g. i13, i36, i42, i1057, etc) are
117     now supported in the LLVM IR and optimizations (<a 
118     href="http://llvm.org/PR1043">PR1043</a>).  However, neither llvm-gcc
119     (<a href="http://llvm.org/PR1284">PR1284</a>) nor the native code generators
120     (<a href="http://llvm.org/PR1270">PR1270</a>) support non-standard width
121     integers yet.</li>
122
123 <li>'Type planes' have been removed (<a href="http://llvm.org/PR411">PR411</a>).
124     It is no longer possible to have two values with the same name in the 
125     same symbol table.  This simplifies LLVM internals, allowing significant 
126     speedups.</li>
127
128 <li>Global variables and functions in .ll files are now prefixed with
129     @ instead of % (<a href="http://llvm.org/PR645">PR645</a>).</li>
130
131 <li>The LLVM 1.x "bytecode" format has been replaced with a  
132     completely new binary representation, named 'bitcode'. The <a
133     href="BitCodeFormat.html">Bitcode Format</a> brings a
134     number of advantages to the LLVM over the old bytecode format: it is denser  
135     (files are smaller), more extensible, requires less memory to read,  
136     is easier to keep backwards compatible (so LLVM 2.5 will read 2.0 .bc  
137     files), and has many other nice features.</li>
138
139 <li>Load and store instructions now track the alignment of their pointer
140     (<a href="http://www.llvm.org/PR400">PR400</a>).  This allows the IR to
141     express loads that are not sufficiently aligned (e.g. due to '<tt>#pragma
142     packed</tt>') or to capture extra alignment information.</li>
143 </ul>
144
145 <p>Major new features:</p>
146
147 <ul>
148
149 <li>A number of ELF features are now supported by LLVM, including 'visibility',
150     extern weak linkage, Thread Local Storage (TLS) with the <tt>__thread</tt>
151     keyword, and symbol aliases.
152     Among other things, this means that many of the special options needed to
153     configure llvm-gcc on linux are no longer needed, and special hacks to build
154     large C++ libraries like Qt are not needed.</li>
155
156 <li>LLVM now has a new MSIL backend. llc -march=msil will now turn LLVM 
157     into MSIL (".net") bytecode.  This is still fairly early development 
158     with a number of limitations.</li>
159
160 <li>A new <a href="CommandGuide/html/llvm-upgrade.html">llvm-upgrade</a> tool 
161     exists to migrates LLVM 1.9 .ll files to LLVM 2.0 syntax.</li>
162 </ul>
163
164 </div>
165
166
167 <!--_________________________________________________________________________-->
168 <div class="doc_subsubsection"><a name="llvmgccfeatures">llvm-gcc
169 Improvements</a></div>
170 <div class="doc_text">
171 <p>New features include:
172 </p>
173
174 <ul>
175 <li>Precompiled Headers (PCH) are now supported.</li>
176
177 <li>"<tt>#pragma packed</tt>" is now supported, as are the various features
178     described above (visibility, extern weak linkage, __thread, aliases,
179     etc).</li>
180
181 <li>Tracking function parameter/result attributes is now possible.</li>
182
183 <li>Many internal enhancements have been added, such as improvements to
184     NON_LVALUE_EXPR, arrays with non-zero base, structs with variable sized
185     fields, VIEW_CONVERT_EXPR, CEIL_DIV_EXPR, nested functions, and many other
186     things.  This is primarily to supports non-C GCC front-ends, like Ada.</li>
187
188 <li>It is simpler to configure llvm-gcc for linux.</li>
189
190 </ul>
191   
192 </div>
193
194 <!--_________________________________________________________________________-->
195 <div class="doc_subsubsection"><a name="optimizer">Optimizer
196 Improvements</a></div>
197
198 <div class="doc_text">
199 <p>New features include:
200 </p>
201
202 <ul>
203 <li>The <a href="WritingAnLLVMPass.html">pass manager</a> has been entirely
204     rewritten, making it significantly smaller, simpler, and more extensible.
205     Support has been added to run FunctionPasses interlaced with
206     CallGraphSCCPasses, and we now support loop transformations explicitly with
207     LoopPass.</li>
208
209 <li>The <tt>-scalarrepl</tt> pass can now promote unions containing FP values
210     into a register, it can also handle unions of vectors of the same
211     size.</li>
212
213 <li>LLVM 2.0 includes a new loop rotation pass, which converts "for loops" into 
214     "do/while loops", where the condition is at the bottom of the loop.</li>
215
216 <li>The Loop Strength Reduction pass has been improved, and support added 
217     for sinking expressions across blocks to reduce register pressure.</li>
218
219 <li>ModulePasses may now use the result of FunctionPasses.</li>
220
221 <li>The [Post]DominatorSet classes have been removed from LLVM and clients
222     switched to use the far-more-efficient ETForest class instead.</li>
223
224 <li>The ImmediateDominator class has also been removed, and clients have been
225     switched to use DominatorTree instead.</li>
226
227 <li>The predicate simplifier pass has been improved, making it able to do 
228     simple value range propagation and eliminate more conditionals.</li>
229
230 </ul>
231   
232 </div>
233
234 <!--_________________________________________________________________________-->
235 <div class="doc_subsubsection"><a name="codegen">Code
236 Generator Enhancements</a></div>
237
238 <div class="doc_text">
239 <p>
240 New features include:
241 </p>
242
243 <ul>
244
245 <li>Support was added for software floating point, which allows LLVM to target
246     chips that don't have hardware FPUs (e.g. ARM thumb mode).</li>
247
248 <li>A new register scavenger has been implemented, which is useful for
249     finding free registers after register allocation.  This is useful when
250     rewriting frame references on RISC targets, for example.</li>
251
252 <li>Heuristics have been added to avoid coalescing vregs with very large live 
253     ranges to physregs.  This was bad because it effectively pinned the physical
254     register for the entire lifetime of the virtual register (<a 
255     href="http://llvm.org/PR711">PR711</a>).</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>Switch statement lowering is significantly better, improving codegen for 
262     sparse switches that have dense subregions, and implemented support 
263     for the shift/and trick.</li>
264
265 <li>Added support for tracking physreg sub-registers and super-registers 
266     in the code generator, as well as extensive register  
267     allocator changes to track them.</li>
268
269 <li>There is initial support for virtreg sub-registers 
270     (<a href="http://llvm.org/PR1350">PR1350</a>).</li>
271
272 </ul>
273
274 <p>
275 Other improvements include:
276 </p>
277
278 <ul>
279
280 <li>Inline assembly support is much more solid that before.
281     The two primary features still missing are support for 80-bit floating point
282     stack registers on X86 (<a href="http://llvm.org/PR879">PR879</a>), and
283     support for inline asm in the C backend (<a 
284     href="http://llvm.org/PR802">PR802</a>).</li>
285
286 <li>DWARF debug information generation has been improved.  LLVM now passes 
287     most of the GDB testsuite on MacOS and debug info is more dense.</li>
288
289 <li>Codegen support for Zero-cost DWARF exception handling has been added (<a 
290     href="http://llvm.org/PR592">PR592</a>).  It is mostly
291     complete and just in need of continued bug fixes and optimizations at 
292     this point.  However, support in llvm-g++ is disabled with an
293     #ifdef for the 2.0 release  (<a 
294     href="http://llvm.org/PR870">PR870</a>).</li>
295
296 <li>The code generator now has more accurate and general hooks for  
297     describing addressing modes ("isLegalAddressingMode") to  
298     optimizations like loop strength reduction and code sinking.</li>
299
300 <li>Progress has been made on a direct Mach-o .o file writer. Many small 
301     apps work, but it is still not quite complete.</li>
302
303 </ul>
304
305 <p>In addition, the LLVM target description format has itself been extended in
306  several ways:</p>
307  
308 <ul>
309 <li>Extended TargetData to support better target parameterization in
310     the .ll/.bc files, eliminating the 'pointersize/endianness' attributes
311     in the files (<a href="http://llvm.org/PR761">PR761</a>).</li>
312
313 <li>TargetData was generalized for finer grained alignment handling,
314     handling of vector alignment, and handling of preferred alignment</li>
315
316 <li>LLVM now supports describing target calling conventions  
317     explicitly in .td files, reducing the amount of C++ code that needs  
318     to be written for a port.</li>
319
320 </ul>
321
322 </div>
323
324 <!--_________________________________________________________________________-->
325 <div class="doc_subsubsection"><a name="specifictargets">Target-Specific
326 Improvements</a></div>
327
328 <div class="doc_text">
329
330 <p>X86-specific Code Generator Enhancements:
331 </p>
332
333 <ul>
334 <li>The MMX instruction set is now supported through intrinsics.</li>
335 <li>The scheduler was improved to better reduce register pressure on  
336     X86 and other targets that are register pressure sensitive.</li>
337 <li>Linux/x86-64 support is much better.</li>
338 <li>PIC support for linux/x86 has been added.</li>
339 <li>The X86 backend now supports the GCC regparm attribute.</li>
340 <li>LLVM now supports inline asm with multiple constraint letters per operand 
341     (like "ri") which is common in X86 inline asms.</li>
342 </ul>
343
344 <p>ARM-specific Code Generator Enhancements:</p>
345
346 <ul>
347 <li>The ARM code generator is now stable and fully supported.</li>
348
349 <li>There are major new features, including support for ARM 
350     v4-v6 chips, vfp support, soft float point support, pre/postinc support,
351     load/store multiple generation, constant pool entry motion (to support
352     large functions), and inline asm support, weak linkage support, static
353     ctor/dtor support and many bug fixes.</li>
354 <li>Added support for Thumb code generation (<tt>llc -march=thumb</tt>).</li>
355
356 <li>The ARM backend now supports the ARM AAPCS/EABI ABI and PIC codegen on 
357     arm/linux.</li>
358
359 <li>Several bugs were fixed for DWARF debug info generation on arm/linux.</li>
360 </ul>
361
362 <p>PowerPC-specific Code Generator Enhancements:</p>
363
364 <ul>
365 <li>The PowerPC 64 JIT now supports addressing code loaded above the 2G
366      boundary.</li>
367
368 <li>Improved support for the Linux/ppc ABI and the linux/ppc JIT is fully 
369     functional now.  llvm-gcc and static compilation are not fully supported 
370     yet though.</li>
371
372 <li>Many PowerPC 64 bug fixes.</li>
373
374 </ul>
375
376 </div>
377
378
379 <!--_________________________________________________________________________-->
380 <div class="doc_subsubsection"><a name="other">Other Improvements</a></div>
381 <div class="doc_text">
382
383 <p>More specific changes include:</p>
384
385 <ul>
386 <li>LLVM no longer relies on static destructors to shut itself down.  Instead,
387     it lazily initializes itself and shuts down when <tt>llvm_shutdown()</tt> is 
388     explicitly called.</li>
389
390 <li>LLVM now has significantly fewer static constructors, reducing startup time.
391     </li>
392
393 <li>Several classes have been refactored to reduce the amount of code that
394     gets linked into apps that use the JIT.</li>
395
396 <li>Construction of intrinsic function declarations has been simplified.</li>
397
398 <li>The gccas/gccld tools have been replaced with small shell scripts.</li>
399
400 <li>Support has been added to llvm-test for running on low-memory  
401     or slow machines (make SMALL_PROBLEM_SIZE=1).</li>
402
403 </ul>
404 </div>
405
406 <!--_________________________________________________________________________-->
407 <div class="doc_subsubsection"><a name="apichanges">API Changes</a></div>
408 <div class="doc_text">
409
410 <p>LLVM 2.0 contains a revamp of the type system and several other significant
411 internal changes.  If you are programming to the C++ API, be aware of the
412 following major changes:</p>
413
414 <ul>
415 <li>Pass registration is slightly different in LLVM 2.0 (you now need an
416    intptr_t in your constructor), as explained in the <a 
417    href="WritingAnLLVMPass.html#basiccode">Writing an LLVM Pass</a>
418    document.</li>
419    
420 <li><tt>ConstantBool</tt>, <tt>ConstantIntegral</tt> and <tt>ConstantInt</tt>
421     classes have been merged together, we now just have
422     <tt>ConstantInt</tt>.</li>
423
424 <li><tt>Type::IntTy</tt>, <tt>Type::UIntTy</tt>, <tt>Type::SByteTy</tt>, ... are
425     replaced by <tt>Type::Int8Ty</tt>, <tt>Type::Int16Ty</tt>, etc.  LLVM types
426     have always corresponded to fixed size types
427     (e.g. long was always 64-bits), but the type system no longer includes
428     information about the sign of the type.</li>
429
430 <li>Several classes (<tt>CallInst</tt>, <tt>GetElementPtrInst</tt>,
431     <tt>ConstantArray</tt>, etc), that once took <tt>std::vector</tt> as
432      arguments now take ranges instead.   For example, you can create a
433     <tt>GetElementPtrInst</tt> with code like:
434     
435     <pre>
436       Value *Ops[] = { Op1, Op2, Op3 };
437       GEP = new GetElementPtrInst(BasePtr, Ops, 3);
438     </pre>
439     
440     This avoids creation of a temporary vector (and a call to malloc/free).  If
441     you have an std::vector, use code like this:
442     <pre>
443       std::vector&lt;Value*&gt; Ops = ...;
444       GEP = new GetElementPtrInst(BasePtr, &amp;Ops[0], Ops.size());
445     </pre>
446
447     </li>
448     
449 <li>CastInst is now abstract and its functionality is split into several parts,
450     one for each of the <a href="LangRef.html#convertops">new cast
451     instructions</a>.</li>
452
453 <li><tt>Instruction::getNext()/getPrev()</tt> are now private (along with
454     <tt>BasicBlock::getNext</tt>, etc), for efficiency reasons (they are now no
455     longer just simple pointers).  Please use BasicBlock::iterator, etc instead.
456 </li>
457
458 <li><tt>Module::getNamedFunction()</tt> is now called
459     <tt>Module::getFunction()</tt>.</li>
460
461 <li><tt>SymbolTable.h</tt> has been split into <tt>ValueSymbolTable.h</tt> and 
462 <tt>TypeSymbolTable.h</tt>.</li>
463 </ul>
464 </div>
465
466
467 <!-- *********************************************************************** -->
468 <div class="doc_section">
469   <a name="portability">Portability and Supported Platforms</a>
470 </div>
471 <!-- *********************************************************************** -->
472
473 <div class="doc_text">
474
475 <p>LLVM is known to work on the following platforms:</p>
476
477 <ul>
478   <li>Intel and AMD machines running Red Hat Linux, Fedora Core and FreeBSD 
479       (and probably other unix-like systems).</li>
480 <li>Intel and AMD machines running on Win32 using MinGW libraries (native)</li>
481 <li>Sun UltraSPARC workstations running Solaris 8.</li>
482 <li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
483     support is available for native builds with Visual C++).</li>
484 <li>PowerPC and X86-based Mac OS X systems, running 10.2 and above in 32-bit and
485     64-bit modes.</li>
486 <li>Alpha-based machines running Debian GNU/Linux.</li>
487 <li>Itanium-based machines running Linux and HP-UX.</li>
488 </ul>
489
490 <p>The core LLVM infrastructure uses
491 <a href="http://www.gnu.org/software/autoconf/">GNU autoconf</a> to adapt itself
492 to the machine and operating system on which it is built.  However, minor
493 porting may be required to get LLVM to work on new platforms.  We welcome your
494 portability patches and reports of successful builds or error messages.</p>
495
496 </div>
497
498 <!-- *********************************************************************** -->
499 <div class="doc_section">
500   <a name="knownproblems">Known Problems</a>
501 </div>
502 <!-- *********************************************************************** -->
503
504 <div class="doc_text">
505
506 <p>This section contains all known problems with the LLVM system, listed by
507 component.  As new problems are discovered, they will be added to these
508 sections.  If you run into a problem, please check the <a
509 href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
510 there isn't already one.</p>
511
512 </div>
513
514 <!-- ======================================================================= -->
515 <div class="doc_subsection">
516   <a name="experimental">Experimental features included with this release</a>
517 </div>
518
519 <div class="doc_text">
520
521 <p>The following components of this LLVM release are either untested, known to
522 be broken or unreliable, or are in early development.  These components should
523 not be relied on, and bugs should not be filed against them, but they may be
524 useful to some people.  In particular, if you would like to work on one of these
525 components, please contact us on the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
526
527 <ul>
528 <li>The <tt>-cee</tt> pass is known to be buggy, and may be removed in in a 
529     future release.</li>
530 <li>C++ EH support</li>
531 <li>The IA64 code generator is experimental.</li>
532 <li>The Alpha JIT is experimental.</li>
533 <li>"<tt>-filetype=asm</tt>" (the default) is the only supported value for the 
534     <tt>-filetype</tt> llc option.</li>
535 </ul>
536
537 </div>
538
539 <!-- ======================================================================= -->
540 <div class="doc_subsection">
541   <a name="x86-be">Known problems with the X86 back-end</a>
542 </div>
543
544 <div class="doc_text">
545
546 <ul>
547 <li>The X86 backend does not yet support <a href="http://llvm.org/PR879">inline
548     assembly that uses the X86 floating point stack</a>.</li>
549 </ul>
550
551 </div>
552
553 <!-- ======================================================================= -->
554 <div class="doc_subsection">
555   <a name="ppc-be">Known problems with the PowerPC back-end</a>
556 </div>
557
558 <div class="doc_text">
559
560 <ul>
561 <li><a href="http://llvm.org/PR642">PowerPC backend does not correctly
562 implement ordered FP comparisons</a>.</li>
563 <li>The Linux PPC32/ABI support needs testing for the interpreter and static
564 compilation, and lacks Dwarf debugging informations.
565 </ul>
566
567 </div>
568
569 <!-- ======================================================================= -->
570 <div class="doc_subsection">
571   <a name="arm-be">Known problems with the ARM back-end</a>
572 </div>
573
574 <div class="doc_text">
575
576 <ul>
577 <li>The Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
578 processors, any thumb program compiled with LLVM crashes or produces wrong
579 results. (<a href="http://llvm.org/PR1388">PR1388</a>)</li>
580 <li>Compilation for ARM Linux OABI (old ABI) is supported, but not fully tested.
581 </li>
582 <li>QEMU-ARM (<= 0.9.0) wrongly executes programs compiled with LLVM. A non-affected QEMU version must be used or this
583 <a href="http://cvs.savannah.nongnu.org/viewcvs/qemu/target-arm/translate.c?root=qemu&amp;r1=1.46&amp;r2=1.47&amp;makepatch=1&amp;diff_format=h">
584 patch</a> must be applied on QEMU.</li>
585 </ul>
586
587 </div>
588
589 <!-- ======================================================================= -->
590 <div class="doc_subsection">
591   <a name="sparc-be">Known problems with the SPARC back-end</a>
592 </div>
593
594 <div class="doc_text">
595
596 <ul>
597 <li>The SPARC backend only supports the 32-bit SPARC ABI (-m32), it does not
598     support the 64-bit SPARC ABI (-m64).</li>
599 </ul>
600
601 </div>
602
603 <!-- ======================================================================= -->
604 <div class="doc_subsection">
605   <a name="alpha-be">Known problems with the Alpha back-end</a>
606 </div>
607
608 <div class="doc_text">
609
610 <ul>
611
612 <li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
613 appropriate nops inserted to ensure restartability.</li>
614
615 </ul>
616 </div>
617
618 <!-- ======================================================================= -->
619 <div class="doc_subsection">
620   <a name="ia64-be">Known problems with the IA64 back-end</a>
621 </div>
622
623 <div class="doc_text">
624
625 <ul>
626
627 <li>C++ programs are likely to fail on IA64, as calls to <tt>setjmp</tt> are
628 made where the argument is not 16-byte aligned, as required on IA64. (Strictly
629 speaking this is not a bug in the IA64 back-end; it will also be encountered
630 when building C++ programs using the C back-end.)</li>
631
632 <li>The C++ front-end does not use <a href="http://llvm.org/PR406">IA64
633 ABI compliant layout of v-tables</a>.  In particular, it just stores function
634 pointers instead of function descriptors in the vtable.  This bug prevents
635 mixing C++ code compiled with LLVM with C++ objects compiled by other C++
636 compilers.</li>
637
638 <li>There are a few ABI violations which will lead to problems when mixing LLVM
639 output with code built with other compilers, particularly for floating-point
640 programs.</li>
641
642 <li>Defining vararg functions is not supported (but calling them is ok).</li>
643
644 <li>The Itanium backend has bitrotted somewhat.</li>
645 </ul>
646
647 </div>
648
649 <!-- ======================================================================= -->
650 <div class="doc_subsection">
651   <a name="c-be">Known problems with the C back-end</a>
652 </div>
653
654 <div class="doc_text">
655
656 <ul>
657 <li><a href="http://llvm.org/PR802">The C backend does not support inline
658     assembly code</a>.</li>
659 </ul>
660
661 </div>
662
663
664 <!-- ======================================================================= -->
665 <div class="doc_subsection">
666   <a name="c-fe">Known problems with the C front-end</a>
667 </div>
668
669 <!-- _______________________________________________________________________ -->
670 <div class="doc_subsubsection">Bugs</div>
671
672 <div class="doc_text">
673
674 <p>llvm-gcc4 does not currently support <a href="http://llvm.org/PR869">Link-Time 
675 Optimization</a> on most platforms "out-of-the-box".  Please inquire on the 
676 llvmdev mailing list if you are interested.</p>
677
678 </div>
679
680 <!-- _______________________________________________________________________ -->
681 <div class="doc_subsubsection">
682   Notes
683 </div>
684
685 <div class="doc_text">
686 <ul>
687
688 <li><p>"long double" is silently transformed by the front-end into "double".  There
689 is no support for floating point data types of any size other than 32 and 64
690 bits.</p></li>
691     
692 <li><p>llvm-gcc does <b>not</b> support <tt>__builtin_apply</tt> yet.
693   See <a href="http://gcc.gnu.org/onlinedocs/gcc/Constructing-Calls.html#Constructing%20Calls">Constructing Calls</a>: Dispatching a call to another function.</p>
694 </li>
695
696 <li><p>llvm-gcc <b>partially</b> supports these GCC extensions:</p>
697   <ol>
698   <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.<br>
699       Nested functions are supported, but llvm-gcc does not support non-local
700       gotos or taking the address of a nested function.</li>
701
702   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function%20Attributes">Function Attributes</a>:
703
704       Declaring that functions have no side effects or that they can never
705       return.<br>
706
707       <b>Supported:</b> <tt>alias</tt>, <tt>always_inline</tt>, <tt>cdecl</tt>,
708       <tt>constructor</tt>, <tt>destructor</tt>,
709       <tt>deprecated</tt>, <tt>fastcall</tt>, <tt>format</tt>, 
710       <tt>format_arg</tt>, <tt>non_null</tt>, <tt>noreturn</tt>, <tt>regparm</tt>
711       <tt>section</tt>, <tt>stdcall</tt>, <tt>unused</tt>, <tt>used</tt>, 
712       <tt>visibility</tt>, <tt>warn_unused_result</tt>, <tt>weak</tt><br>
713
714       <b>Ignored:</b> <tt>noinline</tt>, <tt>pure</tt>, <tt>const</tt>, <tt>nothrow</tt>,
715       <tt>malloc</tt>, <tt>no_instrument_function</tt></li>
716   </ol>
717 </li>
718
719 <li><p>llvm-gcc supports the vast majority of GCC extensions, including:</p>
720
721   <ol>
722   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html#Pragmas">Pragmas</a>: Pragmas accepted by GCC.</li>
723   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Local-Labels.html#Local%20Labels">Local Labels</a>: Labels local to a block.</li>
724   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other%20Builtins">Other Builtins</a>:
725       Other built-in functions.</li>
726   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html#Variable%20Attributes">Variable Attributes</a>:
727       Specifying attributes of variables.</li>
728   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html#Type%20Attributes">Type Attributes</a>:   Specifying attributes of types.</li>
729   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Thread_002dLocal.html">Thread-Local</a>: Per-thread variables.</li>
730   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html#Variable%20Length">Variable Length</a>:
731       Arrays whose length is computed at run time.</li>
732   <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>
733   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html#Statement%20Exprs">Statement Exprs</a>:   Putting statements and declarations inside expressions.</li>
734   <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>
735   <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>
736   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals">Conditionals</a>: Omitting the middle operand of a <code>?:</code> expression.</li>
737   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html#Long%20Long">Long Long</a>: Double-word integers.</li>
738   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex">Complex</a>:   Data types for complex numbers.</li>
739   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Hex-Floats.html#Hex%20Floats">Hex Floats</a>:Hexadecimal floating-point constants.</li>
740   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html#Zero%20Length">Zero Length</a>: Zero-length arrays.</li>
741   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html#Empty%20Structures">Empty Structures</a>: Structures with no members.</li>
742   <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>
743   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Escaped-Newlines.html#Escaped%20Newlines">Escaped Newlines</a>:  Slightly looser rules for escaped newlines.</li>
744   <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>
745   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Constraints.html#Constraints">Constraints</a>: Constraints for asm operands.</li>
746   <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>
747   <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>
748   <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>
749   <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>
750   <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>
751   <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>
752   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Initializers.html#Initializers">Initializers</a>: Non-constant initializers.</li>
753   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html#Compound%20Literals">Compound Literals</a>: Compound literals give structures, unions,
754 or arrays as values.</li>
755   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html#Designated%20Inits">Designated Inits</a>: Labeling elements of initializers.</li>
756   <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>
757   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html#Case%20Ranges">Case Ranges</a>: `case 1 ... 9' and such.</li>
758   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html#Mixed%20Declarations">Mixed Declarations</a>: Mixing declarations and code.</li>
759   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Prototypes.html#Function%20Prototypes">Function Prototypes</a>: Prototype declarations and old-style definitions.</li>
760   <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>
761   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html#Dollar%20Signs">Dollar Signs</a>: Dollar sign is allowed in identifiers.</li>
762   <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>
763   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Alignment.html#Alignment">Alignment</a>: Inquiring about the alignment of a type or variable.</li>
764   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline">Inline</a>: Defining inline functions (as fast as macros).</li>
765   <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>
766   <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>
767   <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>
768   <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>
769   <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>
770   <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute%20Syntax">Attribute Syntax</a>: Formal syntax for attributes.</li>
771   </ol></li>
772
773 </ul>
774
775 <p>If you run into GCC extensions which have not been included in any of these
776 lists, please let us know (also including whether or not they work).</p>
777
778 </div>
779
780 <!-- ======================================================================= -->
781 <div class="doc_subsection">
782   <a name="c++-fe">Known problems with the C++ front-end</a>
783 </div>
784
785 <div class="doc_text">
786
787 <p>The C++ front-end is considered to be fully
788 tested and works for a number of non-trivial programs, including LLVM
789 itself, Qt, Mozilla, etc.</p>
790
791 <ul>
792 <li>llvm-gcc4 only has partial support for <a href="http://llvm.org/PR870">C++ 
793 Exception Handling</a>, and it is not enabled by default.</li>
794
795 <!-- NO EH Support!
796
797 <li>Destructors for local objects are not always run when a <tt>longjmp</tt> is
798     performed. In particular, destructors for objects in the <tt>longjmp</tt>ing
799     function and in the <tt>setjmp</tt> receiver function may not be run.
800     Objects in intervening stack frames will be destroyed, however (which is
801     better than most compilers).</li>
802
803 <li>The LLVM C++ front-end follows the <a
804     href="http://www.codesourcery.com/cxx-abi">Itanium C++ ABI</a>.
805     This document, which is not Itanium specific, specifies a standard for name
806     mangling, class layout, v-table layout, RTTI formats, and other C++
807     representation issues.  Because we use this API, code generated by the LLVM
808     compilers should be binary compatible with machine code generated by other
809     Itanium ABI C++ compilers (such as G++, the Intel and HP compilers, etc).
810     <i>However</i>, the exception handling mechanism used by llvm-gcc3 is very
811     different from the model used in the Itanium ABI, so <b>exceptions will not
812     interact correctly</b>. </li>
813 -->
814 </ul>
815
816 </div>
817
818
819
820 <!-- *********************************************************************** -->
821 <div class="doc_section">
822   <a name="additionalinfo">Additional Information</a>
823 </div>
824 <!-- *********************************************************************** -->
825
826 <div class="doc_text">
827
828 <p>A wide variety of additional information is available on the <a
829 href="http://llvm.org">LLVM web page</a>, in particular in the <a
830 href="http://llvm.org/docs/">documentation</a> section.  The web page also
831 contains versions of the API documentation which is up-to-date with the CVS
832 version of the source code.
833 You can access versions of these documents specific to this release by going
834 into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
835
836 <p>If you have any questions or comments about LLVM, please feel free to contact
837 us via the <a href="http://llvm.org/docs/#maillist"> mailing
838 lists</a>.</p>
839
840 </div>
841
842 <!-- *********************************************************************** -->
843
844 <hr>
845 <address>
846   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
847   src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
848   <a href="http://validator.w3.org/check/referer"><img
849   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
850
851   <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
852   Last modified: $Date$
853 </address>
854
855 </body>
856 </html>