blob: 5d1402581736e4cf447793cb5cef21855cad4fd8 [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 Lattner0d364302011-03-10 07:43:44 +000031<h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.9
Jeffrey Yasskin0830b972010-01-28 01:14:43 +000032release.<br>
33You may prefer the
Chris Lattner0d364302011-03-10 07:43:44 +000034<a href="http://llvm.org/releases/2.8/docs/ReleaseNotes.html">LLVM 2.8
Dan Gohman62af9d22010-05-03 23:51:05 +000035Release Notes</a>.</h1>
Jeffrey Yasskin0830b972010-01-28 01:14:43 +000036
Chris Lattner3d482502003-10-02 04:57:28 +000037<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000038<h1>
Misha Brukman80731b92003-11-22 00:38:41 +000039 <a name="intro">Introduction</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000040</h1>
Chris Lattner3d482502003-10-02 04:57:28 +000041<!-- *********************************************************************** -->
42
Misha Brukman80731b92003-11-22 00:38:41 +000043<div class="doc_text">
44
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000045<p>This document contains the release notes for the LLVM Compiler
Chris Lattner0d364302011-03-10 07:43:44 +000046Infrastructure, release 2.9. Here we describe the status of LLVM, including
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000047major improvements from the previous release and significant known problems.
Mikhail Glushenkov25422542009-03-01 18:09:47 +000048All LLVM releases may be downloaded from the <a
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000049href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
Chris Lattner62495762003-10-02 16:38:05 +000050
Chris Lattnerb5bb5972004-12-07 08:04:13 +000051<p>For more information about LLVM, including information about the latest
Chris Lattnera69595e2005-10-29 07:07:09 +000052release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattnere7525b52003-10-07 21:38:31 +000053web site</a>. If you have questions or comments, the <a
Chris Lattner0b1c9a52010-03-17 04:41:49 +000054href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's
55Mailing List</a> is a good place to send them.</p>
Chris Lattner3d482502003-10-02 04:57:28 +000056
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000057<p>Note that if you are reading this file from a Subversion checkout or the
Chris Lattner0a1fd102007-09-21 03:54:09 +000058main LLVM web page, this document applies to the <i>next</i> release, not the
Gabor Greif355f81c2008-10-14 11:00:32 +000059current one. To see the release notes for a specific release, please see the
Chris Lattner0a1fd102007-09-21 03:54:09 +000060<a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman80731b92003-11-22 00:38:41 +000061
62</div>
Chris Lattneraa61f412009-10-13 17:48:04 +000063
Chris Lattnerce6b0472011-04-05 23:22:33 +000064<!-- Features that need text if they're finished for 3.1:
65 ARM EHABI
Chris Lattnera67df2d2010-04-22 06:28:20 +000066 combiner-aa?
Chris Lattneraa61f412009-10-13 17:48:04 +000067 strong phi elim
Chris Lattneraa61f412009-10-13 17:48:04 +000068 loop dependence analysis
Chris Lattner342f9572010-09-29 05:30:03 +000069 CorrelatedValuePropagation
Chris Lattnerce6b0472011-04-05 23:22:33 +000070 lib/Transforms/IPO/MergeFunctions.cpp => consider for 3.1.
Chris Lattner2b8a52e2008-02-10 07:46:44 +000071 -->
Chris Lattner342f9572010-09-29 05:30:03 +000072
Chris Lattnerf5cd9862008-10-13 18:01:01 +000073<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000074<h1>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000075 <a name="subproj">Sub-project Status Update</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000076</h1>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000077<!-- *********************************************************************** -->
Chris Lattner625a3d82008-06-08 21:34:41 +000078
79<div class="doc_text">
Chris Lattnerc75fd522008-06-08 21:58:17 +000080<p>
Chris Lattner0d364302011-03-10 07:43:44 +000081The LLVM 2.9 distribution currently consists of code from the core LLVM
Chris Lattneraa61f412009-10-13 17:48:04 +000082repository (which roughly includes the LLVM optimizers, code generators
83and supporting tools), the Clang repository and the llvm-gcc repository. In
84addition to this code, the LLVM Project includes other sub-projects that are in
85development. Here we include updates on these subprojects.
Bill Wendlingf170d2e2009-03-02 04:28:57 +000086</p>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000087
Chris Lattnerc75fd522008-06-08 21:58:17 +000088</div>
89
Chris Lattnerf5cd9862008-10-13 18:01:01 +000090
Chris Lattnerc75fd522008-06-08 21:58:17 +000091<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000092<h2>
Chris Lattner44c09cd2008-10-13 18:11:54 +000093<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +000094</h2>
Chris Lattnerc75fd522008-06-08 21:58:17 +000095
96<div class="doc_text">
97
Chris Lattner5de7f6e2010-04-26 17:42:18 +000098<p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
99C++, and Objective-C languages. Clang aims to provide a better user experience
100through expressive diagnostics, a high level of conformance to language
101standards, fast compilation, and low memory use. Like LLVM, Clang provides a
102modular, library-based architecture that makes it suitable for creating or
103integrating with other development tools. Clang is considered a
Chris Lattner342f9572010-09-29 05:30:03 +0000104production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000105(32- and 64-bit), and for darwin/arm targets.</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000106
Chris Lattnerfd97b882011-04-05 07:19:28 +0000107<p>In the LLVM 2.9 time-frame, the Clang team has made many improvements in C,
108C++ and Objective-C support. C++ support is now generally rock solid, has
Chris Lattner9d5b3712011-04-06 00:56:12 +0000109been exercised on a broad variety of code, and has several new <a
110href="http://clang.llvm.org/cxx_status.html#cxx0x">C++'0x features</a>
Chris Lattnerfd97b882011-04-05 07:19:28 +0000111implemented (such as rvalue references and variadic templates). LLVM 2.9 has
112also brought in a large range of bug fixes and minor features (e.g. __label__
113support), and is much more compatible with the Linux Kernel.</p>
114
115<p>If Clang rejects your code that is built with another compiler, please take a
116look at the <a href="http://clang.llvm.org/compatibility.html">language
117compatibility</a> guide to make sure the issue isn't intentional or a known
118issue.
119</p>
Bill Wendlingef362462008-10-27 09:27:33 +0000120
Chris Lattner0d364302011-03-10 07:43:44 +0000121<ul>
122</ul>
Chris Lattner44c09cd2008-10-13 18:11:54 +0000123</div>
124
125<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000126<h2>
Duncan Sands1cd78982011-04-04 11:09:08 +0000127<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000128</h2>
Chris Lattneraa61f412009-10-13 17:48:04 +0000129
130<div class="doc_text">
131<p>
Duncan Sands1cd78982011-04-04 11:09:08 +0000132<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
133<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
134optimizers and code generators with LLVM's.
135Currently it requires a patched version of gcc-4.5.
136The plugin can target the x86-32 and x86-64 processor families and has been
137used successfully on the Darwin, FreeBSD and Linux platforms.
138The Ada, C, C++ and Fortran languages work well.
139The plugin is capable of compiling plenty of Obj-C, Obj-C++ and Java but it is
140not known whether the compiled code actually works or not!
Duncan Sands92452b92010-04-02 09:23:15 +0000141</p>
142
143<p>
Chris Lattner0d364302011-03-10 07:43:44 +0000144The 2.9 release has the following notable changes:
Duncan Sands7f9a0dc2010-09-30 17:37:34 +0000145<ul>
Duncan Sands1cd78982011-04-04 11:09:08 +0000146<li>The plugin is much more stable when compiling Fortran.</li>
Chris Lattner9d5b3712011-04-06 00:56:12 +0000147<li>Inline assembly where an asm output is tied to an input of a different size
148is now supported in many more cases.</li>
Duncan Sands1cd78982011-04-04 11:09:08 +0000149<li>Basic support for the __float128 type was added. It is now possible to
150generate LLVM IR from programs using __float128 but code generation does not
151work yet.</li>
152<li>Compiling Java programs no longer systematically crashes the plugin.</li>
Duncan Sands7f9a0dc2010-09-30 17:37:34 +0000153</ul>
Chris Lattneraa61f412009-10-13 17:48:04 +0000154
155</div>
156
Chris Lattner120804a2010-10-03 23:49:06 +0000157<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000158<h2>
Chris Lattner120804a2010-10-03 23:49:06 +0000159<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000160</h2>
Chris Lattner120804a2010-10-03 23:49:06 +0000161
162<div class="doc_text">
163<p>
164The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
165is a simple library that provides an implementation of the low-level
166target-specific hooks required by code generation and other runtime components.
167For example, when compiling for a 32-bit target, converting a double to a 64-bit
168unsigned integer is compiled into a runtime call to the "__fixunsdfdi"
169function. The compiler-rt library provides highly optimized implementations of
170this and other low-level routines (some are 3x faster than the equivalent
171libgcc routines).</p>
172
Chris Lattner9d5b3712011-04-06 00:56:12 +0000173<p>In the LLVM 2.9 timeframe, compiler_rt has had several minor changes for
174 better ARM support, and a fairly major license change. All of the code in the
175 compiler-rt project is now <a href="DeveloperPolicy.html#license">dual
176 licensed</a> under MIT and UIUC license, which allows you to use compiler-rt
177 in applications without the binary copyright reproduction clause. If you
178 prefer the LLVM/UIUC license, you are free to continue using it under that
179 license as well.</p>
Chris Lattner120804a2010-10-03 23:49:06 +0000180
181</div>
Chris Lattneraa61f412009-10-13 17:48:04 +0000182
183<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000184<h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000185<a name="lldb">LLDB: Low Level Debugger</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000186</h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000187
188<div class="doc_text">
189<p>
Chris Lattner120804a2010-10-03 23:49:06 +0000190<a href="http://lldb.llvm.org/">LLDB</a> is a brand new member of the LLVM
191umbrella of projects. LLDB is a next generation, high-performance debugger. It
192is built as a set of reusable components which highly leverage existing
193libraries in the larger LLVM Project, such as the Clang expression parser, the
194LLVM disassembler and the LLVM JIT.</p>
Chris Lattner342f9572010-09-29 05:30:03 +0000195
196<p>
Chris Lattner9d5b3712011-04-06 00:56:12 +0000197LLDB is has advanced by leaps and bounds in the 2.9 timeframe. It is
198dramatically more stable and useful, and includes both a new <a
199href="http://lldb.llvm.org/tutorial.html">tutorial</a> and a <a
200href="http://lldb.llvm.org/lldb-gdb.html">side-by-side comparison with
201GDB</a>.</p>
Chris Lattner342f9572010-09-29 05:30:03 +0000202
203</div>
204
205<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000206<h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000207<a name="libc++">libc++: C++ Standard Library</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000208</h2>
Chris Lattner342f9572010-09-29 05:30:03 +0000209
210<div class="doc_text">
211<p>
Tobias Grosser436bc5f2010-10-06 21:07:30 +0000212<a href="http://libcxx.llvm.org/">libc++</a> is another new member of the LLVM
Chris Lattner120804a2010-10-03 23:49:06 +0000213family. It is an implementation of the C++ standard library, written from the
214ground up to specifically target the forthcoming C++'0X standard and focus on
215delivering great performance.</p>
Chris Lattner342f9572010-09-29 05:30:03 +0000216
217<p>
Chris Lattner14a33332011-04-06 00:59:18 +0000218In the LLVM 2.9 timeframe, libc++ has had numerous bugs fixed, and is now being
219co-developed with Clang's C++'0x mode.</p>
Chris Lattnerfd97b882011-04-05 07:19:28 +0000220
Chris Lattner14a33332011-04-06 00:59:18 +0000221<p>
222Like compiler_rt, libc++ is now <a href="DeveloperPolicy.html#license">dual
223 licensed</a> under the MIT and UIUC license, allowing it to be used more
224 permissively.
Chris Lattner342f9572010-09-29 05:30:03 +0000225</p>
226
227</div>
228
Chris Lattneraa61f412009-10-13 17:48:04 +0000229
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000230
231<!--=========================================================================-->
Chris Lattner9ee0b012011-04-05 18:38:45 +0000232<!--
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000233<h2>
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000234<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000235</h2>
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000236
237<div class="doc_text">
238<p>
239<a href="http://klee.llvm.org/">KLEE</a> is a symbolic execution framework for
240programs in LLVM bitcode form. KLEE tries to symbolically evaluate "all" paths
241through the application and records state transitions that lead to fault
242states. This allows it to construct testcases that lead to faults and can even
243be used to verify some algorithms.
244</p>
245
Chris Lattner0d364302011-03-10 07:43:44 +0000246<p>UPDATE!</p>
Chris Lattner9ee0b012011-04-05 18:38:45 +0000247</div>-->
Daniel Dunbar8fbd8aa2010-10-04 17:39:47 +0000248
249
Chris Lattner53e06f92009-02-26 22:33:38 +0000250<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000251<h1>
Chris Lattner0d364302011-03-10 07:43:44 +0000252 <a name="externalproj">External Open Source Projects Using LLVM 2.9</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000253</h1>
Chris Lattner53e06f92009-02-26 22:33:38 +0000254<!-- *********************************************************************** -->
255
Chris Lattneraa61f412009-10-13 17:48:04 +0000256<div class="doc_text">
257
258<p>An exciting aspect of LLVM is that it is used as an enabling technology for
259 a lot of other language and tools projects. This section lists some of the
Chris Lattner0d364302011-03-10 07:43:44 +0000260 projects that have already been updated to work with LLVM 2.9.</p>
Chris Lattnerdf85c892010-04-26 17:38:10 +0000261</div>
262
Chris Lattner120804a2010-10-03 23:49:06 +0000263
Chris Lattnerae6a89a2011-04-06 01:13:49 +0000264<!--=========================================================================-->
265<h2>Crack Programming Language</h2>
266
267<div class="doc_text">
268<p>
269<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
270ease of development of a scripting language with the performance of a compiled
271language. The language derives concepts from C++, Java and Python, incorporating
272object-oriented programming, operator overloading and strong typing.</p>
273</div>
274
275
276<!--=========================================================================-->
277<h2>TTA-based Codesign Environment (TCE)</h2>
278
279<div class="doc_text">
280<p>TCE is a toolset for designing application-specific processors (ASP) based on
281the Transport triggered architecture (TTA). The toolset provides a complete
282co-design flow from C/C++ programs down to synthesizable VHDL and parallel
283program binaries. Processor customization points include the register files,
284function units, supported operations, and the interconnection network.</p>
285
286<p>TCE uses Clang and LLVM for C/C++ language support, target independent
287optimizations and also for parts of code generation. It generates new LLVM-based
288code generators "on the fly" for the designed TTA processors and loads them in
289to the compiler backend as runtime libraries to avoid per-target recompilation
290of larger parts of the compiler chain.</p>
291</div>
292
293
294
295<!--=========================================================================-->
296<h2>PinaVM</h2>
297
298<div class="doc_text">
299<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
300source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
301other front-ends, PinaVM actually executes the elaboration of the
302program analyzed using LLVM's JIT infrastructure. It later enriches the
303bitcode with SystemC-specific information.</p>
304</div>
305
306<!--=========================================================================-->
307<h2>Pure</h2>
308
309<div class="doc_text">
310<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
311 algebraic/functional
312 programming language based on term rewriting. Programs are collections
313 of equations which are used to evaluate expressions in a symbolic
314 fashion. The interpreter uses LLVM as a backend to JIT-compile Pure
315 programs to fast native code. Pure offers dynamic typing, eager and lazy
316 evaluation, lexical closures, a hygienic macro system (also based on
317 term rewriting), built-in list and matrix support (including list and
318 matrix comprehensions) and an easy-to-use interface to C and other
319 programming languages (including the ability to load LLVM bitcode
320 modules, and inline C, C++, Fortran and Faust code in Pure programs if
321 the corresponding LLVM-enabled compilers are installed).</p>
322
323<p>Pure version 0.47 has been tested and is known to work with LLVM 2.9
324 (and continues to work with older LLVM releases &gt;= 2.5).</p>
325</div>
326
327<!--=========================================================================-->
328<h2 id="icedtea">IcedTea Java Virtual Machine Implementation</h2>
329
330<div class="doc_text">
331<p>
332<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
333harness to build OpenJDK using only free software build tools and to provide
334replacements for the not-yet free parts of OpenJDK. One of the extensions that
335IcedTea provides is a new JIT compiler named <a
336href="http://icedtea.classpath.org/wiki/ZeroSharkFaq">Shark</a> which uses LLVM
337to provide native code generation without introducing processor-dependent
338code.
339</p>
340
341<p> OpenJDK 7 b112, IcedTea6 1.9 and IcedTea7 1.13 and later have been tested
342and are known to work with LLVM 2.9 (and continue to work with older LLVM
343releases &gt;= 2.6 as well).</p>
344</div>
345
346<!--=========================================================================-->
347<h2>Glasgow Haskell Compiler (GHC)</h2>
348
349<div class="doc_text">
350<p>GHC is an open source, state-of-the-art programming suite for Haskell,
351a standard lazy functional programming language. It includes an
352optimizing static compiler generating good code for a variety of
353platforms, together with an interactive system for convenient, quick
354development.</p>
355
356<p>In addition to the existing C and native code generators, GHC 7.0 now
357supports an LLVM code generator. GHC supports LLVM 2.7 and later.</p>
358</div>
359
360<!--=========================================================================-->
361<h2>Polly - Polyhedral optimizations for LLVM</h2>
362
363<div class="doc_text">
364<p>Polly is a project that aims to provide advanced memory access optimizations
365to better take advantage of SIMD units, cache hierarchies, multiple cores or
366even vector accelerators for LLVM. Built around an abstract mathematical
367description based on Z-polyhedra, it provides the infrastructure to develop
368advanced optimizations in LLVM and to connect complex external optimizers. In
369its first year of existence Polly already provides an exact value-based
370dependency analysis as well as basic SIMD and OpenMP code generation support.
371Furthermore, Polly can use PoCC(Pluto) an advanced optimizer for data-locality
372and parallelism.</p>
373</div>
Chris Lattner120804a2010-10-03 23:49:06 +0000374
Chris Lattnerca7c8962010-10-01 06:34:49 +0000375
Chris Lattnerc75fd522008-06-08 21:58:17 +0000376<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000377<h1>
Chris Lattner0d364302011-03-10 07:43:44 +0000378 <a name="whatsnew">What's New in LLVM 2.9?</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000379</h1>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000380<!-- *********************************************************************** -->
381
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000382<div class="doc_text">
383
Chris Lattneraa61f412009-10-13 17:48:04 +0000384<p>This release includes a huge number of bug fixes, performance tweaks and
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000385minor improvements. Some of the major improvements and new features are listed
386in this section.
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000387</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000388
Chris Lattnera67df2d2010-04-22 06:28:20 +0000389</div>
390
391<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000392<h2>
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000393<a name="majorfeatures">Major New Features</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000394</h2>
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000395
396<div class="doc_text">
397
Chris Lattner0d364302011-03-10 07:43:44 +0000398<p>LLVM 2.9 includes several major new capabilities:</p>
Chris Lattner97beb512007-05-14 06:56:09 +0000399
400<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000401
Chris Lattner23e16b592011-04-06 05:50:04 +0000402<li>Type Based Alias Analysis (TBAA) is now implemented and turned on by default
403 in Clang. This allows substantially better load/store optimization in some
404 cases. TBAA can be disabled by passing -fno-strict-aliasing.
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000405</li>
406
Chris Lattner23e16b592011-04-06 05:50:04 +0000407<li>This release has seen a continued focus on quality of debug information.
408 LLVM now generates much higher fidelity debug information, particularly when
409 debugging optimized code.</li>
410
411<li>Inline assembly now supports multiple alternative constraints.</li>
412
413<li>A new backend for the NVIDIA PTX virtual ISA (used to target its GPUs) is
414 under rapid development. It is not generally useful in 2.9, but is making
415 rapid progress.</li>
Chris Lattner9ee0b012011-04-05 18:38:45 +0000416
Chris Lattner458e79f2008-02-10 08:18:42 +0000417</ul>
Chris Lattnerfd97b882011-04-05 07:19:28 +0000418
Chris Lattner97beb512007-05-14 06:56:09 +0000419</div>
420
Chris Lattner0a1fd102007-09-21 03:54:09 +0000421<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000422<h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000423<a name="coreimprovements">LLVM IR and Core Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000424</h2>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000425
426<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000427<p>LLVM IR has several new features for better support of new targets and that
428expose new optimization opportunities:</p>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000429
Chris Lattnerb7112222008-06-05 06:25:56 +0000430<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000431<li>The <a href="LangRef.html#bitwiseops">udiv, ashr, lshr, and shl</a>
432 instructions now have support exact and nuw/nsw bits to indicate that they
433 don't overflow or shift out bits. This is useful for optimization of <a
434 href="http://llvm.org/PR8862">pointer differences</a> and other cases.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000435
Chris Lattner23e16b592011-04-06 05:50:04 +0000436<li>LLVM IR now supports the <a href="LangRef.html#globalvars">unnamed_addr</a>
437 attribute to indicate that constant global variables with identical
438 initializers can be merged. This fixed <a href="http://llvm.org/PR8927">an
439 issue</a> where LLVM would incorrectly merge two globals which were supposed
440 to have distinct addresses.</li>
441
442<li>The new <a href="LangRef.html#fnattrs">hotpatch attribute</a> has been added
443 to allow runtime patching of functions.</li>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000444</ul>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +0000445
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000446</div>
447
448<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000449<h2>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000450<a name="optimizer">Optimizer Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000451</h2>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000452
453<div class="doc_text">
454
Chris Lattneraa61f412009-10-13 17:48:04 +0000455<p>In addition to a large array of minor performance tweaks and bug fixes, this
Chris Lattner25879d72008-10-13 21:50:36 +0000456release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000457
458<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000459<li>Link Time Optimization (LTO) has been improved to use MC for parsing inline
460 assembly and now can build large programs like Firefox 4 on both Mac OS X and
461 Linux.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000462
Chris Lattner23e16b592011-04-06 05:50:04 +0000463<li>The new -loop-idiom pass recognizes memset/memcpy loops (and memset_pattern
464 on darwin), turning them into library calls, which are typically better
465 optimized than inline code. If you are building a libc and notice that your
466 memcpy and memset functions are compiled into infinite recursion, please build
467 with -ffreestanding or -fno-builtin to disable this pass.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000468
Chris Lattner23e16b592011-04-06 05:50:04 +0000469<li>A new -early-cse pass does a fast pass over functions to fold constants,
470 simplify expressions, perform simple dead store elimination, and perform
471 common subexpression elimination. It does a good job at catching some of the
472 trivial redundancies that exist in unoptimized code, making later passes more
473 effective.<,/li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000474
Chris Lattner23e16b592011-04-06 05:50:04 +0000475<li>A new -loop-instsimplify pass is used to clean up loop bodies in the loop
476 optimizer.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000477
Chris Lattner23e16b592011-04-06 05:50:04 +0000478<li>The new TargetLibraryInfo interface allows mid-level optimizations to know
479 whether the current target's runtime library has certain functions. For
480 example, the optimizer can now transform integer-only printf calls to call
481 iprintf, allowing reduced code size for embedded C libraries (e.g. newlib).
482</li>
483
484<li>LLVM has a new <a href="WritingAnLLVMPass.html#RegionPass">RegionPass</a>
485 infrastructure for region-based optimizations.</li>
486
487<li>Several optimizer passes have been substantially sped up:
488 GVN is much faster on functions with deep dominator trees and lots of basic
489 blocks. The dominator tree and dominance frontier passes are much faster to
490 compute, and preserved by more passes (so they are computed less often). The
491 -scalar-repl pass is also much faster and doesn't use DominanceFrontier.
492</li>
493
494<li>The Dead Store Elimination pass is more aggressive optimizing stores of
495 different types: e.g. a large store following a small one to the same address.
496 The MemCpyOptimizer pass handles several new forms of memcpy elimination.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000497
Chris Lattner23e16b592011-04-06 05:50:04 +0000498<li>LLVM now optimizes various idioms for overflow detection into check of the
499 flag register on various CPUs. For example, we now compile:
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000500
Chris Lattner23e16b592011-04-06 05:50:04 +0000501 <pre>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000502 unsigned long t = a+b;
503 if (t &lt; a) ...
Chris Lattner23e16b592011-04-06 05:50:04 +0000504 </pre>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000505 into:
Chris Lattner23e16b592011-04-06 05:50:04 +0000506 <pre>
507 addq %rdi, %rbx
508 jno LBB0_2
509 </pre>
510</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000511
Chris Lattnerfcc65a72010-10-04 02:42:39 +0000512</ul>
513
Chris Lattneraa61f412009-10-13 17:48:04 +0000514</div>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000515
Chris Lattner7795ea92008-06-08 02:45:07 +0000516<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000517<h2>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000518<a name="mc">MC Level Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000519</h2>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000520
521<div class="doc_text">
522<p>
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000523The LLVM Machine Code (aka MC) subsystem was created to solve a number
Chris Lattnerf25bc192010-09-30 16:31:33 +0000524of problems in the realm of assembly, disassembly, object file format handling,
525and a number of other related areas that CPU instruction-set level tools work
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000526in.</p>
527
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000528<ul>
Chris Lattner23e16b592011-04-06 05:50:04 +0000529<li>ELF MC support has matured enough for the integrated assembler to be turned
530 on by default in Clang on X86-32 and X86-64 ELF systems.</li>
531
532<li>MC supports and CodeGen uses the <tt>.file</tt> and <tt>.loc</tt> directives
533 for producing line number debug info. This produces more compact line
534 tables and easier to read .s files.</li>
535
536<li>MC supports the <tt>.cfi_*</tt> directives for producing DWARF
Rafael Espindola01fb4b02011-03-18 04:07:44 +0000537 frame information, but it is still not used by CodeGen by default.</li>
Chris Lattner23e16b592011-04-06 05:50:04 +0000538
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000539
Chris Lattner23e16b592011-04-06 05:50:04 +0000540<li>The MC assembler now generates much better diagnostics for common errors,
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000541 is much faster at matching instructions, is much more bug-compatible with
542 the GAS assembler, and is now generally useful for a broad range of X86
Chris Lattner23e16b592011-04-06 05:50:04 +0000543 assembly.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000544
Chris Lattner23e16b592011-04-06 05:50:04 +0000545<li>We now have some basic <a href="CodeGenerator.html#mc">internals
546 documentation</a> for MC.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000547
Chris Lattner23e16b592011-04-06 05:50:04 +0000548<li>.td files can now specify assembler aliases directly with the <a
549 href="CodeGenerator.html#na_instparsing">MnemonicAlias and InstAlias</a>
550 tblgen classes.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000551
Chris Lattner23e16b592011-04-06 05:50:04 +0000552<li>LLVM now has an experimental format-independent object file manipulation
553 library (lib/Object). It supports both PE/COFF and ELF. The llvm-nm tool has
554 been extended to work with native object files, and the new llvm-objdump tool
555 supports disassembly of object files (but no relocations are displayed yet).
556</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000557
Chris Lattner23e16b592011-04-06 05:50:04 +0000558<li>Win32 PE-COFF support in the MC assembler has made a lot of progress in the
559 2.9 timeframe, but is still not generally useful.</li>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000560
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000561</ul>
562
563<p>For more information, please see the <a
Chris Lattnerf25bc192010-09-30 16:31:33 +0000564href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro to the
565LLVM MC Project Blog Post</a>.
566</p>
567
NAKAMURA Takumi8d89b8e2011-04-05 08:24:22 +0000568</div>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000569
Chris Lattnerf25bc192010-09-30 16:31:33 +0000570<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000571<h2>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000572<a name="codegen">Target Independent Code Generator Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000573</h2>
Chris Lattner7795ea92008-06-08 02:45:07 +0000574
575<div class="doc_text">
576
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000577<p>We have put a significant amount of work into the code generator
578infrastructure, which allows us to implement more aggressive algorithms and make
579it run faster:</p>
Chris Lattner7795ea92008-06-08 02:45:07 +0000580
581<ul>
Chris Lattner9fd1e922010-10-04 03:58:12 +0000582<!-- SplitKit -->
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000583
584<li>The pre-register-allocation (preRA) instruction scheduler models register
585 pressure much more accurately in some cases. This allows the adoption of more
586 aggressive scheduling heuristics.
587</li>
588
589 LiveDebugVariables is a new pass that keeps track of debugging information for
590 user variables that are kept in registers in optimized builds.
591
592
593Scheduler now models operand latency and pipeline forwarding.
594
595Major regalloc rewrite, not on by default for 2.9 and not advised to use it.
596 * New basic register allocator that can be used as a safe fallback when
597 debugging. Enable with -regalloc=basic.
598 * New infrastructure for live range splitting. SplitKit can break a live
599 interval into smaller pieces while preserving SSA form, and SpillPlacement
600 can help find the best split points. This is a work in progress so the API
601 is changing quickly.
602 * The inline spiller has learned to clean up after live range splitting. It
603 can hoist spills out of loops, and it can eliminate redundant spills.
604 Rematerialization works with live range splitting.
605 * New greedy register allocator using live range splitting. This will be the
606 default register allocator in the next LLVM release, but it is not turned on
607 by default in 2.9.
608
609
610
Chris Lattner0a1fd102007-09-21 03:54:09 +0000611</ul>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000612</div>
613
Chris Lattnerd1094e02009-03-02 02:37:32 +0000614<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000615<h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000616<a name="x86">X86-32 and X86-64 Target Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000617</h2>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000618
619<div class="doc_text">
Chris Lattnerd3f45c82010-10-04 04:39:25 +0000620<p>New features and major changes in the X86 target include:
Chris Lattnerd1094e02009-03-02 02:37:32 +0000621</p>
622
623<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000624<li>
625X86: Reimplemented all of MMX to introduce a new LLVM IR x86_mmx type. Now
626 random types like &lt;2 x i32&gt; are not iseld to mmx without emms. The
627 -disable-mmx flag is gone now.
628</li>
629
630 <li>
631X86 support for FS/GS relative loads and stores using address space 256/257 are
632 reliable now.
633 </li>
634
635 <li>
636X86: Much better codegen for several cases using adc/sbb instead of cmovs for
637 conditional increment and other idioms.
638 </li>
639
640 <li>
641 The X86 backend has adopted a new preRA scheduling
642 mode, "list-ilp", to shorten the height of instruction schedules
643 without inducing register spills.
644 </li>
645
646 MC assembler support for 3dNow! and 3DNowA instructions.
647
NAKAMURA Takumi8d89b8e2011-04-05 08:24:22 +0000648 <li>Several bugs have been fixed for Windows x64 code generator.</li>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000649</ul>
650
Chris Lattnerd1094e02009-03-02 02:37:32 +0000651</div>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000652
653<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000654<h2>
Chris Lattneraa61f412009-10-13 17:48:04 +0000655<a name="ARM">ARM Target Improvements</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000656</h2>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000657
658<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000659<p>New features of the ARM target include:
660</p>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000661
662<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000663<li>ARM Fast ISel</li>
664<li>ARM: New code placement pass.</li>
665<li>ARM: Improved code generation for Cortex-A8 and Cortex-A9 CPUs.</li>
666<li>ARM: __builtin_prefetch turns into prefetch instructions.</li>
667<li>Countless ARM microoptimizations.</li>
668
669<li> The ARM backend preRA scheduler now models machine resources at cycle
670 granularity. This allows the scheduler to both accurately model
671 instruction latency and avoid overcommitting functional units.</li>
672
673
Bob Wilsone44f2982010-09-13 17:39:35 +0000674</ul>
Chris Lattneraa61f412009-10-13 17:48:04 +0000675</div>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000676
677<!--=========================================================================-->
678<h2>
679<a name="OtherTS">Other Target Specific Improvements</a>
680</h2>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000681
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000682<div class="doc_text">
683<ul>
684 PPC: Switched to MCInstPrinter, and MCCodeEmitter. Ready to implement support
685 for directly writing out mach-o object files, but noone seems interested.
686
687 MicroBlaze: major updates for aggressive delay slot filler, MC-based assembly
688 printing, assembly instruction parsing, ELF .o file emission, and MC
689 instruction disassembler.
690
691 SPARC: Many improvements, including using the Y registers for multiplications
692 and addition of a simple delay slot filler.
693
694</ul>
695</div>
Chris Lattner6cb64032008-06-05 08:02:49 +0000696
697<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000698<h2>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000699<a name="changes">Major Changes and Removed Features</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000700</h2>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000701
702<div class="doc_text">
703
Chris Lattner934e2d42008-10-13 22:06:31 +0000704<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattner0d364302011-03-10 07:43:44 +0000705on LLVM 2.8, this section lists some "gotchas" that you may run into upgrading
Chris Lattner934e2d42008-10-13 22:06:31 +0000706from the previous release.</p>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000707
708<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000709 last release for llvm-gcc
710
Chris Lattner23e16b592011-04-06 05:50:04 +0000711 <li>
712 New naming rules in coding standards: CodingStandards.html#ll_naming
713 </li>
714
715
716
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000717- DIBuilder provides simpler interface for front ends like Clang to encode debug info in LLVM IR.
718 - This interface hides implementation details (e.g. DIDerivedType, existence of compile unit etc..) that any front end should not know about.
719 For example, DIFactory DebugFactory;
720 Ty = DebugFactory.CreateDerivedType(DW_TAG_volatile_type,
721 findRegion(TYPE_CONTEXT(type)),
722 StringRef(),
723 getOrCreateFile(main_input_filename),
724 0 /*line no*/,
725 NodeSizeInBits(type),
726 NodeAlignInBits(type),
727 0 /*offset */,
728 0 /* flags */,
729 MainTy);
730 can be replaced by
731 DbgTy = DBuilder.createQualifiedType(DW_TAG_volatile_type, MainTy);
732DIFactory is gone now.
733
734
Chris Lattner934e2d42008-10-13 22:06:31 +0000735
Chris Lattnera7f45cf2010-10-04 01:29:06 +0000736
737
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000738
739 LoopIndexSplit pass was removed, unmaintained.
740 LiveValues, SimplifyHalfPowrLibCalls, and GEPSplitter were removed.
741 Removed the PartialSpecialization pass, it was unmaintained and buggy.
742
743 DIFactory removed, use DIBuilder instead.
744
745 Triple::normalize is new, llvm triples are always stored in normalized form internally.
746
747 Triple x86_64--mingw64 is obsoleted. Use x86_64--mingw32 instead.
748
749 PointerTracking has been removed from mainline, moved to ClamAV.
750
Devang Pateldbf83832008-10-14 20:03:43 +0000751</ul>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000752
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000753</div>
754
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000755<!--=========================================================================-->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000756<h2>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000757<a name="api_changes">Internal API Changes</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000758</h2>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000759
760<div class="doc_text">
761
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000762<p>In addition, many APIs have changed in this release. Some of the major
763 LLVM API changes are:</p>
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000764
765<ul>
Chris Lattnerc3a2c982011-04-06 00:45:11 +0000766
767 include/llvm/System merged into include/llvm/Support.
768
769
770 APInt API changes, see PR5207.
771
772 MVT::Flag renamed to MVT::Glue
773
774
775 error_code + libsystem + PathV2 changes
776 The system_error header from C++0x was added.
777 * Use if (error_code ec = function()) to check for error conditions
778 from functions which return it.
779 * error_code::message returns a human readable description of the error.
780
781 PathV1 has been deprecated in favor of PathV2 (sorry I didn't finish
782 this before the release).
783 * No Path class, use a r-value convertible to a twine instead.
784 * Assumes all paths are UTF-8.
785
786
Daniel Dunbarf70898a2010-10-04 20:11:41 +0000787</ul>
788</div>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000789
Chris Lattner3d482502003-10-02 04:57:28 +0000790<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000791<h1>
Misha Brukman80731b92003-11-22 00:38:41 +0000792 <a name="knownproblems">Known Problems</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000793</h1>
Chris Lattner3d482502003-10-02 04:57:28 +0000794<!-- *********************************************************************** -->
795
Misha Brukman80731b92003-11-22 00:38:41 +0000796<div class="doc_text">
797
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000798<p>This section contains significant known problems with the LLVM system,
Chris Lattner2a092392008-11-10 05:40:34 +0000799listed by component. If you run into a problem, please check the <a
Chris Lattnera69595e2005-10-29 07:07:09 +0000800href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattnerb84f3322003-12-12 21:22:16 +0000801there isn't already one.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000802
Misha Brukman80731b92003-11-22 00:38:41 +0000803</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000804
Chris Lattnerb911de42004-03-14 02:03:02 +0000805<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000806<h2>
Chris Lattnerb911de42004-03-14 02:03:02 +0000807 <a name="experimental">Experimental features included with this release</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000808</h2>
Chris Lattner3d482502003-10-02 04:57:28 +0000809
Chris Lattnerb911de42004-03-14 02:03:02 +0000810<div class="doc_text">
811
Misha Brukmanfa50a222004-05-12 21:46:05 +0000812<p>The following components of this LLVM release are either untested, known to
813be broken or unreliable, or are in early development. These components should
814not be relied on, and bugs should not be filed against them, but they may be
815useful to some people. In particular, if you would like to work on one of these
Chris Lattnere38ac152008-02-12 06:29:45 +0000816components, please contact us on the <a
817href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerb911de42004-03-14 02:03:02 +0000818
819<ul>
Chris Lattner0d364302011-03-10 07:43:44 +0000820<li>The Alpha, Blackfin, CellSPU, MicroBlaze, MSP430, MIPS, PTX, SystemZ
Chris Lattnera7f45cf2010-10-04 01:29:06 +0000821 and XCore backends are experimental.</li>
Chris Lattnerbf1cf672010-10-02 21:59:30 +0000822<li><tt>llc</tt> "<tt>-filetype=obj</tt>" is experimental on all targets
Chris Lattner0d364302011-03-10 07:43:44 +0000823 other than darwin-i386 and darwin-x86_64. FIXME: Not true on ELF anymore?</li>
824
Chris Lattnerb911de42004-03-14 02:03:02 +0000825</ul>
826
827</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000828
Misha Brukman80731b92003-11-22 00:38:41 +0000829<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000830<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000831 <a name="x86-be">Known problems with the X86 back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000832</h2>
John Criswell3bdbd302005-11-08 21:11:33 +0000833
834<div class="doc_text">
835
836<ul>
Anton Korobeynikov486c7d32008-06-08 10:24:13 +0000837 <li>The X86 backend does not yet support
838 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
839 floating point stack</a>. It supports the 'f' and 't' constraints, but not
840 'u'.</li>
Dan Gohman721b3722008-06-08 23:05:11 +0000841 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattnera67df2d2010-04-22 06:28:20 +0000842 <tt>va_arg</tt>. Currently, front-ends support variadic
Dan Gohman721b3722008-06-08 23:05:11 +0000843 argument constructs on X86-64 by lowering them manually.</li>
NAKAMURA Takumi8d89b8e2011-04-05 08:24:22 +0000844 <li>Windows x64 (aka Win64) code generator has a few issues.
845 <ul>
846 <li>llvm-gcc cannot build the mingw-w64 runtime currently
847 due to lack of support for the 'u' inline assembly
848 constraint and for X87 floating point inline assembly.</li>
849 <li>On mingw-w64, you will see unresolved symbol <tt>__chkstk</tt>
850 due to <a href="http://llvm.org/bugs/show_bug.cgi?id=8919">Bug 8919</a>.
851 It is fixed in <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110321/118499.html">r128206</a>.</li>
852 <li>Miss-aligned MOVDQA might crash your program. It is due to
853 <a href="http://llvm.org/bugs/show_bug.cgi?id=9483">Bug 9483</a>,
854 lack of handling aligned internal globals.</li>
855 </ul>
856 </li>
857
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000858</ul>
859
860</div>
861
862<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000863<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000864 <a name="ppc-be">Known problems with the PowerPC back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000865</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000866
867<div class="doc_text">
868
869<ul>
Nicolas Geoffray77d99502007-05-15 09:21:28 +0000870<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattnerbee7b322007-05-23 04:39:32 +0000871compilation, and lacks support for debug information.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000872</ul>
873
874</div>
875
876<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000877<h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000878 <a name="arm-be">Known problems with the ARM back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000879</h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000880
881<div class="doc_text">
882
883<ul>
Chris Lattnerbee7b322007-05-23 04:39:32 +0000884<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sands47fc0a22007-09-26 15:59:54 +0000885processors, thumb programs can crash or produce wrong
Chris Lattnerbee7b322007-05-23 04:39:32 +0000886results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswellea03c9d2009-03-02 15:28:15 +0000887<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattner97beb512007-05-14 06:56:09 +0000888</li>
Chris Lattner97beb512007-05-14 06:56:09 +0000889</ul>
890
891</div>
892
893<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000894<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000895 <a name="sparc-be">Known problems with the SPARC back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000896</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000897
898<div class="doc_text">
899
900<ul>
John Criswellea03c9d2009-03-02 15:28:15 +0000901<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000902 support the 64-bit SPARC ABI (-m64).</li>
903</ul>
904
905</div>
906
907<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000908<h2>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000909 <a name="mips-be">Known problems with the MIPS back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000910</h2>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000911
912<div class="doc_text">
913
914<ul>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000915<li>64-bit MIPS targets are not supported yet.</li>
916</ul>
917
918</div>
919
920<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000921<h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000922 <a name="alpha-be">Known problems with the Alpha back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000923</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000924
925<div class="doc_text">
926
927<ul>
928
929<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
930appropriate nops inserted to ensure restartability.</li>
931
John Criswell3bdbd302005-11-08 21:11:33 +0000932</ul>
933</div>
934
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000935<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000936<h2>
Chris Lattner97beb512007-05-14 06:56:09 +0000937 <a name="c-be">Known problems with the C back-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000938</h2>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000939
940<div class="doc_text">
941
Chris Lattner086d2692010-09-29 05:34:42 +0000942<p>The C backend has numerous problems and is not being actively maintained.
943Depending on it for anything serious is not advised.</p>
944
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000945<ul>
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000946<li><a href="http://llvm.org/PR802">The C backend has only basic support for
947 inline assembly code</a>.</li>
Chris Lattner8e061162007-09-26 06:01:35 +0000948<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
949 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif75b2f762009-03-02 12:02:51 +0000950 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandse09506a2008-02-10 13:40:55 +0000951<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands3aa36732009-02-25 11:51:54 +0000952<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000953</ul>
954
955</div>
John Criswell3bdbd302005-11-08 21:11:33 +0000956
Misha Brukman80731b92003-11-22 00:38:41 +0000957
958<!-- ======================================================================= -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000959<h2>
Chris Lattner086d2692010-09-29 05:34:42 +0000960 <a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000961</h2>
Chris Lattner178f3db2003-10-02 05:07:23 +0000962
Misha Brukman80731b92003-11-22 00:38:41 +0000963<div class="doc_text">
Chris Lattner72a269f2006-03-03 00:34:26 +0000964
Chris Lattner086d2692010-09-29 05:34:42 +0000965<p>llvm-gcc is generally very stable for the C family of languages. The only
966 major language feature of GCC not supported by llvm-gcc is the
967 <tt>__builtin_apply</tt> family of builtins. However, some extensions
968 are only supported on some targets. For example, trampolines are only
969 supported on some targets (these are used when you take the address of a
970 nested function).</p>
Misha Brukman80731b92003-11-22 00:38:41 +0000971
Chris Lattner086d2692010-09-29 05:34:42 +0000972<p>Fortran support generally works, but there are still several unresolved bugs
973 in <a href="http://llvm.org/bugs/">Bugzilla</a>. Please see the
974 tools/gfortran component for details. Note that llvm-gcc is missing major
975 Fortran performance work in the frontend and library that went into GCC after
976 4.2. If you are interested in Fortran, we recommend that you consider using
977 <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000978
Duncan Sandsd63e1c82010-10-04 10:06:56 +0000979<p>The llvm-gcc 4.2 Ada compiler has basic functionality, but is no longer being
980actively maintained. If you are interested in Ada, we recommend that you
981consider using <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattnere38ac152008-02-12 06:29:45 +0000982</div>
983
Chris Lattner3d482502003-10-02 04:57:28 +0000984<!-- *********************************************************************** -->
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000985<h1>
Misha Brukman80731b92003-11-22 00:38:41 +0000986 <a name="additionalinfo">Additional Information</a>
NAKAMURA Takumi530d7392011-04-05 21:55:14 +0000987</h1>
Chris Lattner3d482502003-10-02 04:57:28 +0000988<!-- *********************************************************************** -->
989
Misha Brukman80731b92003-11-22 00:38:41 +0000990<div class="doc_text">
991
Chris Lattnercb5596d2005-05-16 17:13:10 +0000992<p>A wide variety of additional information is available on the <a
Chris Lattnere0c1df42007-05-18 00:44:29 +0000993href="http://llvm.org">LLVM web page</a>, in particular in the <a
994href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencerc7f87f22007-07-09 08:04:31 +0000995contains versions of the API documentation which is up-to-date with the
996Subversion version of the source code.
Misha Brukman96158092005-03-30 19:14:24 +0000997You can access versions of these documents specific to this release by going
998into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000999
Misha Brukman80731b92003-11-22 00:38:41 +00001000<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnera69595e2005-10-29 07:07:09 +00001001us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattnerb84f3322003-12-12 21:22:16 +00001002lists</a>.</p>
Chris Lattner3d482502003-10-02 04:57:28 +00001003
Misha Brukman80731b92003-11-22 00:38:41 +00001004</div>
Chris Lattner3d482502003-10-02 04:57:28 +00001005
1006<!-- *********************************************************************** -->
Chris Lattner3d482502003-10-02 04:57:28 +00001007
Misha Brukman80731b92003-11-22 00:38:41 +00001008<hr>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001009<address>
Misha Brukman8834af92003-12-21 22:53:21 +00001010 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +00001011 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001012 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +00001013 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001014
Chris Lattnere0c1df42007-05-18 00:44:29 +00001015 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman80731b92003-11-22 00:38:41 +00001016 Last modified: $Date$
Misha Brukman68aab3b2003-11-22 01:23:39 +00001017</address>
Chris Lattner3d482502003-10-02 04:57:28 +00001018
Misha Brukman80731b92003-11-22 00:38:41 +00001019</body>
1020</html>