blob: f06bc6f8a21e4858e11e4b68259364201ed8ee8d [file] [log] [blame]
Misha Brukman500bc302003-11-22 00:38:41 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
Reid Spencer6454ed32004-11-18 18:38:58 +00005 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Chris Lattner2fb6e5c2010-10-03 23:09:03 +00006 <meta encoding="utf8">
Misha Brukman500bc302003-11-22 00:38:41 +00007 <link rel="stylesheet" href="llvm.css" type="text/css">
Chris Lattnerbe2e1b52011-03-10 07:43:44 +00008 <title>LLVM 2.9 Release Notes</title>
Misha Brukman500bc302003-11-22 00:38:41 +00009</head>
10<body>
Chris Lattner79c3fe12003-10-02 04:57:28 +000011
NAKAMURA Takumic6319312011-04-05 21:55:14 +000012<h1 class="doc_title">LLVM 2.9 Release Notes</h1>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000013
Chris Lattner0e464a92010-03-17 04:02:39 +000014<img align=right src="http://llvm.org/img/DragonSmall.png"
Gabor Greifee2187a2010-04-22 10:21:43 +000015 width="136" height="136" alt="LLVM Dragon Logo">
Chris Lattner0e464a92010-03-17 04:02:39 +000016
Chris Lattner79c3fe12003-10-02 04:57:28 +000017<ol>
Misha Brukman500bc302003-11-22 00:38:41 +000018 <li><a href="#intro">Introduction</a></li>
Chris Lattner96a445e2008-10-13 18:01:01 +000019 <li><a href="#subproj">Sub-project Status Update</a></li>
Chris Lattnerbe2e1b52011-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 Lattner4b538b92004-04-30 22:17:12 +000022 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Dan Gohman44aa9212008-10-14 16:23:02 +000023 <li><a href="#knownproblems">Known Problems</a></li>
Misha Brukman500bc302003-11-22 00:38:41 +000024 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000025</ol>
26
Chris Lattner7911ce22004-05-23 21:07:27 +000027<div class="doc_author">
Dan Gohman44aa9212008-10-14 16:23:02 +000028 <p>Written by the <a href="http://llvm.org">LLVM Team</a></p>
Misha Brukman500bc302003-11-22 00:38:41 +000029</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000030
Chris Lattner49123fd2011-04-06 06:29:50 +000031<!--
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000032<h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.9
Jeffrey Yasskinbec48772010-01-28 01:14:43 +000033release.<br>
34You may prefer the
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000035<a href="http://llvm.org/releases/2.8/docs/ReleaseNotes.html">LLVM 2.8
Dan Gohmanb44f6c62010-05-03 23:51:05 +000036Release Notes</a>.</h1>
Chris Lattner49123fd2011-04-06 06:29:50 +000037 -->
Jeffrey Yasskinbec48772010-01-28 01:14:43 +000038
Chris Lattner79c3fe12003-10-02 04:57:28 +000039<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +000040<h1>
Misha Brukman500bc302003-11-22 00:38:41 +000041 <a name="intro">Introduction</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +000042</h1>
Chris Lattner79c3fe12003-10-02 04:57:28 +000043<!-- *********************************************************************** -->
44
Misha Brukman500bc302003-11-22 00:38:41 +000045<div class="doc_text">
46
Chris Lattnerf6662f92008-10-13 17:57:36 +000047<p>This document contains the release notes for the LLVM Compiler
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000048Infrastructure, release 2.9. Here we describe the status of LLVM, including
Chris Lattnerf6662f92008-10-13 17:57:36 +000049major improvements from the previous release and significant known problems.
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +000050All LLVM releases may be downloaded from the <a
Chris Lattnerf6662f92008-10-13 17:57:36 +000051href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
Chris Lattner19092612003-10-02 16:38:05 +000052
Chris Lattner7506b1d2004-12-07 08:04:13 +000053<p>For more information about LLVM, including information about the latest
Chris Lattnerc463b272005-10-29 07:07:09 +000054release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattner47ad72c2003-10-07 21:38:31 +000055web site</a>. If you have questions or comments, the <a
Chris Lattnerc66bfef2010-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 Lattner79c3fe12003-10-02 04:57:28 +000058
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000059<p>Note that if you are reading this file from a Subversion checkout or the
Chris Lattner84977642007-09-21 03:54:09 +000060main LLVM web page, this document applies to the <i>next</i> release, not the
Gabor Greiffa933f82008-10-14 11:00:32 +000061current one. To see the release notes for a specific release, please see the
Chris Lattner84977642007-09-21 03:54:09 +000062<a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman500bc302003-11-22 00:38:41 +000063
64</div>
Chris Lattner61358ab2009-10-13 17:48:04 +000065
Chris Lattnere4dc1962011-04-05 23:22:33 +000066<!-- Features that need text if they're finished for 3.1:
67 ARM EHABI
Chris Lattner914ce462010-04-22 06:28:20 +000068 combiner-aa?
Chris Lattner61358ab2009-10-13 17:48:04 +000069 strong phi elim
Chris Lattner61358ab2009-10-13 17:48:04 +000070 loop dependence analysis
Chris Lattnere07043c2010-09-29 05:30:03 +000071 CorrelatedValuePropagation
Chris Lattnere4dc1962011-04-05 23:22:33 +000072 lib/Transforms/IPO/MergeFunctions.cpp => consider for 3.1.
Chris Lattneracce85d2008-02-10 07:46:44 +000073 -->
Chris Lattnere07043c2010-09-29 05:30:03 +000074
Chris Lattner96a445e2008-10-13 18:01:01 +000075<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +000076<h1>
Chris Lattner96a445e2008-10-13 18:01:01 +000077 <a name="subproj">Sub-project Status Update</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +000078</h1>
Chris Lattner96a445e2008-10-13 18:01:01 +000079<!-- *********************************************************************** -->
Chris Lattnerea34f642008-06-08 21:34:41 +000080
81<div class="doc_text">
Chris Lattner8348b472008-06-08 21:58:17 +000082<p>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +000083The LLVM 2.9 distribution currently consists of code from the core LLVM
Chris Lattner61358ab2009-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 Wendling63d8c552009-03-02 04:28:57 +000088</p>
Chris Lattner96a445e2008-10-13 18:01:01 +000089
Chris Lattner8348b472008-06-08 21:58:17 +000090</div>
91
Chris Lattner96a445e2008-10-13 18:01:01 +000092
Chris Lattner8348b472008-06-08 21:58:17 +000093<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +000094<h2>
Chris Lattnerfb97b2d2008-10-13 18:11:54 +000095<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +000096</h2>
Chris Lattner8348b472008-06-08 21:58:17 +000097
98<div class="doc_text">
99
Chris Lattner095539f2010-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 Lattnere07043c2010-09-29 05:30:03 +0000106production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86
Chris Lattner1efe27e2011-04-06 00:45:11 +0000107(32- and 64-bit), and for darwin/arm targets.</p>
Chris Lattner61358ab2009-10-13 17:48:04 +0000108
Chris Lattner0a6f6d52011-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 Lattnerdf448a32011-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 Lattner0a6f6d52011-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
117<p>If Clang rejects your code that is built with another compiler, please take a
118look at the <a href="http://clang.llvm.org/compatibility.html">language
119compatibility</a> guide to make sure the issue isn't intentional or a known
120issue.
121</p>
Bill Wendling741748a2008-10-27 09:27:33 +0000122
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000123<ul>
124</ul>
Chris Lattnerfb97b2d2008-10-13 18:11:54 +0000125</div>
126
127<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000128<h2>
Duncan Sands528a5102011-04-04 11:09:08 +0000129<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000130</h2>
Chris Lattner61358ab2009-10-13 17:48:04 +0000131
132<div class="doc_text">
133<p>
Duncan Sands528a5102011-04-04 11:09:08 +0000134<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
135<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
136optimizers and code generators with LLVM's.
137Currently it requires a patched version of gcc-4.5.
138The plugin can target the x86-32 and x86-64 processor families and has been
139used successfully on the Darwin, FreeBSD and Linux platforms.
140The Ada, C, C++ and Fortran languages work well.
141The plugin is capable of compiling plenty of Obj-C, Obj-C++ and Java but it is
142not known whether the compiled code actually works or not!
Duncan Sands749fd832010-04-02 09:23:15 +0000143</p>
144
145<p>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000146The 2.9 release has the following notable changes:
Duncan Sands4b1da2b2010-09-30 17:37:34 +0000147<ul>
Duncan Sands528a5102011-04-04 11:09:08 +0000148<li>The plugin is much more stable when compiling Fortran.</li>
Chris Lattnerdf448a32011-04-06 00:56:12 +0000149<li>Inline assembly where an asm output is tied to an input of a different size
150is now supported in many more cases.</li>
Duncan Sands528a5102011-04-04 11:09:08 +0000151<li>Basic support for the __float128 type was added. It is now possible to
152generate LLVM IR from programs using __float128 but code generation does not
153work yet.</li>
154<li>Compiling Java programs no longer systematically crashes the plugin.</li>
Duncan Sands4b1da2b2010-09-30 17:37:34 +0000155</ul>
Chris Lattner61358ab2009-10-13 17:48:04 +0000156
157</div>
158
Chris Lattner75547712010-10-03 23:49:06 +0000159<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000160<h2>
Chris Lattner75547712010-10-03 23:49:06 +0000161<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000162</h2>
Chris Lattner75547712010-10-03 23:49:06 +0000163
164<div class="doc_text">
165<p>
166The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
167is a simple library that provides an implementation of the low-level
168target-specific hooks required by code generation and other runtime components.
169For example, when compiling for a 32-bit target, converting a double to a 64-bit
170unsigned integer is compiled into a runtime call to the "__fixunsdfdi"
171function. The compiler-rt library provides highly optimized implementations of
172this and other low-level routines (some are 3x faster than the equivalent
173libgcc routines).</p>
174
Chris Lattnerdf448a32011-04-06 00:56:12 +0000175<p>In the LLVM 2.9 timeframe, compiler_rt has had several minor changes for
176 better ARM support, and a fairly major license change. All of the code in the
177 compiler-rt project is now <a href="DeveloperPolicy.html#license">dual
178 licensed</a> under MIT and UIUC license, which allows you to use compiler-rt
179 in applications without the binary copyright reproduction clause. If you
180 prefer the LLVM/UIUC license, you are free to continue using it under that
181 license as well.</p>
Chris Lattner75547712010-10-03 23:49:06 +0000182
183</div>
Chris Lattner61358ab2009-10-13 17:48:04 +0000184
185<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000186<h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000187<a name="lldb">LLDB: Low Level Debugger</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000188</h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000189
190<div class="doc_text">
191<p>
Chris Lattner75547712010-10-03 23:49:06 +0000192<a href="http://lldb.llvm.org/">LLDB</a> is a brand new member of the LLVM
193umbrella of projects. LLDB is a next generation, high-performance debugger. It
194is built as a set of reusable components which highly leverage existing
195libraries in the larger LLVM Project, such as the Clang expression parser, the
196LLVM disassembler and the LLVM JIT.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000197
198<p>
Chris Lattnerdf448a32011-04-06 00:56:12 +0000199LLDB is has advanced by leaps and bounds in the 2.9 timeframe. It is
200dramatically more stable and useful, and includes both a new <a
201href="http://lldb.llvm.org/tutorial.html">tutorial</a> and a <a
202href="http://lldb.llvm.org/lldb-gdb.html">side-by-side comparison with
203GDB</a>.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000204
205</div>
206
207<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000208<h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000209<a name="libc++">libc++: C++ Standard Library</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000210</h2>
Chris Lattnere07043c2010-09-29 05:30:03 +0000211
212<div class="doc_text">
213<p>
Tobias Grossercdce44b2010-10-06 21:07:30 +0000214<a href="http://libcxx.llvm.org/">libc++</a> is another new member of the LLVM
Chris Lattner75547712010-10-03 23:49:06 +0000215family. It is an implementation of the C++ standard library, written from the
216ground up to specifically target the forthcoming C++'0X standard and focus on
217delivering great performance.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000218
219<p>
Chris Lattner2009c492011-04-06 00:59:18 +0000220In the LLVM 2.9 timeframe, libc++ has had numerous bugs fixed, and is now being
221co-developed with Clang's C++'0x mode.</p>
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000222
Chris Lattner2009c492011-04-06 00:59:18 +0000223<p>
224Like compiler_rt, libc++ is now <a href="DeveloperPolicy.html#license">dual
225 licensed</a> under the MIT and UIUC license, allowing it to be used more
226 permissively.
Chris Lattnere07043c2010-09-29 05:30:03 +0000227</p>
228
229</div>
230
Chris Lattner61358ab2009-10-13 17:48:04 +0000231
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000232
233<!--=========================================================================-->
Chris Lattner7a8e6c52011-04-05 18:38:45 +0000234<!--
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000235<h2>
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000236<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000237</h2>
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000238
239<div class="doc_text">
240<p>
241<a href="http://klee.llvm.org/">KLEE</a> is a symbolic execution framework for
242programs in LLVM bitcode form. KLEE tries to symbolically evaluate "all" paths
243through the application and records state transitions that lead to fault
244states. This allows it to construct testcases that lead to faults and can even
245be used to verify some algorithms.
246</p>
247
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000248<p>UPDATE!</p>
Chris Lattner7a8e6c52011-04-05 18:38:45 +0000249</div>-->
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000250
251
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000252<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000253<h1>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000254 <a name="externalproj">External Open Source Projects Using LLVM 2.9</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000255</h1>
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000256<!-- *********************************************************************** -->
257
Chris Lattner61358ab2009-10-13 17:48:04 +0000258<div class="doc_text">
259
260<p>An exciting aspect of LLVM is that it is used as an enabling technology for
261 a lot of other language and tools projects. This section lists some of the
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000262 projects that have already been updated to work with LLVM 2.9.</p>
Chris Lattner7c8e7962010-04-26 17:38:10 +0000263</div>
264
Chris Lattner75547712010-10-03 23:49:06 +0000265
Chris Lattner3bfe57e2011-04-06 01:13:49 +0000266<!--=========================================================================-->
267<h2>Crack Programming Language</h2>
268
269<div class="doc_text">
270<p>
271<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
272ease of development of a scripting language with the performance of a compiled
273language. The language derives concepts from C++, Java and Python, incorporating
274object-oriented programming, operator overloading and strong typing.</p>
275</div>
276
277
278<!--=========================================================================-->
279<h2>TTA-based Codesign Environment (TCE)</h2>
280
281<div class="doc_text">
282<p>TCE is a toolset for designing application-specific processors (ASP) based on
283the Transport triggered architecture (TTA). The toolset provides a complete
284co-design flow from C/C++ programs down to synthesizable VHDL and parallel
285program binaries. Processor customization points include the register files,
286function units, supported operations, and the interconnection network.</p>
287
288<p>TCE uses Clang and LLVM for C/C++ language support, target independent
289optimizations and also for parts of code generation. It generates new LLVM-based
290code generators "on the fly" for the designed TTA processors and loads them in
291to the compiler backend as runtime libraries to avoid per-target recompilation
292of larger parts of the compiler chain.</p>
293</div>
294
295
296
297<!--=========================================================================-->
298<h2>PinaVM</h2>
299
300<div class="doc_text">
301<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
302source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
303other front-ends, PinaVM actually executes the elaboration of the
304program analyzed using LLVM's JIT infrastructure. It later enriches the
305bitcode with SystemC-specific information.</p>
306</div>
307
308<!--=========================================================================-->
309<h2>Pure</h2>
310
311<div class="doc_text">
312<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
313 algebraic/functional
314 programming language based on term rewriting. Programs are collections
315 of equations which are used to evaluate expressions in a symbolic
316 fashion. The interpreter uses LLVM as a backend to JIT-compile Pure
317 programs to fast native code. Pure offers dynamic typing, eager and lazy
318 evaluation, lexical closures, a hygienic macro system (also based on
319 term rewriting), built-in list and matrix support (including list and
320 matrix comprehensions) and an easy-to-use interface to C and other
321 programming languages (including the ability to load LLVM bitcode
322 modules, and inline C, C++, Fortran and Faust code in Pure programs if
323 the corresponding LLVM-enabled compilers are installed).</p>
324
325<p>Pure version 0.47 has been tested and is known to work with LLVM 2.9
326 (and continues to work with older LLVM releases &gt;= 2.5).</p>
327</div>
328
329<!--=========================================================================-->
330<h2 id="icedtea">IcedTea Java Virtual Machine Implementation</h2>
331
332<div class="doc_text">
333<p>
334<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
335harness to build OpenJDK using only free software build tools and to provide
336replacements for the not-yet free parts of OpenJDK. One of the extensions that
337IcedTea provides is a new JIT compiler named <a
338href="http://icedtea.classpath.org/wiki/ZeroSharkFaq">Shark</a> which uses LLVM
339to provide native code generation without introducing processor-dependent
340code.
341</p>
342
343<p> OpenJDK 7 b112, IcedTea6 1.9 and IcedTea7 1.13 and later have been tested
344and are known to work with LLVM 2.9 (and continue to work with older LLVM
345releases &gt;= 2.6 as well).</p>
346</div>
347
348<!--=========================================================================-->
349<h2>Glasgow Haskell Compiler (GHC)</h2>
350
351<div class="doc_text">
352<p>GHC is an open source, state-of-the-art programming suite for Haskell,
353a standard lazy functional programming language. It includes an
354optimizing static compiler generating good code for a variety of
355platforms, together with an interactive system for convenient, quick
356development.</p>
357
358<p>In addition to the existing C and native code generators, GHC 7.0 now
359supports an LLVM code generator. GHC supports LLVM 2.7 and later.</p>
360</div>
361
362<!--=========================================================================-->
363<h2>Polly - Polyhedral optimizations for LLVM</h2>
364
365<div class="doc_text">
366<p>Polly is a project that aims to provide advanced memory access optimizations
367to better take advantage of SIMD units, cache hierarchies, multiple cores or
368even vector accelerators for LLVM. Built around an abstract mathematical
369description based on Z-polyhedra, it provides the infrastructure to develop
370advanced optimizations in LLVM and to connect complex external optimizers. In
371its first year of existence Polly already provides an exact value-based
372dependency analysis as well as basic SIMD and OpenMP code generation support.
373Furthermore, Polly can use PoCC(Pluto) an advanced optimizer for data-locality
374and parallelism.</p>
375</div>
Chris Lattner75547712010-10-03 23:49:06 +0000376
Chris Lattnere0518442010-10-01 06:34:49 +0000377
Chris Lattner8348b472008-06-08 21:58:17 +0000378<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000379<h1>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000380 <a name="whatsnew">What's New in LLVM 2.9?</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000381</h1>
Chris Lattner8348b472008-06-08 21:58:17 +0000382<!-- *********************************************************************** -->
383
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000384<div class="doc_text">
385
Chris Lattner61358ab2009-10-13 17:48:04 +0000386<p>This release includes a huge number of bug fixes, performance tweaks and
Chris Lattnerf6662f92008-10-13 17:57:36 +0000387minor improvements. Some of the major improvements and new features are listed
388in this section.
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000389</p>
Chris Lattner61358ab2009-10-13 17:48:04 +0000390
Chris Lattner914ce462010-04-22 06:28:20 +0000391</div>
392
393<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000394<h2>
Chris Lattner252b83d2008-02-06 18:00:06 +0000395<a name="majorfeatures">Major New Features</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000396</h2>
Chris Lattner252b83d2008-02-06 18:00:06 +0000397
398<div class="doc_text">
399
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000400<p>LLVM 2.9 includes several major new capabilities:</p>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000401
402<ul>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000403
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000404<li>Type Based Alias Analysis (TBAA) is now implemented and turned on by default
405 in Clang. This allows substantially better load/store optimization in some
406 cases. TBAA can be disabled by passing -fno-strict-aliasing.
Chris Lattner1efe27e2011-04-06 00:45:11 +0000407</li>
408
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000409<li>This release has seen a continued focus on quality of debug information.
410 LLVM now generates much higher fidelity debug information, particularly when
411 debugging optimized code.</li>
412
413<li>Inline assembly now supports multiple alternative constraints.</li>
414
415<li>A new backend for the NVIDIA PTX virtual ISA (used to target its GPUs) is
416 under rapid development. It is not generally useful in 2.9, but is making
417 rapid progress.</li>
Chris Lattner7a8e6c52011-04-05 18:38:45 +0000418
Chris Lattner8170c102008-02-10 08:18:42 +0000419</ul>
Chris Lattner0a6f6d52011-04-05 07:19:28 +0000420
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000421</div>
422
Chris Lattner84977642007-09-21 03:54:09 +0000423<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000424<h2>
Chris Lattner917cc712009-03-02 02:37:32 +0000425<a name="coreimprovements">LLVM IR and Core Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000426</h2>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000427
428<div class="doc_text">
Chris Lattner61358ab2009-10-13 17:48:04 +0000429<p>LLVM IR has several new features for better support of new targets and that
430expose new optimization opportunities:</p>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000431
Chris Lattner791f77b2008-06-05 06:25:56 +0000432<ul>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000433<li>The <a href="LangRef.html#bitwiseops">udiv, ashr, lshr, and shl</a>
434 instructions now have support exact and nuw/nsw bits to indicate that they
435 don't overflow or shift out bits. This is useful for optimization of <a
436 href="http://llvm.org/PR8862">pointer differences</a> and other cases.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000437
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000438<li>LLVM IR now supports the <a href="LangRef.html#globalvars">unnamed_addr</a>
439 attribute to indicate that constant global variables with identical
440 initializers can be merged. This fixed <a href="http://llvm.org/PR8927">an
441 issue</a> where LLVM would incorrectly merge two globals which were supposed
442 to have distinct addresses.</li>
443
444<li>The new <a href="LangRef.html#fnattrs">hotpatch attribute</a> has been added
445 to allow runtime patching of functions.</li>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000446</ul>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +0000447
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000448</div>
449
450<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000451<h2>
Chris Lattneracce85d2008-02-10 07:46:44 +0000452<a name="optimizer">Optimizer Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000453</h2>
Chris Lattneracce85d2008-02-10 07:46:44 +0000454
455<div class="doc_text">
456
Chris Lattner61358ab2009-10-13 17:48:04 +0000457<p>In addition to a large array of minor performance tweaks and bug fixes, this
Chris Lattnerf3013872008-10-13 21:50:36 +0000458release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattneracce85d2008-02-10 07:46:44 +0000459
460<ul>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000461<li>Link Time Optimization (LTO) has been improved to use MC for parsing inline
462 assembly and now can build large programs like Firefox 4 on both Mac OS X and
463 Linux.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000464
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000465<li>The new -loop-idiom pass recognizes memset/memcpy loops (and memset_pattern
466 on darwin), turning them into library calls, which are typically better
467 optimized than inline code. If you are building a libc and notice that your
468 memcpy and memset functions are compiled into infinite recursion, please build
469 with -ffreestanding or -fno-builtin to disable this pass.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000470
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000471<li>A new -early-cse pass does a fast pass over functions to fold constants,
472 simplify expressions, perform simple dead store elimination, and perform
473 common subexpression elimination. It does a good job at catching some of the
474 trivial redundancies that exist in unoptimized code, making later passes more
475 effective.<,/li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000476
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000477<li>A new -loop-instsimplify pass is used to clean up loop bodies in the loop
478 optimizer.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000479
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000480<li>The new TargetLibraryInfo interface allows mid-level optimizations to know
481 whether the current target's runtime library has certain functions. For
482 example, the optimizer can now transform integer-only printf calls to call
483 iprintf, allowing reduced code size for embedded C libraries (e.g. newlib).
484</li>
485
486<li>LLVM has a new <a href="WritingAnLLVMPass.html#RegionPass">RegionPass</a>
487 infrastructure for region-based optimizations.</li>
488
489<li>Several optimizer passes have been substantially sped up:
490 GVN is much faster on functions with deep dominator trees and lots of basic
491 blocks. The dominator tree and dominance frontier passes are much faster to
492 compute, and preserved by more passes (so they are computed less often). The
493 -scalar-repl pass is also much faster and doesn't use DominanceFrontier.
494</li>
495
496<li>The Dead Store Elimination pass is more aggressive optimizing stores of
497 different types: e.g. a large store following a small one to the same address.
498 The MemCpyOptimizer pass handles several new forms of memcpy elimination.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000499
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000500<li>LLVM now optimizes various idioms for overflow detection into check of the
501 flag register on various CPUs. For example, we now compile:
Chris Lattner1efe27e2011-04-06 00:45:11 +0000502
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000503 <pre>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000504 unsigned long t = a+b;
505 if (t &lt; a) ...
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000506 </pre>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000507 into:
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000508 <pre>
509 addq %rdi, %rbx
510 jno LBB0_2
511 </pre>
512</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000513
Chris Lattner11b66112010-10-04 02:42:39 +0000514</ul>
515
Chris Lattner61358ab2009-10-13 17:48:04 +0000516</div>
Chris Lattner917cc712009-03-02 02:37:32 +0000517
Chris Lattner0b832202008-06-08 02:45:07 +0000518<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000519<h2>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000520<a name="mc">MC Level Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000521</h2>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000522
523<div class="doc_text">
524<p>
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000525The LLVM Machine Code (aka MC) subsystem was created to solve a number
Chris Lattner4ba2b652010-09-30 16:31:33 +0000526of problems in the realm of assembly, disassembly, object file format handling,
527and a number of other related areas that CPU instruction-set level tools work
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000528in.</p>
529
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000530<ul>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000531<li>ELF MC support has matured enough for the integrated assembler to be turned
532 on by default in Clang on X86-32 and X86-64 ELF systems.</li>
533
534<li>MC supports and CodeGen uses the <tt>.file</tt> and <tt>.loc</tt> directives
535 for producing line number debug info. This produces more compact line
536 tables and easier to read .s files.</li>
537
538<li>MC supports the <tt>.cfi_*</tt> directives for producing DWARF
Rafael Espindolaa26f36c2011-03-18 04:07:44 +0000539 frame information, but it is still not used by CodeGen by default.</li>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000540
Chris Lattner1efe27e2011-04-06 00:45:11 +0000541
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000542<li>The MC assembler now generates much better diagnostics for common errors,
Chris Lattner1efe27e2011-04-06 00:45:11 +0000543 is much faster at matching instructions, is much more bug-compatible with
544 the GAS assembler, and is now generally useful for a broad range of X86
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000545 assembly.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000546
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000547<li>We now have some basic <a href="CodeGenerator.html#mc">internals
548 documentation</a> for MC.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000549
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000550<li>.td files can now specify assembler aliases directly with the <a
551 href="CodeGenerator.html#na_instparsing">MnemonicAlias and InstAlias</a>
552 tblgen classes.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000553
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000554<li>LLVM now has an experimental format-independent object file manipulation
555 library (lib/Object). It supports both PE/COFF and ELF. The llvm-nm tool has
556 been extended to work with native object files, and the new llvm-objdump tool
557 supports disassembly of object files (but no relocations are displayed yet).
558</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000559
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000560<li>Win32 PE-COFF support in the MC assembler has made a lot of progress in the
561 2.9 timeframe, but is still not generally useful.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000562
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000563</ul>
564
565<p>For more information, please see the <a
Chris Lattner4ba2b652010-09-30 16:31:33 +0000566href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro to the
567LLVM MC Project Blog Post</a>.
568</p>
569
NAKAMURA Takumi45c435a2011-04-05 08:24:22 +0000570</div>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000571
Chris Lattner4ba2b652010-09-30 16:31:33 +0000572<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000573<h2>
Chris Lattner511433e2009-03-02 03:24:11 +0000574<a name="codegen">Target Independent Code Generator Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000575</h2>
Chris Lattner0b832202008-06-08 02:45:07 +0000576
577<div class="doc_text">
578
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000579<p>We have put a significant amount of work into the code generator
580infrastructure, which allows us to implement more aggressive algorithms and make
581it run faster:</p>
Chris Lattner0b832202008-06-08 02:45:07 +0000582
583<ul>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000584<li>The pre-register-allocation (preRA) instruction scheduler models register
585 pressure much more accurately in some cases. This allows the adoption of more
Chris Lattner49123fd2011-04-06 06:29:50 +0000586 aggressive scheduling heuristics without causing spills to be generated.
Chris Lattner1efe27e2011-04-06 00:45:11 +0000587</li>
588
Chris Lattner49123fd2011-04-06 06:29:50 +0000589<li>LiveDebugVariables is a new pass that keeps track of debugging information
590 for user variables that are promoted to registers in optimized builds.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000591
Chris Lattner49123fd2011-04-06 06:29:50 +0000592<li>The scheduler now models operand latency and pipeline forwarding.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000593
Chris Lattner49123fd2011-04-06 06:29:50 +0000594<li>A major register allocator infrastructure rewrite is underway. It is not on
595 by default for 2.9 and you are not advised to use it, but it has made
596 substantial progress in the 2.9 timeframe:
597 <ul>
598 <li>A new -regalloc=basic "basic" register allocator can be used as a simple
599 fallback when debugging. It uses the new infrastructure.</li>
600 <li>New infrastructure is in place for live range splitting. "SplitKit" can
601 break a live interval into smaller pieces while preserving SSA form, and
602 SpillPlacement can help find the best split points. This is a work in
603 progress so the API is changing quickly.</li>
604 <li>The inline spiller has learned to clean up after live range splitting. It
605 can hoist spills out of loops, and it can eliminate redundant spills.</li>
606 <li>Rematerialization works with live range splitting.</li>
607 <li>The new "greedy" register allocator using live range splitting. This will
608 be the default register allocator in the next LLVM release, but it is not
609 turned on by default in 2.9.</li>
610 </ul>
611</li>
Chris Lattner84977642007-09-21 03:54:09 +0000612</ul>
Chris Lattner84977642007-09-21 03:54:09 +0000613</div>
614
Chris Lattner917cc712009-03-02 02:37:32 +0000615<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000616<h2>
Chris Lattner917cc712009-03-02 02:37:32 +0000617<a name="x86">X86-32 and X86-64 Target Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000618</h2>
Chris Lattner917cc712009-03-02 02:37:32 +0000619
620<div class="doc_text">
Chris Lattner7714c912010-10-04 04:39:25 +0000621<p>New features and major changes in the X86 target include:
Chris Lattner917cc712009-03-02 02:37:32 +0000622</p>
623
624<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000625<li>LLVM 2.9 includes a complete reimplementation of the MMX instruction set.
626 The reimplementation uses a new LLVM IR <a
627 href="LangRef.html#t_x86mmx">x86_mmx</a> type to ensure that MMX operations
628 are <em>only</em> generated from source that uses MMX builtin operations. With
629 this, random types like &lt;2 x i32&gt; are not turned into to MMX operations
630 (which can be catastrophic without proper "emms" insertion). Because the X86
631 code generator always generates reliable code, the -disable-mmx flag is now
632 removed.
Chris Lattner1efe27e2011-04-06 00:45:11 +0000633</li>
634
Chris Lattner49123fd2011-04-06 06:29:50 +0000635<li>X86 support for FS/GS relative loads and stores using <a
Jay Foadcb88ec32011-04-06 07:55:30 +0000636 href="CodeGenerator.html#x86_memory">address space 256/257</a> works reliably
Chris Lattner49123fd2011-04-06 06:29:50 +0000637 now.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000638
Chris Lattner49123fd2011-04-06 06:29:50 +0000639<li>LLVM 2.9 generates much better code in several cases by using adc/sbb to
640 avoid generation of conditional move instructions for conditional increment
641 and other idioms.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000642
Chris Lattner49123fd2011-04-06 06:29:50 +0000643<li>The X86 backend has adopted a new preRA scheduling mode, "list-ilp", to
644 shorten the height of instruction schedules without inducing register spills.
645</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000646
Jay Foadcb88ec32011-04-06 07:55:30 +0000647<li>The MC assembler supports 3dNow! and 3DNowA instructions.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000648
Chris Lattner49123fd2011-04-06 06:29:50 +0000649<li>Several bugs have been fixed for Windows x64 code generator.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000650</ul>
651
Chris Lattner917cc712009-03-02 02:37:32 +0000652</div>
Chris Lattner84977642007-09-21 03:54:09 +0000653
654<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000655<h2>
Chris Lattner61358ab2009-10-13 17:48:04 +0000656<a name="ARM">ARM Target Improvements</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000657</h2>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000658
659<div class="doc_text">
Chris Lattner61358ab2009-10-13 17:48:04 +0000660<p>New features of the ARM target include:
661</p>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000662
663<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000664<li>The ARM backend now has a fast instruction selector, which dramatically
665 improves -O0 compile times.</li>
666<li>The ARM backend has new tuning for Cortex-A8 and Cortex-A9 CPUs.</li>
667<li>The __builtin_prefetch builtin (and llvm.prefetch intrinsic) is compiled
668 into prefetch instructions instead of being discarded.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000669
670<li> The ARM backend preRA scheduler now models machine resources at cycle
671 granularity. This allows the scheduler to both accurately model
672 instruction latency and avoid overcommitting functional units.</li>
673
Chris Lattner49123fd2011-04-06 06:29:50 +0000674<li>Countless ARM microoptimizations have landed in LLVM 2.9.</li>
Bob Wilsone8472772010-09-13 17:39:35 +0000675</ul>
Chris Lattner61358ab2009-10-13 17:48:04 +0000676</div>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000677
678<!--=========================================================================-->
679<h2>
680<a name="OtherTS">Other Target Specific Improvements</a>
681</h2>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000682
Chris Lattner1efe27e2011-04-06 00:45:11 +0000683<div class="doc_text">
684<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000685<li>MicroBlaze: major updates for aggressive delay slot filler, MC-based
686 assembly printing, assembly instruction parsing, ELF .o file emission, and MC
687 instruction disassembler have landed.</li>
688
689<li>SPARC: Many improvements, including using the Y registers for
690 multiplications and addition of a simple delay slot filler.</li>
691
692<li>PowerPC: The backend has been largely MC'ized and is ready to support
693 directly writing out mach-o object files. Noone seems interested in finishing
694 this final step though.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000695
696</ul>
697</div>
Chris Lattner77d29b12008-06-05 08:02:49 +0000698
699<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000700<h2>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000701<a name="changes">Major Changes and Removed Features</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000702</h2>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000703
704<div class="doc_text">
705
Chris Lattnereeb4da02008-10-13 22:06:31 +0000706<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000707on LLVM 2.8, this section lists some "gotchas" that you may run into upgrading
Chris Lattnereeb4da02008-10-13 22:06:31 +0000708from the previous release.</p>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000709
710<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000711<li><b>This is the last release to support the llvm-gcc frontend.</b></li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000712
Chris Lattner49123fd2011-04-06 06:29:50 +0000713<li>LLVM has a new <a href="CodingStandards.html#ll_naming">naming
714 convention standard</a>, though the codebase hasn't fully adopted it yet.</li>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000715
Chris Lattner49123fd2011-04-06 06:29:50 +0000716<li>The new DIBuilder class provides a simpler interface for front ends to
717 encode debug info in LLVM IR, and has replaced DIFactory.</li>
Chris Lattnerc5ac61d2011-04-06 05:50:04 +0000718
Chris Lattner49123fd2011-04-06 06:29:50 +0000719<li>LLVM IR and other tools always work on normalized target triples (which have
720 been run through <tt>Triple::normalize</tt>).</li>
721
722<li>The target triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32
723 instead.</li>
724
725<li>The PointerTracking pass has been removed from mainline, and moved to The
726 ClamAV project (its only client).</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000727
Chris Lattner49123fd2011-04-06 06:29:50 +0000728<li>The LoopIndexSplit, LiveValues, SimplifyHalfPowrLibCalls, GEPSplitter, and
729 PartialSpecialization passes were removed. They were unmaintained,
730 buggy, or decided to be a bad idea.</li>
Devang Patelb34dd132008-10-14 20:03:43 +0000731</ul>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000732
Chris Lattnerf6662f92008-10-13 17:57:36 +0000733</div>
734
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000735<!--=========================================================================-->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000736<h2>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000737<a name="api_changes">Internal API Changes</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000738</h2>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000739
740<div class="doc_text">
741
Chris Lattner1efe27e2011-04-06 00:45:11 +0000742<p>In addition, many APIs have changed in this release. Some of the major
743 LLVM API changes are:</p>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000744
745<ul>
Chris Lattner49123fd2011-04-06 06:29:50 +0000746<li>include/llvm/System merged into include/llvm/Support.</li>
747<li>The <a href="http://llvm.org/PR5207">llvm::APInt API</a> was significantly
748 cleaned up.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000749
Chris Lattner49123fd2011-04-06 06:29:50 +0000750<li>In the code generator, MVT::Flag was renamed to MVT::Glue to more accurately
751 describe its behavior.</li>
752
753<li>The system_error header from C++0x was added, and is now pervasively used to
754 capture and handle i/o and other errors in LLVM.</li>
755
756<li>The old sys::Path API has been deprecated in favor of the new PathV2 API,
757 which is more efficient and flexible.</li>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000758</ul>
759</div>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000760
Chris Lattner79c3fe12003-10-02 04:57:28 +0000761<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000762<h1>
Misha Brukman500bc302003-11-22 00:38:41 +0000763 <a name="knownproblems">Known Problems</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000764</h1>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000765<!-- *********************************************************************** -->
766
Misha Brukman500bc302003-11-22 00:38:41 +0000767<div class="doc_text">
768
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000769<p>This section contains significant known problems with the LLVM system,
Chris Lattnere18b32e2008-11-10 05:40:34 +0000770listed by component. If you run into a problem, please check the <a
Chris Lattnerc463b272005-10-29 07:07:09 +0000771href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattner5eccca42003-12-12 21:22:16 +0000772there isn't already one.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000773
Misha Brukman500bc302003-11-22 00:38:41 +0000774</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000775
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000776<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000777<h2>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000778 <a name="experimental">Experimental features included with this release</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000779</h2>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000780
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000781<div class="doc_text">
782
Misha Brukman6df9e2c2004-05-12 21:46:05 +0000783<p>The following components of this LLVM release are either untested, known to
784be broken or unreliable, or are in early development. These components should
785not be relied on, and bugs should not be filed against them, but they may be
786useful to some people. In particular, if you would like to work on one of these
Chris Lattner2b659ef2008-02-12 06:29:45 +0000787components, please contact us on the <a
788href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000789
790<ul>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000791<li>The Alpha, Blackfin, CellSPU, MicroBlaze, MSP430, MIPS, PTX, SystemZ
Chris Lattnerbb117712010-10-04 01:29:06 +0000792 and XCore backends are experimental.</li>
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000793<li><tt>llc</tt> "<tt>-filetype=obj</tt>" is experimental on all targets
Chris Lattner49123fd2011-04-06 06:29:50 +0000794 other than darwin and ELF X86 systems.</li>
Chris Lattnerbe2e1b52011-03-10 07:43:44 +0000795
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000796</ul>
797
798</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000799
Misha Brukman500bc302003-11-22 00:38:41 +0000800<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000801<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000802 <a name="x86-be">Known problems with the X86 back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000803</h2>
John Criswellc0c186d2005-11-08 21:11:33 +0000804
805<div class="doc_text">
806
807<ul>
Anton Korobeynikova6094be2008-06-08 10:24:13 +0000808 <li>The X86 backend does not yet support
809 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
810 floating point stack</a>. It supports the 'f' and 't' constraints, but not
811 'u'.</li>
Dan Gohman8207ba92008-06-08 23:05:11 +0000812 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattner914ce462010-04-22 06:28:20 +0000813 <tt>va_arg</tt>. Currently, front-ends support variadic
Dan Gohman8207ba92008-06-08 23:05:11 +0000814 argument constructs on X86-64 by lowering them manually.</li>
NAKAMURA Takumi45c435a2011-04-05 08:24:22 +0000815 <li>Windows x64 (aka Win64) code generator has a few issues.
816 <ul>
817 <li>llvm-gcc cannot build the mingw-w64 runtime currently
818 due to lack of support for the 'u' inline assembly
819 constraint and for X87 floating point inline assembly.</li>
820 <li>On mingw-w64, you will see unresolved symbol <tt>__chkstk</tt>
821 due to <a href="http://llvm.org/bugs/show_bug.cgi?id=8919">Bug 8919</a>.
822 It is fixed in <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110321/118499.html">r128206</a>.</li>
823 <li>Miss-aligned MOVDQA might crash your program. It is due to
824 <a href="http://llvm.org/bugs/show_bug.cgi?id=9483">Bug 9483</a>,
825 lack of handling aligned internal globals.</li>
826 </ul>
827 </li>
828
Chris Lattner26299222006-11-18 07:51:14 +0000829</ul>
830
831</div>
832
833<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000834<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000835 <a name="ppc-be">Known problems with the PowerPC back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000836</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000837
838<div class="doc_text">
839
840<ul>
Nicolas Geoffraye4285dc2007-05-15 09:21:28 +0000841<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattner57a460e2007-05-23 04:39:32 +0000842compilation, and lacks support for debug information.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000843</ul>
844
845</div>
846
847<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000848<h2>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000849 <a name="arm-be">Known problems with the ARM back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000850</h2>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000851
852<div class="doc_text">
853
854<ul>
Chris Lattner57a460e2007-05-23 04:39:32 +0000855<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sandsc90d68b2007-09-26 15:59:54 +0000856processors, thumb programs can crash or produce wrong
Chris Lattner57a460e2007-05-23 04:39:32 +0000857results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswell524a5dd2009-03-02 15:28:15 +0000858<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000859</li>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000860</ul>
861
862</div>
863
864<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000865<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000866 <a name="sparc-be">Known problems with the SPARC back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000867</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000868
869<div class="doc_text">
870
871<ul>
John Criswell524a5dd2009-03-02 15:28:15 +0000872<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattner26299222006-11-18 07:51:14 +0000873 support the 64-bit SPARC ABI (-m64).</li>
874</ul>
875
876</div>
877
878<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000879<h2>
Bruno Cardoso Lopesb7e1a4f2008-10-25 14:56:26 +0000880 <a name="mips-be">Known problems with the MIPS back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000881</h2>
Bruno Cardoso Lopesb7e1a4f2008-10-25 14:56:26 +0000882
883<div class="doc_text">
884
885<ul>
Bruno Cardoso Lopesb7e1a4f2008-10-25 14:56:26 +0000886<li>64-bit MIPS targets are not supported yet.</li>
887</ul>
888
889</div>
890
891<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000892<h2>
Chris Lattner26299222006-11-18 07:51:14 +0000893 <a name="alpha-be">Known problems with the Alpha back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000894</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000895
896<div class="doc_text">
897
898<ul>
899
900<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
901appropriate nops inserted to ensure restartability.</li>
902
John Criswellc0c186d2005-11-08 21:11:33 +0000903</ul>
904</div>
905
Chris Lattner26299222006-11-18 07:51:14 +0000906<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000907<h2>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000908 <a name="c-be">Known problems with the C back-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000909</h2>
Chris Lattner26299222006-11-18 07:51:14 +0000910
911<div class="doc_text">
912
Chris Lattner3016ee92010-09-29 05:34:42 +0000913<p>The C backend has numerous problems and is not being actively maintained.
914Depending on it for anything serious is not advised.</p>
915
Chris Lattner26299222006-11-18 07:51:14 +0000916<ul>
Chris Lattner5733b272008-06-05 06:35:40 +0000917<li><a href="http://llvm.org/PR802">The C backend has only basic support for
918 inline assembly code</a>.</li>
Chris Lattner725a0d82007-09-26 06:01:35 +0000919<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
920 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif4906abe2009-03-02 12:02:51 +0000921 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandsf74c0cc2008-02-10 13:40:55 +0000922<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands50723a92009-02-25 11:51:54 +0000923<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000924</ul>
925
926</div>
John Criswellc0c186d2005-11-08 21:11:33 +0000927
Misha Brukman500bc302003-11-22 00:38:41 +0000928
929<!-- ======================================================================= -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000930<h2>
Chris Lattner3016ee92010-09-29 05:34:42 +0000931 <a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000932</h2>
Chris Lattner47588f92003-10-02 05:07:23 +0000933
Misha Brukman500bc302003-11-22 00:38:41 +0000934<div class="doc_text">
Chris Lattnerc5d658a2006-03-03 00:34:26 +0000935
Chris Lattner49123fd2011-04-06 06:29:50 +0000936<p><b>LLVM 2.9 will be the last release of llvm-gcc.</b></p>
937
Chris Lattner3016ee92010-09-29 05:34:42 +0000938<p>llvm-gcc is generally very stable for the C family of languages. The only
939 major language feature of GCC not supported by llvm-gcc is the
940 <tt>__builtin_apply</tt> family of builtins. However, some extensions
941 are only supported on some targets. For example, trampolines are only
942 supported on some targets (these are used when you take the address of a
943 nested function).</p>
Misha Brukman500bc302003-11-22 00:38:41 +0000944
Chris Lattner3016ee92010-09-29 05:34:42 +0000945<p>Fortran support generally works, but there are still several unresolved bugs
946 in <a href="http://llvm.org/bugs/">Bugzilla</a>. Please see the
947 tools/gfortran component for details. Note that llvm-gcc is missing major
948 Fortran performance work in the frontend and library that went into GCC after
949 4.2. If you are interested in Fortran, we recommend that you consider using
950 <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000951
Duncan Sands3af96332010-10-04 10:06:56 +0000952<p>The llvm-gcc 4.2 Ada compiler has basic functionality, but is no longer being
953actively maintained. If you are interested in Ada, we recommend that you
954consider using <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner2b659ef2008-02-12 06:29:45 +0000955</div>
956
Chris Lattner79c3fe12003-10-02 04:57:28 +0000957<!-- *********************************************************************** -->
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000958<h1>
Misha Brukman500bc302003-11-22 00:38:41 +0000959 <a name="additionalinfo">Additional Information</a>
NAKAMURA Takumic6319312011-04-05 21:55:14 +0000960</h1>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000961<!-- *********************************************************************** -->
962
Misha Brukman500bc302003-11-22 00:38:41 +0000963<div class="doc_text">
964
Chris Lattner416db102005-05-16 17:13:10 +0000965<p>A wide variety of additional information is available on the <a
Chris Lattnerb4b0ce72007-05-18 00:44:29 +0000966href="http://llvm.org">LLVM web page</a>, in particular in the <a
967href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencer669ed452007-07-09 08:04:31 +0000968contains versions of the API documentation which is up-to-date with the
969Subversion version of the source code.
Misha Brukman109d9e82005-03-30 19:14:24 +0000970You can access versions of these documents specific to this release by going
971into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000972
Misha Brukman500bc302003-11-22 00:38:41 +0000973<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnerc463b272005-10-29 07:07:09 +0000974us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattner5eccca42003-12-12 21:22:16 +0000975lists</a>.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000976
Misha Brukman500bc302003-11-22 00:38:41 +0000977</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000978
979<!-- *********************************************************************** -->
Chris Lattner79c3fe12003-10-02 04:57:28 +0000980
Misha Brukman500bc302003-11-22 00:38:41 +0000981<hr>
Misha Brukman2061e892003-11-22 01:23:39 +0000982<address>
Misha Brukman38847d52003-12-21 22:53:21 +0000983 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000984 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman2061e892003-11-22 01:23:39 +0000985 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000986 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman2061e892003-11-22 01:23:39 +0000987
Chris Lattnerb4b0ce72007-05-18 00:44:29 +0000988 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000989 Last modified: $Date$
Misha Brukman2061e892003-11-22 01:23:39 +0000990</address>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000991
Misha Brukman500bc302003-11-22 00:38:41 +0000992</body>
993</html>