blob: 25dd485d24d97c986204366d19397f554dd336b9 [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">
Dan Gohmanad888912008-10-14 16:23:02 +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
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000231
232<!--=========================================================================-->
Chris Lattner9ee0b012011-04-05 18:38:45 +0000233<!--
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000234<h2>
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000235<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000236</h2>
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000237
238<div class="doc_text">
239<p>
240<a href="http://klee.llvm.org/">KLEE</a> is a symbolic execution framework for
241programs in LLVM bitcode form. KLEE tries to symbolically evaluate "all" paths
242through the application and records state transitions that lead to fault
243states. This allows it to construct testcases that lead to faults and can even
244be used to verify some algorithms.
245</p>
246
Chris Lattner0d364302011-03-10 07:43:44 +0000247<p>UPDATE!</p>
Chris Lattner9ee0b012011-04-05 18:38:45 +0000248</div>-->
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000249
250
Chris Lattner53e06f92009-02-26 22:33:38 +0000251<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000252<h1>
Chris Lattner0d364302011-03-10 07:43:44 +0000253 <a name="externalproj">External Open Source Projects Using LLVM 2.9</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000254</h1>
Chris Lattner53e06f92009-02-26 22:33:38 +0000255<!-- *********************************************************************** -->
256
Chris Lattneraa61f412009-10-13 17:48:04 +0000257<div class="doc_text">
258
259<p>An exciting aspect of LLVM is that it is used as an enabling technology for
260 a lot of other language and tools projects. This section lists some of the
Chris Lattner0d364302011-03-10 07:43:44 +0000261 projects that have already been updated to work with LLVM 2.9.</p>
Chris Lattnerdf85c892010-04-26 17:38:10 +0000262</div>
263
Chris Lattner120804a2010-10-03 23:49:06 +0000264
Chris Lattnerae6a89a2011-04-06 01:13:49 +0000265<!--=========================================================================-->
266<h2>Crack Programming Language</h2>
267
268<div class="doc_text">
269<p>
270<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
271ease of development of a scripting language with the performance of a compiled
272language. The language derives concepts from C++, Java and Python, incorporating
273object-oriented programming, operator overloading and strong typing.</p>
274</div>
275
276
277<!--=========================================================================-->
278<h2>TTA-based Codesign Environment (TCE)</h2>
279
280<div class="doc_text">
281<p>TCE is a toolset for designing application-specific processors (ASP) based on
282the Transport triggered architecture (TTA). The toolset provides a complete
283co-design flow from C/C++ programs down to synthesizable VHDL and parallel
284program binaries. Processor customization points include the register files,
285function units, supported operations, and the interconnection network.</p>
286
287<p>TCE uses Clang and LLVM for C/C++ language support, target independent
288optimizations and also for parts of code generation. It generates new LLVM-based
289code generators "on the fly" for the designed TTA processors and loads them in
290to the compiler backend as runtime libraries to avoid per-target recompilation
291of larger parts of the compiler chain.</p>
292</div>
293
294
295
296<!--=========================================================================-->
297<h2>PinaVM</h2>
298
299<div class="doc_text">
300<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
301source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
302other front-ends, PinaVM actually executes the elaboration of the
303program analyzed using LLVM's JIT infrastructure. It later enriches the
304bitcode with SystemC-specific information.</p>
305</div>
306
307<!--=========================================================================-->
308<h2>Pure</h2>
309
310<div class="doc_text">
311<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
312 algebraic/functional
313 programming language based on term rewriting. Programs are collections
314 of equations which are used to evaluate expressions in a symbolic
315 fashion. The interpreter uses LLVM as a backend to JIT-compile Pure
316 programs to fast native code. Pure offers dynamic typing, eager and lazy
317 evaluation, lexical closures, a hygienic macro system (also based on
318 term rewriting), built-in list and matrix support (including list and
319 matrix comprehensions) and an easy-to-use interface to C and other
320 programming languages (including the ability to load LLVM bitcode
321 modules, and inline C, C++, Fortran and Faust code in Pure programs if
322 the corresponding LLVM-enabled compilers are installed).</p>
323
324<p>Pure version 0.47 has been tested and is known to work with LLVM 2.9
325 (and continues to work with older LLVM releases &gt;= 2.5).</p>
326</div>
327
328<!--=========================================================================-->
329<h2 id="icedtea">IcedTea Java Virtual Machine Implementation</h2>
330
331<div class="doc_text">
332<p>
333<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
334harness to build OpenJDK using only free software build tools and to provide
335replacements for the not-yet free parts of OpenJDK. One of the extensions that
336IcedTea provides is a new JIT compiler named <a
337href="http://icedtea.classpath.org/wiki/ZeroSharkFaq">Shark</a> which uses LLVM
338to provide native code generation without introducing processor-dependent
339code.
340</p>
341
342<p> OpenJDK 7 b112, IcedTea6 1.9 and IcedTea7 1.13 and later have been tested
343and are known to work with LLVM 2.9 (and continue to work with older LLVM
344releases &gt;= 2.6 as well).</p>
345</div>
346
347<!--=========================================================================-->
348<h2>Glasgow Haskell Compiler (GHC)</h2>
349
350<div class="doc_text">
351<p>GHC is an open source, state-of-the-art programming suite for Haskell,
352a standard lazy functional programming language. It includes an
353optimizing static compiler generating good code for a variety of
354platforms, together with an interactive system for convenient, quick
355development.</p>
356
357<p>In addition to the existing C and native code generators, GHC 7.0 now
358supports an LLVM code generator. GHC supports LLVM 2.7 and later.</p>
359</div>
360
361<!--=========================================================================-->
362<h2>Polly - Polyhedral optimizations for LLVM</h2>
363
364<div class="doc_text">
365<p>Polly is a project that aims to provide advanced memory access optimizations
366to better take advantage of SIMD units, cache hierarchies, multiple cores or
367even vector accelerators for LLVM. Built around an abstract mathematical
368description based on Z-polyhedra, it provides the infrastructure to develop
369advanced optimizations in LLVM and to connect complex external optimizers. In
370its first year of existence Polly already provides an exact value-based
371dependency analysis as well as basic SIMD and OpenMP code generation support.
372Furthermore, Polly can use PoCC(Pluto) an advanced optimizer for data-locality
373and parallelism.</p>
374</div>
Chris Lattner120804a2010-10-03 23:49:06 +0000375
Chris Lattner958d2992011-04-06 16:14:25 +0000376<!--=========================================================================-->
377<h2>Rubinius</h2>
378
379<div class="doc_text">
380 <p><a href="http://github.com/evanphx/rubinius">Rubinius</a> is an environment
381 for running Ruby code which strives to write as much of the implementation in
382 Ruby as possible. Combined with a bytecode interpreting VM, it uses LLVM to
383 optimize and compile ruby code down to machine code. Techniques such as type
384 feedback, method inlining, and deoptimization are all used to remove dynamism
385 from ruby execution and increase performance.</p>
386</div>
387
388
Chris Lattnerca7c8962010-10-01 06:34:49 +0000389
Chris Lattnerc75fd522008-06-08 21:58:17 +0000390<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000391<h1>
Chris Lattner0d364302011-03-10 07:43:44 +0000392 <a name="whatsnew">What's New in LLVM 2.9?</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000393</h1>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000394<!-- *********************************************************************** -->
395
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000396<div class="doc_text">
397
Chris Lattneraa61f412009-10-13 17:48:04 +0000398<p>This release includes a huge number of bug fixes, performance tweaks and
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000399minor improvements. Some of the major improvements and new features are listed
400in this section.
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000401</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000402
Chris Lattnera67df2d2010-04-22 06:28:20 +0000403</div>
404
405<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000406<h2>
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000407<a name="majorfeatures">Major New Features</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000408</h2>
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000409
410<div class="doc_text">
411
Chris Lattner0d364302011-03-10 07:43:44 +0000412<p>LLVM 2.9 includes several major new capabilities:</p>
Chris Lattner97beb512007-05-14 06:56:09 +0000413
414<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000415
Chris Lattner23e16b592011-04-06 05:50:04 +0000416<li>Type Based Alias Analysis (TBAA) is now implemented and turned on by default
417 in Clang. This allows substantially better load/store optimization in some
418 cases. TBAA can be disabled by passing -fno-strict-aliasing.
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000419</li>
420
Chris Lattner23e16b592011-04-06 05:50:04 +0000421<li>This release has seen a continued focus on quality of debug information.
422 LLVM now generates much higher fidelity debug information, particularly when
423 debugging optimized code.</li>
424
425<li>Inline assembly now supports multiple alternative constraints.</li>
426
427<li>A new backend for the NVIDIA PTX virtual ISA (used to target its GPUs) is
428 under rapid development. It is not generally useful in 2.9, but is making
429 rapid progress.</li>
Chris Lattner9ee0b012011-04-05 18:38:45 +0000430
Chris Lattner458e79f2008-02-10 08:18:42 +0000431</ul>
Chris Lattnerfd97b882011-04-05 07:19:28 +0000432
Chris Lattner97beb512007-05-14 06:56:09 +0000433</div>
434
Chris Lattner0a1fd102007-09-21 03:54:09 +0000435<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000436<h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000437<a name="coreimprovements">LLVM IR and Core Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000438</h2>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000439
440<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000441<p>LLVM IR has several new features for better support of new targets and that
442expose new optimization opportunities:</p>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000443
Chris Lattnerb7112222008-06-05 06:25:56 +0000444<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000445<li>The <a href="LangRef.html#bitwiseops">udiv, ashr, lshr, and shl</a>
446 instructions now have support exact and nuw/nsw bits to indicate that they
447 don't overflow or shift out bits. This is useful for optimization of <a
448 href="http://llvm.org/PR8862">pointer differences</a> and other cases.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000449
Chris Lattner23e16b592011-04-06 05:50:04 +0000450<li>LLVM IR now supports the <a href="LangRef.html#globalvars">unnamed_addr</a>
451 attribute to indicate that constant global variables with identical
452 initializers can be merged. This fixed <a href="http://llvm.org/PR8927">an
453 issue</a> where LLVM would incorrectly merge two globals which were supposed
454 to have distinct addresses.</li>
455
456<li>The new <a href="LangRef.html#fnattrs">hotpatch attribute</a> has been added
457 to allow runtime patching of functions.</li>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000458</ul>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +0000459
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000460</div>
461
462<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000463<h2>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000464<a name="optimizer">Optimizer Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000465</h2>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000466
467<div class="doc_text">
468
Chris Lattneraa61f412009-10-13 17:48:04 +0000469<p>In addition to a large array of minor performance tweaks and bug fixes, this
Chris Lattner25879d72008-10-13 21:50:36 +0000470release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000471
472<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000473<li>Link Time Optimization (LTO) has been improved to use MC for parsing inline
474 assembly and now can build large programs like Firefox 4 on both Mac OS X and
475 Linux.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000476
Chris Lattner23e16b592011-04-06 05:50:04 +0000477<li>The new -loop-idiom pass recognizes memset/memcpy loops (and memset_pattern
478 on darwin), turning them into library calls, which are typically better
479 optimized than inline code. If you are building a libc and notice that your
480 memcpy and memset functions are compiled into infinite recursion, please build
481 with -ffreestanding or -fno-builtin to disable this pass.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000482
Chris Lattner23e16b592011-04-06 05:50:04 +0000483<li>A new -early-cse pass does a fast pass over functions to fold constants,
484 simplify expressions, perform simple dead store elimination, and perform
485 common subexpression elimination. It does a good job at catching some of the
486 trivial redundancies that exist in unoptimized code, making later passes more
Roman Divacky620f6962011-04-06 19:12:21 +0000487 effective.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000488
Chris Lattner23e16b592011-04-06 05:50:04 +0000489<li>A new -loop-instsimplify pass is used to clean up loop bodies in the loop
490 optimizer.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000491
Chris Lattner23e16b592011-04-06 05:50:04 +0000492<li>The new TargetLibraryInfo interface allows mid-level optimizations to know
493 whether the current target's runtime library has certain functions. For
494 example, the optimizer can now transform integer-only printf calls to call
495 iprintf, allowing reduced code size for embedded C libraries (e.g. newlib).
496</li>
497
498<li>LLVM has a new <a href="WritingAnLLVMPass.html#RegionPass">RegionPass</a>
499 infrastructure for region-based optimizations.</li>
500
501<li>Several optimizer passes have been substantially sped up:
502 GVN is much faster on functions with deep dominator trees and lots of basic
503 blocks. The dominator tree and dominance frontier passes are much faster to
504 compute, and preserved by more passes (so they are computed less often). The
505 -scalar-repl pass is also much faster and doesn't use DominanceFrontier.
506</li>
507
508<li>The Dead Store Elimination pass is more aggressive optimizing stores of
509 different types: e.g. a large store following a small one to the same address.
510 The MemCpyOptimizer pass handles several new forms of memcpy elimination.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000511
Chris Lattner23e16b592011-04-06 05:50:04 +0000512<li>LLVM now optimizes various idioms for overflow detection into check of the
513 flag register on various CPUs. For example, we now compile:
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000514
Chris Lattner23e16b592011-04-06 05:50:04 +0000515 <pre>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000516 unsigned long t = a+b;
517 if (t &lt; a) ...
Chris Lattner23e16b592011-04-06 05:50:04 +0000518 </pre>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000519 into:
Chris Lattner23e16b592011-04-06 05:50:04 +0000520 <pre>
521 addq %rdi, %rbx
522 jno LBB0_2
523 </pre>
524</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000525
Chris Lattnerfcc65a72010-10-04 02:42:39 +0000526</ul>
527
Chris Lattneraa61f412009-10-13 17:48:04 +0000528</div>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000529
Chris Lattner7795ea92008-06-08 02:45:07 +0000530<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000531<h2>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000532<a name="mc">MC Level Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000533</h2>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000534
535<div class="doc_text">
536<p>
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000537The LLVM Machine Code (aka MC) subsystem was created to solve a number
Chris Lattnerf25bc192010-09-30 16:31:33 +0000538of problems in the realm of assembly, disassembly, object file format handling,
539and a number of other related areas that CPU instruction-set level tools work
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000540in.</p>
541
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000542<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000543<li>ELF MC support has matured enough for the integrated assembler to be turned
544 on by default in Clang on X86-32 and X86-64 ELF systems.</li>
545
546<li>MC supports and CodeGen uses the <tt>.file</tt> and <tt>.loc</tt> directives
547 for producing line number debug info. This produces more compact line
548 tables and easier to read .s files.</li>
549
550<li>MC supports the <tt>.cfi_*</tt> directives for producing DWARF
Rafael Espindola01fb4b02011-03-18 04:07:44 +0000551 frame information, but it is still not used by CodeGen by default.</li>
Chris Lattner23e16b592011-04-06 05:50:04 +0000552
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000553
Chris Lattner23e16b592011-04-06 05:50:04 +0000554<li>The MC assembler now generates much better diagnostics for common errors,
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000555 is much faster at matching instructions, is much more bug-compatible with
556 the GAS assembler, and is now generally useful for a broad range of X86
Chris Lattner23e16b592011-04-06 05:50:04 +0000557 assembly.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000558
Chris Lattner23e16b592011-04-06 05:50:04 +0000559<li>We now have some basic <a href="CodeGenerator.html#mc">internals
560 documentation</a> for MC.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000561
Chris Lattner23e16b592011-04-06 05:50:04 +0000562<li>.td files can now specify assembler aliases directly with the <a
563 href="CodeGenerator.html#na_instparsing">MnemonicAlias and InstAlias</a>
564 tblgen classes.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000565
Chris Lattner23e16b592011-04-06 05:50:04 +0000566<li>LLVM now has an experimental format-independent object file manipulation
567 library (lib/Object). It supports both PE/COFF and ELF. The llvm-nm tool has
568 been extended to work with native object files, and the new llvm-objdump tool
569 supports disassembly of object files (but no relocations are displayed yet).
570</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000571
Chris Lattner23e16b592011-04-06 05:50:04 +0000572<li>Win32 PE-COFF support in the MC assembler has made a lot of progress in the
573 2.9 timeframe, but is still not generally useful.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000574
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000575</ul>
576
577<p>For more information, please see the <a
Chris Lattnerf25bc192010-09-30 16:31:33 +0000578href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro to the
579LLVM MC Project Blog Post</a>.
580</p>
581
NAKAMURA Takumi8d89b8e2011-04-05 08:24:22 +0000582</div>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000583
Chris Lattnerf25bc192010-09-30 16:31:33 +0000584<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000585<h2>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000586<a name="codegen">Target Independent Code Generator Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000587</h2>
Chris Lattner7795ea92008-06-08 02:45:07 +0000588
589<div class="doc_text">
590
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000591<p>We have put a significant amount of work into the code generator
592infrastructure, which allows us to implement more aggressive algorithms and make
593it run faster:</p>
Chris Lattner7795ea92008-06-08 02:45:07 +0000594
595<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000596<li>The pre-register-allocation (preRA) instruction scheduler models register
597 pressure much more accurately in some cases. This allows the adoption of more
Chris Lattner17c170a2011-04-06 06:29:50 +0000598 aggressive scheduling heuristics without causing spills to be generated.
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000599</li>
600
Chris Lattner17c170a2011-04-06 06:29:50 +0000601<li>LiveDebugVariables is a new pass that keeps track of debugging information
602 for user variables that are promoted to registers in optimized builds.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000603
Chris Lattner17c170a2011-04-06 06:29:50 +0000604<li>The scheduler now models operand latency and pipeline forwarding.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000605
Chris Lattner17c170a2011-04-06 06:29:50 +0000606<li>A major register allocator infrastructure rewrite is underway. It is not on
607 by default for 2.9 and you are not advised to use it, but it has made
608 substantial progress in the 2.9 timeframe:
609 <ul>
610 <li>A new -regalloc=basic "basic" register allocator can be used as a simple
611 fallback when debugging. It uses the new infrastructure.</li>
612 <li>New infrastructure is in place for live range splitting. "SplitKit" can
613 break a live interval into smaller pieces while preserving SSA form, and
614 SpillPlacement can help find the best split points. This is a work in
615 progress so the API is changing quickly.</li>
616 <li>The inline spiller has learned to clean up after live range splitting. It
617 can hoist spills out of loops, and it can eliminate redundant spills.</li>
618 <li>Rematerialization works with live range splitting.</li>
619 <li>The new "greedy" register allocator using live range splitting. This will
620 be the default register allocator in the next LLVM release, but it is not
621 turned on by default in 2.9.</li>
622 </ul>
623</li>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000624</ul>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000625</div>
626
Chris Lattnerd1094e02009-03-02 02:37:32 +0000627<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000628<h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000629<a name="x86">X86-32 and X86-64 Target Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000630</h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000631
632<div class="doc_text">
Chris Lattnerd3f45c82010-10-04 04:39:25 +0000633<p>New features and major changes in the X86 target include:
Chris Lattnerd1094e02009-03-02 02:37:32 +0000634</p>
635
636<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000637<li>LLVM 2.9 includes a complete reimplementation of the MMX instruction set.
638 The reimplementation uses a new LLVM IR <a
639 href="LangRef.html#t_x86mmx">x86_mmx</a> type to ensure that MMX operations
640 are <em>only</em> generated from source that uses MMX builtin operations. With
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000641 this, random types like &lt;2 x i32&gt; are not turned into MMX operations
Chris Lattner17c170a2011-04-06 06:29:50 +0000642 (which can be catastrophic without proper "emms" insertion). Because the X86
643 code generator always generates reliable code, the -disable-mmx flag is now
644 removed.
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000645</li>
646
Chris Lattner17c170a2011-04-06 06:29:50 +0000647<li>X86 support for FS/GS relative loads and stores using <a
Jay Foad1a7cc442011-04-06 07:55:30 +0000648 href="CodeGenerator.html#x86_memory">address space 256/257</a> works reliably
Chris Lattner17c170a2011-04-06 06:29:50 +0000649 now.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000650
Chris Lattner17c170a2011-04-06 06:29:50 +0000651<li>LLVM 2.9 generates much better code in several cases by using adc/sbb to
652 avoid generation of conditional move instructions for conditional increment
653 and other idioms.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000654
Chris Lattner17c170a2011-04-06 06:29:50 +0000655<li>The X86 backend has adopted a new preRA scheduling mode, "list-ilp", to
656 shorten the height of instruction schedules without inducing register spills.
657</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000658
Jay Foad1a7cc442011-04-06 07:55:30 +0000659<li>The MC assembler supports 3dNow! and 3DNowA instructions.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000660
Chris Lattner17c170a2011-04-06 06:29:50 +0000661<li>Several bugs have been fixed for Windows x64 code generator.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000662</ul>
663
Chris Lattnerd1094e02009-03-02 02:37:32 +0000664</div>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000665
666<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000667<h2>
Chris Lattneraa61f412009-10-13 17:48:04 +0000668<a name="ARM">ARM Target Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000669</h2>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000670
671<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000672<p>New features of the ARM target include:
673</p>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000674
675<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000676<li>The ARM backend now has a fast instruction selector, which dramatically
677 improves -O0 compile times.</li>
678<li>The ARM backend has new tuning for Cortex-A8 and Cortex-A9 CPUs.</li>
679<li>The __builtin_prefetch builtin (and llvm.prefetch intrinsic) is compiled
680 into prefetch instructions instead of being discarded.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000681
682<li> The ARM backend preRA scheduler now models machine resources at cycle
683 granularity. This allows the scheduler to both accurately model
684 instruction latency and avoid overcommitting functional units.</li>
685
Chris Lattner17c170a2011-04-06 06:29:50 +0000686<li>Countless ARM microoptimizations have landed in LLVM 2.9.</li>
Bob Wilsone44f2982010-09-13 17:39:35 +0000687</ul>
Chris Lattneraa61f412009-10-13 17:48:04 +0000688</div>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000689
690<!--=========================================================================-->
691<h2>
692<a name="OtherTS">Other Target Specific Improvements</a>
693</h2>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000694
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000695<div class="doc_text">
696<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000697<li>MicroBlaze: major updates for aggressive delay slot filler, MC-based
698 assembly printing, assembly instruction parsing, ELF .o file emission, and MC
699 instruction disassembler have landed.</li>
700
701<li>SPARC: Many improvements, including using the Y registers for
702 multiplications and addition of a simple delay slot filler.</li>
703
704<li>PowerPC: The backend has been largely MC'ized and is ready to support
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000705 directly writing out mach-o object files. No one seems interested in finishing
Chris Lattner17c170a2011-04-06 06:29:50 +0000706 this final step though.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000707
708</ul>
709</div>
Chris Lattner6cb64032008-06-05 08:02:49 +0000710
711<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000712<h2>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000713<a name="changes">Major Changes and Removed Features</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000714</h2>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000715
716<div class="doc_text">
717
Chris Lattner934e2d42008-10-13 22:06:31 +0000718<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattner0d364302011-03-10 07:43:44 +0000719on LLVM 2.8, this section lists some "gotchas" that you may run into upgrading
Chris Lattner934e2d42008-10-13 22:06:31 +0000720from the previous release.</p>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000721
722<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000723<li><b>This is the last release to support the llvm-gcc frontend.</b></li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000724
Chris Lattner17c170a2011-04-06 06:29:50 +0000725<li>LLVM has a new <a href="CodingStandards.html#ll_naming">naming
726 convention standard</a>, though the codebase hasn't fully adopted it yet.</li>
Chris Lattner23e16b592011-04-06 05:50:04 +0000727
Chris Lattner17c170a2011-04-06 06:29:50 +0000728<li>The new DIBuilder class provides a simpler interface for front ends to
729 encode debug info in LLVM IR, and has replaced DIFactory.</li>
Chris Lattner23e16b592011-04-06 05:50:04 +0000730
Chris Lattner17c170a2011-04-06 06:29:50 +0000731<li>LLVM IR and other tools always work on normalized target triples (which have
732 been run through <tt>Triple::normalize</tt>).</li>
733
734<li>The target triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32
735 instead.</li>
736
737<li>The PointerTracking pass has been removed from mainline, and moved to The
738 ClamAV project (its only client).</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000739
Chris Lattner17c170a2011-04-06 06:29:50 +0000740<li>The LoopIndexSplit, LiveValues, SimplifyHalfPowrLibCalls, GEPSplitter, and
741 PartialSpecialization passes were removed. They were unmaintained,
Duncan Sandsce5d9ae2011-04-06 08:07:40 +0000742 buggy, or deemed to be a bad idea.</li>
Devang Pateldbf83832008-10-14 20:03:43 +0000743</ul>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000744
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000745</div>
746
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000747<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000748<h2>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000749<a name="api_changes">Internal API Changes</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000750</h2>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000751
752<div class="doc_text">
753
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000754<p>In addition, many APIs have changed in this release. Some of the major
755 LLVM API changes are:</p>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000756
757<ul>
Chris Lattner17c170a2011-04-06 06:29:50 +0000758<li>include/llvm/System merged into include/llvm/Support.</li>
759<li>The <a href="http://llvm.org/PR5207">llvm::APInt API</a> was significantly
760 cleaned up.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000761
Chris Lattner17c170a2011-04-06 06:29:50 +0000762<li>In the code generator, MVT::Flag was renamed to MVT::Glue to more accurately
763 describe its behavior.</li>
764
765<li>The system_error header from C++0x was added, and is now pervasively used to
766 capture and handle i/o and other errors in LLVM.</li>
767
768<li>The old sys::Path API has been deprecated in favor of the new PathV2 API,
769 which is more efficient and flexible.</li>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000770</ul>
771</div>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000772
Chris Lattner3d482502003-10-02 04:57:28 +0000773<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000774<h1>
Misha Brukman80731b92003-11-22 00:38:41 +0000775 <a name="knownproblems">Known Problems</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000776</h1>
Chris Lattner3d482502003-10-02 04:57:28 +0000777<!-- *********************************************************************** -->
778
Misha Brukman80731b92003-11-22 00:38:41 +0000779<div class="doc_text">
780
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000781<p>This section contains significant known problems with the LLVM system,
Chris Lattner2a092392008-11-10 05:40:34 +0000782listed by component. If you run into a problem, please check the <a
Chris Lattnera69595e2005-10-29 07:07:09 +0000783href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattnerb84f3322003-12-12 21:22:16 +0000784there isn't already one.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000785
Misha Brukman80731b92003-11-22 00:38:41 +0000786</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000787
Chris Lattnerb911de42004-03-14 02:03:02 +0000788<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000789<h2>
Chris Lattnerb911de42004-03-14 02:03:02 +0000790 <a name="experimental">Experimental features included with this release</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000791</h2>
Chris Lattner3d482502003-10-02 04:57:28 +0000792
Chris Lattnerb911de42004-03-14 02:03:02 +0000793<div class="doc_text">
794
Misha Brukmanfa50a222004-05-12 21:46:05 +0000795<p>The following components of this LLVM release are either untested, known to
796be broken or unreliable, or are in early development. These components should
797not be relied on, and bugs should not be filed against them, but they may be
798useful to some people. In particular, if you would like to work on one of these
Chris Lattnere38ac152008-02-12 06:29:45 +0000799components, please contact us on the <a
800href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerb911de42004-03-14 02:03:02 +0000801
802<ul>
Chris Lattner0d364302011-03-10 07:43:44 +0000803<li>The Alpha, Blackfin, CellSPU, MicroBlaze, MSP430, MIPS, PTX, SystemZ
Chris Lattnera7f45cf2010-10-04 01:29:06 +0000804 and XCore backends are experimental.</li>
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000805<li><tt>llc</tt> "<tt>-filetype=obj</tt>" is experimental on all targets
Chris Lattner17c170a2011-04-06 06:29:50 +0000806 other than darwin and ELF X86 systems.</li>
Chris Lattner0d364302011-03-10 07:43:44 +0000807
Chris Lattnerb911de42004-03-14 02:03:02 +0000808</ul>
809
810</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000811
Misha Brukman80731b92003-11-22 00:38:41 +0000812<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000813<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000814 <a name="x86-be">Known problems with the X86 back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000815</h2>
John Criswell3bdbd302005-11-08 21:11:33 +0000816
817<div class="doc_text">
818
819<ul>
Anton Korobeynikov486c7d32008-06-08 10:24:13 +0000820 <li>The X86 backend does not yet support
821 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
822 floating point stack</a>. It supports the 'f' and 't' constraints, but not
823 'u'.</li>
Dan Gohman721b3722008-06-08 23:05:11 +0000824 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattnera67df2d2010-04-22 06:28:20 +0000825 <tt>va_arg</tt>. Currently, front-ends support variadic
Dan Gohman721b3722008-06-08 23:05:11 +0000826 argument constructs on X86-64 by lowering them manually.</li>
NAKAMURA Takumi8d89b8e2011-04-05 08:24:22 +0000827 <li>Windows x64 (aka Win64) code generator has a few issues.
828 <ul>
829 <li>llvm-gcc cannot build the mingw-w64 runtime currently
830 due to lack of support for the 'u' inline assembly
831 constraint and for X87 floating point inline assembly.</li>
832 <li>On mingw-w64, you will see unresolved symbol <tt>__chkstk</tt>
833 due to <a href="http://llvm.org/bugs/show_bug.cgi?id=8919">Bug 8919</a>.
834 It is fixed in <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110321/118499.html">r128206</a>.</li>
835 <li>Miss-aligned MOVDQA might crash your program. It is due to
836 <a href="http://llvm.org/bugs/show_bug.cgi?id=9483">Bug 9483</a>,
837 lack of handling aligned internal globals.</li>
838 </ul>
839 </li>
840
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000841</ul>
842
843</div>
844
845<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000846<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000847 <a name="ppc-be">Known problems with the PowerPC back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000848</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000849
850<div class="doc_text">
851
852<ul>
Nicolas Geoffray77d99502007-05-15 09:21:28 +0000853<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattnerbee7b322007-05-23 04:39:32 +0000854compilation, and lacks support for debug information.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000855</ul>
856
857</div>
858
859<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000860<h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000861 <a name="arm-be">Known problems with the ARM back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000862</h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000863
864<div class="doc_text">
865
866<ul>
Chris Lattnerbee7b322007-05-23 04:39:32 +0000867<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sands47fc0a22007-09-26 15:59:54 +0000868processors, thumb programs can crash or produce wrong
Chris Lattnerbee7b322007-05-23 04:39:32 +0000869results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswellea03c9d2009-03-02 15:28:15 +0000870<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattner97beb512007-05-14 06:56:09 +0000871</li>
Chris Lattner97beb512007-05-14 06:56:09 +0000872</ul>
873
874</div>
875
876<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000877<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000878 <a name="sparc-be">Known problems with the SPARC back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000879</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000880
881<div class="doc_text">
882
883<ul>
John Criswellea03c9d2009-03-02 15:28:15 +0000884<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000885 support the 64-bit SPARC ABI (-m64).</li>
886</ul>
887
888</div>
889
890<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000891<h2>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000892 <a name="mips-be">Known problems with the MIPS back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000893</h2>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000894
895<div class="doc_text">
896
897<ul>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000898<li>64-bit MIPS targets are not supported yet.</li>
899</ul>
900
901</div>
902
903<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000904<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000905 <a name="alpha-be">Known problems with the Alpha back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000906</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000907
908<div class="doc_text">
909
910<ul>
911
912<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
913appropriate nops inserted to ensure restartability.</li>
914
John Criswell3bdbd302005-11-08 21:11:33 +0000915</ul>
916</div>
917
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000918<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000919<h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000920 <a name="c-be">Known problems with the C back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000921</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000922
923<div class="doc_text">
924
Chris Lattner086d2692010-09-29 05:34:42 +0000925<p>The C backend has numerous problems and is not being actively maintained.
926Depending on it for anything serious is not advised.</p>
927
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000928<ul>
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000929<li><a href="http://llvm.org/PR802">The C backend has only basic support for
930 inline assembly code</a>.</li>
Chris Lattner8e061162007-09-26 06:01:35 +0000931<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
932 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif75b2f762009-03-02 12:02:51 +0000933 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandse09506a2008-02-10 13:40:55 +0000934<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands3aa36732009-02-25 11:51:54 +0000935<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000936</ul>
937
938</div>
John Criswell3bdbd302005-11-08 21:11:33 +0000939
Misha Brukman80731b92003-11-22 00:38:41 +0000940
941<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000942<h2>
Chris Lattner086d2692010-09-29 05:34:42 +0000943 <a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000944</h2>
Chris Lattner178f3db2003-10-02 05:07:23 +0000945
Misha Brukman80731b92003-11-22 00:38:41 +0000946<div class="doc_text">
Chris Lattner72a269f2006-03-03 00:34:26 +0000947
Chris Lattner17c170a2011-04-06 06:29:50 +0000948<p><b>LLVM 2.9 will be the last release of llvm-gcc.</b></p>
949
Chris Lattner086d2692010-09-29 05:34:42 +0000950<p>llvm-gcc is generally very stable for the C family of languages. The only
951 major language feature of GCC not supported by llvm-gcc is the
952 <tt>__builtin_apply</tt> family of builtins. However, some extensions
953 are only supported on some targets. For example, trampolines are only
954 supported on some targets (these are used when you take the address of a
955 nested function).</p>
Misha Brukman80731b92003-11-22 00:38:41 +0000956
Chris Lattner086d2692010-09-29 05:34:42 +0000957<p>Fortran support generally works, but there are still several unresolved bugs
958 in <a href="http://llvm.org/bugs/">Bugzilla</a>. Please see the
959 tools/gfortran component for details. Note that llvm-gcc is missing major
960 Fortran performance work in the frontend and library that went into GCC after
961 4.2. If you are interested in Fortran, we recommend that you consider using
962 <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000963
Duncan Sandsd63e1c82010-10-04 10:06:56 +0000964<p>The llvm-gcc 4.2 Ada compiler has basic functionality, but is no longer being
965actively maintained. If you are interested in Ada, we recommend that you
966consider using <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattnere38ac152008-02-12 06:29:45 +0000967</div>
968
Chris Lattner3d482502003-10-02 04:57:28 +0000969<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000970<h1>
Misha Brukman80731b92003-11-22 00:38:41 +0000971 <a name="additionalinfo">Additional Information</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000972</h1>
Chris Lattner3d482502003-10-02 04:57:28 +0000973<!-- *********************************************************************** -->
974
Misha Brukman80731b92003-11-22 00:38:41 +0000975<div class="doc_text">
976
Chris Lattnercb5596d2005-05-16 17:13:10 +0000977<p>A wide variety of additional information is available on the <a
Chris Lattnere0c1df42007-05-18 00:44:29 +0000978href="http://llvm.org">LLVM web page</a>, in particular in the <a
979href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencerc7f87f22007-07-09 08:04:31 +0000980contains versions of the API documentation which is up-to-date with the
981Subversion version of the source code.
Misha Brukman96158092005-03-30 19:14:24 +0000982You can access versions of these documents specific to this release by going
983into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000984
Misha Brukman80731b92003-11-22 00:38:41 +0000985<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnera69595e2005-10-29 07:07:09 +0000986us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattnerb84f3322003-12-12 21:22:16 +0000987lists</a>.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000988
Misha Brukman80731b92003-11-22 00:38:41 +0000989</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000990
991<!-- *********************************************************************** -->
Chris Lattner3d482502003-10-02 04:57:28 +0000992
Misha Brukman80731b92003-11-22 00:38:41 +0000993<hr>
Misha Brukman68aab3b2003-11-22 01:23:39 +0000994<address>
Misha Brukman8834af92003-12-21 22:53:21 +0000995 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +0000996 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +0000997 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +0000998 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +0000999
Chris Lattnere0c1df42007-05-18 00:44:29 +00001000 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman80731b92003-11-22 00:38:41 +00001001 Last modified: $Date$
Misha Brukman68aab3b2003-11-22 01:23:39 +00001002</address>
Chris Lattner3d482502003-10-02 04:57:28 +00001003
Misha Brukman80731b92003-11-22 00:38:41 +00001004</body>
1005</html>