blob: edaecd1f0d0ec2999b4be18a48889c6bfd1d7746 [file] [log] [blame]
Misha Brukman80731b92003-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 Spencere4190fa2004-11-18 18:38:58 +00005 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Misha Brukman80731b92003-11-22 00:38:41 +00006 <link rel="stylesheet" href="llvm.css" type="text/css">
Chris Lattner7fad44b2009-02-25 04:41:31 +00007 <title>LLVM 2.5 Release Notes</title>
Misha Brukman80731b92003-11-22 00:38:41 +00008</head>
9<body>
Chris Lattner3d482502003-10-02 04:57:28 +000010
Chris Lattner7fad44b2009-02-25 04:41:31 +000011<div class="doc_title">LLVM 2.5 Release Notes</div>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000012
Chris Lattner3d482502003-10-02 04:57:28 +000013<ol>
Misha Brukman80731b92003-11-22 00:38:41 +000014 <li><a href="#intro">Introduction</a></li>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000015 <li><a href="#subproj">Sub-project Status Update</a></li>
Chris Lattner53e06f92009-02-26 22:33:38 +000016 <li><a href="#externalproj">External Projects Using LLVM 2.5</a></li>
Chris Lattnerd1094e02009-03-02 02:37:32 +000017 <li><a href="#whatsnew">What's New in LLVM 2.5?</a></li>
Chris Lattner77a51732004-04-30 22:17:12 +000018 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Misha Brukman80731b92003-11-22 00:38:41 +000019 <li><a href="#portability">Portability and Supported Platforms</a></li>
Dan Gohmanad888912008-10-14 16:23:02 +000020 <li><a href="#knownproblems">Known Problems</a></li>
Misha Brukman80731b92003-11-22 00:38:41 +000021 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner3d482502003-10-02 04:57:28 +000022</ol>
23
Chris Lattner020e1fc2004-05-23 21:07:27 +000024<div class="doc_author">
Dan Gohmanad888912008-10-14 16:23:02 +000025 <p>Written by the <a href="http://llvm.org">LLVM Team</a></p>
Misha Brukman80731b92003-11-22 00:38:41 +000026</div>
Chris Lattner3d482502003-10-02 04:57:28 +000027
28<!-- *********************************************************************** -->
Misha Brukman80731b92003-11-22 00:38:41 +000029<div class="doc_section">
30 <a name="intro">Introduction</a>
31</div>
Chris Lattner3d482502003-10-02 04:57:28 +000032<!-- *********************************************************************** -->
33
Misha Brukman80731b92003-11-22 00:38:41 +000034<div class="doc_text">
35
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000036<p>This document contains the release notes for the LLVM Compiler
Chris Lattner7fad44b2009-02-25 04:41:31 +000037Infrastructure, release 2.5. Here we describe the status of LLVM, including
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000038major improvements from the previous release and significant known problems.
Mikhail Glushenkov25422542009-03-01 18:09:47 +000039All LLVM releases may be downloaded from the <a
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000040href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
Chris Lattner62495762003-10-02 16:38:05 +000041
Chris Lattnerb5bb5972004-12-07 08:04:13 +000042<p>For more information about LLVM, including information about the latest
Chris Lattnera69595e2005-10-29 07:07:09 +000043release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattnere7525b52003-10-07 21:38:31 +000044web site</a>. If you have questions or comments, the <a
Chris Lattner1e4d5bc2008-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 Lattner3d482502003-10-02 04:57:28 +000047
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000048<p>Note that if you are reading this file from a Subversion checkout or the
Chris Lattner0a1fd102007-09-21 03:54:09 +000049main LLVM web page, this document applies to the <i>next</i> release, not the
Gabor Greif355f81c2008-10-14 11:00:32 +000050current one. To see the release notes for a specific release, please see the
Chris Lattner0a1fd102007-09-21 03:54:09 +000051<a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman80731b92003-11-22 00:38:41 +000052
53</div>
Chris Lattner3d482502003-10-02 04:57:28 +000054
Chris Lattner7fad44b2009-02-25 04:41:31 +000055<!-- Unfinished features in 2.5:
Chris Lattner2b8a52e2008-02-10 07:46:44 +000056 Machine LICM
57 Machine Sinking
Chris Lattnerd02da042009-02-25 06:34:50 +000058 target-specific intrinsics
59 gold lto plugin
Chris Lattner3ab27b72009-02-25 07:32:53 +000060 pre-alloc splitter, strong phi elim
Gabor Greif75b2f762009-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 Lattnerd02da042009-02-25 06:34:50 +000063 debug info for optimized code
Chris Lattner07bf7e92009-02-26 07:29:17 +000064 interpreter + libffi
Chris Lattner53e06f92009-02-26 22:33:38 +000065 postalloc scheduler: anti dependence breaking, hazard recognizer?
66
Chris Lattnerd1094e02009-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 Lattner2b8a52e2008-02-10 07:46:44 +000070 -->
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000071
Chris Lattnerc4d68542008-10-12 19:47:48 +000072 <!-- for announcement email:
Chris Lattnerd02da042009-02-25 06:34:50 +000073 -->
Chris Lattner2b8a52e2008-02-10 07:46:44 +000074
Chris Lattnerf5cd9862008-10-13 18:01:01 +000075<!-- *********************************************************************** -->
76<div class="doc_section">
77 <a name="subproj">Sub-project Status Update</a>
Chris Lattner625a3d82008-06-08 21:34:41 +000078</div>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000079<!-- *********************************************************************** -->
Chris Lattner625a3d82008-06-08 21:34:41 +000080
81<div class="doc_text">
Chris Lattnerc75fd522008-06-08 21:58:17 +000082<p>
Chris Lattner7fad44b2009-02-25 04:41:31 +000083The LLVM 2.5 distribution currently consists of code from the core LLVM
Bill Wendling87adbe42009-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 Wendlingf170d2e2009-03-02 04:28:57 +000089</p>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000090
Chris Lattnerc75fd522008-06-08 21:58:17 +000091</div>
92
Chris Lattnerf5cd9862008-10-13 18:01:01 +000093
Chris Lattnerc75fd522008-06-08 21:58:17 +000094<!--=========================================================================-->
Chris Lattnerf5cd9862008-10-13 18:01:01 +000095<div class="doc_subsection">
Chris Lattner44c09cd2008-10-13 18:11:54 +000096<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
Chris Lattnerc75fd522008-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 Wendling87adbe42009-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 Lattnerf70a0242009-02-25 05:09:54 +0000105parsing and code generation support is now very solid. For example, it is
Bill Wendling87adbe42009-03-02 04:28:18 +0000106capable of successfully building many real-world applications for X86-32
107andX86-64,
Chris Lattner53e06f92009-02-26 22:33:38 +0000108including <a href="http://wiki.freebsd.org/BuildingFreeBSDWithClang">the FreeBSD
Bill Wendling87adbe42009-03-02 04:28:18 +0000109kernel</a>. C++ is also
110making <a href="http://clang.llvm.org/cxx_status.html">incredible progress</a>,
111and work on templates has recently started.</p>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000112
Chris Lattnerf70a0242009-02-25 05:09:54 +0000113<p>While Clang is not yet production quality, it is progressing very nicely and
114is quite usable for building many C and Objective-C applications. If you are
115interested in fast compiles and good diagnostics, we encourage you to try it out
Chris Lattnerd02da042009-02-25 06:34:50 +0000116by <a href="http://clang.llvm.org/get_started.html">building from mainline</a>
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000117and reporting any issues you hit to the <a
Chris Lattnerf70a0242009-02-25 05:09:54 +0000118href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">Clang front-end mailing
119list</a>.</p>
120
121<p>In the LLVM 2.5 time-frame, the Clang team has made many improvements:</p>
Bill Wendlingef362462008-10-27 09:27:33 +0000122
Daniel Dunbarc11b40f2008-10-14 23:25:09 +0000123<ul>
Chris Lattnerf70a0242009-02-25 05:09:54 +0000124<li>Clang now has a new driver, which is focused on providing a GCC-compatible
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000125 interface.</li>
126<li>The X86-64 ABI is now supported.</li>
127<li>Precompiled header support is now implemented.</li>
Chris Lattnerf70a0242009-02-25 05:09:54 +0000128<li>Objective-C support is significantly improved beyond LLVM 2.4, supporting
129 many features, such as Objective-C Garbage Collection.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000130<li>Many many bugs are fixed and many features have been added.</li>
Bill Wendling87adbe42009-03-02 04:28:18 +0000131</ul>
Chris Lattner44c09cd2008-10-13 18:11:54 +0000132</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
Ted Kremenekc11fae82009-02-27 07:01:32 +0000141<p>Previously announced in the last LLVM release, the Clang project also
142includes an early stage static source code analysis tool for <a
143href="http://clang.llvm.org/StaticAnalysis.html">automatically finding bugs</a>
144in C and Objective-C programs. The tool performs a growing set of checks to find
145bugs that occur on a specific path within a program.</p>
Chris Lattnerbcffa5a2008-10-14 00:52:49 +0000146
Ted Kremenekc11fae82009-02-27 07:01:32 +0000147<p>In the LLVM 2.5 time-frame there have been many significant improvements to
148the analyzer's core path simulation engine and machinery for generating
149path-based bug reports to end-users. Particularly noteworthy improvements
150include experimental support for full field-sensitivity and reasoning about heap
151objects as well as an improved value-constraints subengine that does a much
152better job of reasoning about inequality relationships (e.g., <tt>x &gt; 2</tt>)
153between variables and constants.
Ted Kremenek3db01842008-10-14 05:14:21 +0000154
John Criswellea03c9d2009-03-02 15:28:15 +0000155<p>The set of checks performed by the static analyzer continues to expand, and
Ted Kremenekc11fae82009-02-27 07:01:32 +0000156future plans for the tool include full source-level inter-procedural analysis
157and deeper checks such as buffer overrun detection. There are many opportunities
158to extend and enhance the static analyzer, and anyone interested in working on
159this project is encouraged to get involved!</p>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000160
161</div>
162
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000163<!--=========================================================================-->
164<div class="doc_subsection">
Nicolas Geoffraye5ec9322008-10-14 19:23:04 +0000165<a name="vmkit">VMKit: JVM/CLI Virtual Machine Implementation</a>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000166</div>
167
168<div class="doc_text">
169<p>
Nicolas Geoffraye5ec9322008-10-14 19:23:04 +0000170The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation of
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000171a JVM and a CLI Virtual Machines (Microsoft .NET is an
172implementation of the CLI) using the Just-In-Time compiler of LLVM.</p>
173
Nicolas Geoffray08a8d0e2009-03-02 09:25:38 +0000174<p>Following LLVM 2.5, VMKit has its second release that you can find on its
Nicolas Geoffray54efd492008-10-15 20:25:04 +0000175<a href="http://vmkit.llvm.org/releases/">webpage</a>. The release includes
176bug fixes, cleanup and new features. The major changes are:</p>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000177
Nicolas Geoffraye5ec9322008-10-14 19:23:04 +0000178<ul>
179
Chris Lattnerd38d5e82009-02-26 05:20:36 +0000180<li>Ahead of Time compiler: compiles .class files to llvm .bc. VMKit uses this
Gabor Greif01c2ec82009-03-02 11:34:51 +0000181functionality to native compile the standard classes (e.g. java.lang.String).
Gabor Greif75b2f762009-03-02 12:02:51 +0000182Users can compile AoT .class files into dynamic libraries and run them with the
Chris Lattnerd38d5e82009-02-26 05:20:36 +0000183help of VMKit.</li>
184
185<li>New exception model: the dwarf exception model is very slow for
186exception-intensive applications, so the JVM has had a new implementation of
187exceptions which check at each function call if an exception happened. There is
188a low performance penalty on applications without exceptions, but it is a big
189gain for exception-intensive applications. For example the jack benchmark in
190Spec JVM98 is 6x faster (performance gain of 83%).</li>
191
Nicolas Geoffray08a8d0e2009-03-02 09:25:38 +0000192<li>User-level management of thread stacks, so that thread local data access
193at runtime is fast and portable. </li>
194
195<li>Implementation of biased locking for faster object synchronizations at
196runtime.</li>
197
198<li>New support for OSX/X64, Linux/X64 (with the Boehm GC) and Linux/ppc32.</li>
Nicolas Geoffraye5ec9322008-10-14 19:23:04 +0000199
200</ul>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000201</div>
202
Chris Lattner53e06f92009-02-26 22:33:38 +0000203<!-- *********************************************************************** -->
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>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000216<a href="http://pure-lang.googlecode.com/">Pure</a>
217is an algebraic/functional programming language based on term rewriting.
Chris Lattner53e06f92009-02-26 22:33:38 +0000218Programs are collections of equations which are used to evaluate expressions in
219a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation,
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000220lexical closures, a hygienic macro system (also based on term rewriting),
Chris Lattner53e06f92009-02-26 22:33:38 +0000221built-in list and matrix support (including list and matrix comprehensions) and
222an 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
226MATLAB-style matrices in order to support numeric computations and signal
227processing in an efficient way. Pure is mainly aimed at mathematical
228applications right now, but it has been designed as a general purpose language.
229The dynamic interpreter environment and the C interface make it possible to use
230it 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>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000242<a href="http://www.dsource.org/projects/ldc">LDC</a> is an implementation of
243the D Programming Language using the LLVM optimizer and code generator.
John Criswellea03c9d2009-03-02 15:28:15 +0000244The LDC project works great with the LLVM 2.5 release. General improvements in
245this
Chris Lattnerd1094e02009-03-02 02:37:32 +0000246cycle have included new inline asm constraint handling, better debug info
247support, general bugfixes, and better x86-64 support. This has allowed
Chris Lattner53e06f92009-02-26 22:33:38 +0000248some major improvements in LDC, getting us much closer to being as
249fully featured as the original DMD compiler from DigitalMars.
250</p>
251</div>
252
Chris Lattnerfb23a962009-02-28 18:58:01 +0000253<!--=========================================================================-->
254<div class="doc_subsection">
255<a name="RoadsendPHP">Roadsend PHP</a>
256</div>
257
258<div class="doc_text">
Chris Lattnerd1094e02009-03-02 02:37:32 +0000259<p><a href="http://code.roadsend.com/rphp">Roadsend PHP</a> (rphp) is an open
Chris Lattner0c72d8f2009-03-02 19:07:24 +0000260source implementation of the PHP programming
261language that uses LLVM for its optimizer, JIT, and static compiler. This is a
262reimplementation of an earlier project that is now based on LLVM.</p>
Chris Lattnerfb23a962009-02-28 18:58:01 +0000263</div>
Chris Lattner53e06f92009-02-26 22:33:38 +0000264
Chris Lattnerc75fd522008-06-08 21:58:17 +0000265
266<!-- *********************************************************************** -->
267<div class="doc_section">
Chris Lattnerd1094e02009-03-02 02:37:32 +0000268 <a name="whatsnew">What's New in LLVM 2.5?</a>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000269</div>
270<!-- *********************************************************************** -->
271
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000272<div class="doc_text">
273
Bill Wendlingef362462008-10-27 09:27:33 +0000274<p>This release includes a huge number of bug fixes, performance tweaks, and
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000275minor improvements. Some of the major improvements and new features are listed
276in this section.
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000277</p>
278</div>
279
Chris Lattnerc75fd522008-06-08 21:58:17 +0000280<!--=========================================================================-->
Chris Lattner625a3d82008-06-08 21:34:41 +0000281<div class="doc_subsection">
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000282<a name="majorfeatures">Major New Features</a>
283</div>
284
285<div class="doc_text">
286
Chris Lattner7fad44b2009-02-25 04:41:31 +0000287<p>LLVM 2.5 includes several major new capabilities:</p>
Chris Lattner97beb512007-05-14 06:56:09 +0000288
289<ul>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000290<li>LLVM 2.5 includes a brand new <a
291href="http://en.wikipedia.org/wiki/XCore">XCore</a> backend.</li>
Chris Lattnerd02da042009-02-25 06:34:50 +0000292
Bill Wendlingb3921bf2009-03-02 07:42:15 +0000293<li>llvm-gcc now generally supports the GFortran front-end, and the precompiled
Chris Lattnerd1094e02009-03-02 02:37:32 +0000294release binaries now support Fortran, even on Mac OS/X.</li>
Chris Lattnerd02da042009-02-25 06:34:50 +0000295
Chris Lattnerd1094e02009-03-02 02:37:32 +0000296<li>CMake is now used by the <a href="GettingStartedVS.html">LLVM build process
297on Windows</a>. It automatically generates Visual Studio project files (and
298more) from a set of simple text files. This makes it much easier to
299maintain. In time, we'd like to standardize on CMake for everything.</li>
Chris Lattner07bf7e92009-02-26 07:29:17 +0000300
Chris Lattnerd1094e02009-03-02 02:37:32 +0000301<li>LLVM 2.5 now uses (and includes) Google Test for unit testing.</li>
Chris Lattner07bf7e92009-02-26 07:29:17 +0000302
Chris Lattnerd1094e02009-03-02 02:37:32 +0000303<li>The LLVM native code generator now supports arbitrary precision integers.
304Types like <tt>i33</tt> have long been valid in the LLVM IR, but were previously
305only supported by the interpreter. Note that the C backend still does not
306support these.</li>
Chris Lattner3ab27b72009-02-25 07:32:53 +0000307
John Criswellea03c9d2009-03-02 15:28:15 +0000308<li>LLVM 2.5 no longer uses 'bison,' so it is easier to build on Windows.</li>
Chris Lattner458e79f2008-02-10 08:18:42 +0000309</ul>
310
Chris Lattner97beb512007-05-14 06:56:09 +0000311</div>
312
Chris Lattnerb7112222008-06-05 06:25:56 +0000313
314<!--=========================================================================-->
315<div class="doc_subsection">
Chris Lattner625a3d82008-06-08 21:34:41 +0000316<a name="llvm-gcc">llvm-gcc 4.2 Improvements</a>
Chris Lattnerb7112222008-06-05 06:25:56 +0000317</div>
318
319<div class="doc_text">
320
Chris Lattner591ef272008-10-13 20:47:20 +0000321<p>LLVM fully supports the llvm-gcc 4.2 front-end, which marries the GCC
322front-ends and driver with the LLVM optimizer and code generator. It currently
323includes support for the C, C++, Objective-C, Ada, and Fortran front-ends.</p>
Chris Lattnerb7112222008-06-05 06:25:56 +0000324
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000325<ul>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000326<li>In this release, the GCC inliner is completely disabled. Previously the GCC
327inliner was used to handle always-inline functions and other cases. This caused
328problems with code size growth, and it is completely disabled in this
329release.</li>
330
331<li>llvm-gcc (and LLVM in general) now support code generation for stack
332canaries, which is an effective form of <a
333href="http://en.wikipedia.org/wiki/Stack-smashing_protection">buffer overflow
334protection</a>. llvm-gcc supports this with the <tt>-fstack-protector</tt>
335command line option (just like GCC). In LLVM IR, you can request code
336generation for stack canaries with function attributes.
337</li>
Gabor Greif7f39fb52008-06-09 06:06:18 +0000338</ul>
Chris Lattnerb7112222008-06-05 06:25:56 +0000339
Chris Lattnerb7112222008-06-05 06:25:56 +0000340</div>
341
342
Chris Lattner0a1fd102007-09-21 03:54:09 +0000343<!--=========================================================================-->
344<div class="doc_subsection">
Chris Lattnerd1094e02009-03-02 02:37:32 +0000345<a name="coreimprovements">LLVM IR and Core Improvements</a>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000346</div>
347
348<div class="doc_text">
Chris Lattnerd1094e02009-03-02 02:37:32 +0000349<p>LLVM IR has several new features that are used by our existing front-ends and
350can be useful if you are writing a front-end for LLVM:</p>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000351
Chris Lattnerb7112222008-06-05 06:25:56 +0000352<ul>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000353<li>The <a href="LangRef.html#i_shufflevector">shufflevector</a> instruction
354has been generalized to allow different shuffle mask width than its input
355vectors. This allows you to use shufflevector to combine two
356"&lt;4 x float&gt;" vectors into a "&lt;8 x float&gt;" for example.</li>
357
358<li>LLVM IR now supports new intrinsics for computing and acting on <a
359href="LangRef.html#int_overflow">overflow of integer operations</a>. This allows
360efficient code generation for languages that must trap or throw an exception on
361overflow. While these intrinsics work on all targets, they only generate
362efficient code on X86 so far.</li>
363
364<li>LLVM IR now supports a new <a href="LangRef.html#linkage">private
365linkage</a> type to produce labels that are stripped by the assembler before it
366produces a .o file (thus they are invisible to the linker).</li>
367
368<li>LLVM IR supports two new attributes for better alias analysis. The <a
369href="LangRef.html#paramattrs">noalias</a> attribute can now be used on the
370return value of a function to indicate that it returns new memory (e.g.
Duncan Sandsd16340c2009-03-02 16:58:00 +0000371'malloc', 'calloc', etc).
372The new <a href="LangRef.html#paramattrs">nocapture</a> attribute can be used
373on pointer arguments to indicate that the function does not return the pointer,
374store it in an object that outlives the call, or let the value of the pointer
375escape from the function in any other way.
376Note that it is the pointer itself that must not escape, not the value it
377points to: loading a value out of the pointer is perfectly fine.
378Many standard library functions (e.g. 'strlen', 'memcpy') have this property.
379<!-- The simplifylibcalls pass applies these attributes to standard libc functions. -->
380</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000381
382<li>The parser for ".ll" files in lib/AsmParser is now completely rewritten as a
383recursive descent parser. This parser produces better error messages (including
John Criswellea03c9d2009-03-02 15:28:15 +0000384caret diagnostics), is less fragile (less likely to crash on strange things),
385does not leak memory, is more efficient, and eliminates LLVM's last use of the
Chris Lattnerd1094e02009-03-02 02:37:32 +0000386'bison' tool.</li>
387
388<li>Debug information representation and manipulation internals have been
389 consolidated to use a new set of classes in
John Criswellea03c9d2009-03-02 15:28:15 +0000390 <tt>llvm/Analysis/DebugInfo.h</tt>. These routines are more
Chris Lattnerd1094e02009-03-02 02:37:32 +0000391 efficient, robust, and extensible and replace the older mechanisms.
392 llvm-gcc, clang, and the code generator now use them to create and process
393 debug information.</li>
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000394
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000395</ul>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +0000396
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000397</div>
398
399<!--=========================================================================-->
400<div class="doc_subsection">
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000401<a name="optimizer">Optimizer Improvements</a>
402</div>
403
404<div class="doc_text">
405
John Criswellea03c9d2009-03-02 15:28:15 +0000406<p>In addition to a large array of bug fixes and minor performance tweaks, this
Chris Lattner25879d72008-10-13 21:50:36 +0000407release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000408
409<ul>
410
Chris Lattnerd1094e02009-03-02 02:37:32 +0000411<li>The loop optimizer now improves floating point induction variables in
412several ways, including adding shadow induction variables to avoid
413"integer &lt;-&gt; floating point" conversions in loops when safe.</li>
414
John Criswellea03c9d2009-03-02 15:28:15 +0000415<li>The "-mem2reg" pass is now much faster on code with large basic blocks.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000416
417<li>The "-jump-threading" pass is more powerful: it is iterative
418 and handles threading based on values with fully and partially redundant
419 loads.</li>
420
421<li>The "-memdep" memory dependence analysis pass (used by GVN and memcpyopt) is
422 both faster and more aggressive.</li>
423
424<li>The "-scalarrepl" scalar replacement of aggregates pass is more aggressive
425 about promoting unions to registers.</li>
Chris Lattner25879d72008-10-13 21:50:36 +0000426
Chris Lattner7795ea92008-06-08 02:45:07 +0000427</ul>
428
429</div>
430
431<!--=========================================================================-->
432<div class="doc_subsection">
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000433<a name="codegen">Target Independent Code Generator Improvements</a>
Chris Lattner7795ea92008-06-08 02:45:07 +0000434</div>
435
436<div class="doc_text">
437
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000438<p>We have put a significant amount of work into the code generator
439infrastructure, which allows us to implement more aggressive algorithms and make
440it run faster:</p>
Chris Lattner7795ea92008-06-08 02:45:07 +0000441
442<ul>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000443<li>The <a href="WritingAnLLVMBackend.html">Writing an LLVM Compiler
444Backend</a> document has been greatly expanded and is substantially more
445complete.</li>
446
447<li>The SelectionDAG type legalization logic has been completely rewritten, is
448now more powerful (it supports arbitrary precision integer types for example),
John Criswellea03c9d2009-03-02 15:28:15 +0000449and is more correct in several corner cases. The type legalizer converts
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000450operations on types that are not natively supported by the target machine into
451equivalent code sequences that only use natively supported types. The old type
452legalizer is still available (for now) and will be used if
453<tt>-disable-legalize-types</tt> is passed to the code generator.
Duncan Sands966fd262009-02-25 11:50:08 +0000454</li>
Chris Lattner7795ea92008-06-08 02:45:07 +0000455
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000456<li>The code generator now supports widening illegal vectors to larger legal
457ones (for example, converting operations on &lt;3 x float&gt; to work on
458&lt;4 x float&gt;) which is very important for common graphics
459applications.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000460
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000461<li>The assembly printers for each target are now split out into their own
462libraries that are separate from the main code generation logic. This reduces
John Criswellea03c9d2009-03-02 15:28:15 +0000463the code size of JIT compilers by not requiring them to be linked in.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000464
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000465<li>The 'fast' instruction selection path (used at -O0 and for fast JIT
466 compilers) now supports accelerating codegen for code that uses exception
467 handling constructs.</li>
468
469<li>The optional PBQP register allocator now supports register coalescing.</li>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000470</ul>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000471</div>
472
Chris Lattnerd1094e02009-03-02 02:37:32 +0000473<!--=========================================================================-->
474<div class="doc_subsection">
475<a name="x86">X86-32 and X86-64 Target Improvements</a>
476</div>
477
478<div class="doc_text">
479<p>New features of the X86 target include:
480</p>
481
482<ul>
Bill Wendling89cd82f2009-03-02 07:54:14 +0000483<li>The <tt><a href="LangRef.html#int_returnaddress">llvm.returnaddress</a></tt>
484intrinsic (which is used to implement <tt>__builtin_return_address</tt>) now
485supports non-zero stack depths on X86.</li>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000486
487<li>The X86 backend now supports code generation of vector shift operations
488using SSE instructions.</li>
489
Bill Wendling89cd82f2009-03-02 07:54:14 +0000490<li>X86-64 code generation now takes advantage of red zone, unless the
491<tt>-mno-red-zone</tt> option is specified.</li>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000492
493<li>The X86 backend now supports using address space #256 in LLVM IR as a way of
494performing memory references off the GS segment register. This allows a
495front-end to take advantage of very low-level programming techniques when
Gabor Greif01c2ec82009-03-02 11:34:51 +0000496targeting X86 CPUs. See <tt>test/CodeGen/X86/movgs.ll</tt> for a simple
Bill Wendling89cd82f2009-03-02 07:54:14 +0000497example.</li>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000498
499<li>The X86 backend now supports a <tt>-disable-mmx</tt> command line option to
500 prevent use of MMX even on chips that support it. This is important for cases
Bill Wendling89cd82f2009-03-02 07:54:14 +0000501 where code does not contain the proper <tt>llvm.x86.mmx.emms</tt>
502 intrinsics.</li>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000503
Bill Wendling89cd82f2009-03-02 07:54:14 +0000504<li>The X86 JIT now detects the new Intel <a
505 href="http://en.wikipedia.org/wiki/Intel_Core_i7">Core i7</a> and <a
John Criswellea03c9d2009-03-02 15:28:15 +0000506 href="http://en.wikipedia.org/wiki/Intel_Atom">Atom</a> chips and
507 auto-configures itself appropriately for the features of these chips.</li>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000508
509<li>The JIT now supports exception handling constructs on Linux/X86-64 and
510 Darwin/x86-64.</li>
Bill Wendling89cd82f2009-03-02 07:54:14 +0000511
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000512<li>The JIT supports Thread Local Storage (TLS) on Linux/X86-32 but not yet on
513 X86-64.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000514</ul>
515
Chris Lattnerd1094e02009-03-02 02:37:32 +0000516</div>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000517
518<!--=========================================================================-->
519<div class="doc_subsection">
Chris Lattner6b8bf782009-02-26 07:32:11 +0000520<a name="pic16">PIC16 Target Improvements</a>
521</div>
522
523<div class="doc_text">
524<p>New features of the PIC16 target include:
525</p>
526
527<ul>
528<li>Both direct and indirect load/stores work now.</li>
529<li>Logical, bitwise and conditional operations now work for integer data
530types.</li>
531<li>Function calls involving basic types work now.</li>
532<li>Support for integer arrays.</li>
John Criswellea03c9d2009-03-02 15:28:15 +0000533<li>The compiler can now emit libcalls for operations not supported by m/c
Bill Wendling89cd82f2009-03-02 07:54:14 +0000534instructions.</li>
535<li>Support for both data and ROM address spaces.</li>
Chris Lattner6b8bf782009-02-26 07:32:11 +0000536</ul>
537
538<p>Things not yet supported:</p>
539
540<ul>
541<li>Floating point.</li>
Bill Wendling89cd82f2009-03-02 07:54:14 +0000542<li>Passing/returning aggregate types to and from functions.</li>
Chris Lattner6b8bf782009-02-26 07:32:11 +0000543<li>Variable arguments.</li>
544<li>Indirect function calls.</li>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000545<li>Interrupts/programs.</li>
Chris Lattner6b8bf782009-02-26 07:32:11 +0000546<li>Debug info.</li>
Chris Lattner6b8bf782009-02-26 07:32:11 +0000547</ul>
548
549</div>
550
551
552<!--=========================================================================-->
553<div class="doc_subsection">
Chris Lattnerc92d7692009-03-01 02:30:21 +0000554<a name="llvmc">Improvements in LLVMC</a>
555</div>
556
557<div class="doc_text">
558<p>New features include:</p>
559
560<ul>
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000561<li>Beginning with LLVM 2.5, <tt>llvmc2</tt> is known as
562 just <tt>llvmc</tt>. The old <tt>llvmc</tt> driver was removed.</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000563
564<li>The Clang plugin was substantially improved and is now enabled
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000565 by default. The command <tt>llvmc --clang</tt> can be now used as a
566 synonym to <tt>ccc</tt>.</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000567
Bill Wendling89cd82f2009-03-02 07:54:14 +0000568<li>There is now a <tt>--check-graph</tt> option, which is supposed to catch
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000569 common errors like multiple default edges, mismatched output/input language
570 names and cycles. In general, these checks can't be done at compile-time
571 because of the need to support plugins.</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000572
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000573<li>Plugins are now more flexible and can refer to compilation graph nodes and
574 options defined in other plugins. To manage dependencies, a priority-sorting
Bill Wendling89cd82f2009-03-02 07:54:14 +0000575 mechanism was introduced. This change affects the TableGen file syntax. See the
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000576 documentation for details.</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000577
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000578<li>Hooks can now be provided with arguments. The syntax is "<tt>$CALL(MyHook,
Bill Wendling89cd82f2009-03-02 07:54:14 +0000579 'Arg1', 'Arg2', 'Arg3')</tt>".</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000580
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000581<li>A new option type: multi-valued option, for options that take more than one
582 argument (for example, "<tt>-foo a b c</tt>").</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000583
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000584<li>New option properties: '<tt>one_or_more</tt>', '<tt>zero_or_more</tt>',
585'<tt>hidden</tt>' and '<tt>really_hidden</tt>'.</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000586
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000587<li>The '<tt>case</tt>' expression gained an '<tt>error</tt>' action and
588 an '<tt>empty</tt>' test (equivalent to "<tt>(not (not_empty ...))</tt>").</li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000589
590<li>Documentation now looks more consistent to the rest of the LLVM
591 docs. There is also a man page now.</li>
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000592
Chris Lattnerc92d7692009-03-01 02:30:21 +0000593</ul>
594
595</div>
596
Chris Lattner6cb64032008-06-05 08:02:49 +0000597
598<!--=========================================================================-->
599<div class="doc_subsection">
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000600<a name="changes">Major Changes and Removed Features</a>
601</div>
602
603<div class="doc_text">
604
Chris Lattner934e2d42008-10-13 22:06:31 +0000605<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattner7fad44b2009-02-25 04:41:31 +0000606on LLVM 2.4, this section lists some "gotchas" that you may run into upgrading
Chris Lattner934e2d42008-10-13 22:06:31 +0000607from the previous release.</p>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000608
609<ul>
610
Bill Wendling89cd82f2009-03-02 07:54:14 +0000611<li>llvm-gcc defaults to <tt>-fno-math-errno</tt> on all X86 targets.</li>
612
Chris Lattner934e2d42008-10-13 22:06:31 +0000613</ul>
614
615
616<p>In addition, many APIs have changed in this release. Some of the major LLVM
617API changes are:</p>
618
619<ul>
Gabor Greif176c12d2009-03-02 12:23:55 +0000620<li>Some deprecated interfaces to create <tt>Instruction</tt> subclasses, that
John Criswellea03c9d2009-03-02 15:28:15 +0000621 were spelled with lower case "create," have been removed.</li>
Devang Pateldbf83832008-10-14 20:03:43 +0000622</ul>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000623
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000624</div>
625
626
627
Chris Lattner62495762003-10-02 16:38:05 +0000628<!-- *********************************************************************** -->
Misha Brukman80731b92003-11-22 00:38:41 +0000629<div class="doc_section">
630 <a name="portability">Portability and Supported Platforms</a>
631</div>
Chris Lattner62495762003-10-02 16:38:05 +0000632<!-- *********************************************************************** -->
633
Misha Brukman80731b92003-11-22 00:38:41 +0000634<div class="doc_text">
635
John Criswell64307722004-12-08 20:35:47 +0000636<p>LLVM is known to work on the following platforms:</p>
Chris Lattner2c7b0872004-06-01 18:22:41 +0000637
638<ul>
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000639<li>Intel and AMD machines (IA32, X86-64, AMD64, EMT-64) running Red Hat
Chris Lattner2a092392008-11-10 05:40:34 +0000640Linux, Fedora Core and FreeBSD (and probably other unix-like systems).</li>
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000641<li>PowerPC and X86-based Mac OS X systems, running 10.3 and above in 32-bit
Chris Lattner2a092392008-11-10 05:40:34 +0000642and 64-bit modes.</li>
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000643<li>Intel and AMD machines running on Win32 using MinGW libraries (native).</li>
Chris Lattnerbee7b322007-05-23 04:39:32 +0000644<li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
645 support is available for native builds with Visual C++).</li>
Gabor Greif80ae8a72008-06-05 18:39:01 +0000646<li>Sun UltraSPARC workstations running Solaris 10.</li>
John Criswelld5234922005-05-13 20:28:15 +0000647<li>Alpha-based machines running Debian GNU/Linux.</li>
Gabor Greif80ae8a72008-06-05 18:39:01 +0000648<li>Itanium-based (IA64) machines running Linux and HP-UX.</li>
Chris Lattner2c7b0872004-06-01 18:22:41 +0000649</ul>
650
Chris Lattner618a99f2008-06-05 06:57:39 +0000651<p>The core LLVM infrastructure uses GNU autoconf to adapt itself
Brian Gaekee3e557e2004-05-09 05:28:35 +0000652to the machine and operating system on which it is built. However, minor
653porting may be required to get LLVM to work on new platforms. We welcome your
654portability patches and reports of successful builds or error messages.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000655
Misha Brukman80731b92003-11-22 00:38:41 +0000656</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000657
658<!-- *********************************************************************** -->
Misha Brukman80731b92003-11-22 00:38:41 +0000659<div class="doc_section">
660 <a name="knownproblems">Known Problems</a>
661</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000662<!-- *********************************************************************** -->
663
Misha Brukman80731b92003-11-22 00:38:41 +0000664<div class="doc_text">
665
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000666<p>This section contains significant known problems with the LLVM system,
Chris Lattner2a092392008-11-10 05:40:34 +0000667listed by component. If you run into a problem, please check the <a
Chris Lattnera69595e2005-10-29 07:07:09 +0000668href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattnerb84f3322003-12-12 21:22:16 +0000669there isn't already one.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000670
Misha Brukman80731b92003-11-22 00:38:41 +0000671</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000672
Chris Lattnerb911de42004-03-14 02:03:02 +0000673<!-- ======================================================================= -->
674<div class="doc_subsection">
675 <a name="experimental">Experimental features included with this release</a>
676</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000677
Chris Lattnerb911de42004-03-14 02:03:02 +0000678<div class="doc_text">
679
Misha Brukmanfa50a222004-05-12 21:46:05 +0000680<p>The following components of this LLVM release are either untested, known to
681be broken or unreliable, or are in early development. These components should
682not be relied on, and bugs should not be filed against them, but they may be
683useful to some people. In particular, if you would like to work on one of these
Chris Lattnere38ac152008-02-12 06:29:45 +0000684components, please contact us on the <a
685href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerb911de42004-03-14 02:03:02 +0000686
687<ul>
Gabor Greif20564a02008-10-14 11:31:14 +0000688<li>The MSIL, IA64, Alpha, SPU, MIPS, and PIC16 backends are experimental.</li>
Bill Wendling89cd82f2009-03-02 07:54:14 +0000689<li>The <tt>llc</tt> "<tt>-filetype=asm</tt>" (the default) is the only
690 supported value for this option.</li>
Chris Lattnerb911de42004-03-14 02:03:02 +0000691</ul>
692
693</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000694
Misha Brukman80731b92003-11-22 00:38:41 +0000695<!-- ======================================================================= -->
696<div class="doc_subsection">
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000697 <a name="x86-be">Known problems with the X86 back-end</a>
John Criswell3bdbd302005-11-08 21:11:33 +0000698</div>
699
700<div class="doc_text">
701
702<ul>
Anton Korobeynikov486c7d32008-06-08 10:24:13 +0000703 <li>The X86 backend does not yet support
704 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
705 floating point stack</a>. It supports the 'f' and 't' constraints, but not
706 'u'.</li>
Chris Lattnerb076b002008-06-08 21:19:07 +0000707 <li>The X86 backend generates inefficient floating point code when configured
708 to generate code for systems that don't have SSE2.</li>
Duncan Sands0bc15262008-06-08 19:38:43 +0000709 <li>Win64 code generation wasn't widely tested. Everything should work, but we
John Criswellea03c9d2009-03-02 15:28:15 +0000710 expect small issues to happen. Also, llvm-gcc cannot build the mingw64
711 runtime currently due
Anton Korobeynikov486c7d32008-06-08 10:24:13 +0000712 to <a href="http://llvm.org/PR2255">several</a>
John Criswellea03c9d2009-03-02 15:28:15 +0000713 <a href="http://llvm.org/PR2257">bugs</a> and due to lack of support for
714 the
715 'u' inline assembly constraint and for X87 floating point inline assembly.</li>
Dan Gohman721b3722008-06-08 23:05:11 +0000716 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattnerd1094e02009-03-02 02:37:32 +0000717 <tt>va_arg</tt>. Currently, the llvm-gcc and front-ends support variadic
Dan Gohman721b3722008-06-08 23:05:11 +0000718 argument constructs on X86-64 by lowering them manually.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000719</ul>
720
721</div>
722
723<!-- ======================================================================= -->
724<div class="doc_subsection">
725 <a name="ppc-be">Known problems with the PowerPC back-end</a>
726</div>
727
728<div class="doc_text">
729
730<ul>
Nicolas Geoffray77d99502007-05-15 09:21:28 +0000731<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattnerbee7b322007-05-23 04:39:32 +0000732compilation, and lacks support for debug information.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000733</ul>
734
735</div>
736
737<!-- ======================================================================= -->
738<div class="doc_subsection">
Chris Lattner97beb512007-05-14 06:56:09 +0000739 <a name="arm-be">Known problems with the ARM back-end</a>
740</div>
741
742<div class="doc_text">
743
744<ul>
Chris Lattnerbee7b322007-05-23 04:39:32 +0000745<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sands47fc0a22007-09-26 15:59:54 +0000746processors, thumb programs can crash or produce wrong
Chris Lattnerbee7b322007-05-23 04:39:32 +0000747results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswellea03c9d2009-03-02 15:28:15 +0000748<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattner97beb512007-05-14 06:56:09 +0000749</li>
Chris Lattnerb076b002008-06-08 21:19:07 +0000750<li>There is a bug in QEMU-ARM (&lt;= 0.9.0) which causes it to incorrectly
751 execute
Chris Lattnerbee7b322007-05-23 04:39:32 +0000752programs compiled with LLVM. Please use more recent versions of QEMU.</li>
Chris Lattner97beb512007-05-14 06:56:09 +0000753</ul>
754
755</div>
756
757<!-- ======================================================================= -->
758<div class="doc_subsection">
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000759 <a name="sparc-be">Known problems with the SPARC back-end</a>
760</div>
761
762<div class="doc_text">
763
764<ul>
John Criswellea03c9d2009-03-02 15:28:15 +0000765<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000766 support the 64-bit SPARC ABI (-m64).</li>
767</ul>
768
769</div>
770
771<!-- ======================================================================= -->
772<div class="doc_subsection">
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000773 <a name="mips-be">Known problems with the MIPS back-end</a>
774</div>
775
776<div class="doc_text">
777
778<ul>
779<li>The O32 ABI is not fully supported.</li>
780<li>64-bit MIPS targets are not supported yet.</li>
781</ul>
782
783</div>
784
785<!-- ======================================================================= -->
786<div class="doc_subsection">
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000787 <a name="alpha-be">Known problems with the Alpha back-end</a>
788</div>
789
790<div class="doc_text">
791
792<ul>
793
794<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
795appropriate nops inserted to ensure restartability.</li>
796
John Criswell3bdbd302005-11-08 21:11:33 +0000797</ul>
798</div>
799
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000800<!-- ======================================================================= -->
801<div class="doc_subsection">
802 <a name="ia64-be">Known problems with the IA64 back-end</a>
803</div>
804
805<div class="doc_text">
806
807<ul>
John Criswellea03c9d2009-03-02 15:28:15 +0000808<li>The Itanium backend is highly experimental and has a number of known
Chris Lattner54d12102008-06-08 23:12:47 +0000809 issues. We are looking for a maintainer for the Itanium backend. If you
Gabor Greife4544f72008-10-15 10:47:24 +0000810 are interested, please contact the LLVMdev mailing list.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000811</ul>
812
813</div>
814
815<!-- ======================================================================= -->
816<div class="doc_subsection">
Chris Lattner97beb512007-05-14 06:56:09 +0000817 <a name="c-be">Known problems with the C back-end</a>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000818</div>
819
820<div class="doc_text">
821
822<ul>
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000823<li><a href="http://llvm.org/PR802">The C backend has only basic support for
824 inline assembly code</a>.</li>
Chris Lattner8e061162007-09-26 06:01:35 +0000825<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
826 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif75b2f762009-03-02 12:02:51 +0000827 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandse09506a2008-02-10 13:40:55 +0000828<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands3aa36732009-02-25 11:51:54 +0000829<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000830</ul>
831
832</div>
John Criswell3bdbd302005-11-08 21:11:33 +0000833
Misha Brukman80731b92003-11-22 00:38:41 +0000834
835<!-- ======================================================================= -->
836<div class="doc_subsection">
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000837 <a name="c-fe">Known problems with the llvm-gcc C front-end</a>
Misha Brukman80731b92003-11-22 00:38:41 +0000838</div>
Chris Lattner178f3db2003-10-02 05:07:23 +0000839
Misha Brukman80731b92003-11-22 00:38:41 +0000840<div class="doc_text">
Chris Lattner72a269f2006-03-03 00:34:26 +0000841
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000842<p>llvm-gcc does not currently support <a href="http://llvm.org/PR869">Link-Time
843Optimization</a> on most platforms "out-of-the-box". Please inquire on the
Gabor Greife4544f72008-10-15 10:47:24 +0000844LLVMdev mailing list if you are interested.</p>
Chris Lattner44124232006-08-08 17:27:28 +0000845
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000846<p>The only major language feature of GCC not supported by llvm-gcc is
847 the <tt>__builtin_apply</tt> family of builtins. However, some extensions
848 are only supported on some targets. For example, trampolines are only
Duncan Sands56448462008-06-08 20:18:35 +0000849 supported on some targets (these are used when you take the address of a
850 nested function).</p>
Misha Brukman80731b92003-11-22 00:38:41 +0000851
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000852<p>If you run into GCC extensions which are not supported, please let us know.
853</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000854
Misha Brukman80731b92003-11-22 00:38:41 +0000855</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000856
Misha Brukman80731b92003-11-22 00:38:41 +0000857<!-- ======================================================================= -->
858<div class="doc_subsection">
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000859 <a name="c++-fe">Known problems with the llvm-gcc C++ front-end</a>
Misha Brukman80731b92003-11-22 00:38:41 +0000860</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000861
Misha Brukman80731b92003-11-22 00:38:41 +0000862<div class="doc_text">
863
Chris Lattner97beb512007-05-14 06:56:09 +0000864<p>The C++ front-end is considered to be fully
Chris Lattnerb5bb5972004-12-07 08:04:13 +0000865tested and works for a number of non-trivial programs, including LLVM
Chris Lattner97beb512007-05-14 06:56:09 +0000866itself, Qt, Mozilla, etc.</p>
Misha Brukman80731b92003-11-22 00:38:41 +0000867
Misha Brukman80731b92003-11-22 00:38:41 +0000868<ul>
Anton Korobeynikov28f08aa2008-10-11 18:27:16 +0000869<li>Exception handling works well on the X86 and PowerPC targets. Currently
Chris Lattner2a092392008-11-10 05:40:34 +0000870 only Linux and Darwin targets are supported (both 32 and 64 bit).</li>
Misha Brukman80731b92003-11-22 00:38:41 +0000871</ul>
Chris Lattner46ecf612003-10-07 22:14:37 +0000872
Misha Brukman80731b92003-11-22 00:38:41 +0000873</div>
874
Chris Lattner7292fb12008-10-30 03:58:13 +0000875<!-- ======================================================================= -->
876<div class="doc_subsection">
877 <a name="fortran-fe">Known problems with the llvm-gcc Fortran front-end</a>
878</div>
879
880<div class="doc_text">
Gabor Greife5f9d672008-11-04 21:50:59 +0000881<ul>
Chris Lattner7292fb12008-10-30 03:58:13 +0000882<li>Fortran support generally works, but there are still several unresolved bugs
883 in Bugzilla. Please see the tools/gfortran component for details.</li>
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000884
Chris Lattner7292fb12008-10-30 03:58:13 +0000885<li>The Fortran front-end currently does not build on Darwin (without tweaks)
886 due to unresolved dependencies on the C front-end.</li>
Gabor Greife5f9d672008-11-04 21:50:59 +0000887</ul>
Chris Lattner7292fb12008-10-30 03:58:13 +0000888</div>
Misha Brukman80731b92003-11-22 00:38:41 +0000889
Chris Lattnere38ac152008-02-12 06:29:45 +0000890<!-- ======================================================================= -->
891<div class="doc_subsection">
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000892 <a name="ada-fe">Known problems with the llvm-gcc Ada front-end</a>
Chris Lattnere38ac152008-02-12 06:29:45 +0000893</div>
894
895<div class="doc_text">
John Criswellea03c9d2009-03-02 15:28:15 +0000896The llvm-gcc 4.2 Ada compiler works fairly well; however, this is not a mature
897technology, and problems should be expected.
Chris Lattnere38ac152008-02-12 06:29:45 +0000898<ul>
Duncan Sands56448462008-06-08 20:18:35 +0000899<li>The Ada front-end currently only builds on X86-32. This is mainly due
John Criswellea03c9d2009-03-02 15:28:15 +0000900to lack of trampoline support (pointers to nested functions) on other platforms.
901However, it <a href="http://llvm.org/PR2006">also fails to build on X86-64</a>
Chris Lattnere38ac152008-02-12 06:29:45 +0000902which does support trampolines.</li>
903<li>The Ada front-end <a href="http://llvm.org/PR2007">fails to bootstrap</a>.
Duncan Sandsd34bf762009-02-25 11:59:06 +0000904This is due to lack of LLVM support for <tt>setjmp</tt>/<tt>longjmp</tt> style
905exception handling, which is used internally by the compiler.
Chris Lattnere38ac152008-02-12 06:29:45 +0000906Workaround: configure with --disable-bootstrap.</li>
Duncan Sandsaef747f2008-10-13 17:27:23 +0000907<li>The c380004, <a href="http://llvm.org/PR2010">c393010</a>
908and <a href="http://llvm.org/PR2421">cxg2021</a> ACATS tests fail
Duncan Sandsd34bf762009-02-25 11:59:06 +0000909(c380004 also fails with gcc-4.2 mainline).
910If the compiler is built with checks disabled then <a href="http://llvm.org/PR2010">c393010</a>
911causes the compiler to go into an infinite loop, using up all system memory.</li>
Duncan Sands2dbb00e2009-03-02 16:35:57 +0000912<li>Some GCC specific Ada tests continue to crash the compiler.</li>
Chris Lattnere38ac152008-02-12 06:29:45 +0000913<li>The -E binder option (exception backtraces)
914<a href="http://llvm.org/PR1982">does not work</a> and will result in programs
915crashing if an exception is raised. Workaround: do not use -E.</li>
916<li>Only discrete types <a href="http://llvm.org/PR1981">are allowed to start
917or finish at a non-byte offset</a> in a record. Workaround: do not pack records
918or use representation clauses that result in a field of a non-discrete type
919starting or finishing in the middle of a byte.</li>
Chris Lattnerb076b002008-06-08 21:19:07 +0000920<li>The <tt>lli</tt> interpreter <a href="http://llvm.org/PR2009">considers
921'main' as generated by the Ada binder to be invalid</a>.
922Workaround: hand edit the file to use pointers for <tt>argv</tt> and
923<tt>envp</tt> rather than integers.</li>
924<li>The <tt>-fstack-check</tt> option <a href="http://llvm.org/PR2008">is
925ignored</a>.</li>
Chris Lattnere38ac152008-02-12 06:29:45 +0000926</ul>
927</div>
928
Chris Lattner3d482502003-10-02 04:57:28 +0000929<!-- *********************************************************************** -->
Misha Brukman80731b92003-11-22 00:38:41 +0000930<div class="doc_section">
931 <a name="additionalinfo">Additional Information</a>
932</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000933<!-- *********************************************************************** -->
934
Misha Brukman80731b92003-11-22 00:38:41 +0000935<div class="doc_text">
936
Chris Lattnercb5596d2005-05-16 17:13:10 +0000937<p>A wide variety of additional information is available on the <a
Chris Lattnere0c1df42007-05-18 00:44:29 +0000938href="http://llvm.org">LLVM web page</a>, in particular in the <a
939href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencerc7f87f22007-07-09 08:04:31 +0000940contains versions of the API documentation which is up-to-date with the
941Subversion version of the source code.
Misha Brukman96158092005-03-30 19:14:24 +0000942You can access versions of these documents specific to this release by going
943into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000944
Misha Brukman80731b92003-11-22 00:38:41 +0000945<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnera69595e2005-10-29 07:07:09 +0000946us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattnerb84f3322003-12-12 21:22:16 +0000947lists</a>.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000948
Misha Brukman80731b92003-11-22 00:38:41 +0000949</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000950
951<!-- *********************************************************************** -->
Chris Lattner3d482502003-10-02 04:57:28 +0000952
Misha Brukman80731b92003-11-22 00:38:41 +0000953<hr>
Misha Brukman68aab3b2003-11-22 01:23:39 +0000954<address>
Misha Brukman8834af92003-12-21 22:53:21 +0000955 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +0000956 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +0000957 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +0000958 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +0000959
Chris Lattnere0c1df42007-05-18 00:44:29 +0000960 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman80731b92003-11-22 00:38:41 +0000961 Last modified: $Date$
Misha Brukman68aab3b2003-11-22 01:23:39 +0000962</address>
Chris Lattner3d482502003-10-02 04:57:28 +0000963
Misha Brukman80731b92003-11-22 00:38:41 +0000964</body>
965</html>