blob: 09446c97483fefacc3c58e5e582b5250e1405e1b [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">
Daniel Dunbaradea4972012-04-19 20:20:34 +00006 <link rel="stylesheet" href="_static/llvm.css" type="text/css">
Chris Lattner21e1b7a2011-12-13 17:55:30 +00007 <title>LLVM 3.1 Release Notes</title>
Misha Brukman500bc302003-11-22 00:38:41 +00008</head>
9<body>
Chris Lattner79c3fe12003-10-02 04:57:28 +000010
Chris Lattner21e1b7a2011-12-13 17:55:30 +000011<h1>LLVM 3.1 Release Notes</h1>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +000012
Jakub Staszakf8de54f2011-12-06 23:33:07 +000013<div>
14<img style="float:right" src="http://llvm.org/img/DragonSmall.png"
15 width="136" height="136" alt="LLVM Dragon Logo">
16</div>
Chris Lattner0e464a92010-03-17 04:02:39 +000017
Chris Lattner79c3fe12003-10-02 04:57:28 +000018<ol>
Misha Brukman500bc302003-11-22 00:38:41 +000019 <li><a href="#intro">Introduction</a></li>
Chris Lattner96a445e2008-10-13 18:01:01 +000020 <li><a href="#subproj">Sub-project Status Update</a></li>
Chris Lattner21e1b7a2011-12-13 17:55:30 +000021 <li><a href="#externalproj">External Projects Using LLVM 3.1</a></li>
22 <li><a href="#whatsnew">What's New in LLVM?</a></li>
Chris Lattner4b538b92004-04-30 22:17:12 +000023 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Dan Gohman44aa9212008-10-14 16:23:02 +000024 <li><a href="#knownproblems">Known Problems</a></li>
Misha Brukman500bc302003-11-22 00:38:41 +000025 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000026</ol>
27
Chris Lattner7911ce22004-05-23 21:07:27 +000028<div class="doc_author">
NAKAMURA Takumib9a33632011-04-09 02:13:37 +000029 <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p>
Misha Brukman500bc302003-11-22 00:38:41 +000030</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000031
Chris Lattner21e1b7a2011-12-13 17:55:30 +000032<h1 style="color:red">These are in-progress notes for the upcoming LLVM 3.1
Jeffrey Yasskinbec48772010-01-28 01:14:43 +000033release.<br>
34You may prefer the
Chris Lattner21e1b7a2011-12-13 17:55:30 +000035<a href="http://llvm.org/releases/3.0/docs/ReleaseNotes.html">LLVM 3.0
Dan Gohmanb44f6c62010-05-03 23:51:05 +000036Release Notes</a>.</h1>
Jeffrey Yasskinbec48772010-01-28 01:14:43 +000037
Chris Lattner79c3fe12003-10-02 04:57:28 +000038<!-- *********************************************************************** -->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +000039<h2>
Misha Brukman500bc302003-11-22 00:38:41 +000040 <a name="intro">Introduction</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +000041</h2>
Chris Lattner79c3fe12003-10-02 04:57:28 +000042<!-- *********************************************************************** -->
43
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +000044<div>
Misha Brukman500bc302003-11-22 00:38:41 +000045
Chris Lattnerf6662f92008-10-13 17:57:36 +000046<p>This document contains the release notes for the LLVM Compiler
Chris Lattner21e1b7a2011-12-13 17:55:30 +000047 Infrastructure, release 3.1. Here we describe the status of LLVM, including
Chris Lattner1ab8ce92011-11-27 18:47:37 +000048 major improvements from the previous release, improvements in various
49 subprojects of LLVM, and some of the current users of the code.
Bill Wendling7b7fa742011-10-26 18:46:16 +000050 All LLVM releases may be downloaded from
51 the <a href="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
Bill Wendling7b7fa742011-10-26 18:46:16 +000054 release, please check out the <a href="http://llvm.org/">main LLVM web
55 site</a>. If you have questions or comments,
56 the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
57 Developer's Mailing List</a> is a good place to send them.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +000058
Bill Wendling7b7fa742011-10-26 18:46:16 +000059<p>Note that if you are reading this file from a Subversion checkout or the main
60 LLVM web page, this document applies to the <i>next</i> release, not the
61 current one. To see the release notes for a specific release, please see the
62 <a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman500bc302003-11-22 00:38:41 +000063
64</div>
Michael J. Spencer60f790c2011-11-28 18:20:09 +000065
66
Chris Lattner96a445e2008-10-13 18:01:01 +000067<!-- *********************************************************************** -->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +000068<h2>
Chris Lattner96a445e2008-10-13 18:01:01 +000069 <a name="subproj">Sub-project Status Update</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +000070</h2>
Chris Lattner96a445e2008-10-13 18:01:01 +000071<!-- *********************************************************************** -->
Chris Lattnerea34f642008-06-08 21:34:41 +000072
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +000073<div>
Bill Wendling7b7fa742011-10-26 18:46:16 +000074
Chris Lattner21e1b7a2011-12-13 17:55:30 +000075<p>The LLVM 3.1 distribution currently consists of code from the core LLVM
Bill Wendling7b7fa742011-10-26 18:46:16 +000076 repository (which roughly includes the LLVM optimizers, code generators and
Bill Wendling1fefd092012-05-14 08:11:53 +000077 supporting tools), and the Clang repository. In addition to this code, the
78 LLVM Project includes other sub-projects that are in development. Here we
79 include updates on these subprojects.</p>
Chris Lattner96a445e2008-10-13 18:01:01 +000080
Chris Lattner8348b472008-06-08 21:58:17 +000081<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +000082<h3>
Chris Lattnerfb97b2d2008-10-13 18:11:54 +000083<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +000084</h3>
Chris Lattner8348b472008-06-08 21:58:17 +000085
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +000086<div>
Chris Lattner8348b472008-06-08 21:58:17 +000087
Chris Lattner095539f2010-04-26 17:42:18 +000088<p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
Bill Wendling7b7fa742011-10-26 18:46:16 +000089 C++, and Objective-C languages. Clang aims to provide a better user
90 experience through expressive diagnostics, a high level of conformance to
91 language standards, fast compilation, and low memory use. Like LLVM, Clang
92 provides a modular, library-based architecture that makes it suitable for
93 creating or integrating with other development tools. Clang is considered a
94 production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86
Chris Lattner1ab8ce92011-11-27 18:47:37 +000095 (32- and 64-bit), and for Darwin/ARM targets.</p>
Chris Lattner61358ab2009-10-13 17:48:04 +000096
Benjamin Kramer88c8e692012-05-13 10:40:08 +000097<p>In the LLVM 3.1 time-frame, the Clang team has made many improvements.
98 Highlights include:</p>
Douglas Gregorba087df2011-10-15 00:48:01 +000099<ul>
Benjamin Kramer88c8e692012-05-13 10:40:08 +0000100 <li>Greatly expanded <a href="http://clang.llvm.org/cxx_status.html">C++11
101 support</a> including lambdas, initializer lists, constexpr, user-defined
102 literals, and atomics.</li>
103 <li>A new <a href="http://clang.llvm.org/docs/Tooling.html">tooling</a>
104 library to ease building of clang-based standalone tools.</li>
105 <li>Extended support for
106 <a href="http://clang.llvm.org/docs/ObjectiveCLiterals.html">literals in
107 Objective C</a>.</li>
Douglas Gregorba087df2011-10-15 00:48:01 +0000108</ul>
Chris Lattner21e1b7a2011-12-13 17:55:30 +0000109
Bill Wendling1fefd092012-05-14 08:11:53 +0000110<p>For more details about the changes to Clang since the 3.0 release, see the
111 <a href="http://clang.llvm.org/docs/ReleaseNotes.html">Clang release
112 notes.</a></p>
Michael J. Spencer60f790c2011-11-28 18:20:09 +0000113
Duncan Sandsf3ba7af2011-04-06 08:07:40 +0000114<p>If Clang rejects your code but another compiler accepts it, please take a
Bill Wendling7b7fa742011-10-26 18:46:16 +0000115 look at the <a href="http://clang.llvm.org/compatibility.html">language
116 compatibility</a> guide to make sure this is not intentional or a known
117 issue.</p>
Bill Wendling741748a2008-10-27 09:27:33 +0000118
Chris Lattnerfb97b2d2008-10-13 18:11:54 +0000119</div>
120
121<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000122<h3>
Duncan Sands528a5102011-04-04 11:09:08 +0000123<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000124</h3>
Chris Lattner61358ab2009-10-13 17:48:04 +0000125
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000126<div>
Bill Wendling1fefd092012-05-14 08:11:53 +0000127
Bill Wendling7b7fa742011-10-26 18:46:16 +0000128<p><a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
129 <a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
Duncan Sands5abd10a2012-05-11 19:59:43 +0000130 optimizers and code generators with LLVM's. It works with gcc-4.5 and gcc-4.6
131 (and partially with gcc-4.7), can target the x86-32/x86-64 and ARM processor
132 families, and has been successfully used on the Darwin, FreeBSD, KFreeBSD,
133 Linux and OpenBSD platforms. It fully supports Ada, C, C++ and Fortran. It
134 has partial support for Go, Java, Obj-C and Obj-C++.</p>
Duncan Sands749fd832010-04-02 09:23:15 +0000135
Chris Lattner21e1b7a2011-12-13 17:55:30 +0000136<p>The 3.1 release has the following notable changes:</p>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000137
Bill Wendling1fefd092012-05-14 08:11:53 +0000138<ul>
Duncan Sands5abd10a2012-05-11 19:59:43 +0000139 <li>Partial support for gcc-4.7. Ada support is poor, but other languages work
140 fairly well.</li>
141
142 <li>Support for ARM processors. Some essential gcc headers that are needed to
143 build DragonEgg for ARM are not installed by gcc. To work around this,
144 copy the missing headers from the gcc source tree.</li>
145
146 <li>Better optimization for Fortran by exploiting the fact that Fortran scalar
147 arguments have 'restrict' semantics.</li>
148
149 <li>Better optimization for all languages by passing information about type
150 aliasing and type ranges to the LLVM optimizers.</li>
151
152 <li>A regression test-suite was added.</li>
Duncan Sands4b1da2b2010-09-30 17:37:34 +0000153</ul>
Chris Lattner61358ab2009-10-13 17:48:04 +0000154
155</div>
156
Chris Lattner75547712010-10-03 23:49:06 +0000157<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000158<h3>
Chris Lattner75547712010-10-03 23:49:06 +0000159<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000160</h3>
Chris Lattner75547712010-10-03 23:49:06 +0000161
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000162<div>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000163
164<p>The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
165 is a simple library that provides an implementation of the low-level
166 target-specific hooks required by code generation and other runtime
167 components. For example, when compiling for a 32-bit target, converting a
168 double to a 64-bit unsigned integer is compiled into a runtime call to the
169 "__fixunsdfdi" function. The compiler-rt library provides highly optimized
170 implementations of this and other low-level routines (some are 3x faster than
171 the equivalent libgcc routines).</p>
Chris Lattner75547712010-10-03 23:49:06 +0000172
David Chisnall6dd3bdb2012-05-15 13:06:46 +0000173<p>As of 3.1, compiler-rt includes the helper functions for atomic operations,
174 allowing atomic operations on arbitrary-sized quantities to work. These
175 functions follow the specification defined by gcc and are used by clang.</p>
176
Chris Lattner75547712010-10-03 23:49:06 +0000177</div>
Chris Lattner61358ab2009-10-13 17:48:04 +0000178
179<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000180<h3>
Chris Lattnere07043c2010-09-29 05:30:03 +0000181<a name="lldb">LLDB: Low Level Debugger</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000182</h3>
Chris Lattnere07043c2010-09-29 05:30:03 +0000183
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000184<div>
Michael J. Spencer60f790c2011-11-28 18:20:09 +0000185
Benjamin Kramerabe446c2012-05-13 10:21:51 +0000186<p><a href="http://lldb.llvm.org">LLDB</a> is a ground-up implementation of a
187 command line debugger, as well as a debugger API that can be used from other
188 applications. LLDB makes use of the Clang parser to provide high-fidelity
189 expression parsing (particularly for C++) and uses the LLVM JIT for target
190 support.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000191
Chris Lattnere07043c2010-09-29 05:30:03 +0000192</div>
193
194<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000195<h3>
Chris Lattnere07043c2010-09-29 05:30:03 +0000196<a name="libc++">libc++: C++ Standard Library</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000197</h3>
Chris Lattnere07043c2010-09-29 05:30:03 +0000198
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000199<div>
Chris Lattnere07043c2010-09-29 05:30:03 +0000200
Bill Wendling7b7fa742011-10-26 18:46:16 +0000201<p>Like compiler_rt, libc++ is now <a href="DeveloperPolicy.html#license">dual
202 licensed</a> under the MIT and UIUC license, allowing it to be used more
203 permissively.</p>
Chris Lattnere07043c2010-09-29 05:30:03 +0000204
David Chisnall6dd3bdb2012-05-15 13:06:46 +0000205<p>Within the LLVM 3.1 time-frame there were the following highlights:</p>
206
207<ul>
208 <li>The <code>&lt;atomic&gt;</code> header is now passing all tests, when
209 compiling with clang and linking against the support code from
210 compiler-rt.</li>
211 <li>FreeBSD now includes libc++ as part of the base system.</li>
212 <li>libc++ has been ported to Solaris and, in combination with libcxxrt and
213 clang, is working with a large body of existing code.</li>
214</ul>
215
Chris Lattnere07043c2010-09-29 05:30:03 +0000216</div>
217
Chris Lattner3d6a80a2011-04-07 03:08:22 +0000218<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000219<h3>
Chris Lattner3d6a80a2011-04-07 03:08:22 +0000220<a name="vmkit">VMKit</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000221</h3>
Chris Lattner3d6a80a2011-04-07 03:08:22 +0000222
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000223<div>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000224
Bill Wendling1fefd092012-05-14 08:11:53 +0000225<p>The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation
226 of a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and
227 just-in-time compilation.</p>
Nicolas Geoffray54d5df92011-11-10 23:37:56 +0000228
Bill Wendling1fefd092012-05-14 08:11:53 +0000229<p>In the LLVM 3.1 time-frame, VMKit has had significant improvements on both
230 runtime and startup performance.</p>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000231
Chris Lattner3d6a80a2011-04-07 03:08:22 +0000232</div>
Michael J. Spencer60f790c2011-11-28 18:20:09 +0000233
Tobias Grosser76213b82012-04-16 17:17:00 +0000234
235<!--=========================================================================-->
236<h3>
Tobias Grosser99a0b282012-04-16 17:18:49 +0000237<a name="Polly">Polly: Polyhedral Optimizer</a>
Tobias Grosser76213b82012-04-16 17:17:00 +0000238</h3>
239
240<div>
241
Bill Wendling1fefd092012-05-14 08:11:53 +0000242<p><a href="http://polly.llvm.org/">Polly</a> is an <em>experimental</em>
Tobias Grosser76213b82012-04-16 17:17:00 +0000243 optimizer for data locality and parallelism. It currently provides high-level
244 loop optimizations and automatic parallelisation (using the OpenMP run time).
245 Work in the area of automatic SIMD and accelerator code generation was
Bill Wendling1fefd092012-05-14 08:11:53 +0000246 started.</p>
Tobias Grosser76213b82012-04-16 17:17:00 +0000247
Bill Wendling1fefd092012-05-14 08:11:53 +0000248<p>Within the LLVM 3.1 time-frame there were the following highlights:</p>
Tobias Grosser76213b82012-04-16 17:17:00 +0000249
Bill Wendling1fefd092012-05-14 08:11:53 +0000250<ul>
Tobias Grosser76213b82012-04-16 17:17:00 +0000251 <li>Polly became an official LLVM project</li>
Bill Wendling1fefd092012-05-14 08:11:53 +0000252 <li>Polly can be loaded directly into clang (enabled by '-O3 -mllvm -polly')</li>
253 <li>An automatic scheduling optimizer (derived
254 from <a href="http://pluto-compiler.sourceforge.net/">Pluto</a>) was
255 integrated. It performs loop transformations to optimize for data-locality
256 and parallelism. The transformations include, but are not limited to
257 interchange, fusion, fission, skewing and tiling.</li>
258</ul>
Tobias Grosser76213b82012-04-16 17:17:00 +0000259
260</div>
261
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000262</div>
Daniel Dunbar97b01a82010-10-04 17:39:47 +0000263
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000264<!-- *********************************************************************** -->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000265<h2>
Chris Lattner21e1b7a2011-12-13 17:55:30 +0000266 <a name="externalproj">External Open Source Projects Using LLVM 3.1</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000267</h2>
Chris Lattnerab68e9e2009-02-26 22:33:38 +0000268<!-- *********************************************************************** -->
269
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000270<div>
Chris Lattner61358ab2009-10-13 17:48:04 +0000271
272<p>An exciting aspect of LLVM is that it is used as an enabling technology for
273 a lot of other language and tools projects. This section lists some of the
Chris Lattner21e1b7a2011-12-13 17:55:30 +0000274 projects that have already been updated to work with LLVM 3.1.</p>
Chris Lattner75547712010-10-03 23:49:06 +0000275
Bill Wendlinged0ab542012-05-15 20:47:23 +0000276<h3>Crack</h3>
277
278<div>
279
280<p><a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide
281 the ease of development of a scripting language with the performance of a
282 compiled language. The language derives concepts from C++, Java and Python,
283 incorporating object-oriented programming, operator overloading and strong
284 typing.</p>
285
286</div>
287
Bill Wendlingf8cfe2e2012-05-13 09:52:48 +0000288<h3>FAUST</h3>
289
290<div>
291
Benjamin Kramerabe446c2012-05-13 10:21:51 +0000292<p><a href="http://faust.grame.fr/">FAUST</a> is a compiled language for
293 real-time audio signal processing. The name FAUST stands for Functional
294 AUdio STream. Its programming model combines two approaches: functional
295 programming and block diagram composition. In addition with the C, C++, Java,
296 JavaScript output formats, the Faust compiler can generate LLVM bitcode, and
297 works with LLVM 2.7-3.1.</p>
Bill Wendlingf8cfe2e2012-05-13 09:52:48 +0000298
299</div>
300
Bill Wendlingde86bea2012-05-11 21:42:37 +0000301<h3>Glasgow Haskell Compiler (GHC)</h3>
302
303<div>
304
Benjamin Kramerabe446c2012-05-13 10:21:51 +0000305<p><a href="http://www.haskell.org/ghc/">GHC</a> is an open source compiler and
306 programming suite for Haskell, a lazy functional programming language. It
307 includes an optimizing static compiler generating good code for a variety of
308 platforms, together with an interactive system for convenient, quick
309 development.</p>
Bill Wendlingde86bea2012-05-11 21:42:37 +0000310
311<p>GHC 7.0 and onwards include an LLVM code generator, supporting LLVM 2.8 and
312 later.</p>
313
314</div>
315
Bill Wendlinge9a73bb2012-05-14 06:23:51 +0000316<h3>Julia</h3>
317
318<div>
319
320<p><a href="https://github.com/JuliaLang/julia">Julia</a> is a high-level,
321 high-performance dynamic language for technical computing. It provides a
322 sophisticated compiler, distributed parallel execution, numerical accuracy,
323 and an extensive mathematical function library. The compiler uses type
324 inference to generate fast code without any type declarations, and uses
325 LLVM's optimization passes and JIT compiler. The
326 <a href="http://julialang.org/"> Julia Language</a> is designed
327 around multiple dispatch, giving programs a large degree of flexibility. It
328 is ready for use on many kinds of problems.</p>
329
330</div>
331
Bill Wendlingf2f92ba2012-05-13 10:00:58 +0000332<h3>LLVM D Compiler</h3>
333
334<div>
335
336<p><a href="https://github.com/ldc-developers/ldc">LLVM D Compiler</a> (LDC) is
337 a compiler for the D programming Language. It is based on the DMD frontend
338 and uses LLVM as backend.</p>
339
340</div>
341
Bill Wendling91071052012-05-13 09:55:24 +0000342<h3>Open Shading Language</h3>
343
344<div>
345
Benjamin Kramerabe446c2012-05-13 10:21:51 +0000346<p><a href="https://github.com/imageworks/OpenShadingLanguage/">Open Shading
347 Language (OSL)</a> is a small but rich language for programmable shading in
348 advanced global illumination renderers and other applications, ideal for
349 describing materials, lights, displacement, and pattern generation. It uses
350 LLVM to JIT complex shader networks to x86 code at runtime.</p>
Bill Wendling91071052012-05-13 09:55:24 +0000351
352<p>OSL was developed by Sony Pictures Imageworks for use in its in-house
353 renderer used for feature film animation and visual effects, and is
Benjamin Kramerabe446c2012-05-13 10:21:51 +0000354 distributed as open source software with the "New BSD" license.</p>
Bill Wendling91071052012-05-13 09:55:24 +0000355
356</div>
357
Bill Wendling59a23e32012-05-13 09:59:27 +0000358<h3>Portable OpenCL (pocl)</h3>
359
360<div>
361
362<p>In addition to producing an easily portable open source OpenCL
Benjamin Kramerabe446c2012-05-13 10:21:51 +0000363 implementation, another major goal of <a href="http://pocl.sourceforge.net/">
364 pocl</a> is improving performance portability of OpenCL programs with
365 compiler optimizations, reducing the need for target-dependent manual
366 optimizations. An important part of pocl is a set of LLVM passes used to
367 statically parallelize multiple work-items with the kernel compiler, even in
368 the presence of work-group barriers. This enables static parallelization of
369 the fine-grained static concurrency in the work groups in multiple ways
370 (SIMD, VLIW, superscalar,...).</p>
Bill Wendling59a23e32012-05-13 09:59:27 +0000371
372</div>
373
Bill Wendlingde86bea2012-05-11 21:42:37 +0000374<h3>Pure</h3>
375
376<div>
377
Bill Wendling015d2ad2012-05-11 22:38:33 +0000378<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
379 algebraic/functional programming language based on term rewriting. Programs
380 are collections of equations which are used to evaluate expressions in a
381 symbolic fashion. The interpreter uses LLVM as a backend to JIT-compile Pure
382 programs to fast native code. Pure offers dynamic typing, eager and lazy
383 evaluation, lexical closures, a hygienic macro system (also based on term
384 rewriting), built-in list and matrix support (including list and matrix
385 comprehensions) and an easy-to-use interface to C and other programming
386 languages (including the ability to load LLVM bitcode modules, and inline C,
387 C++, Fortran and Faust code in Pure programs if the corresponding
388 LLVM-enabled compilers are installed).</p>
Bill Wendlingde86bea2012-05-11 21:42:37 +0000389
390<p>Pure version 0.54 has been tested and is known to work with LLVM 3.1 (and
391 continues to work with older LLVM releases >= 2.5).</p>
392
393</div>
Bill Wendling644ce532011-10-26 09:25:01 +0000394
Bill Wendling59a23e32012-05-13 09:59:27 +0000395<h3>TTA-based Co-design Environment (TCE)</h3>
396
397<div>
398
Benjamin Kramerabe446c2012-05-13 10:21:51 +0000399<p><a href="http://tce.cs.tut.fi/">TCE</a> is a toolset for designing
400 application-specific processors (ASP) based on the Transport triggered
401 architecture (TTA). The toolset provides a complete co-design flow from C/C++
402 programs down to synthesizable VHDL/Verilog and parallel program binaries.
403 Processor customization points include the register files, function units,
404 supported operations, and the interconnection network.</p>
Bill Wendling59a23e32012-05-13 09:59:27 +0000405
406<p>TCE uses Clang and LLVM for C/C++ language support, target independent
407 optimizations and also for parts of code generation. It generates new
408 LLVM-based code generators "on the fly" for the designed TTA processors and
409 loads them in to the compiler backend as runtime libraries to avoid
410 per-target recompilation of larger parts of the compiler chain.</p>
411
412</div>
413
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000414</div>
415
Chris Lattner8348b472008-06-08 21:58:17 +0000416<!-- *********************************************************************** -->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000417<h2>
Chris Lattner21e1b7a2011-12-13 17:55:30 +0000418 <a name="whatsnew">What's New in LLVM 3.1?</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000419</h2>
Chris Lattner8348b472008-06-08 21:58:17 +0000420<!-- *********************************************************************** -->
421
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000422<div>
Chris Lattnerf8e0b4e2008-06-08 22:59:35 +0000423
Chris Lattner61358ab2009-10-13 17:48:04 +0000424<p>This release includes a huge number of bug fixes, performance tweaks and
Bill Wendling7b7fa742011-10-26 18:46:16 +0000425 minor improvements. Some of the major improvements and new features are
426 listed in this section.</p>
Chris Lattner61358ab2009-10-13 17:48:04 +0000427
Chris Lattner914ce462010-04-22 06:28:20 +0000428<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000429<h3>
Chris Lattner252b83d2008-02-06 18:00:06 +0000430<a name="majorfeatures">Major New Features</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000431</h3>
Chris Lattner252b83d2008-02-06 18:00:06 +0000432
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000433<div>
Chris Lattner252b83d2008-02-06 18:00:06 +0000434
Chris Lattner1ab8ce92011-11-27 18:47:37 +0000435 <!-- Features that need text if they're finished for 3.1:
436 ARM EHABI
437 combiner-aa?
438 strong phi elim
439 loop dependence analysis
440 CorrelatedValuePropagation
441 lib/Transforms/IPO/MergeFunctions.cpp => consider for 3.1.
Chris Lattner1c80fbf2011-11-27 20:51:47 +0000442 Integrated assembler on by default for arm/thumb?
443
Chris Lattner1ab8ce92011-11-27 18:47:37 +0000444 -->
445
Chris Lattner1c80fbf2011-11-27 20:51:47 +0000446 <!-- Near dead:
Chris Lattnerdec23b62011-11-15 22:13:27 +0000447 Analysis/RegionInfo.h + Dom Frontiers
448 SparseBitVector: used in LiveVar.
Chris Lattner5a1731d2011-11-27 08:32:32 +0000449 llvm/lib/Archive - replace with lib object?
Chris Lattner1c80fbf2011-11-27 20:51:47 +0000450 -->
Chris Lattner6a007d12011-11-25 20:33:27 +0000451
Chris Lattner21e1b7a2011-12-13 17:55:30 +0000452<p>LLVM 3.1 includes several major changes and big features:</p>
Bill Wendlingbc5f6dd2011-10-26 18:33:01 +0000453
Chris Lattner791f77b2008-06-05 06:25:56 +0000454<ul>
Evan Cheng28681862011-12-14 22:57:45 +0000455 <li><a href="../tools/clang/docs/AddressSanitizer.html">AddressSanitizer</a>,
456 a fast memory error detector.</li>
457 <li><a href="CodeGenerator.html#machineinstrbundle">MachineInstr Bundles</a>,
458 Support to model instruction bundling / packing.</li>
Jim Grosbach6e6b8222012-02-23 23:52:06 +0000459 <li><a href="#armintegratedassembler">ARM Integrated Assembler</a>,
460 A full featured assembler and direct-to-object support for ARM.</li>
Chandler Carruth268fde42012-04-17 01:10:35 +0000461 <li><a href="#blockplacement">Basic Block Placement</a>
462 Probability driven basic block placement.</li>
Chris Lattnerf304ffc2008-02-10 08:17:19 +0000463</ul>
Mikhail Glushenkovea65d7d2008-10-13 02:08:34 +0000464
Bill Wendlingbc5f6dd2011-10-26 18:33:01 +0000465</div>
466
Michael J. Spencer60f790c2011-11-28 18:20:09 +0000467
Chris Lattner4f0fe432011-11-27 19:26:30 +0000468<!--=========================================================================-->
469<h3>
470<a name="coreimprovements">LLVM IR and Core Improvements</a>
471</h3>
472
473<div>
474
475<p>LLVM IR has several new features for better support of new targets and that
476 expose new optimization opportunities:</p>
477
Bill Wendling1fefd092012-05-14 08:11:53 +0000478<ul>
479 <li>A new type representing 16 bit <i>half</i> floating point values has
480 been added.</li>
481 <li>IR now supports vectors of pointers, including vector GEPs.</li>
482 <li>Module flags have been introduced. They convey information about the
483 module as a whole to LLVM subsystems. This is currently used to encode
484 Objective C ABI information.</li>
485 <li>Loads can now have range metadata attached to them to describe the
486 possible values being loaded.</li>
487 <li>The <tt>llvm.ctlz</tt> and <tt>llvm.cttz</tt> intrinsics now have an
488 additional argument which indicates whether the behavior of the intrinsic
489 is undefined on a zero input. This can be used to generate more efficient
490 code on platforms that only have instructions which don't return the type
491 size when counting bits in 0.</li>
492</ul>
493
Andrew Trick5aab6382011-11-06 17:59:24 +0000494</div>
495
496<!--=========================================================================-->
497<h3>
Chris Lattneracce85d2008-02-10 07:46:44 +0000498<a name="optimizer">Optimizer Improvements</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000499</h3>
Chris Lattneracce85d2008-02-10 07:46:44 +0000500
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000501<div>
Chris Lattneracce85d2008-02-10 07:46:44 +0000502
Chris Lattner064caf92011-11-27 21:30:28 +0000503<p>In addition to many minor performance tweaks and bug fixes, this
Bill Wendling7b7fa742011-10-26 18:46:16 +0000504 release includes a few major enhancements and additions to the
505 optimizers:</p>
Chris Lattneracce85d2008-02-10 07:46:44 +0000506
507<ul>
Brendon Cahoonff730392012-04-14 16:54:12 +0000508 <li>The loop unroll pass now is able to unroll loops with run-time trip counts.
509 This feature is turned off by default, and is enabled with the
510 <code>-unroll-runtime</code> flag.</li>
Hal Finkel9068bf52012-04-16 03:49:43 +0000511 <li>A new basic-block autovectorization pass is available. Pass
512 <code>-vectorize</code> to run this pass along with some associated
Hal Finkel12c10b32012-04-16 17:06:49 +0000513 post-vectorization cleanup passes. For more information, see the EuroLLVM
514 2012 slides: <a href="http://llvm.org/devmtg/2012-04-12/Slides/Hal_Finkel.pdf">
515 Autovectorization with LLVM</a>.</li>
Benjamin Kramerf26b4152012-05-13 12:01:16 +0000516 <li>Inline cost heuristics have been completely overhauled and now closely
517 model constant propagation through call sites, disregard trivially dead
518 code costs, and can model C++ STL iterator patterns.</li>
Chris Lattner11b66112010-10-04 02:42:39 +0000519</ul>
520
Chris Lattner61358ab2009-10-13 17:48:04 +0000521</div>
Chris Lattner917cc712009-03-02 02:37:32 +0000522
Chris Lattner0b832202008-06-08 02:45:07 +0000523<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000524<h3>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000525<a name="mc">MC Level Improvements</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000526</h3>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000527
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000528<div>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000529
530<p>The LLVM Machine Code (aka MC) subsystem was created to solve a number of
531 problems in the realm of assembly, disassembly, object file format handling,
532 and a number of other related areas that CPU instruction-set level tools work
Chris Lattner2f206022011-11-27 22:03:34 +0000533 in. For more information, please see
534 the <a href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro
535 to the LLVM MC Project Blog Post</a>.</p>
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000536
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000537<ul>
Benjamin Kramerf26b4152012-05-13 12:01:16 +0000538 <li>The integrated assembler can optionally emit debug information when
539 assembling a </tt>.s</tt> file. It can be enabled by passing the
540 <tt>-g</tt> option to <tt>llvm-mc</tt>.</li>
Chris Lattner7d9b6b42010-10-02 21:59:30 +0000541</ul>
542
NAKAMURA Takumi45c435a2011-04-05 08:24:22 +0000543</div>
Chris Lattner4ba2b652010-09-30 16:31:33 +0000544
Chris Lattner4ba2b652010-09-30 16:31:33 +0000545<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000546<h3>
Chris Lattner511433e2009-03-02 03:24:11 +0000547<a name="codegen">Target Independent Code Generator Improvements</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000548</h3>
Chris Lattner0b832202008-06-08 02:45:07 +0000549
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000550<div>
Chris Lattner0b832202008-06-08 02:45:07 +0000551
Bill Wendling190ec9b2012-02-16 10:23:43 +0000552<p>We have changed the way that the Type Legalizer legalizes vectors. The type
553 legalizer now attempts to promote integer elements. This enabled the
554 implementation of vector-select. Additionally, we see a performance boost on
555 workloads which use vectors of chars and shorts, since they are now promoted
556 to 32-bit types, which are better supported by the SIMD instruction set.
557 Floating point types are still widened as before.</p>
Nadav Rotem75597662011-12-20 08:02:50 +0000558
559
Mikhail Glushenkovf795ef02009-03-01 18:09:47 +0000560<p>We have put a significant amount of work into the code generator
Bill Wendling7b7fa742011-10-26 18:46:16 +0000561 infrastructure, which allows us to implement more aggressive algorithms and
562 make it run faster:</p>
Chris Lattner0b832202008-06-08 02:45:07 +0000563
564<ul>
Jakob Stoklund Olesen9897c622011-12-19 16:53:40 +0000565 <li>TableGen can now synthesize register classes that are only needed to
Bill Wendling190ec9b2012-02-16 10:23:43 +0000566 represent combinations of constraints from instructions and sub-registers.
567 The synthetic register classes inherit most of their properties form their
568 closest user-defined super-class.</li>
Jakob Stoklund Olesend9e5c762012-01-05 00:26:49 +0000569 <li><code>MachineRegisterInfo</code> now allows the reserved registers to be
Bill Wendling190ec9b2012-02-16 10:23:43 +0000570 frozen when register allocation starts. Target hooks should use the
Nadav Rotemfdc309c2012-02-26 08:35:53 +0000571 <code>MRI-&gt;canReserveReg(FramePtr)</code> method to avoid accidentally
Bill Wendling190ec9b2012-02-16 10:23:43 +0000572 disabling frame pointer elimination during register allocation.</li>
Jakob Stoklund Olesen7739cad2012-01-16 19:22:00 +0000573 <li>A new kind of <code>MachineOperand</code> provides a compact
Bill Wendling190ec9b2012-02-16 10:23:43 +0000574 representation of large clobber lists on call instructions. The register
575 mask operand references a bit mask of preserved registers. Everything else
576 is clobbered.</li>
Benjamin Kramer3a2d5652012-05-13 13:10:35 +0000577 <li>The DWARF debug info writer gained support for emitting data for the
578 <a href="SourceLevelDebugging.html#acceltable">name accelerator tables
579 DWARF extension</a>. It is used by LLDB to speed up name lookup.</li>
Chris Lattner84977642007-09-21 03:54:09 +0000580</ul>
Bill Wendling190ec9b2012-02-16 10:23:43 +0000581
Anshuman Dasgupta4b479552012-04-12 15:17:35 +0000582<p> We added new TableGen infrastructure to support bundling for
583 Very Long Instruction Word (VLIW) architectures. TableGen can now
584 automatically generate a deterministic finite automaton from a VLIW
585 target's schedule description which can be queried to determine
586 legal groupings of instructions in a bundle.</p>
587
Anshuman Dasgupta3c1ded22012-04-14 20:59:13 +0000588<p> We have added a new target independent VLIW packetizer based on the
Anshuman Dasguptacff391a2012-04-14 20:57:13 +0000589 DFA infrastructure to group machine instructions into bundles.</p>
590
Chris Lattner84977642007-09-21 03:54:09 +0000591</div>
592
Chandler Carruth268fde42012-04-17 01:10:35 +0000593<h4>
594<a name="blockplacement">Basic Block Placement</a>
595</h4>
596<div>
597<p>A probability based block placement and code layout algorithm was added to
598LLVM's code generator. This layout pass supports probabilities derived from
599static heuristics as well as source code annotations such as
600<code>__builtin_expect</code>.</p>
601</div>
602
Chris Lattner917cc712009-03-02 02:37:32 +0000603<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000604<h3>
Chris Lattner917cc712009-03-02 02:37:32 +0000605<a name="x86">X86-32 and X86-64 Target Improvements</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000606</h3>
Chris Lattner917cc712009-03-02 02:37:32 +0000607
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000608<div>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000609
610<p>New features and major changes in the X86 target include:</p>
Chris Lattner917cc712009-03-02 02:37:32 +0000611
612<ul>
Benjamin Kramer3a2d5652012-05-13 13:10:35 +0000613 <li>Greatly improved support for AVX2.</li>
614 <li>Lots of bug fixes and improvements for AVX1.</li>
615 <li>Support for the FMA4 and XOP instruction set extensions.</li>
Jakob Stoklund Olesen26246612012-02-16 18:22:39 +0000616 <li>Call instructions use the new register mask operands for faster compile
617 times and better support for different calling conventions. The old WINCALL
618 instructions are no longer needed.</li>
NAKAMURA Takumi847307a2012-04-07 02:24:20 +0000619 <li>DW2 Exception Handling is enabled on Cygwin and MinGW.</li>
Benjamin Kramer3a2d5652012-05-13 13:10:35 +0000620 <li>Support for implicit TLS model used with MSVC runtime.</li>
Chris Lattner917cc712009-03-02 02:37:32 +0000621</ul>
622
Chris Lattner917cc712009-03-02 02:37:32 +0000623</div>
Chris Lattner84977642007-09-21 03:54:09 +0000624
625<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000626<h3>
Chris Lattner61358ab2009-10-13 17:48:04 +0000627<a name="ARM">ARM Target Improvements</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000628</h3>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000629
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000630<div>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000631
632<p>New features of the ARM target include:</p>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000633
634<ul>
Jakob Stoklund Olesenf5bb45f2011-12-16 16:07:41 +0000635 <li>The constant island pass now supports basic block and constant pool entry
Jim Grosbach6e6b8222012-02-23 23:52:06 +0000636 alignments greater than 4 bytes.</li>
637 <li>On Darwin, the ARM target now has a full-featured integrated assembler.
638 </li>
639</ul>
Chris Lattner7b95c382011-11-15 22:23:46 +0000640
Jim Grosbach6e6b8222012-02-23 23:52:06 +0000641<h4>
642<a name="armintegratedassembler">ARM Integrated Assembler</a>
643</h4>
644<div>
645<p>The ARM target now includes a full featured macro assembler, including
646direct-to-object module support for clang. The assembler is currently enabled
647by default for Darwin only pending testing and any additional necessary
648platform specific support for Linux.</p>
Michael J. Spencer60f790c2011-11-28 18:20:09 +0000649
Jim Grosbach6e6b8222012-02-23 23:52:06 +0000650<p>Full support is included for Thumb1, Thumb2 and ARM modes, along with
651subtarget and CPU specific extensions for VFP2, VFP3 and NEON.</p>
652
653<p>The assembler is Unified Syntax only (see ARM Architecural Reference Manual
654for details). While there is some, and growing, support for pre-unfied (divided)
655syntax, there are still significant gaps in that support.</p>
656</div>
NAKAMURA Takumi9c55f592012-03-27 11:25:16 +0000657
658</div>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000659<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000660<h3>
Akira Hatanaka5381cbf2011-11-15 21:33:05 +0000661<a name="MIPS">MIPS Target Improvements</a>
662</h3>
663
664<div>
Akira Hatanaka19e74212012-05-14 18:40:07 +0000665New features and major changes in the MIPS target include:</p>
Akira Hatanaka5381cbf2011-11-15 21:33:05 +0000666
667<ul>
Akira Hatanaka19e74212012-05-14 18:40:07 +0000668 <li>MIPS32 little-endian direct object code emission is functional.</li>
669 <li>MIPS64 little-endian code generation is largely functional for N64 ABI in assembly printing mode with the exception of handling of long double (f128) type.</li>
670 <li>Support for new instructions has been added, which includes swap-bytes
671 instructions (WSBH and DSBH), floating point multiply-add/subtract and
672 negative multiply-add/subtract instructions, and floating
673 point load/store instructions with reg+reg addressing (LWXC1, etc.)</li>
674 <li>Various fixes to improve performance have been implemented.</li>
675 <li>Post-RA scheduling is now enabled at -O3.</li>
676 <li>Support for soft-float code generation has been added.</li>
Akira Hatanaka6ed743e2012-05-15 20:06:41 +0000677 <li>clang driver's support for MIPS 64-bits targets.</li>
678 <li>Support for MIPS floating point ABI option in clang driver.</li>
Akira Hatanaka5381cbf2011-11-15 21:33:05 +0000679</ul>
680</div>
Chris Lattner7b95c382011-11-15 22:23:46 +0000681
682<!--=========================================================================-->
683<h3>
Justin Holewinskidc23c142012-05-13 17:32:35 +0000684<a name="PTX">PTX Target Improvements</a>
685</h3>
686
687<div>
688
689<p>An outstanding conditional inversion bug was fixed in this release.</p>
690
691<p><b>NOTE</b>: LLVM 3.1 marks the last release of the PTX back-end, in its
692 current form. The back-end is currently being replaced by the NVPTX
693 back-end, currently in SVN ToT.</p>
694
695</div>
696
697<!--=========================================================================-->
698<h3>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000699<a name="OtherTS">Other Target Specific Improvements</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000700</h3>
Chris Lattnerc441fb82009-03-01 02:30:21 +0000701
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000702<div>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000703
Chris Lattner1efe27e2011-04-06 00:45:11 +0000704<ul>
Bill Wendling1fefd092012-05-14 08:11:53 +0000705 <li>Support for Qualcomm's Hexagon VLIW processor has been added.</li>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000706</ul>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000707
Chris Lattner1efe27e2011-04-06 00:45:11 +0000708</div>
Chris Lattner77d29b12008-06-05 08:02:49 +0000709
710<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000711<h3>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000712<a name="changes">Major Changes and Removed Features</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000713</h3>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000714
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000715<div>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000716
Bill Wendling2626dba2011-08-03 22:18:20 +0000717<p>If you're already an LLVM user or developer with out-of-tree changes based on
Chris Lattner21e1b7a2011-12-13 17:55:30 +0000718 LLVM 3.1, this section lists some "gotchas" that you may run into upgrading
Bill Wendling2626dba2011-08-03 22:18:20 +0000719 from the previous release.</p>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000720
721<ul>
Benjamin Kramer2fb68012012-05-13 11:46:05 +0000722 <li>LLVM's build system now requires a python 2 interpreter to be present at
723 build time. A perl interpreter is no longer required.</li>
Benjamin Kramer5fdfaf52012-05-13 11:28:46 +0000724 <li>The C backend has been removed. It had numerous problems, to the point of
725 not being able to compile any nontrivial program.</li>
726 <li>The Alpha, Blackfin and SystemZ targets have been removed due to lack of
727 maintenance.</li>
Bill Wendling190ec9b2012-02-16 10:23:43 +0000728 <li>LLVM 3.1 removes support for reading LLVM 2.9 bitcode files. Going
729 forward, we aim for all future versions of LLVM to read bitcode files and
730 <tt>.ll</tt> files produced by LLVM 3.0 and later.</li>
731 <li>The <tt>unwind</tt> instruction is now gone. With the introduction of the
732 new exception handling system in LLVM 3.0, the <tt>unwind</tt> instruction
733 became obsolete.</li>
Joerg Sonnenbergerdba86d82012-04-26 20:10:07 +0000734 <li>LLVM 3.0 and earlier automatically added the returns_twice fo functions
735 like setjmp based on the name. This functionality was removed in 3.1.
736 This affects Clang users, if -ffreestanding is used.</li>
Devang Patelb34dd132008-10-14 20:03:43 +0000737</ul>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000738
Chris Lattnerf6662f92008-10-13 17:57:36 +0000739</div>
740
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000741<!--=========================================================================-->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000742<h3>
Chris Lattner1efe27e2011-04-06 00:45:11 +0000743<a name="api_changes">Internal API Changes</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000744</h3>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000745
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000746<div>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000747
Chris Lattner1efe27e2011-04-06 00:45:11 +0000748<p>In addition, many APIs have changed in this release. Some of the major
Bill Wendling16005252011-08-02 06:20:17 +0000749 LLVM API changes are:</p>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000750
751<ul>
Nick Lewycky98a92d12012-03-21 22:58:28 +0000752 <li>Target specific options have been moved from global variables to members
753 on the new <code>TargetOptions</code> class, which is local to each
754 <code>TargetMachine</code>. As a consequence, the associated flags will
755 no longer be accepted by <tt>clang -mllvm</tt>. This includes:
756<ul>
Nick Lewycky8a618a22012-03-23 00:56:26 +0000757<li><code>llvm::PrintMachineCode</code></li>
758<li><code>llvm::NoFramePointerElim</code></li>
759<li><code>llvm::NoFramePointerElimNonLeaf</code></li>
760<li><code>llvm::DisableFramePointerElim(const MachineFunction &)</code></li>
761<li><code>llvm::LessPreciseFPMADOption</code></li>
762<li><code>llvm::LessPrecideFPMAD()</code></li>
763<li><code>llvm::NoExcessFPPrecision</code></li>
764<li><code>llvm::UnsafeFPMath</code></li>
765<li><code>llvm::NoInfsFPMath</code></li>
766<li><code>llvm::NoNaNsFPMath</code></li>
767<li><code>llvm::HonorSignDependentRoundingFPMathOption</code></li>
768<li><code>llvm::HonorSignDependentRoundingFPMath()</code></li>
769<li><code>llvm::UseSoftFloat</code></li>
770<li><code>llvm::FloatABIType</code></li>
771<li><code>llvm::NoZerosInBSS</code></li>
772<li><code>llvm::JITExceptionHandling</code></li>
773<li><code>llvm::JITEmitDebugInfo</code></li>
774<li><code>llvm::JITEmitDebugInfoToDisk</code></li>
775<li><code>llvm::GuaranteedTailCallOpt</code></li>
776<li><code>llvm::StackAlignmentOverride</code></li>
777<li><code>llvm::RealignStack</code></li>
778<li><code>llvm::DisableJumpTables</code></li>
779<li><code>llvm::EnableFastISel</code></li>
780<li><code>llvm::getTrapFunctionName()</code></li>
781<li><code>llvm::EnableSegmentedStacks</code></li>
Nick Lewycky98a92d12012-03-21 22:58:28 +0000782</ul></li>
Bill Wendling1fefd092012-05-14 08:11:53 +0000783
784 <li>The <code>MDBuilder</code> class has been added to simplify the creation
785 of metadata.</li>
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000786</ul>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000787
Daniel Dunbarf0233c62010-10-04 20:11:41 +0000788</div>
Chris Lattnerf6662f92008-10-13 17:57:36 +0000789
Nadav Rotemfdc309c2012-02-26 08:35:53 +0000790<!--=========================================================================-->
791<h3>
792<a name="tools_changes">Tools Changes</a>
793</h3>
794
795<div>
796
797<p>In addition, some tools have changed in this release. Some of the changes
798 are:</p>
799
800
801<ul>
Benjamin Kramer5fdfaf52012-05-13 11:28:46 +0000802 <li><tt>llvm-stress</tt> is a command line tool for generating random
803 <tt>.ll</tt> files to fuzz different LLVM components. </li>
804 <li>The <tt>llvm-ld</tt> tool has been removed. The clang driver provides a
805 more reliable solution for turning a set of bitcode files into a binary.
806 To merge bitcode files <tt>llvm-link</tt> can be used instead.</li>
Nadav Rotemfdc309c2012-02-26 08:35:53 +0000807</ul>
808
809</div>
810
Gregory Szorcca347492012-05-12 21:12:22 +0000811
812<!--=========================================================================-->
813<h3>
814<a name="python">Python Bindings</a>
815</h3>
816
817<div>
818
819<p>Officially supported Python bindings have been added! Feature support is far
820from complete. The current bindings support interfaces to:</p>
821<ul>
822 <li>Object File Interface</li>
823 <li>Disassembler</li>
824</ul>
825
826<p>Using the Object File Interface, it is possible to inspect binary object files.
827Think of it as a Python version of readelf or llvm-objdump.</p>
828
829<p>Support for additional features is currently being developed by community
830contributors. If you are interested in shaping the direction of the Python
831bindings, please express your intent on IRC or the developers list.</p>
832
833</div>
834
Nadav Rotemfdc309c2012-02-26 08:35:53 +0000835</div>
836
Chris Lattner79c3fe12003-10-02 04:57:28 +0000837<!-- *********************************************************************** -->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000838<h2>
Misha Brukman500bc302003-11-22 00:38:41 +0000839 <a name="knownproblems">Known Problems</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000840</h2>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000841<!-- *********************************************************************** -->
842
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000843<div>
Misha Brukman500bc302003-11-22 00:38:41 +0000844
Chris Lattner70e22012011-11-27 19:38:20 +0000845<p>LLVM is generally a production quality compiler, and is used by a broad range
846 of applications and shipping in many products. That said, not every
847 subsystem is as mature as the aggregate, particularly the more obscure
848 targets. If you run into a problem, please check the <a
849 href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
850 there isn't already one or ask on the <a
851 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev
852 list</a>.</p>
Michael J. Spencer60f790c2011-11-28 18:20:09 +0000853
Chris Lattner70e22012011-11-27 19:38:20 +0000854 <p>Known problem areas include:</p>
Michael J. Spencer60f790c2011-11-28 18:20:09 +0000855
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000856<ul>
Benjamin Kramer5fdfaf52012-05-13 11:28:46 +0000857 <li>The CellSPU, MSP430, PTX and XCore backends are experimental.</li>
Bill Wendling7b7fa742011-10-26 18:46:16 +0000858
Chris Lattner70e22012011-11-27 19:38:20 +0000859 <li>The integrated assembler, disassembler, and JIT is not supported by
860 several targets. If an integrated assembler is not supported, then a
861 system assembler is required. For more details, see the <a
862 href="CodeGenerator.html#targetfeatures">Target Features Matrix</a>.
863 </li>
Chris Lattner26299222006-11-18 07:51:14 +0000864</ul>
865
866</div>
John Criswellc0c186d2005-11-08 21:11:33 +0000867
Chris Lattner79c3fe12003-10-02 04:57:28 +0000868<!-- *********************************************************************** -->
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000869<h2>
Misha Brukman500bc302003-11-22 00:38:41 +0000870 <a name="additionalinfo">Additional Information</a>
NAKAMURA Takumi06c6d9a2011-04-18 01:17:51 +0000871</h2>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000872<!-- *********************************************************************** -->
873
NAKAMURA Takumi074eeaa2011-04-21 01:52:00 +0000874<div>
Misha Brukman500bc302003-11-22 00:38:41 +0000875
Bill Wendling7b7fa742011-10-26 18:46:16 +0000876<p>A wide variety of additional information is available on
877 the <a href="http://llvm.org/">LLVM web page</a>, in particular in
878 the <a href="http://llvm.org/docs/">documentation</a> section. The web page
879 also contains versions of the API documentation which is up-to-date with the
880 Subversion version of the source code. You can access versions of these
881 documents specific to this release by going into the "<tt>llvm/doc/</tt>"
882 directory in the LLVM tree.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000883
Misha Brukman500bc302003-11-22 00:38:41 +0000884<p>If you have any questions or comments about LLVM, please feel free to contact
Bill Wendling7b7fa742011-10-26 18:46:16 +0000885 us via the <a href="http://llvm.org/docs/#maillist"> mailing lists</a>.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000886
Misha Brukman500bc302003-11-22 00:38:41 +0000887</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000888
889<!-- *********************************************************************** -->
Chris Lattner79c3fe12003-10-02 04:57:28 +0000890
Misha Brukman500bc302003-11-22 00:38:41 +0000891<hr>
Misha Brukman2061e892003-11-22 01:23:39 +0000892<address>
Misha Brukman38847d52003-12-21 22:53:21 +0000893 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000894 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman2061e892003-11-22 01:23:39 +0000895 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman44408702008-12-11 17:34:48 +0000896 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman2061e892003-11-22 01:23:39 +0000897
Chris Lattnerb4b0ce72007-05-18 00:44:29 +0000898 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000899 Last modified: $Date$
Misha Brukman2061e892003-11-22 01:23:39 +0000900</address>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000901
Misha Brukman500bc302003-11-22 00:38:41 +0000902</body>
903</html>