blob: c67766cbef478aeecbdfca7c0e0264a1600a2894 [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">
Chris Lattnerd93b4af2010-10-03 23:09:03 +00006 <meta encoding="utf8">
Misha Brukman80731b92003-11-22 00:38:41 +00007 <link rel="stylesheet" href="llvm.css" type="text/css">
Chris Lattner0d364302011-03-10 07:43:44 +00008 <title>LLVM 2.9 Release Notes</title>
Misha Brukman80731b92003-11-22 00:38:41 +00009</head>
10<body>
Chris Lattner3d482502003-10-02 04:57:28 +000011
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000012<h1 class="doc_title">LLVM 2.9 Release Notes</h1>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000013
Chris Lattnerc871bac2010-03-17 04:02:39 +000014<img align=right src="http://llvm.org/img/DragonSmall.png"
Gabor Greif27b166352010-04-22 10:21:43 +000015 width="136" height="136" alt="LLVM Dragon Logo">
Chris Lattnerc871bac2010-03-17 04:02:39 +000016
Chris Lattner3d482502003-10-02 04:57:28 +000017<ol>
Misha Brukman80731b92003-11-22 00:38:41 +000018 <li><a href="#intro">Introduction</a></li>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000019 <li><a href="#subproj">Sub-project Status Update</a></li>
Chris Lattner0d364302011-03-10 07:43:44 +000020 <li><a href="#externalproj">External Projects Using LLVM 2.9</a></li>
21 <li><a href="#whatsnew">What's New in LLVM 2.9?</a></li>
Chris Lattner77a51732004-04-30 22:17:12 +000022 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Dan Gohmanad888912008-10-14 16:23:02 +000023 <li><a href="#knownproblems">Known Problems</a></li>
Misha Brukman80731b92003-11-22 00:38:41 +000024 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner3d482502003-10-02 04:57:28 +000025</ol>
26
Chris Lattner020e1fc2004-05-23 21:07:27 +000027<div class="doc_author">
NAKAMURA Takumica46f5a2011-04-09 02:13:37 +000028 <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p>
Misha Brukman80731b92003-11-22 00:38:41 +000029</div>
Chris Lattner3d482502003-10-02 04:57:28 +000030
Chris Lattner17c170a2011-04-06 06:29:50 +000031<!--
Chris Lattner0d364302011-03-10 07:43:44 +000032<h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.9
Jeffrey Yasskin0830b972010-01-28 01:14:43 +000033release.<br>
34You may prefer the
Chris Lattner0d364302011-03-10 07:43:44 +000035<a href="http://llvm.org/releases/2.8/docs/ReleaseNotes.html">LLVM 2.8
Dan Gohman62af9d22010-05-03 23:51:05 +000036Release Notes</a>.</h1>
Chris Lattner17c170a2011-04-06 06:29:50 +000037 -->
Jeffrey Yasskin0830b972010-01-28 01:14:43 +000038
Chris Lattner3d482502003-10-02 04:57:28 +000039<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000040<h1>
Misha Brukman80731b92003-11-22 00:38:41 +000041 <a name="intro">Introduction</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000042</h1>
Chris Lattner3d482502003-10-02 04:57:28 +000043<!-- *********************************************************************** -->
44
Misha Brukman80731b92003-11-22 00:38:41 +000045<div class="doc_text">
46
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000047<p>This document contains the release notes for the LLVM Compiler
Chris Lattner0d364302011-03-10 07:43:44 +000048Infrastructure, release 2.9. Here we describe the status of LLVM, including
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000049major improvements from the previous release and significant known problems.
Mikhail Glushenkov25422542009-03-01 18:09:47 +000050All LLVM releases may be downloaded from the <a
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000051href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
Chris Lattner62495762003-10-02 16:38:05 +000052
Chris Lattnerb5bb5972004-12-07 08:04:13 +000053<p>For more information about LLVM, including information about the latest
Chris Lattnera69595e2005-10-29 07:07:09 +000054release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattnere7525b52003-10-07 21:38:31 +000055web site</a>. If you have questions or comments, the <a
Chris Lattner0b1c9a52010-03-17 04:41:49 +000056href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's
57Mailing List</a> is a good place to send them.</p>
Chris Lattner3d482502003-10-02 04:57:28 +000058
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000059<p>Note that if you are reading this file from a Subversion checkout or the
Chris Lattner0a1fd102007-09-21 03:54:09 +000060main LLVM web page, this document applies to the <i>next</i> release, not the
Gabor Greif355f81c2008-10-14 11:00:32 +000061current one. To see the release notes for a specific release, please see the
Chris Lattner0a1fd102007-09-21 03:54:09 +000062<a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman80731b92003-11-22 00:38:41 +000063
64</div>
Chris Lattneraa61f412009-10-13 17:48:04 +000065
Chris Lattnerce6b0472011-04-05 23:22:33 +000066<!-- Features that need text if they're finished for 3.1:
67 ARM EHABI
Chris Lattnera67df2d2010-04-22 06:28:20 +000068 combiner-aa?
Chris Lattneraa61f412009-10-13 17:48:04 +000069 strong phi elim
Chris Lattneraa61f412009-10-13 17:48:04 +000070 loop dependence analysis
Chris Lattner342f9572010-09-29 05:30:03 +000071 CorrelatedValuePropagation
Chris Lattnerce6b0472011-04-05 23:22:33 +000072 lib/Transforms/IPO/MergeFunctions.cpp => consider for 3.1.
Chris Lattner2b8a52e2008-02-10 07:46:44 +000073 -->
Chris Lattner342f9572010-09-29 05:30:03 +000074
Chris Lattnerf5cd9862008-10-13 18:01:01 +000075<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000076<h1>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000077 <a name="subproj">Sub-project Status Update</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000078</h1>
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 Lattner0d364302011-03-10 07:43:44 +000083The LLVM 2.9 distribution currently consists of code from the core LLVM
Chris Lattneraa61f412009-10-13 17:48:04 +000084repository (which roughly includes the LLVM optimizers, code generators
85and supporting tools), the Clang repository and the llvm-gcc repository. In
86addition to this code, the LLVM Project includes other sub-projects that are in
87development. Here we include updates on these subprojects.
Bill Wendlingf170d2e2009-03-02 04:28:57 +000088</p>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000089
Chris Lattnerc75fd522008-06-08 21:58:17 +000090</div>
91
Chris Lattnerf5cd9862008-10-13 18:01:01 +000092
Chris Lattnerc75fd522008-06-08 21:58:17 +000093<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000094<h2>
Chris Lattner44c09cd2008-10-13 18:11:54 +000095<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000096</h2>
Chris Lattnerc75fd522008-06-08 21:58:17 +000097
98<div class="doc_text">
99
Chris Lattner5de7f6e2010-04-26 17:42:18 +0000100<p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
101C++, and Objective-C languages. Clang aims to provide a better user experience
102through expressive diagnostics, a high level of conformance to language
103standards, fast compilation, and low memory use. Like LLVM, Clang provides a
104modular, library-based architecture that makes it suitable for creating or
105integrating with other development tools. Clang is considered a
Chris Lattner342f9572010-09-29 05:30:03 +0000106production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000107(32- and 64-bit), and for darwin/arm targets.</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000108
Chris Lattnerfd97b882011-04-05 07:19:28 +0000109<p>In the LLVM 2.9 time-frame, the Clang team has made many improvements in C,
110C++ and Objective-C support. C++ support is now generally rock solid, has
Chris Lattner9d5b3712011-04-06 00:56:12 +0000111been exercised on a broad variety of code, and has several new <a
112href="http://clang.llvm.org/cxx_status.html#cxx0x">C++'0x features</a>
Chris Lattnerfd97b882011-04-05 07:19:28 +0000113implemented (such as rvalue references and variadic templates). LLVM 2.9 has
114also brought in a large range of bug fixes and minor features (e.g. __label__
115support), and is much more compatible with the Linux Kernel.</p>
116
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000117<p>If Clang rejects your code but another compiler accepts it, please take a
Chris Lattnerfd97b882011-04-05 07:19:28 +0000118look at the <a href="http://clang.llvm.org/compatibility.html">language
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000119compatibility</a> guide to make sure this is not intentional or a known issue.
Chris Lattnerfd97b882011-04-05 07:19:28 +0000120</p>
Bill Wendlingef362462008-10-27 09:27:33 +0000121
Chris Lattner0d364302011-03-10 07:43:44 +0000122<ul>
123</ul>
Chris Lattner44c09cd2008-10-13 18:11:54 +0000124</div>
125
126<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000127<h2>
Duncan Sands1cd78982011-04-04 11:09:08 +0000128<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000129</h2>
Chris Lattneraa61f412009-10-13 17:48:04 +0000130
131<div class="doc_text">
132<p>
Duncan Sands1cd78982011-04-04 11:09:08 +0000133<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
134<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
135optimizers and code generators with LLVM's.
136Currently it requires a patched version of gcc-4.5.
137The plugin can target the x86-32 and x86-64 processor families and has been
138used successfully on the Darwin, FreeBSD and Linux platforms.
139The Ada, C, C++ and Fortran languages work well.
140The plugin is capable of compiling plenty of Obj-C, Obj-C++ and Java but it is
141not known whether the compiled code actually works or not!
Duncan Sands92452b92010-04-02 09:23:15 +0000142</p>
143
144<p>
Chris Lattner0d364302011-03-10 07:43:44 +0000145The 2.9 release has the following notable changes:
Duncan Sands7f9a0dc2010-09-30 17:37:34 +0000146<ul>
Duncan Sands1cd78982011-04-04 11:09:08 +0000147<li>The plugin is much more stable when compiling Fortran.</li>
Chris Lattner9d5b3712011-04-06 00:56:12 +0000148<li>Inline assembly where an asm output is tied to an input of a different size
149is now supported in many more cases.</li>
Duncan Sands1cd78982011-04-04 11:09:08 +0000150<li>Basic support for the __float128 type was added. It is now possible to
151generate LLVM IR from programs using __float128 but code generation does not
152work yet.</li>
153<li>Compiling Java programs no longer systematically crashes the plugin.</li>
Duncan Sands7f9a0dc2010-09-30 17:37:34 +0000154</ul>
Chris Lattneraa61f412009-10-13 17:48:04 +0000155
156</div>
157
Chris Lattner120804a2010-10-03 23:49:06 +0000158<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000159<h2>
Chris Lattner120804a2010-10-03 23:49:06 +0000160<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000161</h2>
Chris Lattner120804a2010-10-03 23:49:06 +0000162
163<div class="doc_text">
164<p>
165The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
166is a simple library that provides an implementation of the low-level
167target-specific hooks required by code generation and other runtime components.
168For example, when compiling for a 32-bit target, converting a double to a 64-bit
169unsigned integer is compiled into a runtime call to the "__fixunsdfdi"
170function. The compiler-rt library provides highly optimized implementations of
171this and other low-level routines (some are 3x faster than the equivalent
172libgcc routines).</p>
173
Chris Lattner9d5b3712011-04-06 00:56:12 +0000174<p>In the LLVM 2.9 timeframe, compiler_rt has had several minor changes for
175 better ARM support, and a fairly major license change. All of the code in the
176 compiler-rt project is now <a href="DeveloperPolicy.html#license">dual
177 licensed</a> under MIT and UIUC license, which allows you to use compiler-rt
178 in applications without the binary copyright reproduction clause. If you
179 prefer the LLVM/UIUC license, you are free to continue using it under that
180 license as well.</p>
Chris Lattner120804a2010-10-03 23:49:06 +0000181
182</div>
Chris Lattneraa61f412009-10-13 17:48:04 +0000183
184<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000185<h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000186<a name="lldb">LLDB: Low Level Debugger</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000187</h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000188
189<div class="doc_text">
190<p>
Chris Lattner120804a2010-10-03 23:49:06 +0000191<a href="http://lldb.llvm.org/">LLDB</a> is a brand new member of the LLVM
192umbrella of projects. LLDB is a next generation, high-performance debugger. It
193is built as a set of reusable components which highly leverage existing
194libraries in the larger LLVM Project, such as the Clang expression parser, the
195LLVM disassembler and the LLVM JIT.</p>
Chris Lattner342f9572010-09-29 05:30:03 +0000196
197<p>
Chris Lattner9d5b3712011-04-06 00:56:12 +0000198LLDB is has advanced by leaps and bounds in the 2.9 timeframe. It is
199dramatically more stable and useful, and includes both a new <a
200href="http://lldb.llvm.org/tutorial.html">tutorial</a> and a <a
201href="http://lldb.llvm.org/lldb-gdb.html">side-by-side comparison with
202GDB</a>.</p>
Chris Lattner342f9572010-09-29 05:30:03 +0000203
204</div>
205
206<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000207<h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000208<a name="libc++">libc++: C++ Standard Library</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000209</h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000210
211<div class="doc_text">
212<p>
Tobias Grosser436bc5f2010-10-06 21:07:30 +0000213<a href="http://libcxx.llvm.org/">libc++</a> is another new member of the LLVM
Chris Lattner120804a2010-10-03 23:49:06 +0000214family. It is an implementation of the C++ standard library, written from the
215ground up to specifically target the forthcoming C++'0X standard and focus on
216delivering great performance.</p>
Chris Lattner342f9572010-09-29 05:30:03 +0000217
218<p>
Chris Lattner14a33332011-04-06 00:59:18 +0000219In the LLVM 2.9 timeframe, libc++ has had numerous bugs fixed, and is now being
220co-developed with Clang's C++'0x mode.</p>
Chris Lattnerfd97b882011-04-05 07:19:28 +0000221
Chris Lattner14a33332011-04-06 00:59:18 +0000222<p>
223Like compiler_rt, libc++ is now <a href="DeveloperPolicy.html#license">dual
224 licensed</a> under the MIT and UIUC license, allowing it to be used more
225 permissively.
Chris Lattner342f9572010-09-29 05:30:03 +0000226</p>
227
228</div>
229
Chris Lattneraa61f412009-10-13 17:48:04 +0000230
Chris Lattnercaefe932011-04-07 03:08:22 +0000231<!--=========================================================================-->
232<h2>
233<a name="LLBrowse">LLBrowse: IR Browser</a>
234</h2>
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000235
Chris Lattnercaefe932011-04-07 03:08:22 +0000236<div class="doc_text">
237<p>
238<a href="http://llvm.org/svn/llvm-project/llbrowse/trunk/doc/LLBrowse.html">
239 LLBrowse</a> is an interactive viewer for LLVM modules. It can load any LLVM
240 module and displays its contents as an expandable tree view, facilitating an
241 easy way to inspect types, functions, global variables, or metadata nodes. It
242 is fully cross-platform, being based on the popular wxWidgets GUI toolkit.
243</p>
244</div>
245
246<!--=========================================================================-->
247<h2>
248<a name="vmkit">VMKit</a>
249</h2>
250
251<div class="doc_text">
252<p>The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation
253 of a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and
254 just-in-time compilation. As of LLVM 2.9, VMKit now supports generational
255 garbage collectors. The garbage collectors are provided by the MMTk framework,
256 and VMKit can be configured to use one of the numerous implemented collectors
257 of MMTk.
258</p>
259</div>
260
261
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000262<!--=========================================================================-->
Chris Lattner9ee0b012011-04-05 18:38:45 +0000263<!--
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000264<h2>
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000265<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000266</h2>
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000267
268<div class="doc_text">
269<p>
270<a href="http://klee.llvm.org/">KLEE</a> is a symbolic execution framework for
271programs in LLVM bitcode form. KLEE tries to symbolically evaluate "all" paths
272through the application and records state transitions that lead to fault
273states. This allows it to construct testcases that lead to faults and can even
274be used to verify some algorithms.
275</p>
276
Chris Lattner0d364302011-03-10 07:43:44 +0000277<p>UPDATE!</p>
Chris Lattner9ee0b012011-04-05 18:38:45 +0000278</div>-->
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000279
280
Chris Lattner53e06f92009-02-26 22:33:38 +0000281<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000282<h1>
Chris Lattner0d364302011-03-10 07:43:44 +0000283 <a name="externalproj">External Open Source Projects Using LLVM 2.9</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000284</h1>
Chris Lattner53e06f92009-02-26 22:33:38 +0000285<!-- *********************************************************************** -->
286
Chris Lattneraa61f412009-10-13 17:48:04 +0000287<div class="doc_text">
288
289<p>An exciting aspect of LLVM is that it is used as an enabling technology for
290 a lot of other language and tools projects. This section lists some of the
Chris Lattner0d364302011-03-10 07:43:44 +0000291 projects that have already been updated to work with LLVM 2.9.</p>
Chris Lattnerdf85c892010-04-26 17:38:10 +0000292</div>
293
Chris Lattner120804a2010-10-03 23:49:06 +0000294
Chris Lattnerae6a89a2011-04-06 01:13:49 +0000295<!--=========================================================================-->
296<h2>Crack Programming Language</h2>
297
298<div class="doc_text">
299<p>
300<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
301ease of development of a scripting language with the performance of a compiled
302language. The language derives concepts from C++, Java and Python, incorporating
303object-oriented programming, operator overloading and strong typing.</p>
304</div>
305
306
307<!--=========================================================================-->
308<h2>TTA-based Codesign Environment (TCE)</h2>
309
310<div class="doc_text">
311<p>TCE is a toolset for designing application-specific processors (ASP) based on
312the Transport triggered architecture (TTA). The toolset provides a complete
313co-design flow from C/C++ programs down to synthesizable VHDL and parallel
314program binaries. Processor customization points include the register files,
315function units, supported operations, and the interconnection network.</p>
316
317<p>TCE uses Clang and LLVM for C/C++ language support, target independent
318optimizations and also for parts of code generation. It generates new LLVM-based
319code generators "on the fly" for the designed TTA processors and loads them in
320to the compiler backend as runtime libraries to avoid per-target recompilation
321of larger parts of the compiler chain.</p>
322</div>
323
324
325
326<!--=========================================================================-->
327<h2>PinaVM</h2>
328
329<div class="doc_text">
330<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
331source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
332other front-ends, PinaVM actually executes the elaboration of the
333program analyzed using LLVM's JIT infrastructure. It later enriches the
334bitcode with SystemC-specific information.</p>
335</div>
336
337<!--=========================================================================-->
338<h2>Pure</h2>
339
340<div class="doc_text">
341<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
342 algebraic/functional
343 programming language based on term rewriting. Programs are collections
344 of equations which are used to evaluate expressions in a symbolic
345 fashion. The interpreter uses LLVM as a backend to JIT-compile Pure
346 programs to fast native code. Pure offers dynamic typing, eager and lazy
347 evaluation, lexical closures, a hygienic macro system (also based on
348 term rewriting), built-in list and matrix support (including list and
349 matrix comprehensions) and an easy-to-use interface to C and other
350 programming languages (including the ability to load LLVM bitcode
351 modules, and inline C, C++, Fortran and Faust code in Pure programs if
352 the corresponding LLVM-enabled compilers are installed).</p>
353
354<p>Pure version 0.47 has been tested and is known to work with LLVM 2.9
355 (and continues to work with older LLVM releases &gt;= 2.5).</p>
356</div>
357
358<!--=========================================================================-->
359<h2 id="icedtea">IcedTea Java Virtual Machine Implementation</h2>
360
361<div class="doc_text">
362<p>
363<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
364harness to build OpenJDK using only free software build tools and to provide
365replacements for the not-yet free parts of OpenJDK. One of the extensions that
366IcedTea provides is a new JIT compiler named <a
367href="http://icedtea.classpath.org/wiki/ZeroSharkFaq">Shark</a> which uses LLVM
368to provide native code generation without introducing processor-dependent
369code.
370</p>
371
372<p> OpenJDK 7 b112, IcedTea6 1.9 and IcedTea7 1.13 and later have been tested
373and are known to work with LLVM 2.9 (and continue to work with older LLVM
374releases &gt;= 2.6 as well).</p>
375</div>
376
377<!--=========================================================================-->
378<h2>Glasgow Haskell Compiler (GHC)</h2>
379
380<div class="doc_text">
381<p>GHC is an open source, state-of-the-art programming suite for Haskell,
382a standard lazy functional programming language. It includes an
383optimizing static compiler generating good code for a variety of
384platforms, together with an interactive system for convenient, quick
385development.</p>
386
387<p>In addition to the existing C and native code generators, GHC 7.0 now
388supports an LLVM code generator. GHC supports LLVM 2.7 and later.</p>
389</div>
390
391<!--=========================================================================-->
392<h2>Polly - Polyhedral optimizations for LLVM</h2>
393
394<div class="doc_text">
395<p>Polly is a project that aims to provide advanced memory access optimizations
396to better take advantage of SIMD units, cache hierarchies, multiple cores or
397even vector accelerators for LLVM. Built around an abstract mathematical
398description based on Z-polyhedra, it provides the infrastructure to develop
399advanced optimizations in LLVM and to connect complex external optimizers. In
400its first year of existence Polly already provides an exact value-based
401dependency analysis as well as basic SIMD and OpenMP code generation support.
402Furthermore, Polly can use PoCC(Pluto) an advanced optimizer for data-locality
403and parallelism.</p>
404</div>
Chris Lattner120804a2010-10-03 23:49:06 +0000405
Chris Lattner958d2992011-04-06 16:14:25 +0000406<!--=========================================================================-->
407<h2>Rubinius</h2>
408
409<div class="doc_text">
410 <p><a href="http://github.com/evanphx/rubinius">Rubinius</a> is an environment
411 for running Ruby code which strives to write as much of the implementation in
412 Ruby as possible. Combined with a bytecode interpreting VM, it uses LLVM to
413 optimize and compile ruby code down to machine code. Techniques such as type
414 feedback, method inlining, and deoptimization are all used to remove dynamism
415 from ruby execution and increase performance.</p>
416</div>
417
418
Chris Lattner5ddaab12011-04-07 03:09:21 +0000419<!--=========================================================================-->
420<div class="doc_subsection">
421<a name="FAUST">FAUST Real-Time Audio Signal Processing Language</a>
422</div>
Chris Lattnerca7c8962010-10-01 06:34:49 +0000423
Chris Lattner5ddaab12011-04-07 03:09:21 +0000424<div class="doc_text">
425<p>
426<a href="http://faust.grame.fr">FAUST</a> is a compiled language for real-time
427audio signal processing. The name FAUST stands for Functional AUdio STream. Its
428programming model combines two approaches: functional programming and block
429diagram composition. In addition with the C, C++, JAVA output formats, the
430Faust compiler can now generate LLVM bitcode, and works with LLVM 2.7-2.9.</p>
431
432</div>
433
Chris Lattnerc75fd522008-06-08 21:58:17 +0000434<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000435<h1>
Chris Lattner0d364302011-03-10 07:43:44 +0000436 <a name="whatsnew">What's New in LLVM 2.9?</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000437</h1>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000438<!-- *********************************************************************** -->
439
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000440<div class="doc_text">
441
Chris Lattneraa61f412009-10-13 17:48:04 +0000442<p>This release includes a huge number of bug fixes, performance tweaks and
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000443minor improvements. Some of the major improvements and new features are listed
444in this section.
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000445</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000446
Chris Lattnera67df2d2010-04-22 06:28:20 +0000447</div>
448
449<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000450<h2>
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000451<a name="majorfeatures">Major New Features</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000452</h2>
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000453
454<div class="doc_text">
455
Chris Lattner0d364302011-03-10 07:43:44 +0000456<p>LLVM 2.9 includes several major new capabilities:</p>
Chris Lattner97beb512007-05-14 06:56:09 +0000457
458<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000459
Chris Lattner23e16b592011-04-06 05:50:04 +0000460<li>Type Based Alias Analysis (TBAA) is now implemented and turned on by default
461 in Clang. This allows substantially better load/store optimization in some
462 cases. TBAA can be disabled by passing -fno-strict-aliasing.
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000463</li>
464
Chris Lattner23e16b592011-04-06 05:50:04 +0000465<li>This release has seen a continued focus on quality of debug information.
466 LLVM now generates much higher fidelity debug information, particularly when
467 debugging optimized code.</li>
468
469<li>Inline assembly now supports multiple alternative constraints.</li>
470
471<li>A new backend for the NVIDIA PTX virtual ISA (used to target its GPUs) is
472 under rapid development. It is not generally useful in 2.9, but is making
473 rapid progress.</li>
Chris Lattner9ee0b012011-04-05 18:38:45 +0000474
Chris Lattner458e79f2008-02-10 08:18:42 +0000475</ul>
Chris Lattnerfd97b882011-04-05 07:19:28 +0000476
Chris Lattner97beb512007-05-14 06:56:09 +0000477</div>
478
Chris Lattner0a1fd102007-09-21 03:54:09 +0000479<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000480<h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000481<a name="coreimprovements">LLVM IR and Core Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000482</h2>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000483
484<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000485<p>LLVM IR has several new features for better support of new targets and that
486expose new optimization opportunities:</p>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000487
Chris Lattnerb7112222008-06-05 06:25:56 +0000488<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000489<li>The <a href="LangRef.html#bitwiseops">udiv, ashr, lshr, and shl</a>
490 instructions now have support exact and nuw/nsw bits to indicate that they
491 don't overflow or shift out bits. This is useful for optimization of <a
492 href="http://llvm.org/PR8862">pointer differences</a> and other cases.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000493
Chris Lattner23e16b592011-04-06 05:50:04 +0000494<li>LLVM IR now supports the <a href="LangRef.html#globalvars">unnamed_addr</a>
495 attribute to indicate that constant global variables with identical
496 initializers can be merged. This fixed <a href="http://llvm.org/PR8927">an
497 issue</a> where LLVM would incorrectly merge two globals which were supposed
498 to have distinct addresses.</li>
499
500<li>The new <a href="LangRef.html#fnattrs">hotpatch attribute</a> has been added
501 to allow runtime patching of functions.</li>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000502</ul>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +0000503
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000504</div>
505
506<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000507<h2>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000508<a name="optimizer">Optimizer Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000509</h2>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000510
511<div class="doc_text">
512
Chris Lattneraa61f412009-10-13 17:48:04 +0000513<p>In addition to a large array of minor performance tweaks and bug fixes, this
Chris Lattner25879d72008-10-13 21:50:36 +0000514release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000515
516<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000517<li>Link Time Optimization (LTO) has been improved to use MC for parsing inline
518 assembly and now can build large programs like Firefox 4 on both Mac OS X and
519 Linux.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000520
Chris Lattner23e16b592011-04-06 05:50:04 +0000521<li>The new -loop-idiom pass recognizes memset/memcpy loops (and memset_pattern
522 on darwin), turning them into library calls, which are typically better
523 optimized than inline code. If you are building a libc and notice that your
524 memcpy and memset functions are compiled into infinite recursion, please build
525 with -ffreestanding or -fno-builtin to disable this pass.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000526
Chris Lattner23e16b592011-04-06 05:50:04 +0000527<li>A new -early-cse pass does a fast pass over functions to fold constants,
528 simplify expressions, perform simple dead store elimination, and perform
529 common subexpression elimination. It does a good job at catching some of the
530 trivial redundancies that exist in unoptimized code, making later passes more
Roman Divacky620f6962011-04-06 19:12:21 +0000531 effective.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000532
Chris Lattner23e16b592011-04-06 05:50:04 +0000533<li>A new -loop-instsimplify pass is used to clean up loop bodies in the loop
534 optimizer.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000535
Chris Lattner23e16b592011-04-06 05:50:04 +0000536<li>The new TargetLibraryInfo interface allows mid-level optimizations to know
537 whether the current target's runtime library has certain functions. For
538 example, the optimizer can now transform integer-only printf calls to call
539 iprintf, allowing reduced code size for embedded C libraries (e.g. newlib).
540</li>
541
542<li>LLVM has a new <a href="WritingAnLLVMPass.html#RegionPass">RegionPass</a>
543 infrastructure for region-based optimizations.</li>
544
545<li>Several optimizer passes have been substantially sped up:
546 GVN is much faster on functions with deep dominator trees and lots of basic
547 blocks. The dominator tree and dominance frontier passes are much faster to
548 compute, and preserved by more passes (so they are computed less often). The
549 -scalar-repl pass is also much faster and doesn't use DominanceFrontier.
550</li>
551
552<li>The Dead Store Elimination pass is more aggressive optimizing stores of
553 different types: e.g. a large store following a small one to the same address.
554 The MemCpyOptimizer pass handles several new forms of memcpy elimination.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000555
Chris Lattner23e16b592011-04-06 05:50:04 +0000556<li>LLVM now optimizes various idioms for overflow detection into check of the
557 flag register on various CPUs. For example, we now compile:
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000558
Chris Lattner23e16b592011-04-06 05:50:04 +0000559 <pre>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000560 unsigned long t = a+b;
561 if (t &lt; a) ...
Chris Lattner23e16b592011-04-06 05:50:04 +0000562 </pre>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000563 into:
Chris Lattner23e16b592011-04-06 05:50:04 +0000564 <pre>
565 addq %rdi, %rbx
566 jno LBB0_2
567 </pre>
568</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000569
Chris Lattnerfcc65a72010-10-04 02:42:39 +0000570</ul>
571
Chris Lattneraa61f412009-10-13 17:48:04 +0000572</div>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000573
Chris Lattner7795ea92008-06-08 02:45:07 +0000574<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000575<h2>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000576<a name="mc">MC Level Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000577</h2>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000578
579<div class="doc_text">
580<p>
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000581The LLVM Machine Code (aka MC) subsystem was created to solve a number
Chris Lattnerf25bc192010-09-30 16:31:33 +0000582of problems in the realm of assembly, disassembly, object file format handling,
583and a number of other related areas that CPU instruction-set level tools work
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000584in.</p>
585
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000586<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000587<li>ELF MC support has matured enough for the integrated assembler to be turned
588 on by default in Clang on X86-32 and X86-64 ELF systems.</li>
589
590<li>MC supports and CodeGen uses the <tt>.file</tt> and <tt>.loc</tt> directives
591 for producing line number debug info. This produces more compact line
592 tables and easier to read .s files.</li>
593
594<li>MC supports the <tt>.cfi_*</tt> directives for producing DWARF
Rafael Espindola01fb4b02011-03-18 04:07:44 +0000595 frame information, but it is still not used by CodeGen by default.</li>
Chris Lattner23e16b592011-04-06 05:50:04 +0000596
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000597
Chris Lattner23e16b592011-04-06 05:50:04 +0000598<li>The MC assembler now generates much better diagnostics for common errors,
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000599 is much faster at matching instructions, is much more bug-compatible with
600 the GAS assembler, and is now generally useful for a broad range of X86
Chris Lattner23e16b592011-04-06 05:50:04 +0000601 assembly.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000602
Chris Lattner23e16b592011-04-06 05:50:04 +0000603<li>We now have some basic <a href="CodeGenerator.html#mc">internals
604 documentation</a> for MC.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000605
Chris Lattner23e16b592011-04-06 05:50:04 +0000606<li>.td files can now specify assembler aliases directly with the <a
607 href="CodeGenerator.html#na_instparsing">MnemonicAlias and InstAlias</a>
608 tblgen classes.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000609
Chris Lattner23e16b592011-04-06 05:50:04 +0000610<li>LLVM now has an experimental format-independent object file manipulation
611 library (lib/Object). It supports both PE/COFF and ELF. The llvm-nm tool has
612 been extended to work with native object files, and the new llvm-objdump tool
613 supports disassembly of object files (but no relocations are displayed yet).
614</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000615
Chris Lattner23e16b592011-04-06 05:50:04 +0000616<li>Win32 PE-COFF support in the MC assembler has made a lot of progress in the
617 2.9 timeframe, but is still not generally useful.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000618
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000619</ul>
620
621<p>For more information, please see the <a
Chris Lattnerf25bc192010-09-30 16:31:33 +0000622href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro to the
623LLVM MC Project Blog Post</a>.
624</p>
625
NAKAMURA Takumi8d89b8e2011-04-05 08:24:22 +0000626</div>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000627
Chris Lattnerf25bc192010-09-30 16:31:33 +0000628<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000629<h2>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000630<a name="codegen">Target Independent Code Generator Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000631</h2>
Chris Lattner7795ea92008-06-08 02:45:07 +0000632
633<div class="doc_text">
634
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000635<p>We have put a significant amount of work into the code generator
636infrastructure, which allows us to implement more aggressive algorithms and make
637it run faster:</p>
Chris Lattner7795ea92008-06-08 02:45:07 +0000638
639<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000640<li>The pre-register-allocation (preRA) instruction scheduler models register
641 pressure much more accurately in some cases. This allows the adoption of more
Chris Lattner17c170a2011-04-06 06:29:50 +0000642 aggressive scheduling heuristics without causing spills to be generated.
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000643</li>
644
Chris Lattner17c170a2011-04-06 06:29:50 +0000645<li>LiveDebugVariables is a new pass that keeps track of debugging information
646 for user variables that are promoted to registers in optimized builds.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000647
Chris Lattner17c170a2011-04-06 06:29:50 +0000648<li>The scheduler now models operand latency and pipeline forwarding.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000649
Chris Lattner17c170a2011-04-06 06:29:50 +0000650<li>A major register allocator infrastructure rewrite is underway. It is not on
651 by default for 2.9 and you are not advised to use it, but it has made
652 substantial progress in the 2.9 timeframe:
653 <ul>
654 <li>A new -regalloc=basic "basic" register allocator can be used as a simple
655 fallback when debugging. It uses the new infrastructure.</li>
656 <li>New infrastructure is in place for live range splitting. "SplitKit" can
657 break a live interval into smaller pieces while preserving SSA form, and
658 SpillPlacement can help find the best split points. This is a work in
659 progress so the API is changing quickly.</li>
660 <li>The inline spiller has learned to clean up after live range splitting. It
661 can hoist spills out of loops, and it can eliminate redundant spills.</li>
662 <li>Rematerialization works with live range splitting.</li>
663 <li>The new "greedy" register allocator using live range splitting. This will
664 be the default register allocator in the next LLVM release, but it is not
665 turned on by default in 2.9.</li>
666 </ul>
667</li>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000668</ul>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000669</div>
670
Chris Lattnerd1094e02009-03-02 02:37:32 +0000671<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000672<h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000673<a name="x86">X86-32 and X86-64 Target Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000674</h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000675
676<div class="doc_text">
Chris Lattnerd3f45c82010-10-04 04:39:25 +0000677<p>New features and major changes in the X86 target include:
Chris Lattnerd1094e02009-03-02 02:37:32 +0000678</p>
679
680<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000681<li>LLVM 2.9 includes a complete reimplementation of the MMX instruction set.
682 The reimplementation uses a new LLVM IR <a
683 href="LangRef.html#t_x86mmx">x86_mmx</a> type to ensure that MMX operations
684 are <em>only</em> generated from source that uses MMX builtin operations. With
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000685 this, random types like &lt;2 x i32&gt; are not turned into MMX operations
Chris Lattner17c170a2011-04-06 06:29:50 +0000686 (which can be catastrophic without proper "emms" insertion). Because the X86
687 code generator always generates reliable code, the -disable-mmx flag is now
688 removed.
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000689</li>
690
Chris Lattner17c170a2011-04-06 06:29:50 +0000691<li>X86 support for FS/GS relative loads and stores using <a
Jay Foad1a7cc442011-04-06 07:55:30 +0000692 href="CodeGenerator.html#x86_memory">address space 256/257</a> works reliably
Chris Lattner17c170a2011-04-06 06:29:50 +0000693 now.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000694
Chris Lattner17c170a2011-04-06 06:29:50 +0000695<li>LLVM 2.9 generates much better code in several cases by using adc/sbb to
696 avoid generation of conditional move instructions for conditional increment
697 and other idioms.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000698
Chris Lattner17c170a2011-04-06 06:29:50 +0000699<li>The X86 backend has adopted a new preRA scheduling mode, "list-ilp", to
700 shorten the height of instruction schedules without inducing register spills.
701</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000702
Jay Foad1a7cc442011-04-06 07:55:30 +0000703<li>The MC assembler supports 3dNow! and 3DNowA instructions.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000704
Chris Lattner17c170a2011-04-06 06:29:50 +0000705<li>Several bugs have been fixed for Windows x64 code generator.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000706</ul>
707
Chris Lattnerd1094e02009-03-02 02:37:32 +0000708</div>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000709
710<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000711<h2>
Chris Lattneraa61f412009-10-13 17:48:04 +0000712<a name="ARM">ARM Target Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000713</h2>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000714
715<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000716<p>New features of the ARM target include:
717</p>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000718
719<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000720<li>The ARM backend now has a fast instruction selector, which dramatically
721 improves -O0 compile times.</li>
722<li>The ARM backend has new tuning for Cortex-A8 and Cortex-A9 CPUs.</li>
723<li>The __builtin_prefetch builtin (and llvm.prefetch intrinsic) is compiled
724 into prefetch instructions instead of being discarded.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000725
726<li> The ARM backend preRA scheduler now models machine resources at cycle
727 granularity. This allows the scheduler to both accurately model
728 instruction latency and avoid overcommitting functional units.</li>
729
Chris Lattner17c170a2011-04-06 06:29:50 +0000730<li>Countless ARM microoptimizations have landed in LLVM 2.9.</li>
Bob Wilsone44f2982010-09-13 17:39:35 +0000731</ul>
Chris Lattneraa61f412009-10-13 17:48:04 +0000732</div>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000733
734<!--=========================================================================-->
735<h2>
736<a name="OtherTS">Other Target Specific Improvements</a>
737</h2>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000738
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000739<div class="doc_text">
740<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000741<li>MicroBlaze: major updates for aggressive delay slot filler, MC-based
742 assembly printing, assembly instruction parsing, ELF .o file emission, and MC
743 instruction disassembler have landed.</li>
744
745<li>SPARC: Many improvements, including using the Y registers for
746 multiplications and addition of a simple delay slot filler.</li>
747
748<li>PowerPC: The backend has been largely MC'ized and is ready to support
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000749 directly writing out mach-o object files. No one seems interested in finishing
Chris Lattner17c170a2011-04-06 06:29:50 +0000750 this final step though.</li>
Bruno Cardoso Lopesa21d4702011-04-08 03:06:22 +0000751
752<li>Mips: Improved o32 ABI support, including better varags handling.
753More instructions supported in codegen: madd, msub, rotr, rotrv and clo.
754It also now supports lowering block addresses.</li>
755
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000756</ul>
757</div>
Chris Lattner6cb64032008-06-05 08:02:49 +0000758
759<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000760<h2>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000761<a name="changes">Major Changes and Removed Features</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000762</h2>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000763
764<div class="doc_text">
765
Chris Lattner934e2d42008-10-13 22:06:31 +0000766<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattner0d364302011-03-10 07:43:44 +0000767on LLVM 2.8, this section lists some "gotchas" that you may run into upgrading
Chris Lattner934e2d42008-10-13 22:06:31 +0000768from the previous release.</p>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000769
770<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000771<li><b>This is the last release to support the llvm-gcc frontend.</b></li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000772
Chris Lattner17c170a2011-04-06 06:29:50 +0000773<li>LLVM has a new <a href="CodingStandards.html#ll_naming">naming
774 convention standard</a>, though the codebase hasn't fully adopted it yet.</li>
Chris Lattner23e16b592011-04-06 05:50:04 +0000775
Chris Lattner17c170a2011-04-06 06:29:50 +0000776<li>The new DIBuilder class provides a simpler interface for front ends to
777 encode debug info in LLVM IR, and has replaced DIFactory.</li>
Chris Lattner23e16b592011-04-06 05:50:04 +0000778
Chris Lattner17c170a2011-04-06 06:29:50 +0000779<li>LLVM IR and other tools always work on normalized target triples (which have
780 been run through <tt>Triple::normalize</tt>).</li>
781
782<li>The target triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32
783 instead.</li>
784
785<li>The PointerTracking pass has been removed from mainline, and moved to The
786 ClamAV project (its only client).</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000787
Chris Lattner17c170a2011-04-06 06:29:50 +0000788<li>The LoopIndexSplit, LiveValues, SimplifyHalfPowrLibCalls, GEPSplitter, and
789 PartialSpecialization passes were removed. They were unmaintained,
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000790 buggy, or deemed to be a bad idea.</li>
Devang Pateldbf83832008-10-14 20:03:43 +0000791</ul>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000792
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000793</div>
794
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000795<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000796<h2>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000797<a name="api_changes">Internal API Changes</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000798</h2>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000799
800<div class="doc_text">
801
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000802<p>In addition, many APIs have changed in this release. Some of the major
803 LLVM API changes are:</p>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000804
805<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000806<li>include/llvm/System merged into include/llvm/Support.</li>
807<li>The <a href="http://llvm.org/PR5207">llvm::APInt API</a> was significantly
808 cleaned up.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000809
Chris Lattner17c170a2011-04-06 06:29:50 +0000810<li>In the code generator, MVT::Flag was renamed to MVT::Glue to more accurately
811 describe its behavior.</li>
812
813<li>The system_error header from C++0x was added, and is now pervasively used to
814 capture and handle i/o and other errors in LLVM.</li>
815
816<li>The old sys::Path API has been deprecated in favor of the new PathV2 API,
817 which is more efficient and flexible.</li>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000818</ul>
819</div>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000820
Chris Lattner3d482502003-10-02 04:57:28 +0000821<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000822<h1>
Misha Brukman80731b92003-11-22 00:38:41 +0000823 <a name="knownproblems">Known Problems</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000824</h1>
Chris Lattner3d482502003-10-02 04:57:28 +0000825<!-- *********************************************************************** -->
826
Misha Brukman80731b92003-11-22 00:38:41 +0000827<div class="doc_text">
828
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000829<p>This section contains significant known problems with the LLVM system,
Chris Lattner2a092392008-11-10 05:40:34 +0000830listed by component. If you run into a problem, please check the <a
Chris Lattnera69595e2005-10-29 07:07:09 +0000831href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattnerb84f3322003-12-12 21:22:16 +0000832there isn't already one.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000833
Misha Brukman80731b92003-11-22 00:38:41 +0000834</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000835
Chris Lattnerb911de42004-03-14 02:03:02 +0000836<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000837<h2>
Chris Lattnerb911de42004-03-14 02:03:02 +0000838 <a name="experimental">Experimental features included with this release</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000839</h2>
Chris Lattner3d482502003-10-02 04:57:28 +0000840
Chris Lattnerb911de42004-03-14 02:03:02 +0000841<div class="doc_text">
842
Misha Brukmanfa50a222004-05-12 21:46:05 +0000843<p>The following components of this LLVM release are either untested, known to
844be broken or unreliable, or are in early development. These components should
845not be relied on, and bugs should not be filed against them, but they may be
846useful to some people. In particular, if you would like to work on one of these
Chris Lattnere38ac152008-02-12 06:29:45 +0000847components, please contact us on the <a
848href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerb911de42004-03-14 02:03:02 +0000849
850<ul>
Chris Lattner0d364302011-03-10 07:43:44 +0000851<li>The Alpha, Blackfin, CellSPU, MicroBlaze, MSP430, MIPS, PTX, SystemZ
Chris Lattnera7f45cf2010-10-04 01:29:06 +0000852 and XCore backends are experimental.</li>
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000853<li><tt>llc</tt> "<tt>-filetype=obj</tt>" is experimental on all targets
Chris Lattner17c170a2011-04-06 06:29:50 +0000854 other than darwin and ELF X86 systems.</li>
Chris Lattner0d364302011-03-10 07:43:44 +0000855
Chris Lattnerb911de42004-03-14 02:03:02 +0000856</ul>
857
858</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000859
Misha Brukman80731b92003-11-22 00:38:41 +0000860<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000861<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000862 <a name="x86-be">Known problems with the X86 back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000863</h2>
John Criswell3bdbd302005-11-08 21:11:33 +0000864
865<div class="doc_text">
866
867<ul>
Anton Korobeynikov486c7d32008-06-08 10:24:13 +0000868 <li>The X86 backend does not yet support
869 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
870 floating point stack</a>. It supports the 'f' and 't' constraints, but not
871 'u'.</li>
Dan Gohman721b3722008-06-08 23:05:11 +0000872 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattnera67df2d2010-04-22 06:28:20 +0000873 <tt>va_arg</tt>. Currently, front-ends support variadic
Dan Gohman721b3722008-06-08 23:05:11 +0000874 argument constructs on X86-64 by lowering them manually.</li>
NAKAMURA Takumi8d89b8e2011-04-05 08:24:22 +0000875 <li>Windows x64 (aka Win64) code generator has a few issues.
876 <ul>
877 <li>llvm-gcc cannot build the mingw-w64 runtime currently
878 due to lack of support for the 'u' inline assembly
879 constraint and for X87 floating point inline assembly.</li>
880 <li>On mingw-w64, you will see unresolved symbol <tt>__chkstk</tt>
881 due to <a href="http://llvm.org/bugs/show_bug.cgi?id=8919">Bug 8919</a>.
882 It is fixed in <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110321/118499.html">r128206</a>.</li>
883 <li>Miss-aligned MOVDQA might crash your program. It is due to
884 <a href="http://llvm.org/bugs/show_bug.cgi?id=9483">Bug 9483</a>,
885 lack of handling aligned internal globals.</li>
886 </ul>
887 </li>
888
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000889</ul>
890
891</div>
892
893<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000894<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000895 <a name="ppc-be">Known problems with the PowerPC back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000896</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000897
898<div class="doc_text">
899
900<ul>
Nicolas Geoffray77d99502007-05-15 09:21:28 +0000901<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattnerbee7b322007-05-23 04:39:32 +0000902compilation, and lacks support for debug information.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000903</ul>
904
905</div>
906
907<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000908<h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000909 <a name="arm-be">Known problems with the ARM back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000910</h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000911
912<div class="doc_text">
913
914<ul>
Chris Lattnerbee7b322007-05-23 04:39:32 +0000915<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sands47fc0a22007-09-26 15:59:54 +0000916processors, thumb programs can crash or produce wrong
Chris Lattnerbee7b322007-05-23 04:39:32 +0000917results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswellea03c9d2009-03-02 15:28:15 +0000918<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattner97beb512007-05-14 06:56:09 +0000919</li>
Chris Lattner97beb512007-05-14 06:56:09 +0000920</ul>
921
922</div>
923
924<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000925<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000926 <a name="sparc-be">Known problems with the SPARC back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000927</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000928
929<div class="doc_text">
930
931<ul>
John Criswellea03c9d2009-03-02 15:28:15 +0000932<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000933 support the 64-bit SPARC ABI (-m64).</li>
934</ul>
935
936</div>
937
938<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000939<h2>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000940 <a name="mips-be">Known problems with the MIPS back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000941</h2>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000942
943<div class="doc_text">
944
945<ul>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000946<li>64-bit MIPS targets are not supported yet.</li>
947</ul>
948
949</div>
950
951<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000952<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000953 <a name="alpha-be">Known problems with the Alpha back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000954</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000955
956<div class="doc_text">
957
958<ul>
959
960<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
961appropriate nops inserted to ensure restartability.</li>
962
John Criswell3bdbd302005-11-08 21:11:33 +0000963</ul>
964</div>
965
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000966<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000967<h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000968 <a name="c-be">Known problems with the C back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000969</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000970
971<div class="doc_text">
972
Chris Lattner086d2692010-09-29 05:34:42 +0000973<p>The C backend has numerous problems and is not being actively maintained.
974Depending on it for anything serious is not advised.</p>
975
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000976<ul>
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000977<li><a href="http://llvm.org/PR802">The C backend has only basic support for
978 inline assembly code</a>.</li>
Chris Lattner8e061162007-09-26 06:01:35 +0000979<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
980 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif75b2f762009-03-02 12:02:51 +0000981 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandse09506a2008-02-10 13:40:55 +0000982<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands3aa36732009-02-25 11:51:54 +0000983<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000984</ul>
985
986</div>
John Criswell3bdbd302005-11-08 21:11:33 +0000987
Misha Brukman80731b92003-11-22 00:38:41 +0000988
989<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000990<h2>
Chris Lattner086d2692010-09-29 05:34:42 +0000991 <a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000992</h2>
Chris Lattner178f3db2003-10-02 05:07:23 +0000993
Misha Brukman80731b92003-11-22 00:38:41 +0000994<div class="doc_text">
Chris Lattner72a269f2006-03-03 00:34:26 +0000995
Chris Lattner17c170a2011-04-06 06:29:50 +0000996<p><b>LLVM 2.9 will be the last release of llvm-gcc.</b></p>
997
Chris Lattner086d2692010-09-29 05:34:42 +0000998<p>llvm-gcc is generally very stable for the C family of languages. The only
999 major language feature of GCC not supported by llvm-gcc is the
1000 <tt>__builtin_apply</tt> family of builtins. However, some extensions
1001 are only supported on some targets. For example, trampolines are only
1002 supported on some targets (these are used when you take the address of a
1003 nested function).</p>
Misha Brukman80731b92003-11-22 00:38:41 +00001004
Chris Lattner086d2692010-09-29 05:34:42 +00001005<p>Fortran support generally works, but there are still several unresolved bugs
1006 in <a href="http://llvm.org/bugs/">Bugzilla</a>. Please see the
1007 tools/gfortran component for details. Note that llvm-gcc is missing major
1008 Fortran performance work in the frontend and library that went into GCC after
1009 4.2. If you are interested in Fortran, we recommend that you consider using
1010 <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner3d482502003-10-02 04:57:28 +00001011
Duncan Sandsd63e1c82010-10-04 10:06:56 +00001012<p>The llvm-gcc 4.2 Ada compiler has basic functionality, but is no longer being
1013actively maintained. If you are interested in Ada, we recommend that you
1014consider using <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattnere38ac152008-02-12 06:29:45 +00001015</div>
1016
Chris Lattner3d482502003-10-02 04:57:28 +00001017<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +00001018<h1>
Misha Brukman80731b92003-11-22 00:38:41 +00001019 <a name="additionalinfo">Additional Information</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +00001020</h1>
Chris Lattner3d482502003-10-02 04:57:28 +00001021<!-- *********************************************************************** -->
1022
Misha Brukman80731b92003-11-22 00:38:41 +00001023<div class="doc_text">
1024
Chris Lattnercb5596d2005-05-16 17:13:10 +00001025<p>A wide variety of additional information is available on the <a
NAKAMURA Takumica46f5a2011-04-09 02:13:37 +00001026href="http://llvm.org/">LLVM web page</a>, in particular in the <a
Chris Lattnere0c1df42007-05-18 00:44:29 +00001027href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencerc7f87f22007-07-09 08:04:31 +00001028contains versions of the API documentation which is up-to-date with the
1029Subversion version of the source code.
Misha Brukman96158092005-03-30 19:14:24 +00001030You can access versions of these documents specific to this release by going
1031into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner3d482502003-10-02 04:57:28 +00001032
Misha Brukman80731b92003-11-22 00:38:41 +00001033<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnera69595e2005-10-29 07:07:09 +00001034us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattnerb84f3322003-12-12 21:22:16 +00001035lists</a>.</p>
Chris Lattner3d482502003-10-02 04:57:28 +00001036
Misha Brukman80731b92003-11-22 00:38:41 +00001037</div>
Chris Lattner3d482502003-10-02 04:57:28 +00001038
1039<!-- *********************************************************************** -->
Chris Lattner3d482502003-10-02 04:57:28 +00001040
Misha Brukman80731b92003-11-22 00:38:41 +00001041<hr>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001042<address>
Misha Brukman8834af92003-12-21 22:53:21 +00001043 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +00001044 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001045 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +00001046 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001047
Chris Lattnere0c1df42007-05-18 00:44:29 +00001048 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman80731b92003-11-22 00:38:41 +00001049 Last modified: $Date$
Misha Brukman68aab3b2003-11-22 01:23:39 +00001050</address>
Chris Lattner3d482502003-10-02 04:57:28 +00001051
Misha Brukman80731b92003-11-22 00:38:41 +00001052</body>
1053</html>