blob: bdaba71b7430d341e663a0b1df71528fd743ff45 [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 Lattner38ab04c2009-02-25 04:41:31 +00007 <title>LLVM 2.5 Release Notes</title>
Misha Brukman500bc302003-11-22 00:38:41 +00008</head>
9<body>
Chris Lattner79c3fe12003-10-02 04:57:28 +000010
Chris Lattner38ab04c2009-02-25 04:41:31 +000011<div class="doc_title">LLVM 2.5 Release Notes</div>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000012
Chris Lattner79c3fe12003-10-02 04:57:28 +000013<ol>
Misha Brukman500bc302003-11-22 00:38:41 +000014 <li><a href="#intro">Introduction</a></li>
Chris Lattner96a445e2008-10-13 18:01:01 +000015 <li><a href="#subproj">Sub-project Status Update</a></li>
Chris Lattnerab68e9e2009-02-26 22:33:38 +000016 <li><a href="#externalproj">External Projects Using LLVM 2.5</a></li>
Chris Lattner917cc712009-03-02 02:37:32 +000017 <li><a href="#whatsnew">What's New in LLVM 2.5?</a></li>
Chris Lattner4b538b92004-04-30 22:17:12 +000018 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Misha Brukman500bc302003-11-22 00:38:41 +000019 <li><a href="#portability">Portability and Supported Platforms</a></li>
Dan Gohman44aa9212008-10-14 16:23:02 +000020 <li><a href="#knownproblems">Known Problems</a></li>
Misha Brukman500bc302003-11-22 00:38:41 +000021 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000022</ol>
23
Chris Lattner7911ce22004-05-23 21:07:27 +000024<div class="doc_author">
Dan Gohman44aa9212008-10-14 16:23:02 +000025 <p>Written by the <a href="http://llvm.org">LLVM Team</a></p>
Misha Brukman500bc302003-11-22 00:38:41 +000026</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000027
28<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +000029<div class="doc_section">
30 <a name="intro">Introduction</a>
31</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000032<!-- *********************************************************************** -->
33
Misha Brukman500bc302003-11-22 00:38:41 +000034<div class="doc_text">
35
Chris Lattnerf6662f92008-10-13 17:57:36 +000036<p>This document contains the release notes for the LLVM Compiler
Chris Lattner38ab04c2009-02-25 04:41:31 +000037Infrastructure, release 2.5. Here we describe the status of LLVM, including
Chris Lattnerf6662f92008-10-13 17:57:36 +000038major improvements from the previous release and significant known problems.
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +000039All LLVM releases may be downloaded from the <a
Chris Lattnerf6662f92008-10-13 17:57:36 +000040href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
Chris Lattner19092612003-10-02 16:38:05 +000041
Chris Lattner7506b1d2004-12-07 08:04:13 +000042<p>For more information about LLVM, including information about the latest
Chris Lattnerc463b272005-10-29 07:07:09 +000043release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattner47ad72c2003-10-07 21:38:31 +000044web site</a>. If you have questions or comments, the <a
Chris Lattnerf6662f92008-10-13 17:57:36 +000045href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's Mailing
46List</a> is a good place to send them.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +000047
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000048<p>Note that if you are reading this file from a Subversion checkout or the
Chris Lattner84977642007-09-21 03:54:09 +000049main LLVM web page, this document applies to the <i>next</i> release, not the
Gabor Greiffa933f82008-10-14 11:00:32 +000050current one. To see the release notes for a specific release, please see the
Chris Lattner84977642007-09-21 03:54:09 +000051<a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman500bc302003-11-22 00:38:41 +000052
53</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000054
Chris Lattner38ab04c2009-02-25 04:41:31 +000055<!-- Unfinished features in 2.5:
Chris Lattneracce85d2008-02-10 07:46:44 +000056 Machine LICM
57 Machine Sinking
Chris Lattner74c80df2009-02-25 06:34:50 +000058 target-specific intrinsics
59 gold lto plugin
Chris Lattner99f375b2009-02-25 07:32:53 +000060 pre-alloc splitter, strong phi elim
Gabor Greif4906abe2009-03-02 12:02:51 +000061 <tt>llc -enable-value-prop</tt>, propagation of value info
62 (sign/zero ext info) from one MBB to another
Chris Lattner74c80df2009-02-25 06:34:50 +000063 debug info for optimized code
Chris Lattnerc1771e32009-02-26 07:29:17 +000064 interpreter + libffi
Chris Lattnerab68e9e2009-02-26 22:33:38 +000065 postalloc scheduler: anti dependence breaking, hazard recognizer?
66
Chris Lattner917cc712009-03-02 02:37:32 +000067initial support for debug line numbers when optimization enabled, not useful in
68 2.5 but will be for 2.6.
69
Chris Lattneracce85d2008-02-10 07:46:44 +000070 -->
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000071
Chris Lattner547a3912008-10-12 19:47:48 +000072 <!-- for announcement email:
Chris Lattner74c80df2009-02-25 06:34:50 +000073 -->
Chris Lattneracce85d2008-02-10 07:46:44 +000074
Chris Lattner96a445e2008-10-13 18:01:01 +000075<!-- *********************************************************************** -->
76<div class="doc_section">
77 <a name="subproj">Sub-project Status Update</a>
Chris Lattnerea34f642008-06-08 21:34:41 +000078</div>
Chris Lattner96a445e2008-10-13 18:01:01 +000079<!-- *********************************************************************** -->
Chris Lattnerea34f642008-06-08 21:34:41 +000080
81<div class="doc_text">
Chris Lattner8348b472008-06-08 21:58:17 +000082<p>
Chris Lattner38ab04c2009-02-25 04:41:31 +000083The LLVM 2.5 distribution currently consists of code from the core LLVM
Bill Wendling6bc15282009-03-02 04:28:18 +000084repository &mdash;which roughly includes the LLVM optimizers, code generators
85and supporting tools &mdash; and the llvm-gcc repository. In addition to this
86code, the LLVM Project includes other sub-projects that are in development. The
87two which are the most actively developed are the <a href="#clang">Clang
88Project</a> and the <a href="#vmkit">VMKit Project</a>.
Bill Wendling63d8c552009-03-02 04:28:57 +000089</p>
Chris Lattner96a445e2008-10-13 18:01:01 +000090
Chris Lattner8348b472008-06-08 21:58:17 +000091</div>
92
Chris Lattner96a445e2008-10-13 18:01:01 +000093
Chris Lattner8348b472008-06-08 21:58:17 +000094<!--=========================================================================-->
Chris Lattner96a445e2008-10-13 18:01:01 +000095<div class="doc_subsection">
Chris Lattnerfb97b2d2008-10-13 18:11:54 +000096<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
Chris Lattner8348b472008-06-08 21:58:17 +000097</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
Bill Wendling6bc15282009-03-02 04:28:18 +0000102a set of new 'LLVM native' front-end technologies for the LLVM optimizer and
103code generator. While Clang is not included in the LLVM 2.5 release, it is
104continuing to make major strides forward in all areas. Its C and Objective-C
Chris Lattnerf40c40b2009-02-25 05:09:54 +0000105parsing and code generation support is now very solid. For example, it is
Bill Wendling6bc15282009-03-02 04:28:18 +0000106capable of successfully building many real-world applications for X86-32
Daniel Dunbare3d1b652009-03-02 20:08:12 +0000107and X86-64,
108including the <a href="http://wiki.freebsd.org/BuildingFreeBSDWithClang">FreeBSD
109kernel</a> and <a href="http://gcc.gnu.org/gcc-4.2/">gcc 4.2</a>. C++ is also
Bill Wendling6bc15282009-03-02 04:28:18 +0000110making <a href="http://clang.llvm.org/cxx_status.html">incredible progress</a>,
Daniel Dunbare3d1b652009-03-02 20:08:12 +0000111and work on templates has recently started. If you are
Chris Lattnerf40c40b2009-02-25 05:09:54 +0000112interested in fast compiles and good diagnostics, we encourage you to try it out
Chris Lattner74c80df2009-02-25 06:34:50 +0000113by <a href="http://clang.llvm.org/get_started.html">building from mainline</a>
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000114and reporting any issues you hit to the <a
Chris Lattnerf40c40b2009-02-25 05:09:54 +0000115href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">Clang front-end mailing
116list</a>.</p>
117
118<p>In the LLVM 2.5 time-frame, the Clang team has made many improvements:</p>
Bill Wendling741748a2008-10-27 09:27:33 +0000119
Daniel Dunbar13739432008-10-14 23:25:09 +0000120<ul>
Chris Lattnerf40c40b2009-02-25 05:09:54 +0000121<li>Clang now has a new driver, which is focused on providing a GCC-compatible
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000122 interface.</li>
Daniel Dunbare3d1b652009-03-02 20:08:12 +0000123<li>The X86-64 ABI is now supported, including support for the Apple
124 64-bit Objective-C runtime and zero cost exception handling.</li>
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000125<li>Precompiled header support is now implemented.</li>
Chris Lattnerf40c40b2009-02-25 05:09:54 +0000126<li>Objective-C support is significantly improved beyond LLVM 2.4, supporting
127 many features, such as Objective-C Garbage Collection.</li>
Daniel Dunbare3d1b652009-03-02 20:08:12 +0000128<li>Variable length arrays are now fully supported.</li>
129<li>C99 designated initializers are now fully supported.</li>
130<li>Clang now includes all major compiler headers, including a
131 redesigned <i>tgmath.h</i> and several more intrinsic headers.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000132<li>Many many bugs are fixed and many features have been added.</li>
Bill Wendling6bc15282009-03-02 04:28:18 +0000133</ul>
Chris Lattnerfb97b2d2008-10-13 18:11:54 +0000134</div>
135
136<!--=========================================================================-->
137<div class="doc_subsection">
138<a name="clangsa">Clang Static Analyzer</a>
139</div>
140
141<div class="doc_text">
142
Ted Kremenek8b3894c2009-02-27 07:01:32 +0000143<p>Previously announced in the last LLVM release, the Clang project also
144includes an early stage static source code analysis tool for <a
145href="http://clang.llvm.org/StaticAnalysis.html">automatically finding bugs</a>
146in C and Objective-C programs. The tool performs a growing set of checks to find
147bugs that occur on a specific path within a program.</p>
Chris Lattnercc042612008-10-14 00:52:49 +0000148
Ted Kremenek8b3894c2009-02-27 07:01:32 +0000149<p>In the LLVM 2.5 time-frame there have been many significant improvements to
150the analyzer's core path simulation engine and machinery for generating
151path-based bug reports to end-users. Particularly noteworthy improvements
152include experimental support for full field-sensitivity and reasoning about heap
153objects as well as an improved value-constraints subengine that does a much
154better job of reasoning about inequality relationships (e.g., <tt>x &gt; 2</tt>)
155between variables and constants.
Ted Kremenek3c3ec0c2008-10-14 05:14:21 +0000156
John Criswell524a5dd2009-03-02 15:28:15 +0000157<p>The set of checks performed by the static analyzer continues to expand, and
Ted Kremenek8b3894c2009-02-27 07:01:32 +0000158future plans for the tool include full source-level inter-procedural analysis
159and deeper checks such as buffer overrun detection. There are many opportunities
160to extend and enhance the static analyzer, and anyone interested in working on
161this project is encouraged to get involved!</p>
Chris Lattner8348b472008-06-08 21:58:17 +0000162
163</div>
164
Chris Lattner96a445e2008-10-13 18:01:01 +0000165<!--=========================================================================-->
166<div class="doc_subsection">
Nicolas Geoffray99a4d302008-10-14 19:23:04 +0000167<a name="vmkit">VMKit: JVM/CLI Virtual Machine Implementation</a>
Chris Lattner96a445e2008-10-13 18:01:01 +0000168</div>
169
170<div class="doc_text">
171<p>
Nicolas Geoffray99a4d302008-10-14 19:23:04 +0000172The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation of
Chris Lattner96a445e2008-10-13 18:01:01 +0000173a JVM and a CLI Virtual Machines (Microsoft .NET is an
174implementation of the CLI) using the Just-In-Time compiler of LLVM.</p>
175
Nicolas Geoffray09c9ed42009-03-02 09:25:38 +0000176<p>Following LLVM 2.5, VMKit has its second release that you can find on its
Nicolas Geoffray56d313d2008-10-15 20:25:04 +0000177<a href="http://vmkit.llvm.org/releases/">webpage</a>. The release includes
178bug fixes, cleanup and new features. The major changes are:</p>
Chris Lattner96a445e2008-10-13 18:01:01 +0000179
Nicolas Geoffray99a4d302008-10-14 19:23:04 +0000180<ul>
181
Chris Lattner75e26ca2009-02-26 05:20:36 +0000182<li>Ahead of Time compiler: compiles .class files to llvm .bc. VMKit uses this
Gabor Greif29ecc1c2009-03-02 11:34:51 +0000183functionality to native compile the standard classes (e.g. java.lang.String).
Gabor Greif4906abe2009-03-02 12:02:51 +0000184Users can compile AoT .class files into dynamic libraries and run them with the
Chris Lattner75e26ca2009-02-26 05:20:36 +0000185help of VMKit.</li>
186
187<li>New exception model: the dwarf exception model is very slow for
188exception-intensive applications, so the JVM has had a new implementation of
189exceptions which check at each function call if an exception happened. There is
190a low performance penalty on applications without exceptions, but it is a big
191gain for exception-intensive applications. For example the jack benchmark in
192Spec JVM98 is 6x faster (performance gain of 83%).</li>
193
Nicolas Geoffray09c9ed42009-03-02 09:25:38 +0000194<li>User-level management of thread stacks, so that thread local data access
195at runtime is fast and portable. </li>
196
197<li>Implementation of biased locking for faster object synchronizations at
198runtime.</li>
199
200<li>New support for OSX/X64, Linux/X64 (with the Boehm GC) and Linux/ppc32.</li>
Nicolas Geoffray99a4d302008-10-14 19:23:04 +0000201
202</ul>
Chris Lattner96a445e2008-10-13 18:01:01 +0000203</div>
204
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000205<!-- *********************************************************************** -->
206<div class="doc_section">
207 <a name="externalproj">External Projects Using LLVM 2.5</a>
208</div>
209<!-- *********************************************************************** -->
210
211<!--=========================================================================-->
212<div class="doc_subsection">
213<a name="pure">Pure</a>
214</div>
215
216<div class="doc_text">
217<p>
Chris Lattner917cc712009-03-02 02:37:32 +0000218<a href="http://pure-lang.googlecode.com/">Pure</a>
219is an algebraic/functional programming language based on term rewriting.
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000220Programs are collections of equations which are used to evaluate expressions in
221a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation,
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000222lexical closures, a hygienic macro system (also based on term rewriting),
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000223built-in list and matrix support (including list and matrix comprehensions) and
224an easy-to-use C interface. The interpreter uses LLVM as a backend to
225 JIT-compile Pure programs to fast native code.</p>
226
227<p>In addition to the usual algebraic data structures, Pure also has
228MATLAB-style matrices in order to support numeric computations and signal
229processing in an efficient way. Pure is mainly aimed at mathematical
230applications right now, but it has been designed as a general purpose language.
231The dynamic interpreter environment and the C interface make it possible to use
232it as a kind of functional scripting language for many application areas.
233</p>
234</div>
235
236
237<!--=========================================================================-->
238<div class="doc_subsection">
239<a name="ldc">LLVM D Compiler</a>
240</div>
241
242<div class="doc_text">
243<p>
Chris Lattner917cc712009-03-02 02:37:32 +0000244<a href="http://www.dsource.org/projects/ldc">LDC</a> is an implementation of
245the D Programming Language using the LLVM optimizer and code generator.
John Criswell524a5dd2009-03-02 15:28:15 +0000246The LDC project works great with the LLVM 2.5 release. General improvements in
247this
Chris Lattner917cc712009-03-02 02:37:32 +0000248cycle have included new inline asm constraint handling, better debug info
249support, general bugfixes, and better x86-64 support. This has allowed
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000250some major improvements in LDC, getting us much closer to being as
251fully featured as the original DMD compiler from DigitalMars.
252</p>
253</div>
254
Chris Lattnerbc31caf2009-02-28 18:58:01 +0000255<!--=========================================================================-->
256<div class="doc_subsection">
257<a name="RoadsendPHP">Roadsend PHP</a>
258</div>
259
260<div class="doc_text">
Chris Lattner917cc712009-03-02 02:37:32 +0000261<p><a href="http://code.roadsend.com/rphp">Roadsend PHP</a> (rphp) is an open
Chris Lattnercade8222009-03-02 19:07:24 +0000262source implementation of the PHP programming
263language that uses LLVM for its optimizer, JIT, and static compiler. This is a
264reimplementation of an earlier project that is now based on LLVM.</p>
Chris Lattnerbc31caf2009-02-28 18:58:01 +0000265</div>
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000266
Chris Lattner8348b472008-06-08 21:58:17 +0000267
268<!-- *********************************************************************** -->
269<div class="doc_section">
Chris Lattner917cc712009-03-02 02:37:32 +0000270 <a name="whatsnew">What's New in LLVM 2.5?</a>
Chris Lattner8348b472008-06-08 21:58:17 +0000271</div>
272<!-- *********************************************************************** -->
273
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000274<div class="doc_text">
275
Bill Wendling741748a2008-10-27 09:27:33 +0000276<p>This release includes a huge number of bug fixes, performance tweaks, and
Chris Lattnerf6662f92008-10-13 17:57:36 +0000277minor improvements. Some of the major improvements and new features are listed
278in this section.
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000279</p>
280</div>
281
Chris Lattner8348b472008-06-08 21:58:17 +0000282<!--=========================================================================-->
Chris Lattnerea34f642008-06-08 21:34:41 +0000283<div class="doc_subsection">
Chris Lattner252b83d2008-02-06 18:00:06 +0000284<a name="majorfeatures">Major New Features</a>
285</div>
286
287<div class="doc_text">
288
Chris Lattner38ab04c2009-02-25 04:41:31 +0000289<p>LLVM 2.5 includes several major new capabilities:</p>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000290
291<ul>
Chris Lattner917cc712009-03-02 02:37:32 +0000292<li>LLVM 2.5 includes a brand new <a
293href="http://en.wikipedia.org/wiki/XCore">XCore</a> backend.</li>
Chris Lattner74c80df2009-02-25 06:34:50 +0000294
Bill Wendlingdc1350e2009-03-02 07:42:15 +0000295<li>llvm-gcc now generally supports the GFortran front-end, and the precompiled
Chris Lattner917cc712009-03-02 02:37:32 +0000296release binaries now support Fortran, even on Mac OS/X.</li>
Chris Lattner74c80df2009-02-25 06:34:50 +0000297
Chris Lattner917cc712009-03-02 02:37:32 +0000298<li>CMake is now used by the <a href="GettingStartedVS.html">LLVM build process
299on Windows</a>. It automatically generates Visual Studio project files (and
300more) from a set of simple text files. This makes it much easier to
301maintain. In time, we'd like to standardize on CMake for everything.</li>
Chris Lattnerc1771e32009-02-26 07:29:17 +0000302
Chris Lattner917cc712009-03-02 02:37:32 +0000303<li>LLVM 2.5 now uses (and includes) Google Test for unit testing.</li>
Chris Lattnerc1771e32009-02-26 07:29:17 +0000304
Chris Lattner917cc712009-03-02 02:37:32 +0000305<li>The LLVM native code generator now supports arbitrary precision integers.
306Types like <tt>i33</tt> have long been valid in the LLVM IR, but were previously
307only supported by the interpreter. Note that the C backend still does not
308support these.</li>
Chris Lattner99f375b2009-02-25 07:32:53 +0000309
John Criswell524a5dd2009-03-02 15:28:15 +0000310<li>LLVM 2.5 no longer uses 'bison,' so it is easier to build on Windows.</li>
Chris Lattner8170c102008-02-10 08:18:42 +0000311</ul>
312
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000313</div>
314
Chris Lattner791f77b2008-06-05 06:25:56 +0000315
316<!--=========================================================================-->
317<div class="doc_subsection">
Chris Lattnerea34f642008-06-08 21:34:41 +0000318<a name="llvm-gcc">llvm-gcc 4.2 Improvements</a>
Chris Lattner791f77b2008-06-05 06:25:56 +0000319</div>
320
321<div class="doc_text">
322
Chris Lattnerb82eb062008-10-13 20:47:20 +0000323<p>LLVM fully supports the llvm-gcc 4.2 front-end, which marries the GCC
324front-ends and driver with the LLVM optimizer and code generator. It currently
325includes support for the C, C++, Objective-C, Ada, and Fortran front-ends.</p>
Chris Lattner791f77b2008-06-05 06:25:56 +0000326
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000327<ul>
Chris Lattner917cc712009-03-02 02:37:32 +0000328<li>In this release, the GCC inliner is completely disabled. Previously the GCC
329inliner was used to handle always-inline functions and other cases. This caused
330problems with code size growth, and it is completely disabled in this
331release.</li>
332
333<li>llvm-gcc (and LLVM in general) now support code generation for stack
334canaries, which is an effective form of <a
335href="http://en.wikipedia.org/wiki/Stack-smashing_protection">buffer overflow
336protection</a>. llvm-gcc supports this with the <tt>-fstack-protector</tt>
337command line option (just like GCC). In LLVM IR, you can request code
338generation for stack canaries with function attributes.
339</li>
Gabor Greifa3bd11d2008-06-09 06:06:18 +0000340</ul>
Chris Lattner791f77b2008-06-05 06:25:56 +0000341
Chris Lattner791f77b2008-06-05 06:25:56 +0000342</div>
343
344
Chris Lattner84977642007-09-21 03:54:09 +0000345<!--=========================================================================-->
346<div class="doc_subsection">
Chris Lattner917cc712009-03-02 02:37:32 +0000347<a name="coreimprovements">LLVM IR and Core Improvements</a>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000348</div>
349
350<div class="doc_text">
Chris Lattner917cc712009-03-02 02:37:32 +0000351<p>LLVM IR has several new features that are used by our existing front-ends and
352can be useful if you are writing a front-end for LLVM:</p>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000353
Chris Lattner791f77b2008-06-05 06:25:56 +0000354<ul>
Chris Lattner917cc712009-03-02 02:37:32 +0000355<li>The <a href="LangRef.html#i_shufflevector">shufflevector</a> instruction
356has been generalized to allow different shuffle mask width than its input
357vectors. This allows you to use shufflevector to combine two
358"&lt;4 x float&gt;" vectors into a "&lt;8 x float&gt;" for example.</li>
359
360<li>LLVM IR now supports new intrinsics for computing and acting on <a
361href="LangRef.html#int_overflow">overflow of integer operations</a>. This allows
362efficient code generation for languages that must trap or throw an exception on
363overflow. While these intrinsics work on all targets, they only generate
364efficient code on X86 so far.</li>
365
366<li>LLVM IR now supports a new <a href="LangRef.html#linkage">private
367linkage</a> type to produce labels that are stripped by the assembler before it
368produces a .o file (thus they are invisible to the linker).</li>
369
370<li>LLVM IR supports two new attributes for better alias analysis. The <a
371href="LangRef.html#paramattrs">noalias</a> attribute can now be used on the
372return value of a function to indicate that it returns new memory (e.g.
Duncan Sands05c70952009-03-02 16:58:00 +0000373'malloc', 'calloc', etc).
374The new <a href="LangRef.html#paramattrs">nocapture</a> attribute can be used
375on pointer arguments to indicate that the function does not return the pointer,
376store it in an object that outlives the call, or let the value of the pointer
377escape from the function in any other way.
378Note that it is the pointer itself that must not escape, not the value it
379points to: loading a value out of the pointer is perfectly fine.
380Many standard library functions (e.g. 'strlen', 'memcpy') have this property.
381<!-- The simplifylibcalls pass applies these attributes to standard libc functions. -->
382</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000383
384<li>The parser for ".ll" files in lib/AsmParser is now completely rewritten as a
385recursive descent parser. This parser produces better error messages (including
John Criswell524a5dd2009-03-02 15:28:15 +0000386caret diagnostics), is less fragile (less likely to crash on strange things),
387does not leak memory, is more efficient, and eliminates LLVM's last use of the
Chris Lattner917cc712009-03-02 02:37:32 +0000388'bison' tool.</li>
389
390<li>Debug information representation and manipulation internals have been
391 consolidated to use a new set of classes in
John Criswell524a5dd2009-03-02 15:28:15 +0000392 <tt>llvm/Analysis/DebugInfo.h</tt>. These routines are more
Chris Lattner917cc712009-03-02 02:37:32 +0000393 efficient, robust, and extensible and replace the older mechanisms.
394 llvm-gcc, clang, and the code generator now use them to create and process
395 debug information.</li>
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000396
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000397</ul>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +0000398
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000399</div>
400
401<!--=========================================================================-->
402<div class="doc_subsection">
Chris Lattneracce85d2008-02-10 07:46:44 +0000403<a name="optimizer">Optimizer Improvements</a>
404</div>
405
406<div class="doc_text">
407
John Criswell524a5dd2009-03-02 15:28:15 +0000408<p>In addition to a large array of bug fixes and minor performance tweaks, this
Chris Lattnerf3013872008-10-13 21:50:36 +0000409release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattneracce85d2008-02-10 07:46:44 +0000410
411<ul>
412
Chris Lattner917cc712009-03-02 02:37:32 +0000413<li>The loop optimizer now improves floating point induction variables in
414several ways, including adding shadow induction variables to avoid
415"integer &lt;-&gt; floating point" conversions in loops when safe.</li>
416
John Criswell524a5dd2009-03-02 15:28:15 +0000417<li>The "-mem2reg" pass is now much faster on code with large basic blocks.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000418
419<li>The "-jump-threading" pass is more powerful: it is iterative
420 and handles threading based on values with fully and partially redundant
421 loads.</li>
422
423<li>The "-memdep" memory dependence analysis pass (used by GVN and memcpyopt) is
424 both faster and more aggressive.</li>
425
426<li>The "-scalarrepl" scalar replacement of aggregates pass is more aggressive
427 about promoting unions to registers.</li>
Chris Lattnerf3013872008-10-13 21:50:36 +0000428
Chris Lattner0b832202008-06-08 02:45:07 +0000429</ul>
430
431</div>
432
433<!--=========================================================================-->
434<div class="doc_subsection">
Chris Lattner511433e2009-03-02 03:24:11 +0000435<a name="codegen">Target Independent Code Generator Improvements</a>
Chris Lattner0b832202008-06-08 02:45:07 +0000436</div>
437
438<div class="doc_text">
439
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000440<p>We have put a significant amount of work into the code generator
441infrastructure, which allows us to implement more aggressive algorithms and make
442it run faster:</p>
Chris Lattner0b832202008-06-08 02:45:07 +0000443
444<ul>
Chris Lattner511433e2009-03-02 03:24:11 +0000445<li>The <a href="WritingAnLLVMBackend.html">Writing an LLVM Compiler
446Backend</a> document has been greatly expanded and is substantially more
447complete.</li>
448
449<li>The SelectionDAG type legalization logic has been completely rewritten, is
450now more powerful (it supports arbitrary precision integer types for example),
John Criswell524a5dd2009-03-02 15:28:15 +0000451and is more correct in several corner cases. The type legalizer converts
Chris Lattner511433e2009-03-02 03:24:11 +0000452operations on types that are not natively supported by the target machine into
453equivalent code sequences that only use natively supported types. The old type
454legalizer is still available (for now) and will be used if
455<tt>-disable-legalize-types</tt> is passed to the code generator.
Duncan Sands07636ea2009-02-25 11:50:08 +0000456</li>
Chris Lattner0b832202008-06-08 02:45:07 +0000457
Chris Lattner511433e2009-03-02 03:24:11 +0000458<li>The code generator now supports widening illegal vectors to larger legal
459ones (for example, converting operations on &lt;3 x float&gt; to work on
460&lt;4 x float&gt;) which is very important for common graphics
461applications.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000462
Chris Lattner511433e2009-03-02 03:24:11 +0000463<li>The assembly printers for each target are now split out into their own
464libraries that are separate from the main code generation logic. This reduces
John Criswell524a5dd2009-03-02 15:28:15 +0000465the code size of JIT compilers by not requiring them to be linked in.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000466
Chris Lattner511433e2009-03-02 03:24:11 +0000467<li>The 'fast' instruction selection path (used at -O0 and for fast JIT
468 compilers) now supports accelerating codegen for code that uses exception
469 handling constructs.</li>
470
471<li>The optional PBQP register allocator now supports register coalescing.</li>
Chris Lattner84977642007-09-21 03:54:09 +0000472</ul>
Chris Lattner84977642007-09-21 03:54:09 +0000473</div>
474
Chris Lattner917cc712009-03-02 02:37:32 +0000475<!--=========================================================================-->
476<div class="doc_subsection">
477<a name="x86">X86-32 and X86-64 Target Improvements</a>
478</div>
479
480<div class="doc_text">
481<p>New features of the X86 target include:
482</p>
483
484<ul>
Bill Wendling99dac472009-03-02 07:54:14 +0000485<li>The <tt><a href="LangRef.html#int_returnaddress">llvm.returnaddress</a></tt>
486intrinsic (which is used to implement <tt>__builtin_return_address</tt>) now
487supports non-zero stack depths on X86.</li>
Chris Lattner511433e2009-03-02 03:24:11 +0000488
489<li>The X86 backend now supports code generation of vector shift operations
490using SSE instructions.</li>
491
Bill Wendling99dac472009-03-02 07:54:14 +0000492<li>X86-64 code generation now takes advantage of red zone, unless the
493<tt>-mno-red-zone</tt> option is specified.</li>
Chris Lattner511433e2009-03-02 03:24:11 +0000494
495<li>The X86 backend now supports using address space #256 in LLVM IR as a way of
496performing memory references off the GS segment register. This allows a
497front-end to take advantage of very low-level programming techniques when
Gabor Greif29ecc1c2009-03-02 11:34:51 +0000498targeting X86 CPUs. See <tt>test/CodeGen/X86/movgs.ll</tt> for a simple
Bill Wendling99dac472009-03-02 07:54:14 +0000499example.</li>
Chris Lattner511433e2009-03-02 03:24:11 +0000500
501<li>The X86 backend now supports a <tt>-disable-mmx</tt> command line option to
502 prevent use of MMX even on chips that support it. This is important for cases
Bill Wendling99dac472009-03-02 07:54:14 +0000503 where code does not contain the proper <tt>llvm.x86.mmx.emms</tt>
504 intrinsics.</li>
Chris Lattner511433e2009-03-02 03:24:11 +0000505
Bill Wendling99dac472009-03-02 07:54:14 +0000506<li>The X86 JIT now detects the new Intel <a
507 href="http://en.wikipedia.org/wiki/Intel_Core_i7">Core i7</a> and <a
John Criswell524a5dd2009-03-02 15:28:15 +0000508 href="http://en.wikipedia.org/wiki/Intel_Atom">Atom</a> chips and
509 auto-configures itself appropriately for the features of these chips.</li>
Chris Lattner511433e2009-03-02 03:24:11 +0000510
511<li>The JIT now supports exception handling constructs on Linux/X86-64 and
512 Darwin/x86-64.</li>
Bill Wendling99dac472009-03-02 07:54:14 +0000513
Chris Lattner511433e2009-03-02 03:24:11 +0000514<li>The JIT supports Thread Local Storage (TLS) on Linux/X86-32 but not yet on
515 X86-64.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000516</ul>
517
Chris Lattner917cc712009-03-02 02:37:32 +0000518</div>
Chris Lattner84977642007-09-21 03:54:09 +0000519
520<!--=========================================================================-->
521<div class="doc_subsection">
Chris Lattner11398992009-02-26 07:32:11 +0000522<a name="pic16">PIC16 Target Improvements</a>
523</div>
524
525<div class="doc_text">
526<p>New features of the PIC16 target include:
527</p>
528
529<ul>
530<li>Both direct and indirect load/stores work now.</li>
531<li>Logical, bitwise and conditional operations now work for integer data
532types.</li>
533<li>Function calls involving basic types work now.</li>
534<li>Support for integer arrays.</li>
John Criswell524a5dd2009-03-02 15:28:15 +0000535<li>The compiler can now emit libcalls for operations not supported by m/c
Bill Wendling99dac472009-03-02 07:54:14 +0000536instructions.</li>
537<li>Support for both data and ROM address spaces.</li>
Chris Lattner11398992009-02-26 07:32:11 +0000538</ul>
539
540<p>Things not yet supported:</p>
541
542<ul>
543<li>Floating point.</li>
Bill Wendling99dac472009-03-02 07:54:14 +0000544<li>Passing/returning aggregate types to and from functions.</li>
Chris Lattner11398992009-02-26 07:32:11 +0000545<li>Variable arguments.</li>
546<li>Indirect function calls.</li>
Chris Lattner511433e2009-03-02 03:24:11 +0000547<li>Interrupts/programs.</li>
Chris Lattner11398992009-02-26 07:32:11 +0000548<li>Debug info.</li>
Chris Lattner11398992009-02-26 07:32:11 +0000549</ul>
550
551</div>
552
553
554<!--=========================================================================-->
555<div class="doc_subsection">
Chris Lattnerc441fb82009-03-01 02:30:21 +0000556<a name="llvmc">Improvements in LLVMC</a>
557</div>
558
559<div class="doc_text">
560<p>New features include:</p>
561
562<ul>
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000563<li>Beginning with LLVM 2.5, <tt>llvmc2</tt> is known as
564 just <tt>llvmc</tt>. The old <tt>llvmc</tt> driver was removed.</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000565
566<li>The Clang plugin was substantially improved and is now enabled
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000567 by default. The command <tt>llvmc --clang</tt> can be now used as a
568 synonym to <tt>ccc</tt>.</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000569
Bill Wendling99dac472009-03-02 07:54:14 +0000570<li>There is now a <tt>--check-graph</tt> option, which is supposed to catch
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000571 common errors like multiple default edges, mismatched output/input language
572 names and cycles. In general, these checks can't be done at compile-time
573 because of the need to support plugins.</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000574
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000575<li>Plugins are now more flexible and can refer to compilation graph nodes and
576 options defined in other plugins. To manage dependencies, a priority-sorting
Bill Wendling99dac472009-03-02 07:54:14 +0000577 mechanism was introduced. This change affects the TableGen file syntax. See the
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000578 documentation for details.</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000579
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000580<li>Hooks can now be provided with arguments. The syntax is "<tt>$CALL(MyHook,
Bill Wendling99dac472009-03-02 07:54:14 +0000581 'Arg1', 'Arg2', 'Arg3')</tt>".</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000582
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000583<li>A new option type: multi-valued option, for options that take more than one
584 argument (for example, "<tt>-foo a b c</tt>").</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000585
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000586<li>New option properties: '<tt>one_or_more</tt>', '<tt>zero_or_more</tt>',
587'<tt>hidden</tt>' and '<tt>really_hidden</tt>'.</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000588
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000589<li>The '<tt>case</tt>' expression gained an '<tt>error</tt>' action and
590 an '<tt>empty</tt>' test (equivalent to "<tt>(not (not_empty ...))</tt>").</li>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000591
592<li>Documentation now looks more consistent to the rest of the LLVM
593 docs. There is also a man page now.</li>
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000594
Chris Lattnerc441fb82009-03-01 02:30:21 +0000595</ul>
596
597</div>
598
Chris Lattner77d29b12008-06-05 08:02:49 +0000599
600<!--=========================================================================-->
601<div class="doc_subsection">
Chris Lattnerf6662f92008-10-13 17:57:36 +0000602<a name="changes">Major Changes and Removed Features</a>
603</div>
604
605<div class="doc_text">
606
Chris Lattnereeb4da02008-10-13 22:06:31 +0000607<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattner38ab04c2009-02-25 04:41:31 +0000608on LLVM 2.4, this section lists some "gotchas" that you may run into upgrading
Chris Lattnereeb4da02008-10-13 22:06:31 +0000609from the previous release.</p>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000610
611<ul>
612
Bill Wendling99dac472009-03-02 07:54:14 +0000613<li>llvm-gcc defaults to <tt>-fno-math-errno</tt> on all X86 targets.</li>
614
Chris Lattnereeb4da02008-10-13 22:06:31 +0000615</ul>
616
617
618<p>In addition, many APIs have changed in this release. Some of the major LLVM
619API changes are:</p>
620
621<ul>
Gabor Greifcc465502009-03-02 12:23:55 +0000622<li>Some deprecated interfaces to create <tt>Instruction</tt> subclasses, that
John Criswell524a5dd2009-03-02 15:28:15 +0000623 were spelled with lower case "create," have been removed.</li>
Devang Patelb34dd132008-10-14 20:03:43 +0000624</ul>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000625
Chris Lattnerf6662f92008-10-13 17:57:36 +0000626</div>
627
628
629
Chris Lattner19092612003-10-02 16:38:05 +0000630<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000631<div class="doc_section">
632 <a name="portability">Portability and Supported Platforms</a>
633</div>
Chris Lattner19092612003-10-02 16:38:05 +0000634<!-- *********************************************************************** -->
635
Misha Brukman500bc302003-11-22 00:38:41 +0000636<div class="doc_text">
637
John Criswell0b5b5e92004-12-08 20:35:47 +0000638<p>LLVM is known to work on the following platforms:</p>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000639
640<ul>
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000641<li>Intel and AMD machines (IA32, X86-64, AMD64, EMT-64) running Red Hat
Chris Lattnere18b32e2008-11-10 05:40:34 +0000642Linux, Fedora Core and FreeBSD (and probably other unix-like systems).</li>
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000643<li>PowerPC and X86-based Mac OS X systems, running 10.3 and above in 32-bit
Chris Lattnere18b32e2008-11-10 05:40:34 +0000644and 64-bit modes.</li>
Chris Lattner252b83d2008-02-06 18:00:06 +0000645<li>Intel and AMD machines running on Win32 using MinGW libraries (native).</li>
Chris Lattner57a460e2007-05-23 04:39:32 +0000646<li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
647 support is available for native builds with Visual C++).</li>
Gabor Greif96a89c72008-06-05 18:39:01 +0000648<li>Sun UltraSPARC workstations running Solaris 10.</li>
John Criswell9321fa82005-05-13 20:28:15 +0000649<li>Alpha-based machines running Debian GNU/Linux.</li>
Gabor Greif96a89c72008-06-05 18:39:01 +0000650<li>Itanium-based (IA64) machines running Linux and HP-UX.</li>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000651</ul>
652
Chris Lattnerbc5786b2008-06-05 06:57:39 +0000653<p>The core LLVM infrastructure uses GNU autoconf to adapt itself
Brian Gaekeb0fd7612004-05-09 05:28:35 +0000654to the machine and operating system on which it is built. However, minor
655porting may be required to get LLVM to work on new platforms. We welcome your
656portability patches and reports of successful builds or error messages.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000657
Misha Brukman500bc302003-11-22 00:38:41 +0000658</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000659
660<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000661<div class="doc_section">
662 <a name="knownproblems">Known Problems</a>
663</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000664<!-- *********************************************************************** -->
665
Misha Brukman500bc302003-11-22 00:38:41 +0000666<div class="doc_text">
667
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000668<p>This section contains significant known problems with the LLVM system,
Chris Lattnere18b32e2008-11-10 05:40:34 +0000669listed by component. If you run into a problem, please check the <a
Chris Lattnerc463b272005-10-29 07:07:09 +0000670href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattner5eccca42003-12-12 21:22:16 +0000671there isn't already one.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000672
Misha Brukman500bc302003-11-22 00:38:41 +0000673</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000674
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000675<!-- ======================================================================= -->
676<div class="doc_subsection">
677 <a name="experimental">Experimental features included with this release</a>
678</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000679
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000680<div class="doc_text">
681
Misha Brukman6df9e2c2004-05-12 21:46:05 +0000682<p>The following components of this LLVM release are either untested, known to
683be broken or unreliable, or are in early development. These components should
684not be relied on, and bugs should not be filed against them, but they may be
685useful to some people. In particular, if you would like to work on one of these
Chris Lattner2b659ef2008-02-12 06:29:45 +0000686components, please contact us on the <a
687href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000688
689<ul>
Gabor Greifa8b84902008-10-14 11:31:14 +0000690<li>The MSIL, IA64, Alpha, SPU, MIPS, and PIC16 backends are experimental.</li>
Bill Wendling99dac472009-03-02 07:54:14 +0000691<li>The <tt>llc</tt> "<tt>-filetype=asm</tt>" (the default) is the only
692 supported value for this option.</li>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000693</ul>
694
695</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000696
Misha Brukman500bc302003-11-22 00:38:41 +0000697<!-- ======================================================================= -->
698<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000699 <a name="x86-be">Known problems with the X86 back-end</a>
John Criswellc0c186d2005-11-08 21:11:33 +0000700</div>
701
702<div class="doc_text">
703
704<ul>
Anton Korobeynikova6094be2008-06-08 10:24:13 +0000705 <li>The X86 backend does not yet support
706 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
707 floating point stack</a>. It supports the 'f' and 't' constraints, but not
708 'u'.</li>
Chris Lattnere6e1b352008-06-08 21:19:07 +0000709 <li>The X86 backend generates inefficient floating point code when configured
710 to generate code for systems that don't have SSE2.</li>
Duncan Sands47eff2b2008-06-08 19:38:43 +0000711 <li>Win64 code generation wasn't widely tested. Everything should work, but we
John Criswell524a5dd2009-03-02 15:28:15 +0000712 expect small issues to happen. Also, llvm-gcc cannot build the mingw64
713 runtime currently due
Anton Korobeynikova6094be2008-06-08 10:24:13 +0000714 to <a href="http://llvm.org/PR2255">several</a>
John Criswell524a5dd2009-03-02 15:28:15 +0000715 <a href="http://llvm.org/PR2257">bugs</a> and due to lack of support for
716 the
717 'u' inline assembly constraint and for X87 floating point inline assembly.</li>
Dan Gohman8207ba92008-06-08 23:05:11 +0000718 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattner917cc712009-03-02 02:37:32 +0000719 <tt>va_arg</tt>. Currently, the llvm-gcc and front-ends support variadic
Dan Gohman8207ba92008-06-08 23:05:11 +0000720 argument constructs on X86-64 by lowering them manually.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000721</ul>
722
723</div>
724
725<!-- ======================================================================= -->
726<div class="doc_subsection">
727 <a name="ppc-be">Known problems with the PowerPC back-end</a>
728</div>
729
730<div class="doc_text">
731
732<ul>
Nicolas Geoffraye4285dc2007-05-15 09:21:28 +0000733<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattner57a460e2007-05-23 04:39:32 +0000734compilation, and lacks support for debug information.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000735</ul>
736
737</div>
738
739<!-- ======================================================================= -->
740<div class="doc_subsection">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000741 <a name="arm-be">Known problems with the ARM back-end</a>
742</div>
743
744<div class="doc_text">
745
746<ul>
Chris Lattner57a460e2007-05-23 04:39:32 +0000747<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sandsc90d68b2007-09-26 15:59:54 +0000748processors, thumb programs can crash or produce wrong
Chris Lattner57a460e2007-05-23 04:39:32 +0000749results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswell524a5dd2009-03-02 15:28:15 +0000750<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000751</li>
Chris Lattnere6e1b352008-06-08 21:19:07 +0000752<li>There is a bug in QEMU-ARM (&lt;= 0.9.0) which causes it to incorrectly
753 execute
Chris Lattner57a460e2007-05-23 04:39:32 +0000754programs compiled with LLVM. Please use more recent versions of QEMU.</li>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000755</ul>
756
757</div>
758
759<!-- ======================================================================= -->
760<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000761 <a name="sparc-be">Known problems with the SPARC back-end</a>
762</div>
763
764<div class="doc_text">
765
766<ul>
John Criswell524a5dd2009-03-02 15:28:15 +0000767<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattner26299222006-11-18 07:51:14 +0000768 support the 64-bit SPARC ABI (-m64).</li>
769</ul>
770
771</div>
772
773<!-- ======================================================================= -->
774<div class="doc_subsection">
Bruno Cardoso Lopesb7e1a4f2008-10-25 14:56:26 +0000775 <a name="mips-be">Known problems with the MIPS back-end</a>
776</div>
777
778<div class="doc_text">
779
780<ul>
781<li>The O32 ABI is not fully supported.</li>
782<li>64-bit MIPS targets are not supported yet.</li>
783</ul>
784
785</div>
786
787<!-- ======================================================================= -->
788<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000789 <a name="alpha-be">Known problems with the Alpha back-end</a>
790</div>
791
792<div class="doc_text">
793
794<ul>
795
796<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
797appropriate nops inserted to ensure restartability.</li>
798
John Criswellc0c186d2005-11-08 21:11:33 +0000799</ul>
800</div>
801
Chris Lattner26299222006-11-18 07:51:14 +0000802<!-- ======================================================================= -->
803<div class="doc_subsection">
804 <a name="ia64-be">Known problems with the IA64 back-end</a>
805</div>
806
807<div class="doc_text">
808
809<ul>
John Criswell524a5dd2009-03-02 15:28:15 +0000810<li>The Itanium backend is highly experimental and has a number of known
Chris Lattner04af7cb2008-06-08 23:12:47 +0000811 issues. We are looking for a maintainer for the Itanium backend. If you
Gabor Greif3bd3a262008-10-15 10:47:24 +0000812 are interested, please contact the LLVMdev mailing list.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000813</ul>
814
815</div>
816
817<!-- ======================================================================= -->
818<div class="doc_subsection">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000819 <a name="c-be">Known problems with the C back-end</a>
Chris Lattner26299222006-11-18 07:51:14 +0000820</div>
821
822<div class="doc_text">
823
824<ul>
Chris Lattner5733b272008-06-05 06:35:40 +0000825<li><a href="http://llvm.org/PR802">The C backend has only basic support for
826 inline assembly code</a>.</li>
Chris Lattner725a0d82007-09-26 06:01:35 +0000827<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
828 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif4906abe2009-03-02 12:02:51 +0000829 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandsf74c0cc2008-02-10 13:40:55 +0000830<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands50723a92009-02-25 11:51:54 +0000831<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000832</ul>
833
834</div>
John Criswellc0c186d2005-11-08 21:11:33 +0000835
Misha Brukman500bc302003-11-22 00:38:41 +0000836
837<!-- ======================================================================= -->
838<div class="doc_subsection">
Chris Lattner5733b272008-06-05 06:35:40 +0000839 <a name="c-fe">Known problems with the llvm-gcc C front-end</a>
Misha Brukman500bc302003-11-22 00:38:41 +0000840</div>
Chris Lattner47588f92003-10-02 05:07:23 +0000841
Misha Brukman500bc302003-11-22 00:38:41 +0000842<div class="doc_text">
Chris Lattnerc5d658a2006-03-03 00:34:26 +0000843
Chris Lattner252b83d2008-02-06 18:00:06 +0000844<p>llvm-gcc does not currently support <a href="http://llvm.org/PR869">Link-Time
845Optimization</a> on most platforms "out-of-the-box". Please inquire on the
Gabor Greif3bd3a262008-10-15 10:47:24 +0000846LLVMdev mailing list if you are interested.</p>
Chris Lattnerd9ea0172006-08-08 17:27:28 +0000847
Chris Lattner5733b272008-06-05 06:35:40 +0000848<p>The only major language feature of GCC not supported by llvm-gcc is
849 the <tt>__builtin_apply</tt> family of builtins. However, some extensions
850 are only supported on some targets. For example, trampolines are only
Duncan Sands27aff872008-06-08 20:18:35 +0000851 supported on some targets (these are used when you take the address of a
852 nested function).</p>
Misha Brukman500bc302003-11-22 00:38:41 +0000853
Chris Lattner5733b272008-06-05 06:35:40 +0000854<p>If you run into GCC extensions which are not supported, please let us know.
855</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000856
Misha Brukman500bc302003-11-22 00:38:41 +0000857</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000858
Misha Brukman500bc302003-11-22 00:38:41 +0000859<!-- ======================================================================= -->
860<div class="doc_subsection">
Chris Lattner5733b272008-06-05 06:35:40 +0000861 <a name="c++-fe">Known problems with the llvm-gcc C++ front-end</a>
Misha Brukman500bc302003-11-22 00:38:41 +0000862</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000863
Misha Brukman500bc302003-11-22 00:38:41 +0000864<div class="doc_text">
865
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000866<p>The C++ front-end is considered to be fully
Chris Lattner7506b1d2004-12-07 08:04:13 +0000867tested and works for a number of non-trivial programs, including LLVM
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000868itself, Qt, Mozilla, etc.</p>
Misha Brukman500bc302003-11-22 00:38:41 +0000869
Misha Brukman500bc302003-11-22 00:38:41 +0000870<ul>
Anton Korobeynikov0021fc12008-10-11 18:27:16 +0000871<li>Exception handling works well on the X86 and PowerPC targets. Currently
Chris Lattnere18b32e2008-11-10 05:40:34 +0000872 only Linux and Darwin targets are supported (both 32 and 64 bit).</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000873</ul>
Chris Lattnerfcc54b32003-10-07 22:14:37 +0000874
Misha Brukman500bc302003-11-22 00:38:41 +0000875</div>
876
Chris Lattner1eb4df62008-10-30 03:58:13 +0000877<!-- ======================================================================= -->
878<div class="doc_subsection">
879 <a name="fortran-fe">Known problems with the llvm-gcc Fortran front-end</a>
880</div>
881
882<div class="doc_text">
Gabor Greifba10fe02008-11-04 21:50:59 +0000883<ul>
Chris Lattner1eb4df62008-10-30 03:58:13 +0000884<li>Fortran support generally works, but there are still several unresolved bugs
885 in Bugzilla. Please see the tools/gfortran component for details.</li>
Gabor Greifba10fe02008-11-04 21:50:59 +0000886</ul>
Chris Lattner1eb4df62008-10-30 03:58:13 +0000887</div>
Misha Brukman500bc302003-11-22 00:38:41 +0000888
Chris Lattner2b659ef2008-02-12 06:29:45 +0000889<!-- ======================================================================= -->
890<div class="doc_subsection">
Chris Lattner5733b272008-06-05 06:35:40 +0000891 <a name="ada-fe">Known problems with the llvm-gcc Ada front-end</a>
Chris Lattner2b659ef2008-02-12 06:29:45 +0000892</div>
893
894<div class="doc_text">
John Criswell524a5dd2009-03-02 15:28:15 +0000895The llvm-gcc 4.2 Ada compiler works fairly well; however, this is not a mature
896technology, and problems should be expected.
Chris Lattner2b659ef2008-02-12 06:29:45 +0000897<ul>
Duncan Sands27aff872008-06-08 20:18:35 +0000898<li>The Ada front-end currently only builds on X86-32. This is mainly due
John Criswell524a5dd2009-03-02 15:28:15 +0000899to lack of trampoline support (pointers to nested functions) on other platforms.
900However, it <a href="http://llvm.org/PR2006">also fails to build on X86-64</a>
Chris Lattner2b659ef2008-02-12 06:29:45 +0000901which does support trampolines.</li>
902<li>The Ada front-end <a href="http://llvm.org/PR2007">fails to bootstrap</a>.
Duncan Sands326a4982009-02-25 11:59:06 +0000903This is due to lack of LLVM support for <tt>setjmp</tt>/<tt>longjmp</tt> style
904exception handling, which is used internally by the compiler.
Chris Lattner2b659ef2008-02-12 06:29:45 +0000905Workaround: configure with --disable-bootstrap.</li>
Duncan Sands978bcee2008-10-13 17:27:23 +0000906<li>The c380004, <a href="http://llvm.org/PR2010">c393010</a>
907and <a href="http://llvm.org/PR2421">cxg2021</a> ACATS tests fail
Duncan Sands326a4982009-02-25 11:59:06 +0000908(c380004 also fails with gcc-4.2 mainline).
909If the compiler is built with checks disabled then <a href="http://llvm.org/PR2010">c393010</a>
910causes the compiler to go into an infinite loop, using up all system memory.</li>
Duncan Sandsdd3e6722009-03-02 16:35:57 +0000911<li>Some GCC specific Ada tests continue to crash the compiler.</li>
Chris Lattner2b659ef2008-02-12 06:29:45 +0000912<li>The -E binder option (exception backtraces)
913<a href="http://llvm.org/PR1982">does not work</a> and will result in programs
914crashing if an exception is raised. Workaround: do not use -E.</li>
915<li>Only discrete types <a href="http://llvm.org/PR1981">are allowed to start
916or finish at a non-byte offset</a> in a record. Workaround: do not pack records
917or use representation clauses that result in a field of a non-discrete type
918starting or finishing in the middle of a byte.</li>
Chris Lattnere6e1b352008-06-08 21:19:07 +0000919<li>The <tt>lli</tt> interpreter <a href="http://llvm.org/PR2009">considers
920'main' as generated by the Ada binder to be invalid</a>.
921Workaround: hand edit the file to use pointers for <tt>argv</tt> and
922<tt>envp</tt> rather than integers.</li>
923<li>The <tt>-fstack-check</tt> option <a href="http://llvm.org/PR2008">is
924ignored</a>.</li>
Chris Lattner2b659ef2008-02-12 06:29:45 +0000925</ul>
926</div>
927
Chris Lattner79c3fe12003-10-02 04:57:28 +0000928<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000929<div class="doc_section">
930 <a name="additionalinfo">Additional Information</a>
931</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000932<!-- *********************************************************************** -->
933
Misha Brukman500bc302003-11-22 00:38:41 +0000934<div class="doc_text">
935
Chris Lattner416db102005-05-16 17:13:10 +0000936<p>A wide variety of additional information is available on the <a
Chris Lattnerb4b0ce72007-05-18 00:44:29 +0000937href="http://llvm.org">LLVM web page</a>, in particular in the <a
938href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencer669ed452007-07-09 08:04:31 +0000939contains versions of the API documentation which is up-to-date with the
940Subversion version of the source code.
Misha Brukman109d9e82005-03-30 19:14:24 +0000941You can access versions of these documents specific to this release by going
942into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000943
Misha Brukman500bc302003-11-22 00:38:41 +0000944<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnerc463b272005-10-29 07:07:09 +0000945us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattner5eccca42003-12-12 21:22:16 +0000946lists</a>.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000947
Misha Brukman500bc302003-11-22 00:38:41 +0000948</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000949
950<!-- *********************************************************************** -->
Chris Lattner79c3fe12003-10-02 04:57:28 +0000951
Misha Brukman500bc302003-11-22 00:38:41 +0000952<hr>
Misha Brukman2061e892003-11-22 01:23:39 +0000953<address>
Misha Brukman38847d52003-12-21 22:53:21 +0000954 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000955 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman2061e892003-11-22 01:23:39 +0000956 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000957 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman2061e892003-11-22 01:23:39 +0000958
Chris Lattnerb4b0ce72007-05-18 00:44:29 +0000959 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000960 Last modified: $Date$
Misha Brukman2061e892003-11-22 01:23:39 +0000961</address>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000962
Misha Brukman500bc302003-11-22 00:38:41 +0000963</body>
964</html>