note the removal of deprecated interfaces
[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.5 Release Notes</title>
8 </head>
9 <body>
10
11 <div class="doc_title">LLVM 2.5 Release Notes</div>
12
13 <ol>
14   <li><a href="#intro">Introduction</a></li>
15   <li><a href="#subproj">Sub-project Status Update</a></li>
16   <li><a href="#externalproj">External Projects Using LLVM 2.5</a></li>
17   <li><a href="#whatsnew">What's New in LLVM 2.5?</a></li>
18   <li><a href="GettingStarted.html">Installation Instructions</a></li>
19   <li><a href="#portability">Portability and Supported Platforms</a></li>
20   <li><a href="#knownproblems">Known Problems</a></li>
21   <li><a href="#additionalinfo">Additional Information</a></li>
22 </ol>
23
24 <div class="doc_author">
25   <p>Written by the <a href="http://llvm.org">LLVM Team</a></p>
26 </div>
27
28 <!-- *********************************************************************** -->
29 <div class="doc_section">
30   <a name="intro">Introduction</a>
31 </div>
32 <!-- *********************************************************************** -->
33
34 <div class="doc_text">
35
36 <p>This document contains the release notes for the LLVM Compiler
37 Infrastructure, release 2.5.  Here we describe the status of LLVM, including
38 major improvements from the previous release and significant known problems.
39 All LLVM releases may be downloaded from the <a
40 href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
41
42 <p>For more information about LLVM, including information about the latest
43 release, please check out the <a href="http://llvm.org/">main LLVM
44 web site</a>.  If you have questions or comments, the <a
45 href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's Mailing
46 List</a> is a good place to send them.</p>
47
48 <p>Note that if you are reading this file from a Subversion checkout or the
49 main LLVM web page, this document applies to the <i>next</i> release, not the
50 current one.  To see the release notes for a specific release, please see the
51 <a href="http://llvm.org/releases/">releases page</a>.</p>
52
53 </div>
54
55 <!-- Unfinished features in 2.5:
56   Machine LICM
57   Machine Sinking
58   target-specific intrinsics
59   gold lto plugin
60   pre-alloc splitter, strong phi elim
61   <tt>llc -enable-value-prop</tt>, propagation of value info
62        (sign/zero ext info) from one MBB to another
63   debug info for optimized code
64   interpreter + libffi
65   postalloc scheduler: anti dependence breaking, hazard recognizer?
66
67 initial support for debug line numbers when optimization enabled, not useful in
68   2.5 but will be for 2.6.
69
70  -->
71
72  <!-- for announcement email:
73    -->
74
75 <!-- *********************************************************************** -->
76 <div class="doc_section">
77   <a name="subproj">Sub-project Status Update</a>
78 </div>
79 <!-- *********************************************************************** -->
80
81 <div class="doc_text">
82 <p>
83 The LLVM 2.5 distribution currently consists of code from the core LLVM
84 repository &mdash;which roughly includes the LLVM optimizers, code generators
85 and supporting tools &mdash; and the llvm-gcc repository.  In addition to this
86 code, the LLVM Project includes other sub-projects that are in development.  The
87 two which are the most actively developed are the <a href="#clang">Clang
88 Project</a> and the <a href="#vmkit">VMKit Project</a>.
89 </p>
90
91 </div>
92
93
94 <!--=========================================================================-->
95 <div class="doc_subsection">
96 <a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
97 </div>
98
99 <div class="doc_text">
100
101 <p>The <a href="http://clang.llvm.org/">Clang project</a> is an effort to build
102 a set of new 'LLVM native' front-end technologies for the LLVM optimizer and
103 code generator.  While Clang is not included in the LLVM 2.5 release, it is
104 continuing to make major strides forward in all areas.  Its C and Objective-C
105 parsing and code generation support is now very solid.  For example, it is
106 capable of successfully building many real-world applications for X86-32
107 andX86-64,
108 including <a href="http://wiki.freebsd.org/BuildingFreeBSDWithClang">the FreeBSD
109 kernel</a>.  C++ is also
110 making <a href="http://clang.llvm.org/cxx_status.html">incredible progress</a>,
111 and work on templates has recently started.</p>
112
113 <p>While Clang is not yet production quality, it is progressing very nicely and
114 is quite usable for building many C and Objective-C applications.  If you are
115 interested in fast compiles and good diagnostics, we encourage you to try it out
116 by <a href="http://clang.llvm.org/get_started.html">building from mainline</a>
117 and reporting any issues you hit to the <a
118 href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">Clang front-end mailing
119 list</a>.</p>
120
121 <p>In the LLVM 2.5 time-frame, the Clang team has made many improvements:</p>
122
123 <ul>
124 <li>Clang now has a new driver, which is focused on providing a GCC-compatible
125     interface.</li>
126 <li>The X86-64 ABI is now supported.</li>
127 <li>Precompiled header support is now implemented.</li>
128 <li>Objective-C support is significantly improved beyond LLVM 2.4, supporting
129     many features, such as Objective-C Garbage Collection.</li>
130 <li>Many many bugs are fixed and many features have been added.</li>
131 </ul>
132 </div>
133
134 <!--=========================================================================-->
135 <div class="doc_subsection">
136 <a name="clangsa">Clang Static Analyzer</a>
137 </div>
138
139 <div class="doc_text">
140
141 <p>Previously announced in the last LLVM release, the Clang project also
142 includes an early stage static source code analysis tool for <a
143 href="http://clang.llvm.org/StaticAnalysis.html">automatically finding bugs</a>
144 in C and Objective-C programs. The tool performs a growing set of checks to find
145 bugs that occur on a specific path within a program.</p>
146
147 <p>In the LLVM 2.5 time-frame there have been many significant improvements to
148 the analyzer's core path simulation engine and machinery for generating
149 path-based bug reports to end-users. Particularly noteworthy improvements
150 include experimental support for full field-sensitivity and reasoning about heap
151 objects as well as an improved value-constraints subengine that does a much
152 better job of reasoning about inequality relationships (e.g., <tt>x &gt; 2</tt>)
153 between variables and constants.
154
155 <p>The set of checks performed by the static analyzer continue to expand, and
156 future plans for the tool include full source-level inter-procedural analysis
157 and deeper checks such as buffer overrun detection. There are many opportunities
158 to extend and enhance the static analyzer, and anyone interested in working on
159 this project is encouraged to get involved!</p>
160
161 </div>
162
163 <!--=========================================================================-->
164 <div class="doc_subsection">
165 <a name="vmkit">VMKit: JVM/CLI Virtual Machine Implementation</a>
166 </div>
167
168 <div class="doc_text">
169 <p>
170 The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation of
171 a JVM and a CLI Virtual Machines (Microsoft .NET is an
172 implementation of the CLI) using the Just-In-Time compiler of LLVM.</p>
173
174 <p>Following LLVM 2.5, VMKit has its second release that you can find on its
175 <a href="http://vmkit.llvm.org/releases/">webpage</a>. The release includes
176 bug fixes, cleanup and new features. The major changes are:</p>
177
178 <ul>
179
180 <li>Ahead of Time compiler: compiles .class files to llvm .bc. VMKit uses this
181 functionality to native compile the standard classes (e.g. java.lang.String).
182 Users can compile AoT .class files into dynamic libraries and run them with the
183 help of VMKit.</li>
184
185 <li>New exception model: the dwarf exception model is very slow for
186 exception-intensive applications, so the JVM has had a new implementation of
187 exceptions which check at each function call if an exception happened. There is
188 a low performance penalty on applications without exceptions, but it is a big
189 gain for exception-intensive applications. For example the jack benchmark in
190 Spec JVM98 is 6x faster (performance gain of 83%).</li>
191
192 <li>User-level management of thread stacks, so that thread local data access
193 at runtime is fast and portable. </li>
194
195 <li>Implementation of biased locking for faster object synchronizations at
196 runtime.</li>
197
198 <li>New support for OSX/X64, Linux/X64 (with the Boehm GC) and Linux/ppc32.</li>
199
200 </ul>
201 </div>
202
203 <!-- *********************************************************************** -->
204 <div class="doc_section">
205   <a name="externalproj">External Projects Using LLVM 2.5</a>
206 </div>
207 <!-- *********************************************************************** -->
208
209 <!--=========================================================================-->
210 <div class="doc_subsection">
211 <a name="pure">Pure</a>
212 </div>
213
214 <div class="doc_text">
215 <p>
216 <a href="http://pure-lang.googlecode.com/">Pure</a>
217 is an algebraic/functional programming language based on term rewriting.
218 Programs are collections of equations which are used to evaluate expressions in
219 a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation,
220 lexical closures, a hygienic macro system (also based on term rewriting),
221 built-in list and matrix support (including list and matrix comprehensions) and
222 an easy-to-use C interface. The interpreter uses LLVM as a backend to
223  JIT-compile Pure programs to fast native code.</p>
224
225 <p>In addition to the usual algebraic data structures, Pure also has
226 MATLAB-style matrices in order to support numeric computations and signal
227 processing in an efficient way. Pure is mainly aimed at mathematical
228 applications right now, but it has been designed as a general purpose language.
229 The dynamic interpreter environment and the C interface make it possible to use
230 it as a kind of functional scripting language for many application areas.
231 </p>
232 </div>
233
234
235 <!--=========================================================================-->
236 <div class="doc_subsection">
237 <a name="ldc">LLVM D Compiler</a>
238 </div>
239
240 <div class="doc_text">
241 <p>
242 <a href="http://www.dsource.org/projects/ldc">LDC</a> is an implementation of
243 the D Programming Language using the LLVM optimizer and code generator.
244 LDC project works great with the LLVM 2.5 release.  General improvements in this
245 cycle have included new inline asm constraint handling, better debug info
246 support, general bugfixes, and better x86-64 support.  This has allowed
247 some major improvements in LDC, getting us much closer to being as
248 fully featured as the original DMD compiler from DigitalMars.
249 </p>
250 </div>
251
252 <!--=========================================================================-->
253 <div class="doc_subsection">
254 <a name="RoadsendPHP">Roadsend PHP</a>
255 </div>
256
257 <div class="doc_text">
258 <p><a href="http://code.roadsend.com/rphp">Roadsend PHP</a> (rphp) is an open
259 source compiler for the PHP programming language that uses LLVM for its
260 optimizer, JIT, and static compiler.  This is a reimplementation of an earlier
261 project that is now based on the LLVM.</p>
262 </div>
263
264
265 <!-- *********************************************************************** -->
266 <div class="doc_section">
267   <a name="whatsnew">What's New in LLVM 2.5?</a>
268 </div>
269 <!-- *********************************************************************** -->
270
271 <div class="doc_text">
272
273 <p>This release includes a huge number of bug fixes, performance tweaks, and
274 minor improvements.  Some of the major improvements and new features are listed
275 in this section.
276 </p>
277 </div>
278
279 <!--=========================================================================-->
280 <div class="doc_subsection">
281 <a name="majorfeatures">Major New Features</a>
282 </div>
283
284 <div class="doc_text">
285
286 <p>LLVM 2.5 includes several major new capabilities:</p>
287
288 <ul>
289 <li>LLVM 2.5 includes a brand new <a
290 href="http://en.wikipedia.org/wiki/XCore">XCore</a> backend.</li>
291
292 <li>llvm-gcc now generally supports the GFortran front-end, and the precompiled
293 release binaries now support Fortran, even on Mac OS/X.</li>
294
295 <li>CMake is now used by the <a href="GettingStartedVS.html">LLVM build process
296 on Windows</a>.  It automatically generates Visual Studio project files (and
297 more) from a set of simple text files.  This makes it much easier to
298 maintain.  In time, we'd like to standardize on CMake for everything.</li>
299
300 <li>LLVM 2.5 now uses (and includes) Google Test for unit testing.</li>
301
302 <li>The LLVM native code generator now supports arbitrary precision integers.
303 Types like <tt>i33</tt> have long been valid in the LLVM IR, but were previously
304 only supported by the interpreter.  Note that the C backend still does not
305 support these.</li>
306
307 <li>LLVM 2.5 no longer uses 'bison', so it is easier to build on Windows.</li>
308 </ul>
309
310 </div>
311
312
313 <!--=========================================================================-->
314 <div class="doc_subsection">
315 <a name="llvm-gcc">llvm-gcc 4.2 Improvements</a>
316 </div>
317
318 <div class="doc_text">
319
320 <p>LLVM fully supports the llvm-gcc 4.2 front-end, which marries the GCC
321 front-ends and driver with the LLVM optimizer and code generator.  It currently
322 includes support for the C, C++, Objective-C, Ada, and Fortran front-ends.</p>
323
324 <ul>
325 <li>In this release, the GCC inliner is completely disabled.  Previously the GCC
326 inliner was used to handle always-inline functions and other cases.  This caused
327 problems with code size growth, and it is completely disabled in this
328 release.</li>
329
330 <li>llvm-gcc (and LLVM in general) now support code generation for stack
331 canaries, which is an effective form of <a
332 href="http://en.wikipedia.org/wiki/Stack-smashing_protection">buffer overflow
333 protection</a>.  llvm-gcc supports this with the <tt>-fstack-protector</tt>
334 command line option (just like GCC).  In LLVM IR, you can request code
335 generation for stack canaries with function attributes.
336 </li>
337 </ul>
338
339 </div>
340
341
342 <!--=========================================================================-->
343 <div class="doc_subsection">
344 <a name="coreimprovements">LLVM IR and Core Improvements</a>
345 </div>
346
347 <div class="doc_text">
348 <p>LLVM IR has several new features that are used by our existing front-ends and
349 can be useful if you are writing a front-end for LLVM:</p>
350
351 <ul>
352 <li>The <a href="LangRef.html#i_shufflevector">shufflevector</a> instruction 
353 has been generalized to allow different shuffle mask width than its input
354 vectors.  This allows you to use shufflevector to combine two
355 "&lt;4 x float&gt;" vectors into a "&lt;8 x float&gt;" for example.</li>
356
357 <li>LLVM IR now supports new intrinsics for computing and acting on <a 
358 href="LangRef.html#int_overflow">overflow of integer operations</a>. This allows
359 efficient code generation for languages that must trap or throw an exception on
360 overflow.  While these intrinsics work on all targets, they only generate
361 efficient code on X86 so far.</li>
362
363 <li>LLVM IR now supports a new <a href="LangRef.html#linkage">private
364 linkage</a> type to produce labels that are stripped by the assembler before it
365 produces a .o file (thus they are invisible to the linker).</li>
366
367 <li>LLVM IR supports two new attributes for better alias analysis.  The <a
368 href="LangRef.html#paramattrs">noalias</a> attribute can now be used on the
369 return value of a function to indicate that it returns new memory (e.g.
370 'malloc', 'calloc', etc).</li>
371
372 <li>The new <a href="LangRef.html#paramattrs">nocapture</a> attribute can be
373 used on pointer arguments to functions that access through but do not return the
374 pointer in a data structure that out lives the call (e.g. 'strlen', 'memcpy',
375 and many others).  The simplifylibcalls pass applies these attributes to
376 standard libc functions.</li>
377
378 <li>The parser for ".ll" files in lib/AsmParser is now completely rewritten as a
379 recursive descent parser.  This parser produces better error messages (including
380 caret diagnostics) is less fragile (less likely to crash on strange things) does
381 not leak memory, is more efficient, and eliminates LLVM's last use of the
382 'bison' tool.</li>
383
384 <li>Debug information representation and manipulation internals have been
385     consolidated to use a new set of classes in
386     <tt>llvm/Analysis/DebugInfo.h</tt> classes.  These routines are more
387     efficient, robust, and extensible and replace the older mechanisms.
388     llvm-gcc, clang, and the code generator now use them to create and process
389     debug information.</li>
390
391 </ul>
392
393 </div>
394
395 <!--=========================================================================-->
396 <div class="doc_subsection">
397 <a name="optimizer">Optimizer Improvements</a>
398 </div>
399
400 <div class="doc_text">
401
402 <p>In addition to a huge array of bug fixes and minor performance tweaks, this
403 release includes a few major enhancements and additions to the optimizers:</p>
404
405 <ul>
406
407 <li>The loop optimizer now improves floating point induction variables in
408 several ways, including adding shadow induction variables to avoid
409 "integer &lt;-&gt; floating point" conversions in loops when safe.</li>
410
411 <li>The "-mem2reg" pass is now much faster on code with huge basic blocks.</li>
412
413 <li>The "-jump-threading" pass is more powerful: it is iterative
414   and handles threading based on values with fully and partially redundant
415   loads.</li>
416
417 <li>The "-memdep" memory dependence analysis pass (used by GVN and memcpyopt) is
418     both faster and more aggressive.</li>
419
420 <li>The "-scalarrepl" scalar replacement of aggregates pass is more aggressive
421     about promoting unions to registers.</li>
422
423 </ul>
424
425 </div>
426
427 <!--=========================================================================-->
428 <div class="doc_subsection">
429 <a name="codegen">Target Independent Code Generator Improvements</a>
430 </div>
431
432 <div class="doc_text">
433
434 <p>We have put a significant amount of work into the code generator
435 infrastructure, which allows us to implement more aggressive algorithms and make
436 it run faster:</p>
437
438 <ul>
439 <li>The <a href="WritingAnLLVMBackend.html">Writing an LLVM Compiler
440 Backend</a> document has been greatly expanded and is substantially more
441 complete.</li>
442
443 <li>The SelectionDAG type legalization logic has been completely rewritten, is
444 now more powerful (it supports arbitrary precision integer types for example),
445 and more correct in several corner cases.  The type legalizer converts
446 operations on types that are not natively supported by the target machine into
447 equivalent code sequences that only use natively supported types.  The old type
448 legalizer is still available (for now) and will be used if
449 <tt>-disable-legalize-types</tt> is passed to the code generator.
450 </li>
451
452 <li>The code generator now supports widening illegal vectors to larger legal
453 ones (for example, converting operations on &lt;3 x float&gt; to work on
454 &lt;4 x float&gt;) which is very important for common graphics
455 applications.</li>
456
457 <li>The assembly printers for each target are now split out into their own
458 libraries that are separate from the main code generation logic.  This reduces
459 code size of JIT compilers by not requiring them to be linked in.</li>
460
461 <li>The 'fast' instruction selection path (used at -O0 and for fast JIT
462     compilers) now supports accelerating codegen for code that uses exception
463     handling constructs.</li>
464     
465 <li>The optional PBQP register allocator now supports register coalescing.</li>
466 </ul>
467 </div>
468
469 <!--=========================================================================-->
470 <div class="doc_subsection">
471 <a name="x86">X86-32 and X86-64 Target Improvements</a>
472 </div>
473
474 <div class="doc_text">
475 <p>New features of the X86 target include:
476 </p>
477
478 <ul>
479 <li>The <tt><a href="LangRef.html#int_returnaddress">llvm.returnaddress</a></tt>
480 intrinsic (which is used to implement <tt>__builtin_return_address</tt>) now
481 supports non-zero stack depths on X86.</li>
482
483 <li>The X86 backend now supports code generation of vector shift operations
484 using SSE instructions.</li>
485
486 <li>X86-64 code generation now takes advantage of red zone, unless the
487 <tt>-mno-red-zone</tt> option is specified.</li>
488
489 <li>The X86 backend now supports using address space #256 in LLVM IR as a way of
490 performing memory references off the GS segment register.  This allows a
491 front-end to take advantage of very low-level programming techniques when
492 targeting X86 CPUs. See <tt>test/CodeGen/X86/movgs.ll</tt> for a simple
493 example.</li>
494
495 <li>The X86 backend now supports a <tt>-disable-mmx</tt> command line option to
496   prevent use of MMX even on chips that support it.  This is important for cases
497   where code does not contain the proper <tt>llvm.x86.mmx.emms</tt>
498   intrinsics.</li>
499
500 <li>The X86 JIT now detects the new Intel <a 
501    href="http://en.wikipedia.org/wiki/Intel_Core_i7">Core i7</a> and <a
502    href="http://en.wikipedia.org/wiki/Intel_Atom">Atom</a> chips;
503     auto-configuring itself appropriately for the features of these chips.</li>
504     
505 <li>The JIT now supports exception handling constructs on Linux/X86-64 and
506     Darwin/x86-64.</li>
507
508 <li>The JIT supports Thread Local Storage (TLS) on Linux/X86-32 but not yet on
509     X86-64.</li>
510 </ul>
511
512 </div>
513
514 <!--=========================================================================-->
515 <div class="doc_subsection">
516 <a name="pic16">PIC16 Target Improvements</a>
517 </div>
518
519 <div class="doc_text">
520 <p>New features of the PIC16 target include:
521 </p>
522
523 <ul>
524 <li>Both direct and indirect load/stores work now.</li>
525 <li>Logical, bitwise and conditional operations now work for integer data
526 types.</li>
527 <li>Function calls involving basic types work now.</li>
528 <li>Support for integer arrays.</li>
529 <li>Compiler can now emit libcalls for operations not supported by m/c
530 instructions.</li>
531 <li>Support for both data and ROM address spaces.</li>
532 </ul>
533
534 <p>Things not yet supported:</p>
535
536 <ul>
537 <li>Floating point.</li>
538 <li>Passing/returning aggregate types to and from functions.</li>
539 <li>Variable arguments.</li>
540 <li>Indirect function calls.</li>
541 <li>Interrupts/programs.</li>
542 <li>Debug info.</li>
543 </ul>
544
545 </div>
546
547
548 <!--=========================================================================-->
549 <div class="doc_subsection">
550 <a name="llvmc">Improvements in LLVMC</a>
551 </div>
552
553 <div class="doc_text">
554 <p>New features include:</p>
555
556 <ul>
557 <li>Beginning with LLVM 2.5, <tt>llvmc2</tt> is known as
558  just <tt>llvmc</tt>. The old <tt>llvmc</tt> driver was removed.</li>
559
560 <li>The Clang plugin was substantially improved and is now enabled
561  by default. The command <tt>llvmc --clang</tt> can be now used as a
562  synonym to <tt>ccc</tt>.</li>
563
564 <li>There is now a <tt>--check-graph</tt> option, which is supposed to catch
565  common errors like multiple default edges, mismatched output/input language
566  names and cycles. In general, these checks can't be done at compile-time
567  because of the need to support plugins.</li>
568
569 <li>Plugins are now more flexible and can refer to compilation graph nodes and
570  options defined in other plugins. To manage dependencies, a priority-sorting
571  mechanism was introduced. This change affects the TableGen file syntax. See the
572  documentation for details.</li>
573
574 <li>Hooks can now be provided with arguments. The syntax is "<tt>$CALL(MyHook,
575  'Arg1', 'Arg2', 'Arg3')</tt>".</li>
576
577 <li>A new option type: multi-valued option, for options that take more than one
578  argument (for example, "<tt>-foo a b c</tt>").</li>
579
580 <li>New option properties: '<tt>one_or_more</tt>', '<tt>zero_or_more</tt>',
581 '<tt>hidden</tt>' and '<tt>really_hidden</tt>'.</li>
582
583 <li>The '<tt>case</tt>' expression gained an '<tt>error</tt>' action and
584  an '<tt>empty</tt>' test (equivalent to "<tt>(not (not_empty ...))</tt>").</li>
585
586 <li>Documentation now looks more consistent to the rest of the LLVM
587  docs. There is also a man page now.</li>
588
589 </ul>
590
591 </div>
592
593
594 <!--=========================================================================-->
595 <div class="doc_subsection">
596 <a name="changes">Major Changes and Removed Features</a>
597 </div>
598
599 <div class="doc_text">
600
601 <p>If you're already an LLVM user or developer with out-of-tree changes based
602 on LLVM 2.4, this section lists some "gotchas" that you may run into upgrading
603 from the previous release.</p>
604
605 <ul>
606
607 <li>llvm-gcc defaults to <tt>-fno-math-errno</tt> on all X86 targets.</li>
608
609 </ul>
610
611
612 <p>In addition, many APIs have changed in this release.  Some of the major LLVM
613 API changes are:</p>
614
615 <ul>
616 <li>Some deprecated interfaces to create <tt>Instruction</tt> subclasses, that
617     were spelled with lower case "create", have been removed.</li>
618 </ul>
619
620 </div>
621
622
623
624 <!-- *********************************************************************** -->
625 <div class="doc_section">
626   <a name="portability">Portability and Supported Platforms</a>
627 </div>
628 <!-- *********************************************************************** -->
629
630 <div class="doc_text">
631
632 <p>LLVM is known to work on the following platforms:</p>
633
634 <ul>
635 <li>Intel and AMD machines (IA32, X86-64, AMD64, EMT-64) running Red Hat
636 Linux, Fedora Core and FreeBSD (and probably other unix-like systems).</li>
637 <li>PowerPC and X86-based Mac OS X systems, running 10.3 and above in 32-bit
638 and 64-bit modes.</li>
639 <li>Intel and AMD machines running on Win32 using MinGW libraries (native).</li>
640 <li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
641     support is available for native builds with Visual C++).</li>
642 <li>Sun UltraSPARC workstations running Solaris 10.</li>
643 <li>Alpha-based machines running Debian GNU/Linux.</li>
644 <li>Itanium-based (IA64) machines running Linux and HP-UX.</li>
645 </ul>
646
647 <p>The core LLVM infrastructure uses GNU autoconf to adapt itself
648 to the machine and operating system on which it is built.  However, minor
649 porting may be required to get LLVM to work on new platforms.  We welcome your
650 portability patches and reports of successful builds or error messages.</p>
651
652 </div>
653
654 <!-- *********************************************************************** -->
655 <div class="doc_section">
656   <a name="knownproblems">Known Problems</a>
657 </div>
658 <!-- *********************************************************************** -->
659
660 <div class="doc_text">
661
662 <p>This section contains significant known problems with the LLVM system,
663 listed by component.  If you run into a problem, please check the <a
664 href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
665 there isn't already one.</p>
666
667 </div>
668
669 <!-- ======================================================================= -->
670 <div class="doc_subsection">
671   <a name="experimental">Experimental features included with this release</a>
672 </div>
673
674 <div class="doc_text">
675
676 <p>The following components of this LLVM release are either untested, known to
677 be broken or unreliable, or are in early development.  These components should
678 not be relied on, and bugs should not be filed against them, but they may be
679 useful to some people.  In particular, if you would like to work on one of these
680 components, please contact us on the <a
681 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
682
683 <ul>
684 <li>The MSIL, IA64, Alpha, SPU, MIPS, and PIC16 backends are experimental.</li>
685 <li>The <tt>llc</tt> "<tt>-filetype=asm</tt>" (the default) is the only
686     supported value for this option.</li>
687 </ul>
688
689 </div>
690
691 <!-- ======================================================================= -->
692 <div class="doc_subsection">
693   <a name="x86-be">Known problems with the X86 back-end</a>
694 </div>
695
696 <div class="doc_text">
697
698 <ul>
699   <li>The X86 backend does not yet support
700     all <a href="http://llvm.org/PR879">inline assembly that uses the X86
701     floating point stack</a>.  It supports the 'f' and 't' constraints, but not
702     'u'.</li>
703   <li>The X86 backend generates inefficient floating point code when configured
704     to generate code for systems that don't have SSE2.</li>
705   <li>Win64 code generation wasn't widely tested. Everything should work, but we
706     expect small issues to happen. Also, llvm-gcc cannot build mingw64 runtime
707     currently due
708     to <a href="http://llvm.org/PR2255">several</a>
709     <a href="http://llvm.org/PR2257">bugs</a> due to lack of support for the
710     'u' inline assembly constraint and X87 floating point inline assembly.</li>
711   <li>The X86-64 backend does not yet support the LLVM IR instruction
712       <tt>va_arg</tt>. Currently, the llvm-gcc and front-ends support variadic
713       argument constructs on X86-64 by lowering them manually.</li>
714 </ul>
715
716 </div>
717
718 <!-- ======================================================================= -->
719 <div class="doc_subsection">
720   <a name="ppc-be">Known problems with the PowerPC back-end</a>
721 </div>
722
723 <div class="doc_text">
724
725 <ul>
726 <li>The Linux PPC32/ABI support needs testing for the interpreter and static
727 compilation, and lacks support for debug information.</li>
728 </ul>
729
730 </div>
731
732 <!-- ======================================================================= -->
733 <div class="doc_subsection">
734   <a name="arm-be">Known problems with the ARM back-end</a>
735 </div>
736
737 <div class="doc_text">
738
739 <ul>
740 <li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
741 processors, thumb programs can crash or produce wrong
742 results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
743 <li>Compilation for ARM Linux OABI (old ABI) is supported, but not fully tested.
744 </li>
745 <li>There is a bug in QEMU-ARM (&lt;= 0.9.0) which causes it to incorrectly
746  execute
747 programs compiled with LLVM.  Please use more recent versions of QEMU.</li>
748 </ul>
749
750 </div>
751
752 <!-- ======================================================================= -->
753 <div class="doc_subsection">
754   <a name="sparc-be">Known problems with the SPARC back-end</a>
755 </div>
756
757 <div class="doc_text">
758
759 <ul>
760 <li>The SPARC backend only supports the 32-bit SPARC ABI (-m32), it does not
761     support the 64-bit SPARC ABI (-m64).</li>
762 </ul>
763
764 </div>
765
766 <!-- ======================================================================= -->
767 <div class="doc_subsection">
768   <a name="mips-be">Known problems with the MIPS back-end</a>
769 </div>
770
771 <div class="doc_text">
772
773 <ul>
774 <li>The O32 ABI is not fully supported.</li>
775 <li>64-bit MIPS targets are not supported yet.</li>
776 </ul>
777
778 </div>
779
780 <!-- ======================================================================= -->
781 <div class="doc_subsection">
782   <a name="alpha-be">Known problems with the Alpha back-end</a>
783 </div>
784
785 <div class="doc_text">
786
787 <ul>
788
789 <li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
790 appropriate nops inserted to ensure restartability.</li>
791
792 </ul>
793 </div>
794
795 <!-- ======================================================================= -->
796 <div class="doc_subsection">
797   <a name="ia64-be">Known problems with the IA64 back-end</a>
798 </div>
799
800 <div class="doc_text">
801
802 <ul>
803 <li>The Itanium backend is highly experimental, and has a number of known
804     issues.  We are looking for a maintainer for the Itanium backend.  If you
805     are interested, please contact the LLVMdev mailing list.</li>
806 </ul>
807
808 </div>
809
810 <!-- ======================================================================= -->
811 <div class="doc_subsection">
812   <a name="c-be">Known problems with the C back-end</a>
813 </div>
814
815 <div class="doc_text">
816
817 <ul>
818 <li><a href="http://llvm.org/PR802">The C backend has only basic support for
819     inline assembly code</a>.</li>
820 <li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
821     C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
822     C++ code compiled with <tt>llc</tt> or native compilers.</li>
823 <li>The C backend does not support all exception handling constructs.</li>
824 <li>The C backend does not support arbitrary precision integers.</li>
825 </ul>
826
827 </div>
828
829
830 <!-- ======================================================================= -->
831 <div class="doc_subsection">
832   <a name="c-fe">Known problems with the llvm-gcc C front-end</a>
833 </div>
834
835 <div class="doc_text">
836
837 <p>llvm-gcc does not currently support <a href="http://llvm.org/PR869">Link-Time
838 Optimization</a> on most platforms "out-of-the-box".  Please inquire on the
839 LLVMdev mailing list if you are interested.</p>
840
841 <p>The only major language feature of GCC not supported by llvm-gcc is
842     the <tt>__builtin_apply</tt> family of builtins.   However, some extensions
843     are only supported on some targets.  For example, trampolines are only
844     supported on some targets (these are used when you take the address of a
845     nested function).</p>
846
847 <p>If you run into GCC extensions which are not supported, please let us know.
848 </p>
849
850 </div>
851
852 <!-- ======================================================================= -->
853 <div class="doc_subsection">
854   <a name="c++-fe">Known problems with the llvm-gcc C++ front-end</a>
855 </div>
856
857 <div class="doc_text">
858
859 <p>The C++ front-end is considered to be fully
860 tested and works for a number of non-trivial programs, including LLVM
861 itself, Qt, Mozilla, etc.</p>
862
863 <ul>
864 <li>Exception handling works well on the X86 and PowerPC targets. Currently
865   only Linux and Darwin targets are supported (both 32 and 64 bit).</li>
866 </ul>
867
868 </div>
869
870 <!-- ======================================================================= -->
871 <div class="doc_subsection">
872   <a name="fortran-fe">Known problems with the llvm-gcc Fortran front-end</a>
873 </div>
874
875 <div class="doc_text">
876 <ul>
877 <li>Fortran support generally works, but there are still several unresolved bugs
878     in Bugzilla.  Please see the tools/gfortran component for details.</li>
879
880 <li>The Fortran front-end currently does not build on Darwin (without tweaks)
881     due to unresolved dependencies on the C front-end.</li>
882 </ul>
883 </div>
884
885 <!-- ======================================================================= -->
886 <div class="doc_subsection">
887   <a name="ada-fe">Known problems with the llvm-gcc Ada front-end</a>
888 </div>
889
890 <div class="doc_text">
891 The llvm-gcc 4.2 Ada compiler works fairly well, however this is not a mature
892 technology and problems should be expected.
893 <ul>
894 <li>The Ada front-end currently only builds on X86-32.  This is mainly due
895 to lack of trampoline support (pointers to nested functions) on other platforms,
896 however it <a href="http://llvm.org/PR2006">also fails to build on X86-64</a>
897 which does support trampolines.</li>
898 <li>The Ada front-end <a href="http://llvm.org/PR2007">fails to bootstrap</a>.
899 This is due to lack of LLVM support for <tt>setjmp</tt>/<tt>longjmp</tt> style
900 exception handling, which is used internally by the compiler.
901 Workaround: configure with --disable-bootstrap.</li>
902 <li>The c380004, <a href="http://llvm.org/PR2010">c393010</a>
903 and <a href="http://llvm.org/PR2421">cxg2021</a> ACATS tests fail
904 (c380004 also fails with gcc-4.2 mainline).
905 If the compiler is built with checks disabled then <a href="http://llvm.org/PR2010">c393010</a>
906 causes the compiler to go into an infinite loop, using up all system memory.</li>
907 <li>Some gcc specific Ada tests continue to crash the compiler.</li>
908 <li>The -E binder option (exception backtraces)
909 <a href="http://llvm.org/PR1982">does not work</a> and will result in programs
910 crashing if an exception is raised.  Workaround: do not use -E.</li>
911 <li>Only discrete types <a href="http://llvm.org/PR1981">are allowed to start
912 or finish at a non-byte offset</a> in a record.  Workaround: do not pack records
913 or use representation clauses that result in a field of a non-discrete type
914 starting or finishing in the middle of a byte.</li>
915 <li>The <tt>lli</tt> interpreter <a href="http://llvm.org/PR2009">considers
916 'main' as generated by the Ada binder to be invalid</a>.
917 Workaround: hand edit the file to use pointers for <tt>argv</tt> and
918 <tt>envp</tt> rather than integers.</li>
919 <li>The <tt>-fstack-check</tt> option <a href="http://llvm.org/PR2008">is
920 ignored</a>.</li>
921 </ul>
922 </div>
923
924 <!-- *********************************************************************** -->
925 <div class="doc_section">
926   <a name="additionalinfo">Additional Information</a>
927 </div>
928 <!-- *********************************************************************** -->
929
930 <div class="doc_text">
931
932 <p>A wide variety of additional information is available on the <a
933 href="http://llvm.org">LLVM web page</a>, in particular in the <a
934 href="http://llvm.org/docs/">documentation</a> section.  The web page also
935 contains versions of the API documentation which is up-to-date with the
936 Subversion version of the source code.
937 You can access versions of these documents specific to this release by going
938 into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
939
940 <p>If you have any questions or comments about LLVM, please feel free to contact
941 us via the <a href="http://llvm.org/docs/#maillist"> mailing
942 lists</a>.</p>
943
944 </div>
945
946 <!-- *********************************************************************** -->
947
948 <hr>
949 <address>
950   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
951   src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
952   <a href="http://validator.w3.org/check/referer"><img
953   src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
954
955   <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
956   Last modified: $Date$
957 </address>
958
959 </body>
960 </html>