blob: 29d10aff03ad9f7a3fbf5e5a5820dd0cf02da17b [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 Lattnerbe2e1b52011-03-10 07:43:44 +00007 <title>LLVM 2.9 Release Notes</title>
Misha Brukman500bc302003-11-22 00:38:41 +00008</head>
9<body>
Chris Lattner79c3fe12003-10-02 04:57:28 +000010
NAKAMURA Takumic6319312011-04-05 21:55:14 +000011<h1 class="doc_title">LLVM 2.9 Release Notes</h1>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000012
Chris Lattner0e464a92010-03-17 04:02:39 +000013<img align=right src="http://llvm.org/img/DragonSmall.png"
Gabor Greifee2187a2010-04-22 10:21:43 +000014 width="136" height="136" alt="LLVM Dragon Logo">
Chris Lattner0e464a92010-03-17 04:02:39 +000015
Chris Lattner79c3fe12003-10-02 04:57:28 +000016<ol>
Misha Brukman500bc302003-11-22 00:38:41 +000017 <li><a href="#intro">Introduction</a></li>
Chris Lattner96a445e2008-10-13 18:01:01 +000018 <li><a href="#subproj">Sub-project Status Update</a></li>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000019 <li><a href="#externalproj">External Projects Using LLVM 2.9</a></li>
20 <li><a href="#whatsnew">What's New in LLVM 2.9?</a></li>
Chris Lattner4b538b92004-04-30 22:17:12 +000021 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Dan Gohman44aa9212008-10-14 16:23:02 +000022 <li><a href="#knownproblems">Known Problems</a></li>
Misha Brukman500bc302003-11-22 00:38:41 +000023 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000024</ol>
25
Chris Lattner7911ce22004-05-23 21:07:27 +000026<div class="doc_author">
NAKAMURA Takumib9a33632011-04-09 02:13:37 +000027 <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p>
Misha Brukman500bc302003-11-22 00:38:41 +000028</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000029
Chris Lattner49123fd2011-04-06 06:29:50 +000030<!--
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000031<h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.9
Jeffrey Yasskinbec48772010-01-28 01:14:43 +000032release.<br>
33You may prefer the
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000034<a href="http://llvm.org/releases/2.8/docs/ReleaseNotes.html">LLVM 2.8
Dan Gohmanb44f6c62010-05-03 23:51:05 +000035Release Notes</a>.</h1>
Chris Lattner49123fd2011-04-06 06:29:50 +000036 -->
Jeffrey Yasskinbec48772010-01-28 01:14:43 +000037
Chris Lattner79c3fe12003-10-02 04:57:28 +000038<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +000039<h1>
Misha Brukman500bc302003-11-22 00:38:41 +000040 <a name="intro">Introduction</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +000041</h1>
Chris Lattner79c3fe12003-10-02 04:57:28 +000042<!-- *********************************************************************** -->
43
Misha Brukman500bc302003-11-22 00:38:41 +000044<div class="doc_text">
45
Chris Lattnerf6662f92008-10-13 17:57:36 +000046<p>This document contains the release notes for the LLVM Compiler
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000047Infrastructure, release 2.9. Here we describe the status of LLVM, including
Chris Lattnerf6662f92008-10-13 17:57:36 +000048major improvements from the previous release and significant known problems.
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +000049All LLVM releases may be downloaded from the <a
Chris Lattnerf6662f92008-10-13 17:57:36 +000050href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
Chris Lattner19092612003-10-02 16:38:05 +000051
Chris Lattner7506b1d2004-12-07 08:04:13 +000052<p>For more information about LLVM, including information about the latest
Chris Lattnerc463b272005-10-29 07:07:09 +000053release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattner47ad72c2003-10-07 21:38:31 +000054web site</a>. If you have questions or comments, the <a
Chris Lattnerc66bfef2010-03-17 04:41:49 +000055href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's
56Mailing List</a> is a good place to send them.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +000057
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000058<p>Note that if you are reading this file from a Subversion checkout or the
Chris Lattner84977642007-09-21 03:54:09 +000059main LLVM web page, this document applies to the <i>next</i> release, not the
Gabor Greiffa933f82008-10-14 11:00:32 +000060current one. To see the release notes for a specific release, please see the
Chris Lattner84977642007-09-21 03:54:09 +000061<a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman500bc302003-11-22 00:38:41 +000062
63</div>
Chris Lattner61358ab2009-10-13 17:48:04 +000064
Chris Lattnere4dc1962011-04-05 23:22:33 +000065<!-- Features that need text if they're finished for 3.1:
66 ARM EHABI
Chris Lattner914ce462010-04-22 06:28:20 +000067 combiner-aa?
Chris Lattner61358ab2009-10-13 17:48:04 +000068 strong phi elim
Chris Lattner61358ab2009-10-13 17:48:04 +000069 loop dependence analysis
Chris Lattnere07043c2010-09-29 05:30:03 +000070 CorrelatedValuePropagation
Chris Lattnere4dc1962011-04-05 23:22:33 +000071 lib/Transforms/IPO/MergeFunctions.cpp => consider for 3.1.
Chris Lattneracce85d2008-02-10 07:46:44 +000072 -->
Chris Lattnere07043c2010-09-29 05:30:03 +000073
Chris Lattner96a445e2008-10-13 18:01:01 +000074<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +000075<h1>
Chris Lattner96a445e2008-10-13 18:01:01 +000076 <a name="subproj">Sub-project Status Update</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +000077</h1>
Chris Lattner96a445e2008-10-13 18:01:01 +000078<!-- *********************************************************************** -->
Chris Lattnerea34f642008-06-08 21:34:41 +000079
80<div class="doc_text">
Chris Lattner8348b472008-06-08 21:58:17 +000081<p>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000082The LLVM 2.9 distribution currently consists of code from the core LLVM
Chris Lattner61358ab2009-10-13 17:48:04 +000083repository (which roughly includes the LLVM optimizers, code generators
84and supporting tools), the Clang repository and the llvm-gcc repository. In
85addition to this code, the LLVM Project includes other sub-projects that are in
86development. Here we include updates on these subprojects.
Bill Wendling63d8c552009-03-02 04:28:57 +000087</p>
Chris Lattner96a445e2008-10-13 18:01:01 +000088
Chris Lattner8348b472008-06-08 21:58:17 +000089</div>
90
Chris Lattner96a445e2008-10-13 18:01:01 +000091
Chris Lattner8348b472008-06-08 21:58:17 +000092<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +000093<h2>
Chris Lattnerfb97b2d2008-10-13 18:11:54 +000094<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +000095</h2>
Chris Lattner8348b472008-06-08 21:58:17 +000096
97<div class="doc_text">
98
Chris Lattner095539f2010-04-26 17:42:18 +000099<p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
100C++, and Objective-C languages. Clang aims to provide a better user experience
101through expressive diagnostics, a high level of conformance to language
102standards, fast compilation, and low memory use. Like LLVM, Clang provides a
103modular, library-based architecture that makes it suitable for creating or
104integrating with other development tools. Clang is considered a
Chris Lattnere07043c2010-09-29 05:30:03 +0000105production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86
Chris Lattner1efe27e2011-04-06 00:45:11 +0000106(32- and 64-bit), and for darwin/arm targets.</p>
Chris Lattner61358ab2009-10-13 17:48:04 +0000107
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000108<p>In the LLVM 2.9 time-frame, the Clang team has made many improvements in C,
109C++ and Objective-C support. C++ support is now generally rock solid, has
Chris Lattnerdf448a32011-04-06 00:56:12 +0000110been exercised on a broad variety of code, and has several new <a
111href="http://clang.llvm.org/cxx_status.html#cxx0x">C++'0x features</a>
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000112implemented (such as rvalue references and variadic templates). LLVM 2.9 has
113also brought in a large range of bug fixes and minor features (e.g. __label__
114support), and is much more compatible with the Linux Kernel.</p>
115
Duncan Sandsf3ba7af2011-04-06 08:07:40 +0000116<p>If Clang rejects your code but another compiler accepts it, please take a
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000117look at the <a href="http://clang.llvm.org/compatibility.html">language
Duncan Sandsf3ba7af2011-04-06 08:07:40 +0000118compatibility</a> guide to make sure this is not intentional or a known issue.
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000119</p>
Bill Wendling741748a2008-10-27 09:27:33 +0000120
Chris Lattnerfb97b2d2008-10-13 18:11:54 +0000121</div>
122
123<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000124<h2>
Duncan Sands528a5102011-04-04 11:09:08 +0000125<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000126</h2>
Chris Lattner61358ab2009-10-13 17:48:04 +0000127
128<div class="doc_text">
129<p>
Duncan Sands528a5102011-04-04 11:09:08 +0000130<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
131<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
132optimizers and code generators with LLVM's.
133Currently it requires a patched version of gcc-4.5.
134The plugin can target the x86-32 and x86-64 processor families and has been
135used successfully on the Darwin, FreeBSD and Linux platforms.
136The Ada, C, C++ and Fortran languages work well.
137The plugin is capable of compiling plenty of Obj-C, Obj-C++ and Java but it is
138not known whether the compiled code actually works or not!
Duncan Sands749fd832010-04-02 09:23:15 +0000139</p>
140
141<p>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000142The 2.9 release has the following notable changes:
Duncan Sands4b1da2b2010-09-30 17:37:34 +0000143<ul>
Duncan Sands528a5102011-04-04 11:09:08 +0000144<li>The plugin is much more stable when compiling Fortran.</li>
Chris Lattnerdf448a32011-04-06 00:56:12 +0000145<li>Inline assembly where an asm output is tied to an input of a different size
146is now supported in many more cases.</li>
Duncan Sands528a5102011-04-04 11:09:08 +0000147<li>Basic support for the __float128 type was added. It is now possible to
148generate LLVM IR from programs using __float128 but code generation does not
149work yet.</li>
150<li>Compiling Java programs no longer systematically crashes the plugin.</li>
Duncan Sands4b1da2b2010-09-30 17:37:34 +0000151</ul>
Chris Lattner61358ab2009-10-13 17:48:04 +0000152
153</div>
154
Chris Lattner75547712010-10-03 23:49:06 +0000155<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000156<h2>
Chris Lattner75547712010-10-03 23:49:06 +0000157<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000158</h2>
Chris Lattner75547712010-10-03 23:49:06 +0000159
160<div class="doc_text">
161<p>
162The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
163is a simple library that provides an implementation of the low-level
164target-specific hooks required by code generation and other runtime components.
165For example, when compiling for a 32-bit target, converting a double to a 64-bit
166unsigned integer is compiled into a runtime call to the "__fixunsdfdi"
167function. The compiler-rt library provides highly optimized implementations of
168this and other low-level routines (some are 3x faster than the equivalent
169libgcc routines).</p>
170
Chris Lattnerdf448a32011-04-06 00:56:12 +0000171<p>In the LLVM 2.9 timeframe, compiler_rt has had several minor changes for
172 better ARM support, and a fairly major license change. All of the code in the
173 compiler-rt project is now <a href="DeveloperPolicy.html#license">dual
174 licensed</a> under MIT and UIUC license, which allows you to use compiler-rt
175 in applications without the binary copyright reproduction clause. If you
176 prefer the LLVM/UIUC license, you are free to continue using it under that
177 license as well.</p>
Chris Lattner75547712010-10-03 23:49:06 +0000178
179</div>
Chris Lattner61358ab2009-10-13 17:48:04 +0000180
181<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000182<h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000183<a name="lldb">LLDB: Low Level Debugger</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000184</h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000185
186<div class="doc_text">
187<p>
Chris Lattner75547712010-10-03 23:49:06 +0000188<a href="http://lldb.llvm.org/">LLDB</a> is a brand new member of the LLVM
189umbrella of projects. LLDB is a next generation, high-performance debugger. It
190is built as a set of reusable components which highly leverage existing
191libraries in the larger LLVM Project, such as the Clang expression parser, the
192LLVM disassembler and the LLVM JIT.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000193
194<p>
Chris Lattnerdf448a32011-04-06 00:56:12 +0000195LLDB is has advanced by leaps and bounds in the 2.9 timeframe. It is
196dramatically more stable and useful, and includes both a new <a
197href="http://lldb.llvm.org/tutorial.html">tutorial</a> and a <a
198href="http://lldb.llvm.org/lldb-gdb.html">side-by-side comparison with
199GDB</a>.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000200
201</div>
202
203<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000204<h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000205<a name="libc++">libc++: C++ Standard Library</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000206</h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000207
208<div class="doc_text">
209<p>
Tobias Grossercdce44b2010-10-06 21:07:30 +0000210<a href="http://libcxx.llvm.org/">libc++</a> is another new member of the LLVM
Chris Lattner75547712010-10-03 23:49:06 +0000211family. It is an implementation of the C++ standard library, written from the
212ground up to specifically target the forthcoming C++'0X standard and focus on
213delivering great performance.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000214
215<p>
Chris Lattner2009c492011-04-06 00:59:18 +0000216In the LLVM 2.9 timeframe, libc++ has had numerous bugs fixed, and is now being
217co-developed with Clang's C++'0x mode.</p>
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000218
Chris Lattner2009c492011-04-06 00:59:18 +0000219<p>
220Like compiler_rt, libc++ is now <a href="DeveloperPolicy.html#license">dual
221 licensed</a> under the MIT and UIUC license, allowing it to be used more
222 permissively.
Chris Lattnere07043c2010-09-29 05:30:03 +0000223</p>
224
225</div>
226
Chris Lattner61358ab2009-10-13 17:48:04 +0000227
Chris Lattner3d6a80a2011-04-07 03:08:22 +0000228<!--=========================================================================-->
229<h2>
230<a name="LLBrowse">LLBrowse: IR Browser</a>
231</h2>
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000232
Chris Lattner3d6a80a2011-04-07 03:08:22 +0000233<div class="doc_text">
234<p>
235<a href="http://llvm.org/svn/llvm-project/llbrowse/trunk/doc/LLBrowse.html">
236 LLBrowse</a> is an interactive viewer for LLVM modules. It can load any LLVM
237 module and displays its contents as an expandable tree view, facilitating an
238 easy way to inspect types, functions, global variables, or metadata nodes. It
239 is fully cross-platform, being based on the popular wxWidgets GUI toolkit.
240</p>
241</div>
242
243<!--=========================================================================-->
244<h2>
245<a name="vmkit">VMKit</a>
246</h2>
247
248<div class="doc_text">
249<p>The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation
250 of a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and
251 just-in-time compilation. As of LLVM 2.9, VMKit now supports generational
252 garbage collectors. The garbage collectors are provided by the MMTk framework,
253 and VMKit can be configured to use one of the numerous implemented collectors
254 of MMTk.
255</p>
256</div>
257
258
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000259<!--=========================================================================-->
Chris Lattner7a8e6c52011-04-05 18:38:45 +0000260<!--
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000261<h2>
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000262<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000263</h2>
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000264
265<div class="doc_text">
266<p>
267<a href="http://klee.llvm.org/">KLEE</a> is a symbolic execution framework for
268programs in LLVM bitcode form. KLEE tries to symbolically evaluate "all" paths
269through the application and records state transitions that lead to fault
270states. This allows it to construct testcases that lead to faults and can even
271be used to verify some algorithms.
272</p>
273
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000274<p>UPDATE!</p>
Chris Lattner7a8e6c52011-04-05 18:38:45 +0000275</div>-->
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000276
277
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000278<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000279<h1>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000280 <a name="externalproj">External Open Source Projects Using LLVM 2.9</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000281</h1>
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000282<!-- *********************************************************************** -->
283
Chris Lattner61358ab2009-10-13 17:48:04 +0000284<div class="doc_text">
285
286<p>An exciting aspect of LLVM is that it is used as an enabling technology for
287 a lot of other language and tools projects. This section lists some of the
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000288 projects that have already been updated to work with LLVM 2.9.</p>
Chris Lattner7c8e7962010-04-26 17:38:10 +0000289</div>
290
Chris Lattner75547712010-10-03 23:49:06 +0000291
Chris Lattner3bfe57e2011-04-06 01:13:49 +0000292<!--=========================================================================-->
293<h2>Crack Programming Language</h2>
294
295<div class="doc_text">
296<p>
297<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
298ease of development of a scripting language with the performance of a compiled
299language. The language derives concepts from C++, Java and Python, incorporating
300object-oriented programming, operator overloading and strong typing.</p>
301</div>
302
303
304<!--=========================================================================-->
305<h2>TTA-based Codesign Environment (TCE)</h2>
306
307<div class="doc_text">
308<p>TCE is a toolset for designing application-specific processors (ASP) based on
309the Transport triggered architecture (TTA). The toolset provides a complete
310co-design flow from C/C++ programs down to synthesizable VHDL and parallel
311program binaries. Processor customization points include the register files,
312function units, supported operations, and the interconnection network.</p>
313
314<p>TCE uses Clang and LLVM for C/C++ language support, target independent
315optimizations and also for parts of code generation. It generates new LLVM-based
316code generators "on the fly" for the designed TTA processors and loads them in
317to the compiler backend as runtime libraries to avoid per-target recompilation
318of larger parts of the compiler chain.</p>
319</div>
320
321
322
323<!--=========================================================================-->
324<h2>PinaVM</h2>
325
326<div class="doc_text">
327<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
328source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
329other front-ends, PinaVM actually executes the elaboration of the
330program analyzed using LLVM's JIT infrastructure. It later enriches the
331bitcode with SystemC-specific information.</p>
332</div>
333
334<!--=========================================================================-->
335<h2>Pure</h2>
336
337<div class="doc_text">
338<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
339 algebraic/functional
340 programming language based on term rewriting. Programs are collections
341 of equations which are used to evaluate expressions in a symbolic
342 fashion. The interpreter uses LLVM as a backend to JIT-compile Pure
343 programs to fast native code. Pure offers dynamic typing, eager and lazy
344 evaluation, lexical closures, a hygienic macro system (also based on
345 term rewriting), built-in list and matrix support (including list and
346 matrix comprehensions) and an easy-to-use interface to C and other
347 programming languages (including the ability to load LLVM bitcode
348 modules, and inline C, C++, Fortran and Faust code in Pure programs if
349 the corresponding LLVM-enabled compilers are installed).</p>
350
351<p>Pure version 0.47 has been tested and is known to work with LLVM 2.9
352 (and continues to work with older LLVM releases &gt;= 2.5).</p>
353</div>
354
355<!--=========================================================================-->
356<h2 id="icedtea">IcedTea Java Virtual Machine Implementation</h2>
357
358<div class="doc_text">
359<p>
360<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
361harness to build OpenJDK using only free software build tools and to provide
362replacements for the not-yet free parts of OpenJDK. One of the extensions that
363IcedTea provides is a new JIT compiler named <a
364href="http://icedtea.classpath.org/wiki/ZeroSharkFaq">Shark</a> which uses LLVM
365to provide native code generation without introducing processor-dependent
366code.
367</p>
368
369<p> OpenJDK 7 b112, IcedTea6 1.9 and IcedTea7 1.13 and later have been tested
370and are known to work with LLVM 2.9 (and continue to work with older LLVM
371releases &gt;= 2.6 as well).</p>
372</div>
373
374<!--=========================================================================-->
375<h2>Glasgow Haskell Compiler (GHC)</h2>
376
377<div class="doc_text">
378<p>GHC is an open source, state-of-the-art programming suite for Haskell,
379a standard lazy functional programming language. It includes an
380optimizing static compiler generating good code for a variety of
381platforms, together with an interactive system for convenient, quick
382development.</p>
383
384<p>In addition to the existing C and native code generators, GHC 7.0 now
385supports an LLVM code generator. GHC supports LLVM 2.7 and later.</p>
386</div>
387
388<!--=========================================================================-->
389<h2>Polly - Polyhedral optimizations for LLVM</h2>
390
391<div class="doc_text">
392<p>Polly is a project that aims to provide advanced memory access optimizations
393to better take advantage of SIMD units, cache hierarchies, multiple cores or
394even vector accelerators for LLVM. Built around an abstract mathematical
395description based on Z-polyhedra, it provides the infrastructure to develop
396advanced optimizations in LLVM and to connect complex external optimizers. In
397its first year of existence Polly already provides an exact value-based
398dependency analysis as well as basic SIMD and OpenMP code generation support.
399Furthermore, Polly can use PoCC(Pluto) an advanced optimizer for data-locality
400and parallelism.</p>
401</div>
Chris Lattner75547712010-10-03 23:49:06 +0000402
Chris Lattner0fa5da92011-04-06 16:14:25 +0000403<!--=========================================================================-->
404<h2>Rubinius</h2>
405
406<div class="doc_text">
407 <p><a href="http://github.com/evanphx/rubinius">Rubinius</a> is an environment
408 for running Ruby code which strives to write as much of the implementation in
409 Ruby as possible. Combined with a bytecode interpreting VM, it uses LLVM to
410 optimize and compile ruby code down to machine code. Techniques such as type
411 feedback, method inlining, and deoptimization are all used to remove dynamism
412 from ruby execution and increase performance.</p>
413</div>
414
415
Chris Lattnera844a3e2011-04-07 03:09:21 +0000416<!--=========================================================================-->
417<div class="doc_subsection">
418<a name="FAUST">FAUST Real-Time Audio Signal Processing Language</a>
419</div>
Chris Lattnere0518442010-10-01 06:34:49 +0000420
Chris Lattnera844a3e2011-04-07 03:09:21 +0000421<div class="doc_text">
422<p>
423<a href="http://faust.grame.fr">FAUST</a> is a compiled language for real-time
424audio signal processing. The name FAUST stands for Functional AUdio STream. Its
425programming model combines two approaches: functional programming and block
426diagram composition. In addition with the C, C++, JAVA output formats, the
427Faust compiler can now generate LLVM bitcode, and works with LLVM 2.7-2.9.</p>
428
429</div>
430
Chris Lattner8348b472008-06-08 21:58:17 +0000431<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000432<h1>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000433 <a name="whatsnew">What's New in LLVM 2.9?</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000434</h1>
Chris Lattner8348b472008-06-08 21:58:17 +0000435<!-- *********************************************************************** -->
436
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000437<div class="doc_text">
438
Chris Lattner61358ab2009-10-13 17:48:04 +0000439<p>This release includes a huge number of bug fixes, performance tweaks and
Chris Lattnerf6662f92008-10-13 17:57:36 +0000440minor improvements. Some of the major improvements and new features are listed
441in this section.
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000442</p>
Chris Lattner61358ab2009-10-13 17:48:04 +0000443
Chris Lattner914ce462010-04-22 06:28:20 +0000444</div>
445
446<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000447<h2>
Chris Lattner252b83d2008-02-06 18:00:06 +0000448<a name="majorfeatures">Major New Features</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000449</h2>
Chris Lattner252b83d2008-02-06 18:00:06 +0000450
451<div class="doc_text">
452
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000453<p>LLVM 2.9 includes several major new capabilities:</p>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000454
455<ul>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000456
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000457<li>Type Based Alias Analysis (TBAA) is now implemented and turned on by default
458 in Clang. This allows substantially better load/store optimization in some
459 cases. TBAA can be disabled by passing -fno-strict-aliasing.
Chris Lattner1efe27e2011-04-06 00:45:11 +0000460</li>
461
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000462<li>This release has seen a continued focus on quality of debug information.
463 LLVM now generates much higher fidelity debug information, particularly when
464 debugging optimized code.</li>
465
466<li>Inline assembly now supports multiple alternative constraints.</li>
467
468<li>A new backend for the NVIDIA PTX virtual ISA (used to target its GPUs) is
469 under rapid development. It is not generally useful in 2.9, but is making
470 rapid progress.</li>
Chris Lattner7a8e6c52011-04-05 18:38:45 +0000471
Chris Lattner8170c102008-02-10 08:18:42 +0000472</ul>
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000473
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000474</div>
475
Chris Lattner84977642007-09-21 03:54:09 +0000476<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000477<h2>
Chris Lattner917cc712009-03-02 02:37:32 +0000478<a name="coreimprovements">LLVM IR and Core Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000479</h2>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000480
481<div class="doc_text">
Chris Lattner61358ab2009-10-13 17:48:04 +0000482<p>LLVM IR has several new features for better support of new targets and that
483expose new optimization opportunities:</p>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000484
Chris Lattner791f77b2008-06-05 06:25:56 +0000485<ul>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000486<li>The <a href="LangRef.html#bitwiseops">udiv, ashr, lshr, and shl</a>
487 instructions now have support exact and nuw/nsw bits to indicate that they
488 don't overflow or shift out bits. This is useful for optimization of <a
489 href="http://llvm.org/PR8862">pointer differences</a> and other cases.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000490
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000491<li>LLVM IR now supports the <a href="LangRef.html#globalvars">unnamed_addr</a>
492 attribute to indicate that constant global variables with identical
493 initializers can be merged. This fixed <a href="http://llvm.org/PR8927">an
494 issue</a> where LLVM would incorrectly merge two globals which were supposed
495 to have distinct addresses.</li>
496
497<li>The new <a href="LangRef.html#fnattrs">hotpatch attribute</a> has been added
498 to allow runtime patching of functions.</li>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000499</ul>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +0000500
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000501</div>
502
503<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000504<h2>
Chris Lattneracce85d2008-02-10 07:46:44 +0000505<a name="optimizer">Optimizer Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000506</h2>
Chris Lattneracce85d2008-02-10 07:46:44 +0000507
508<div class="doc_text">
509
Chris Lattner61358ab2009-10-13 17:48:04 +0000510<p>In addition to a large array of minor performance tweaks and bug fixes, this
Chris Lattnerf3013872008-10-13 21:50:36 +0000511release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattneracce85d2008-02-10 07:46:44 +0000512
513<ul>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000514<li>Link Time Optimization (LTO) has been improved to use MC for parsing inline
515 assembly and now can build large programs like Firefox 4 on both Mac OS X and
516 Linux.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000517
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000518<li>The new -loop-idiom pass recognizes memset/memcpy loops (and memset_pattern
519 on darwin), turning them into library calls, which are typically better
520 optimized than inline code. If you are building a libc and notice that your
521 memcpy and memset functions are compiled into infinite recursion, please build
522 with -ffreestanding or -fno-builtin to disable this pass.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000523
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000524<li>A new -early-cse pass does a fast pass over functions to fold constants,
525 simplify expressions, perform simple dead store elimination, and perform
526 common subexpression elimination. It does a good job at catching some of the
527 trivial redundancies that exist in unoptimized code, making later passes more
Roman Divacky77b42e92011-04-06 19:12:21 +0000528 effective.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000529
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000530<li>A new -loop-instsimplify pass is used to clean up loop bodies in the loop
531 optimizer.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000532
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000533<li>The new TargetLibraryInfo interface allows mid-level optimizations to know
534 whether the current target's runtime library has certain functions. For
535 example, the optimizer can now transform integer-only printf calls to call
536 iprintf, allowing reduced code size for embedded C libraries (e.g. newlib).
537</li>
538
539<li>LLVM has a new <a href="WritingAnLLVMPass.html#RegionPass">RegionPass</a>
540 infrastructure for region-based optimizations.</li>
541
542<li>Several optimizer passes have been substantially sped up:
543 GVN is much faster on functions with deep dominator trees and lots of basic
544 blocks. The dominator tree and dominance frontier passes are much faster to
545 compute, and preserved by more passes (so they are computed less often). The
546 -scalar-repl pass is also much faster and doesn't use DominanceFrontier.
547</li>
548
549<li>The Dead Store Elimination pass is more aggressive optimizing stores of
550 different types: e.g. a large store following a small one to the same address.
551 The MemCpyOptimizer pass handles several new forms of memcpy elimination.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000552
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000553<li>LLVM now optimizes various idioms for overflow detection into check of the
554 flag register on various CPUs. For example, we now compile:
Chris Lattner1efe27e2011-04-06 00:45:11 +0000555
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000556 <pre>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000557 unsigned long t = a+b;
558 if (t &lt; a) ...
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000559 </pre>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000560 into:
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000561 <pre>
562 addq %rdi, %rbx
563 jno LBB0_2
564 </pre>
565</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000566
Chris Lattner11b66112010-10-04 02:42:39 +0000567</ul>
568
Chris Lattner61358ab2009-10-13 17:48:04 +0000569</div>
Chris Lattner917cc712009-03-02 02:37:32 +0000570
Chris Lattner0b832202008-06-08 02:45:07 +0000571<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000572<h2>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000573<a name="mc">MC Level Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000574</h2>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000575
576<div class="doc_text">
577<p>
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000578The LLVM Machine Code (aka MC) subsystem was created to solve a number
Chris Lattner4ba2b652010-09-30 16:31:33 +0000579of problems in the realm of assembly, disassembly, object file format handling,
580and a number of other related areas that CPU instruction-set level tools work
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000581in.</p>
582
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000583<ul>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000584<li>ELF MC support has matured enough for the integrated assembler to be turned
585 on by default in Clang on X86-32 and X86-64 ELF systems.</li>
586
587<li>MC supports and CodeGen uses the <tt>.file</tt> and <tt>.loc</tt> directives
588 for producing line number debug info. This produces more compact line
589 tables and easier to read .s files.</li>
590
591<li>MC supports the <tt>.cfi_*</tt> directives for producing DWARF
Rafael Espindolaa26f36c2011-03-18 04:07:44 +0000592 frame information, but it is still not used by CodeGen by default.</li>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000593
Chris Lattner1efe27e2011-04-06 00:45:11 +0000594
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000595<li>The MC assembler now generates much better diagnostics for common errors,
Chris Lattner1efe27e2011-04-06 00:45:11 +0000596 is much faster at matching instructions, is much more bug-compatible with
597 the GAS assembler, and is now generally useful for a broad range of X86
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000598 assembly.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000599
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000600<li>We now have some basic <a href="CodeGenerator.html#mc">internals
601 documentation</a> for MC.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000602
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000603<li>.td files can now specify assembler aliases directly with the <a
604 href="CodeGenerator.html#na_instparsing">MnemonicAlias and InstAlias</a>
605 tblgen classes.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000606
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000607<li>LLVM now has an experimental format-independent object file manipulation
608 library (lib/Object). It supports both PE/COFF and ELF. The llvm-nm tool has
609 been extended to work with native object files, and the new llvm-objdump tool
610 supports disassembly of object files (but no relocations are displayed yet).
611</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000612
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000613<li>Win32 PE-COFF support in the MC assembler has made a lot of progress in the
614 2.9 timeframe, but is still not generally useful.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000615
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000616</ul>
617
618<p>For more information, please see the <a
Chris Lattner4ba2b652010-09-30 16:31:33 +0000619href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro to the
620LLVM MC Project Blog Post</a>.
621</p>
622
NAKAMURA Takumi45c435a2011-04-05 08:24:22 +0000623</div>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000624
Chris Lattner4ba2b652010-09-30 16:31:33 +0000625<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000626<h2>
Chris Lattner511433e2009-03-02 03:24:11 +0000627<a name="codegen">Target Independent Code Generator Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000628</h2>
Chris Lattner0b832202008-06-08 02:45:07 +0000629
630<div class="doc_text">
631
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000632<p>We have put a significant amount of work into the code generator
633infrastructure, which allows us to implement more aggressive algorithms and make
634it run faster:</p>
Chris Lattner0b832202008-06-08 02:45:07 +0000635
636<ul>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000637<li>The pre-register-allocation (preRA) instruction scheduler models register
638 pressure much more accurately in some cases. This allows the adoption of more
Chris Lattner49123fd2011-04-06 06:29:50 +0000639 aggressive scheduling heuristics without causing spills to be generated.
Chris Lattner1efe27e2011-04-06 00:45:11 +0000640</li>
641
Chris Lattner49123fd2011-04-06 06:29:50 +0000642<li>LiveDebugVariables is a new pass that keeps track of debugging information
643 for user variables that are promoted to registers in optimized builds.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000644
Chris Lattner49123fd2011-04-06 06:29:50 +0000645<li>The scheduler now models operand latency and pipeline forwarding.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000646
Chris Lattner49123fd2011-04-06 06:29:50 +0000647<li>A major register allocator infrastructure rewrite is underway. It is not on
648 by default for 2.9 and you are not advised to use it, but it has made
649 substantial progress in the 2.9 timeframe:
650 <ul>
651 <li>A new -regalloc=basic "basic" register allocator can be used as a simple
652 fallback when debugging. It uses the new infrastructure.</li>
653 <li>New infrastructure is in place for live range splitting. "SplitKit" can
654 break a live interval into smaller pieces while preserving SSA form, and
655 SpillPlacement can help find the best split points. This is a work in
656 progress so the API is changing quickly.</li>
657 <li>The inline spiller has learned to clean up after live range splitting. It
658 can hoist spills out of loops, and it can eliminate redundant spills.</li>
659 <li>Rematerialization works with live range splitting.</li>
660 <li>The new "greedy" register allocator using live range splitting. This will
661 be the default register allocator in the next LLVM release, but it is not
662 turned on by default in 2.9.</li>
663 </ul>
664</li>
Chris Lattner84977642007-09-21 03:54:09 +0000665</ul>
Chris Lattner84977642007-09-21 03:54:09 +0000666</div>
667
Chris Lattner917cc712009-03-02 02:37:32 +0000668<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000669<h2>
Chris Lattner917cc712009-03-02 02:37:32 +0000670<a name="x86">X86-32 and X86-64 Target Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000671</h2>
Chris Lattner917cc712009-03-02 02:37:32 +0000672
673<div class="doc_text">
Chris Lattner7714c912010-10-04 04:39:25 +0000674<p>New features and major changes in the X86 target include:
Chris Lattner917cc712009-03-02 02:37:32 +0000675</p>
676
677<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000678<li>LLVM 2.9 includes a complete reimplementation of the MMX instruction set.
679 The reimplementation uses a new LLVM IR <a
680 href="LangRef.html#t_x86mmx">x86_mmx</a> type to ensure that MMX operations
681 are <em>only</em> generated from source that uses MMX builtin operations. With
Duncan Sandsf3ba7af2011-04-06 08:07:40 +0000682 this, random types like &lt;2 x i32&gt; are not turned into MMX operations
Chris Lattner49123fd2011-04-06 06:29:50 +0000683 (which can be catastrophic without proper "emms" insertion). Because the X86
684 code generator always generates reliable code, the -disable-mmx flag is now
685 removed.
Chris Lattner1efe27e2011-04-06 00:45:11 +0000686</li>
687
Chris Lattner49123fd2011-04-06 06:29:50 +0000688<li>X86 support for FS/GS relative loads and stores using <a
Jay Foadcb88ec32011-04-06 07:55:30 +0000689 href="CodeGenerator.html#x86_memory">address space 256/257</a> works reliably
Chris Lattner49123fd2011-04-06 06:29:50 +0000690 now.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000691
Chris Lattner49123fd2011-04-06 06:29:50 +0000692<li>LLVM 2.9 generates much better code in several cases by using adc/sbb to
693 avoid generation of conditional move instructions for conditional increment
694 and other idioms.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000695
Chris Lattner49123fd2011-04-06 06:29:50 +0000696<li>The X86 backend has adopted a new preRA scheduling mode, "list-ilp", to
697 shorten the height of instruction schedules without inducing register spills.
698</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000699
Jay Foadcb88ec32011-04-06 07:55:30 +0000700<li>The MC assembler supports 3dNow! and 3DNowA instructions.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000701
Chris Lattner49123fd2011-04-06 06:29:50 +0000702<li>Several bugs have been fixed for Windows x64 code generator.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000703</ul>
704
Chris Lattner917cc712009-03-02 02:37:32 +0000705</div>
Chris Lattner84977642007-09-21 03:54:09 +0000706
707<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000708<h2>
Chris Lattner61358ab2009-10-13 17:48:04 +0000709<a name="ARM">ARM Target Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000710</h2>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000711
712<div class="doc_text">
Chris Lattner61358ab2009-10-13 17:48:04 +0000713<p>New features of the ARM target include:
714</p>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000715
716<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000717<li>The ARM backend now has a fast instruction selector, which dramatically
718 improves -O0 compile times.</li>
719<li>The ARM backend has new tuning for Cortex-A8 and Cortex-A9 CPUs.</li>
720<li>The __builtin_prefetch builtin (and llvm.prefetch intrinsic) is compiled
721 into prefetch instructions instead of being discarded.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000722
723<li> The ARM backend preRA scheduler now models machine resources at cycle
724 granularity. This allows the scheduler to both accurately model
725 instruction latency and avoid overcommitting functional units.</li>
726
Chris Lattner49123fd2011-04-06 06:29:50 +0000727<li>Countless ARM microoptimizations have landed in LLVM 2.9.</li>
Bob Wilsone8472772010-09-13 17:39:35 +0000728</ul>
Chris Lattner61358ab2009-10-13 17:48:04 +0000729</div>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000730
731<!--=========================================================================-->
732<h2>
733<a name="OtherTS">Other Target Specific Improvements</a>
734</h2>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000735
Chris Lattner1efe27e2011-04-06 00:45:11 +0000736<div class="doc_text">
737<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000738<li>MicroBlaze: major updates for aggressive delay slot filler, MC-based
739 assembly printing, assembly instruction parsing, ELF .o file emission, and MC
740 instruction disassembler have landed.</li>
741
742<li>SPARC: Many improvements, including using the Y registers for
743 multiplications and addition of a simple delay slot filler.</li>
744
745<li>PowerPC: The backend has been largely MC'ized and is ready to support
Duncan Sandsf3ba7af2011-04-06 08:07:40 +0000746 directly writing out mach-o object files. No one seems interested in finishing
Chris Lattner49123fd2011-04-06 06:29:50 +0000747 this final step though.</li>
Bruno Cardoso Lopes3dcac712011-04-08 03:06:22 +0000748
749<li>Mips: Improved o32 ABI support, including better varags handling.
750More instructions supported in codegen: madd, msub, rotr, rotrv and clo.
751It also now supports lowering block addresses.</li>
752
Chris Lattner1efe27e2011-04-06 00:45:11 +0000753</ul>
754</div>
Chris Lattner77d29b12008-06-05 08:02:49 +0000755
756<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000757<h2>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000758<a name="changes">Major Changes and Removed Features</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000759</h2>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000760
761<div class="doc_text">
762
Chris Lattnereeb4da02008-10-13 22:06:31 +0000763<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000764on LLVM 2.8, this section lists some "gotchas" that you may run into upgrading
Chris Lattnereeb4da02008-10-13 22:06:31 +0000765from the previous release.</p>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000766
767<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000768<li><b>This is the last release to support the llvm-gcc frontend.</b></li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000769
Chris Lattner49123fd2011-04-06 06:29:50 +0000770<li>LLVM has a new <a href="CodingStandards.html#ll_naming">naming
771 convention standard</a>, though the codebase hasn't fully adopted it yet.</li>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000772
Chris Lattner49123fd2011-04-06 06:29:50 +0000773<li>The new DIBuilder class provides a simpler interface for front ends to
774 encode debug info in LLVM IR, and has replaced DIFactory.</li>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000775
Chris Lattner49123fd2011-04-06 06:29:50 +0000776<li>LLVM IR and other tools always work on normalized target triples (which have
777 been run through <tt>Triple::normalize</tt>).</li>
778
779<li>The target triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32
780 instead.</li>
781
782<li>The PointerTracking pass has been removed from mainline, and moved to The
783 ClamAV project (its only client).</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000784
Chris Lattner49123fd2011-04-06 06:29:50 +0000785<li>The LoopIndexSplit, LiveValues, SimplifyHalfPowrLibCalls, GEPSplitter, and
786 PartialSpecialization passes were removed. They were unmaintained,
Duncan Sandsf3ba7af2011-04-06 08:07:40 +0000787 buggy, or deemed to be a bad idea.</li>
Devang Patelb34dd132008-10-14 20:03:43 +0000788</ul>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000789
Chris Lattnerf6662f92008-10-13 17:57:36 +0000790</div>
791
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000792<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000793<h2>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000794<a name="api_changes">Internal API Changes</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000795</h2>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000796
797<div class="doc_text">
798
Chris Lattner1efe27e2011-04-06 00:45:11 +0000799<p>In addition, many APIs have changed in this release. Some of the major
800 LLVM API changes are:</p>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000801
802<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000803<li>include/llvm/System merged into include/llvm/Support.</li>
804<li>The <a href="http://llvm.org/PR5207">llvm::APInt API</a> was significantly
805 cleaned up.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000806
Chris Lattner49123fd2011-04-06 06:29:50 +0000807<li>In the code generator, MVT::Flag was renamed to MVT::Glue to more accurately
808 describe its behavior.</li>
809
810<li>The system_error header from C++0x was added, and is now pervasively used to
811 capture and handle i/o and other errors in LLVM.</li>
812
813<li>The old sys::Path API has been deprecated in favor of the new PathV2 API,
814 which is more efficient and flexible.</li>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000815</ul>
816</div>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000817
Chris Lattner79c3fe12003-10-02 04:57:28 +0000818<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000819<h1>
Misha Brukman500bc302003-11-22 00:38:41 +0000820 <a name="knownproblems">Known Problems</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000821</h1>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000822<!-- *********************************************************************** -->
823
Misha Brukman500bc302003-11-22 00:38:41 +0000824<div class="doc_text">
825
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000826<p>This section contains significant known problems with the LLVM system,
Chris Lattnere18b32e2008-11-10 05:40:34 +0000827listed by component. If you run into a problem, please check the <a
Chris Lattnerc463b272005-10-29 07:07:09 +0000828href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattner5eccca42003-12-12 21:22:16 +0000829there isn't already one.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000830
Misha Brukman500bc302003-11-22 00:38:41 +0000831</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000832
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000833<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000834<h2>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000835 <a name="experimental">Experimental features included with this release</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000836</h2>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000837
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000838<div class="doc_text">
839
Misha Brukman6df9e2c2004-05-12 21:46:05 +0000840<p>The following components of this LLVM release are either untested, known to
841be broken or unreliable, or are in early development. These components should
842not be relied on, and bugs should not be filed against them, but they may be
843useful to some people. In particular, if you would like to work on one of these
Chris Lattner2b659ef2008-02-12 06:29:45 +0000844components, please contact us on the <a
845href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000846
847<ul>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000848<li>The Alpha, Blackfin, CellSPU, MicroBlaze, MSP430, MIPS, PTX, SystemZ
Chris Lattnerbb117712010-10-04 01:29:06 +0000849 and XCore backends are experimental.</li>
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000850<li><tt>llc</tt> "<tt>-filetype=obj</tt>" is experimental on all targets
Chris Lattner49123fd2011-04-06 06:29:50 +0000851 other than darwin and ELF X86 systems.</li>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000852
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000853</ul>
854
855</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000856
Misha Brukman500bc302003-11-22 00:38:41 +0000857<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000858<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000859 <a name="x86-be">Known problems with the X86 back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000860</h2>
John Criswellc0c186d2005-11-08 21:11:33 +0000861
862<div class="doc_text">
863
864<ul>
Anton Korobeynikova6094be2008-06-08 10:24:13 +0000865 <li>The X86 backend does not yet support
866 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
867 floating point stack</a>. It supports the 'f' and 't' constraints, but not
868 'u'.</li>
Dan Gohman8207ba92008-06-08 23:05:11 +0000869 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattner914ce462010-04-22 06:28:20 +0000870 <tt>va_arg</tt>. Currently, front-ends support variadic
Dan Gohman8207ba92008-06-08 23:05:11 +0000871 argument constructs on X86-64 by lowering them manually.</li>
NAKAMURA Takumi45c435a2011-04-05 08:24:22 +0000872 <li>Windows x64 (aka Win64) code generator has a few issues.
873 <ul>
874 <li>llvm-gcc cannot build the mingw-w64 runtime currently
875 due to lack of support for the 'u' inline assembly
876 constraint and for X87 floating point inline assembly.</li>
877 <li>On mingw-w64, you will see unresolved symbol <tt>__chkstk</tt>
878 due to <a href="http://llvm.org/bugs/show_bug.cgi?id=8919">Bug 8919</a>.
879 It is fixed in <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110321/118499.html">r128206</a>.</li>
880 <li>Miss-aligned MOVDQA might crash your program. It is due to
881 <a href="http://llvm.org/bugs/show_bug.cgi?id=9483">Bug 9483</a>,
882 lack of handling aligned internal globals.</li>
883 </ul>
884 </li>
885
Chris Lattner26299222006-11-18 07:51:14 +0000886</ul>
887
888</div>
889
890<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000891<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000892 <a name="ppc-be">Known problems with the PowerPC back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000893</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000894
895<div class="doc_text">
896
897<ul>
Nicolas Geoffraye4285dc2007-05-15 09:21:28 +0000898<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattner57a460e2007-05-23 04:39:32 +0000899compilation, and lacks support for debug information.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000900</ul>
901
902</div>
903
904<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000905<h2>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000906 <a name="arm-be">Known problems with the ARM back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000907</h2>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000908
909<div class="doc_text">
910
911<ul>
Chris Lattner57a460e2007-05-23 04:39:32 +0000912<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sandsc90d68b2007-09-26 15:59:54 +0000913processors, thumb programs can crash or produce wrong
Chris Lattner57a460e2007-05-23 04:39:32 +0000914results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswell524a5dd2009-03-02 15:28:15 +0000915<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000916</li>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000917</ul>
918
919</div>
920
921<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000922<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000923 <a name="sparc-be">Known problems with the SPARC back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000924</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000925
926<div class="doc_text">
927
928<ul>
John Criswell524a5dd2009-03-02 15:28:15 +0000929<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattner26299222006-11-18 07:51:14 +0000930 support the 64-bit SPARC ABI (-m64).</li>
931</ul>
932
933</div>
934
935<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000936<h2>
Bruno Cardoso Lopesb7e1a4f2008-10-25 14:56:26 +0000937 <a name="mips-be">Known problems with the MIPS back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000938</h2>
Bruno Cardoso Lopesb7e1a4f2008-10-25 14:56:26 +0000939
940<div class="doc_text">
941
942<ul>
Bruno Cardoso Lopesb7e1a4f2008-10-25 14:56:26 +0000943<li>64-bit MIPS targets are not supported yet.</li>
944</ul>
945
946</div>
947
948<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000949<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000950 <a name="alpha-be">Known problems with the Alpha back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000951</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000952
953<div class="doc_text">
954
955<ul>
956
957<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
958appropriate nops inserted to ensure restartability.</li>
959
John Criswellc0c186d2005-11-08 21:11:33 +0000960</ul>
961</div>
962
Chris Lattner26299222006-11-18 07:51:14 +0000963<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000964<h2>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000965 <a name="c-be">Known problems with the C back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000966</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000967
968<div class="doc_text">
969
Chris Lattner3016ee92010-09-29 05:34:42 +0000970<p>The C backend has numerous problems and is not being actively maintained.
971Depending on it for anything serious is not advised.</p>
972
Chris Lattner26299222006-11-18 07:51:14 +0000973<ul>
Chris Lattner5733b272008-06-05 06:35:40 +0000974<li><a href="http://llvm.org/PR802">The C backend has only basic support for
975 inline assembly code</a>.</li>
Chris Lattner725a0d82007-09-26 06:01:35 +0000976<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
977 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif4906abe2009-03-02 12:02:51 +0000978 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandsf74c0cc2008-02-10 13:40:55 +0000979<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands50723a92009-02-25 11:51:54 +0000980<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000981</ul>
982
983</div>
John Criswellc0c186d2005-11-08 21:11:33 +0000984
Misha Brukman500bc302003-11-22 00:38:41 +0000985
986<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000987<h2>
Chris Lattner3016ee92010-09-29 05:34:42 +0000988 <a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000989</h2>
Chris Lattner47588f92003-10-02 05:07:23 +0000990
Misha Brukman500bc302003-11-22 00:38:41 +0000991<div class="doc_text">
Chris Lattnerc5d658a2006-03-03 00:34:26 +0000992
Chris Lattner49123fd2011-04-06 06:29:50 +0000993<p><b>LLVM 2.9 will be the last release of llvm-gcc.</b></p>
994
Chris Lattner3016ee92010-09-29 05:34:42 +0000995<p>llvm-gcc is generally very stable for the C family of languages. The only
996 major language feature of GCC not supported by llvm-gcc is the
997 <tt>__builtin_apply</tt> family of builtins. However, some extensions
998 are only supported on some targets. For example, trampolines are only
999 supported on some targets (these are used when you take the address of a
1000 nested function).</p>
Misha Brukman500bc302003-11-22 00:38:41 +00001001
Chris Lattner3016ee92010-09-29 05:34:42 +00001002<p>Fortran support generally works, but there are still several unresolved bugs
1003 in <a href="http://llvm.org/bugs/">Bugzilla</a>. Please see the
1004 tools/gfortran component for details. Note that llvm-gcc is missing major
1005 Fortran performance work in the frontend and library that went into GCC after
1006 4.2. If you are interested in Fortran, we recommend that you consider using
1007 <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +00001008
Duncan Sands3af96332010-10-04 10:06:56 +00001009<p>The llvm-gcc 4.2 Ada compiler has basic functionality, but is no longer being
1010actively maintained. If you are interested in Ada, we recommend that you
1011consider using <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner2b659ef2008-02-12 06:29:45 +00001012</div>
1013
Chris Lattner79c3fe12003-10-02 04:57:28 +00001014<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +00001015<h1>
Misha Brukman500bc302003-11-22 00:38:41 +00001016 <a name="additionalinfo">Additional Information</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +00001017</h1>
Chris Lattner79c3fe12003-10-02 04:57:28 +00001018<!-- *********************************************************************** -->
1019
Misha Brukman500bc302003-11-22 00:38:41 +00001020<div class="doc_text">
1021
Chris Lattner416db102005-05-16 17:13:10 +00001022<p>A wide variety of additional information is available on the <a
NAKAMURA Takumib9a33632011-04-09 02:13:37 +00001023href="http://llvm.org/">LLVM web page</a>, in particular in the <a
Chris Lattnerb4b0ce72007-05-18 00:44:29 +00001024href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencer669ed452007-07-09 08:04:31 +00001025contains versions of the API documentation which is up-to-date with the
1026Subversion version of the source code.
Misha Brukman109d9e82005-03-30 19:14:24 +00001027You can access versions of these documents specific to this release by going
1028into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +00001029
Misha Brukman500bc302003-11-22 00:38:41 +00001030<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnerc463b272005-10-29 07:07:09 +00001031us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattner5eccca42003-12-12 21:22:16 +00001032lists</a>.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +00001033
Misha Brukman500bc302003-11-22 00:38:41 +00001034</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +00001035
1036<!-- *********************************************************************** -->
Chris Lattner79c3fe12003-10-02 04:57:28 +00001037
Misha Brukman500bc302003-11-22 00:38:41 +00001038<hr>
Misha Brukman2061e892003-11-22 01:23:39 +00001039<address>
Misha Brukman38847d52003-12-21 22:53:21 +00001040 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +00001041 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman2061e892003-11-22 01:23:39 +00001042 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +00001043 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman2061e892003-11-22 01:23:39 +00001044
Chris Lattnerb4b0ce72007-05-18 00:44:29 +00001045 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman500bc302003-11-22 00:38:41 +00001046 Last modified: $Date$
Misha Brukman2061e892003-11-22 01:23:39 +00001047</address>
Chris Lattner79c3fe12003-10-02 04:57:28 +00001048
Misha Brukman500bc302003-11-22 00:38:41 +00001049</body>
1050</html>