Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update the release notes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_29@129054 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
commit 762e194268e673272606344b39b483785b71004d 1 parent 2aba8f7
Bill Wendling isanbard authored

Showing 1 changed file with 495 additions and 752 deletions. Show diff stats Hide diff stats

  1. +495 752 docs/ReleaseNotes.html
1,247 docs/ReleaseNotes.html
@@ -5,11 +5,11 @@
5 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 6 <meta encoding="utf8">
7 7 <link rel="stylesheet" href="llvm.css" type="text/css">
8   - <title>LLVM 2.8 Release Notes</title>
  8 + <title>LLVM 2.9 Release Notes</title>
9 9 </head>
10 10 <body>
11 11
12   -<div class="doc_title">LLVM 2.8 Release Notes</div>
  12 +<h1 class="doc_title">LLVM 2.9 Release Notes</h1>
13 13
14 14 <img align=right src="http://llvm.org/img/DragonSmall.png"
15 15 width="136" height="136" alt="LLVM Dragon Logo">
@@ -17,8 +17,8 @@
17 17 <ol>
18 18 <li><a href="#intro">Introduction</a></li>
19 19 <li><a href="#subproj">Sub-project Status Update</a></li>
20   - <li><a href="#externalproj">External Projects Using LLVM 2.8</a></li>
21   - <li><a href="#whatsnew">What's New in LLVM 2.8?</a></li>
  20 + <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>
22 22 <li><a href="GettingStarted.html">Installation Instructions</a></li>
23 23 <li><a href="#knownproblems">Known Problems</a></li>
24 24 <li><a href="#additionalinfo">Additional Information</a></li>
@@ -29,23 +29,23 @@
29 29 </div>
30 30
31 31 <!--
32   -<h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
  32 +<h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.9
33 33 release.<br>
34 34 You may prefer the
35   -<a href="http://llvm.org/releases/2.7/docs/ReleaseNotes.html">LLVM 2.7
  35 +<a href="http://llvm.org/releases/2.8/docs/ReleaseNotes.html">LLVM 2.8
36 36 Release Notes</a>.</h1>
37   --->
  37 + -->
38 38
39 39 <!-- *********************************************************************** -->
40   -<div class="doc_section">
  40 +<h1>
41 41 <a name="intro">Introduction</a>
42   -</div>
  42 +</h1>
43 43 <!-- *********************************************************************** -->
44 44
45 45 <div class="doc_text">
46 46
47 47 <p>This document contains the release notes for the LLVM Compiler
48   -Infrastructure, release 2.8. Here we describe the status of LLVM, including
  48 +Infrastructure, release 2.9. Here we describe the status of LLVM, including
49 49 major improvements from the previous release and significant known problems.
50 50 All LLVM releases may be downloaded from the <a
51 51 href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
@@ -62,36 +62,25 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
62 62 <a href="http://llvm.org/releases/">releases page</a>.</p>
63 63
64 64 </div>
65   -
66   -
67   -<!--
68   -Almost dead code.
69   - include/llvm/Analysis/LiveValues.h => Dan
70   - lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8.
71   - GEPSplitterPass
72   --->
73   -
74 65
75   -<!-- Features that need text if they're finished for 2.9:
  66 +<!-- Features that need text if they're finished for 3.1:
  67 + ARM EHABI
76 68 combiner-aa?
77 69 strong phi elim
78 70 loop dependence analysis
79   - TBAA
80 71 CorrelatedValuePropagation
  72 + lib/Transforms/IPO/MergeFunctions.cpp => consider for 3.1.
81 73 -->
82 74
83   - <!-- Announcement, lldb, libc++ -->
84   -
85   -
86 75 <!-- *********************************************************************** -->
87   -<div class="doc_section">
  76 +<h1>
88 77 <a name="subproj">Sub-project Status Update</a>
89   -</div>
  78 +</h1>
90 79 <!-- *********************************************************************** -->
91 80
92 81 <div class="doc_text">
93 82 <p>
94   -The LLVM 2.8 distribution currently consists of code from the core LLVM
  83 +The LLVM 2.9 distribution currently consists of code from the core LLVM
95 84 repository (which roughly includes the LLVM optimizers, code generators
96 85 and supporting tools), the Clang repository and the llvm-gcc repository. In
97 86 addition to this code, the LLVM Project includes other sub-projects that are in
@@ -102,9 +91,9 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
102 91
103 92
104 93 <!--=========================================================================-->
105   -<div class="doc_subsection">
  94 +<h2>
106 95 <a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
107   -</div>
  96 +</h2>
108 97
109 98 <div class="doc_text">
110 99
@@ -115,110 +104,61 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
115 104 modular, library-based architecture that makes it suitable for creating or
116 105 integrating with other development tools. Clang is considered a
117 106 production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86
118   -(32- and 64-bit), and for darwin-arm targets.</p>
119   -
120   -<p>In the LLVM 2.8 time-frame, the Clang team has made many improvements:</p>
121   -
122   - <ul>
123   - <li>Clang C++ is now feature-complete with respect to the ISO C++ 1998 and 2003 standards.</li>
124   - <li>Added support for Objective-C++.</li>
125   - <li>Clang now uses LLVM-MC to directly generate object code and to parse inline assembly (on Darwin).</li>
126   - <li>Introduced many new warnings, including <code>-Wmissing-field-initializers</code>, <code>-Wshadow</code>, <code>-Wno-protocol</code>, <code>-Wtautological-compare</code>, <code>-Wstrict-selector-match</code>, <code>-Wcast-align</code>, <code>-Wunused</code> improvements, and greatly improved format-string checking.</li>
127   - <li>Introduced the "libclang" library, a C interface to Clang intended to support IDE clients.</li>
128   - <li>Added support for <code>#pragma GCC visibility</code>, <code>#pragma align</code>, and others.</li>
129   - <li>Added support for SSE, AVX, ARM NEON, and AltiVec.</li>
130   - <li>Improved support for many Microsoft extensions.</li>
131   - <li>Implemented support for blocks in C++.</li>
132   - <li>Implemented precompiled headers for C++.</li>
133   - <li>Improved abstract syntax trees to retain more accurate source information.</li>
134   - <li>Added driver support for handling LLVM IR and bitcode files directly.</li>
135   - <li>Major improvements to compiler correctness for exception handling.</li>
136   - <li>Improved generated code quality in some areas:
137   - <ul>
138   - <li>Good code generation for X86-32 and X86-64 ABI handling.</li>
139   - <li>Improved code generation for bit-fields, although important work remains.</li>
140   - </ul>
141   - </li>
142   - </ul>
143   -</div>
144   -
145   -<!--=========================================================================-->
146   -<div class="doc_subsection">
147   -<a name="clangsa">Clang Static Analyzer</a>
148   -</div>
149   -
150   -<div class="doc_text">
151   -
152   -<p>The <a href="http://clang-analyzer.llvm.org/">Clang Static Analyzer</a>
153   - project is an effort to use static source code analysis techniques to
154   - automatically find bugs in C and Objective-C programs (and hopefully <a
155   - href="http://clang-analyzer.llvm.org/dev_cxx.html">C++ in the
156   - future</a>!). The tool is very good at finding bugs that occur on specific
157   - paths through code, such as on error conditions.</p>
158   -
159   -<p>The LLVM 2.8 release fixes a number of bugs and slightly improves precision
160   - over 2.7, but there are no major new features in the release.
  107 +(32- and 64-bit), and for darwin/arm targets.</p>
  108 +
  109 +<p>In the LLVM 2.9 time-frame, the Clang team has made many improvements in C,
  110 +C++ and Objective-C support. C++ support is now generally rock solid, has
  111 +been exercised on a broad variety of code, and has several new <a
  112 +href="http://clang.llvm.org/cxx_status.html#cxx0x">C++'0x features</a>
  113 +implemented (such as rvalue references and variadic templates). LLVM 2.9 has
  114 +also brought in a large range of bug fixes and minor features (e.g. __label__
  115 +support), and is much more compatible with the Linux Kernel.</p>
  116 +
  117 +<p>If Clang rejects your code but another compiler accepts it, please take a
  118 +look at the <a href="http://clang.llvm.org/compatibility.html">language
  119 +compatibility</a> guide to make sure this is not intentional or a known issue.
161 120 </p>
162 121
  122 +<ul>
  123 +</ul>
163 124 </div>
164 125
165 126 <!--=========================================================================-->
166   -<div class="doc_subsection">
167   -<a name="dragonegg">DragonEgg: llvm-gcc ported to gcc-4.5</a>
168   -</div>
  127 +<h2>
  128 +<a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
  129 +</h2>
169 130
170 131 <div class="doc_text">
171 132 <p>
172   -<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a port of llvm-gcc to
173   -gcc-4.5. Unlike llvm-gcc, dragonegg in theory does not require any gcc-4.5
174   -modifications whatsoever (currently one small patch is needed) thanks to the
175   -new <a href="http://gcc.gnu.org/wiki/plugins">gcc plugin architecture</a>.
176   -DragonEgg is a gcc plugin that makes gcc-4.5 use the LLVM optimizers and code
177   -generators instead of gcc's, just like with llvm-gcc.
  133 +<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
  134 +<a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
  135 +optimizers and code generators with LLVM's.
  136 +Currently it requires a patched version of gcc-4.5.
  137 +The plugin can target the x86-32 and x86-64 processor families and has been
  138 +used successfully on the Darwin, FreeBSD and Linux platforms.
  139 +The Ada, C, C++ and Fortran languages work well.
  140 +The plugin is capable of compiling plenty of Obj-C, Obj-C++ and Java but it is
  141 +not known whether the compiled code actually works or not!
178 142 </p>
179 143
180 144 <p>
181   -DragonEgg is still a work in progress, but it is able to compile a lot of code,
182   -for example all of gcc, LLVM and clang. Currently Ada, C, C++ and Fortran work
183   -well, while all other languages either don't work at all or only work poorly.
184   -For the moment only the x86-32 and x86-64 targets are supported, and only on
185   -linux and darwin (darwin may need additional gcc patches).
186   -</p>
187   -
188   -<p>
189   -The 2.8 release has the following notable changes:
  145 +The 2.9 release has the following notable changes:
190 146 <ul>
191   -<li>The plugin loads faster due to exporting fewer symbols.</li>
192   -<li>Additional vector operations such as addps256 are now supported.</li>
193   -<li>Ada global variables with no initial value are no longer zero initialized,
194   -resulting in better optimization.</li>
195   -<li>The '-fplugin-arg-dragonegg-enable-gcc-optzns' flag now runs all gcc
196   -optimizers, rather than just a handful.</li>
197   -<li>Fortran programs using common variables now link correctly.</li>
198   -<li>GNU OMP constructs no longer crash the compiler.</li>
  147 +<li>The plugin is much more stable when compiling Fortran.</li>
  148 +<li>Inline assembly where an asm output is tied to an input of a different size
  149 +is now supported in many more cases.</li>
  150 +<li>Basic support for the __float128 type was added. It is now possible to
  151 +generate LLVM IR from programs using __float128 but code generation does not
  152 +work yet.</li>
  153 +<li>Compiling Java programs no longer systematically crashes the plugin.</li>
199 154 </ul>
200 155
201 156 </div>
202 157
203 158 <!--=========================================================================-->
204   -<div class="doc_subsection">
205   -<a name="vmkit">VMKit: JVM/CLI Virtual Machine Implementation</a>
206   -</div>
207   -
208   -<div class="doc_text">
209   -<p>
210   -The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation of
211   -a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and
212   -just-in-time compilation. As of LLVM 2.8, VMKit now supports copying garbage
213   -collectors, and can be configured to use MMTk's copy mark-sweep garbage
214   -collector. In LLVM 2.8, the VMKit .NET VM is no longer being maintained.
215   -</p>
216   -</div>
217   -
218   -<!--=========================================================================-->
219   -<div class="doc_subsection">
  159 +<h2>
220 160 <a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
221   -</div>
  161 +</h2>
222 162
223 163 <div class="doc_text">
224 164 <p>
@@ -231,19 +171,20 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
231 171 this and other low-level routines (some are 3x faster than the equivalent
232 172 libgcc routines).</p>
233 173
234   -<p>
235   -All of the code in the compiler-rt project is available under the standard LLVM
236   -License, a "BSD-style" license. New in LLVM 2.8, compiler_rt now supports
237   -soft floating point (for targets that don't have a real floating point unit),
238   -and includes an extensive testsuite for the "blocks" language feature and the
239   -blocks runtime included in compiler_rt.</p>
  174 +<p>In the LLVM 2.9 timeframe, compiler_rt has had several minor changes for
  175 + better ARM support, and a fairly major license change. All of the code in the
  176 + compiler-rt project is now <a href="DeveloperPolicy.html#license">dual
  177 + licensed</a> under MIT and UIUC license, which allows you to use compiler-rt
  178 + in applications without the binary copyright reproduction clause. If you
  179 + prefer the LLVM/UIUC license, you are free to continue using it under that
  180 + license as well.</p>
240 181
241 182 </div>
242 183
243 184 <!--=========================================================================-->
244   -<div class="doc_subsection">
  185 +<h2>
245 186 <a name="lldb">LLDB: Low Level Debugger</a>
246   -</div>
  187 +</h2>
247 188
248 189 <div class="doc_text">
249 190 <p>
@@ -254,18 +195,18 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
254 195 LLVM disassembler and the LLVM JIT.</p>
255 196
256 197 <p>
257   -LLDB is in early development and not included as part of the LLVM 2.8 release,
258   -but is mature enough to support basic debugging scenarios on Mac OS X in C,
259   -Objective-C and C++. We'd really like help extending and expanding LLDB to
260   -support new platforms, new languages, new architectures, and new features.
261   -</p>
  198 +LLDB is has advanced by leaps and bounds in the 2.9 timeframe. It is
  199 +dramatically more stable and useful, and includes both a new <a
  200 +href="http://lldb.llvm.org/tutorial.html">tutorial</a> and a <a
  201 +href="http://lldb.llvm.org/lldb-gdb.html">side-by-side comparison with
  202 +GDB</a>.</p>
262 203
263 204 </div>
264 205
265 206 <!--=========================================================================-->
266   -<div class="doc_subsection">
  207 +<h2>
267 208 <a name="libc++">libc++: C++ Standard Library</a>
268   -</div>
  209 +</h2>
269 210
270 211 <div class="doc_text">
271 212 <p>
@@ -275,19 +216,54 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
275 216 delivering great performance.</p>
276 217
277 218 <p>
278   -As of the LLVM 2.8 release, libc++ is virtually feature complete, but would
279   -benefit from more testing and better integration with Clang++. It is also
280   -looking forward to the C++ committee finalizing the C++'0x standard.
  219 +In the LLVM 2.9 timeframe, libc++ has had numerous bugs fixed, and is now being
  220 +co-developed with Clang's C++'0x mode.</p>
  221 +
  222 +<p>
  223 +Like compiler_rt, libc++ is now <a href="DeveloperPolicy.html#license">dual
  224 + licensed</a> under the MIT and UIUC license, allowing it to be used more
  225 + permissively.
281 226 </p>
282 227
283 228 </div>
284 229
285 230
  231 +<!--=========================================================================-->
  232 +<h2>
  233 +<a name="LLBrowse">LLBrowse: IR Browser</a>
  234 +</h2>
  235 +
  236 +<div class="doc_text">
  237 +<p>
  238 +<a href="http://llvm.org/svn/llvm-project/llbrowse/trunk/doc/LLBrowse.html">
  239 + LLBrowse</a> is an interactive viewer for LLVM modules. It can load any LLVM
  240 + module and displays its contents as an expandable tree view, facilitating an
  241 + easy way to inspect types, functions, global variables, or metadata nodes. It
  242 + is fully cross-platform, being based on the popular wxWidgets GUI toolkit.
  243 +</p>
  244 +</div>
286 245
287 246 <!--=========================================================================-->
288   -<div class="doc_subsection">
289   -<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
  247 +<h2>
  248 +<a name="vmkit">VMKit</a>
  249 +</h2>
  250 +
  251 +<div class="doc_text">
  252 +<p>The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation
  253 + of a Java Virtual Machine (Java VM or JVM) that uses LLVM for static and
  254 + just-in-time compilation. As of LLVM 2.9, VMKit now supports generational
  255 + garbage collectors. The garbage collectors are provided by the MMTk framework,
  256 + and VMKit can be configured to use one of the numerous implemented collectors
  257 + of MMTk.
  258 +</p>
290 259 </div>
  260 +
  261 +
  262 +<!--=========================================================================-->
  263 +<!--
  264 +<h2>
  265 +<a name="klee">KLEE: A Symbolic Execution Virtual Machine</a>
  266 +</h2>
291 267
292 268 <div class="doc_text">
293 269 <p>
@@ -298,171 +274,145 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
298 274 be used to verify some algorithms.
299 275 </p>
300 276
301   -<p>Although KLEE does not have any major new features as of 2.8, we have made
302   -various minor improvements, particular to ease development:</p>
303   -<ul>
304   - <li>Added support for LLVM 2.8. KLEE currently maintains compatibility with
305   - LLVM 2.6, 2.7, and 2.8.</li>
306   - <li>Added a buildbot for 2.6, 2.7, and trunk. A 2.8 buildbot will be coming
307   - soon following release.</li>
308   - <li>Fixed many C++ code issues to allow building with Clang++. Mostly
309   - complete, except for the version of MiniSAT which is inside the KLEE STP
310   - version.</li>
311   - <li>Improved support for building with separate source and build
312   - directories.</li>
313   - <li>Added support for "long double" on x86.</li>
314   - <li>Initial work on KLEE support for using 'lit' test runner instead of
315   - DejaGNU.</li>
316   - <li>Added <tt>configure</tt> support for using an external version of
317   - STP.</li>
318   -</ul>
319   -
320   -</div>
  277 +<p>UPDATE!</p>
  278 +</div>-->
321 279
322 280
323 281 <!-- *********************************************************************** -->
324   -<div class="doc_section">
325   - <a name="externalproj">External Open Source Projects Using LLVM 2.8</a>
326   -</div>
  282 +<h1>
  283 + <a name="externalproj">External Open Source Projects Using LLVM 2.9</a>
  284 +</h1>
327 285 <!-- *********************************************************************** -->
328 286
329 287 <div class="doc_text">
330 288
331 289 <p>An exciting aspect of LLVM is that it is used as an enabling technology for
332 290 a lot of other language and tools projects. This section lists some of the
333   - projects that have already been updated to work with LLVM 2.8.</p>
  291 + projects that have already been updated to work with LLVM 2.9.</p>
334 292 </div>
335 293
  294 +
336 295 <!--=========================================================================-->
337   -<div class="doc_subsection">
338   -<a name="tce">TTA-based Codesign Environment (TCE)</a>
339   -</div>
  296 +<h2>Crack Programming Language</h2>
340 297
341 298 <div class="doc_text">
342 299 <p>
343   -<a href="http://tce.cs.tut.fi/">TCE</a> is a toolset for designing
344   -application-specific processors (ASP) based on the Transport triggered
345   -architecture (TTA). The toolset provides a complete co-design flow from C/C++
346   -programs down to synthesizable VHDL and parallel program binaries. Processor
347   -customization points include the register files, function units, supported
348   -operations, and the interconnection network.</p>
349   -
350   -<p>TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target
351   -independent optimizations and also for parts of code generation. It generates
352   -new LLVM-based code generators "on the fly" for the designed TTA processors and
353   -loads them in to the compiler backend as runtime libraries to avoid per-target
354   -recompilation of larger parts of the compiler chain.</p>
355   -
  300 +<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide the
  301 +ease of development of a scripting language with the performance of a compiled
  302 +language. The language derives concepts from C++, Java and Python, incorporating
  303 +object-oriented programming, operator overloading and strong typing.</p>
356 304 </div>
357   -
  305 +
  306 +
358 307 <!--=========================================================================-->
359   -<div class="doc_subsection">
360   -<a name="Horizon">Horizon Bytecode Compiler</a>
361   -</div>
362   -
  308 +<h2>TTA-based Codesign Environment (TCE)</h2>
  309 +
363 310 <div class="doc_text">
364   -<p>
365   -<a href="http://www.quokforge.org/projects/horizon">Horizon</a> is a bytecode
366   -language and compiler written on top of LLVM, intended for producing
367   -single-address-space managed code operating systems that
368   -run faster than the equivalent multiple-address-space C systems.
369   -More in-depth blurb is available on the <a
370   -href="http://www.quokforge.org/projects/horizon/wiki/Wiki">wiki</a>.</p>
371   -
  311 +<p>TCE is a toolset for designing application-specific processors (ASP) based on
  312 +the Transport triggered architecture (TTA). The toolset provides a complete
  313 +co-design flow from C/C++ programs down to synthesizable VHDL and parallel
  314 +program binaries. Processor customization points include the register files,
  315 +function units, supported operations, and the interconnection network.</p>
  316 +
  317 +<p>TCE uses Clang and LLVM for C/C++ language support, target independent
  318 +optimizations and also for parts of code generation. It generates new LLVM-based
  319 +code generators "on the fly" for the designed TTA processors and loads them in
  320 +to the compiler backend as runtime libraries to avoid per-target recompilation
  321 +of larger parts of the compiler chain.</p>
372 322 </div>
373 323
  324 +
  325 +
374 326 <!--=========================================================================-->
375   -<div class="doc_subsection">
376   -<a name="clamav">Clam AntiVirus</a>
  327 +<h2>PinaVM</h2>
  328 +
  329 +<div class="doc_text">
  330 +<p><a href="http://gitorious.org/pinavm/pages/Home">PinaVM</a> is an open
  331 +source, <a href="http://www.systemc.org/">SystemC</a> front-end. Unlike many
  332 +other front-ends, PinaVM actually executes the elaboration of the
  333 +program analyzed using LLVM's JIT infrastructure. It later enriches the
  334 +bitcode with SystemC-specific information.</p>
377 335 </div>
378 336
  337 +<!--=========================================================================-->
  338 +<h2>Pure</h2>
  339 +
379 340 <div class="doc_text">
380   -<p>
381   -<a href="http://www.clamav.net">Clam AntiVirus</a> is an open source (GPL)
382   -anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail
383   -gateways. Since version 0.96 it has <a
384   -href="http://vrt-sourcefire.blogspot.com/2010/09/introduction-to-clamavs-low-level.html">bytecode
385   -signatures</a> that allow writing detections for complex malware. It
386   -uses LLVM's JIT to speed up the execution of bytecode on
387   -X86, X86-64, PPC32/64, falling back to its own interpreter otherwise.
388   -The git version was updated to work with LLVM 2.8.
389   -</p>
390   -
391   -<p>The <a
392   -href="http://git.clamav.net/gitweb?p=clamav-bytecode-compiler.git;a=blob_plain;f=docs/user/clambc-user.pdf">
393   -ClamAV bytecode compiler</a> uses Clang and LLVM to compile a C-like
394   -language, insert runtime checks, and generate ClamAV bytecode.</p>
395   -
  341 +<p><a href="http://pure-lang.googlecode.com/">Pure</a> is an
  342 + algebraic/functional
  343 + programming language based on term rewriting. Programs are collections
  344 + of equations which are used to evaluate expressions in a symbolic
  345 + fashion. The interpreter uses LLVM as a backend to JIT-compile Pure
  346 + programs to fast native code. Pure offers dynamic typing, eager and lazy
  347 + evaluation, lexical closures, a hygienic macro system (also based on
  348 + term rewriting), built-in list and matrix support (including list and
  349 + matrix comprehensions) and an easy-to-use interface to C and other
  350 + programming languages (including the ability to load LLVM bitcode
  351 + modules, and inline C, C++, Fortran and Faust code in Pure programs if
  352 + the corresponding LLVM-enabled compilers are installed).</p>
  353 +
  354 +<p>Pure version 0.47 has been tested and is known to work with LLVM 2.9
  355 + (and continues to work with older LLVM releases &gt;= 2.5).</p>
396 356 </div>
397 357
398 358 <!--=========================================================================-->
399   -<div class="doc_subsection">
400   -<a name="pure">Pure</a>
401   -</div>
  359 +<h2 id="icedtea">IcedTea Java Virtual Machine Implementation</h2>
402 360
403 361 <div class="doc_text">
404 362 <p>
405   -<a href="http://pure-lang.googlecode.com/">Pure</a>
406   -is an algebraic/functional
407   -programming language based on term rewriting. Programs are collections
408   -of equations which are used to evaluate expressions in a symbolic
409   -fashion. Pure offers dynamic typing, eager and lazy evaluation, lexical
410   -closures, a hygienic macro system (also based on term rewriting),
411   -built-in list and matrix support (including list and matrix
412   -comprehensions) and an easy-to-use C interface. The interpreter uses
413   -LLVM as a backend to JIT-compile Pure programs to fast native code.</p>
414   -
415   -<p>Pure versions 0.44 and later have been tested and are known to work with
416   -LLVM 2.8 (and continue to work with older LLVM releases >= 2.5).</p>
  363 +<a href="http://icedtea.classpath.org/wiki/Main_Page">IcedTea</a> provides a
  364 +harness to build OpenJDK using only free software build tools and to provide
  365 +replacements for the not-yet free parts of OpenJDK. One of the extensions that
  366 +IcedTea provides is a new JIT compiler named <a
  367 +href="http://icedtea.classpath.org/wiki/ZeroSharkFaq">Shark</a> which uses LLVM
  368 +to provide native code generation without introducing processor-dependent
  369 +code.
  370 +</p>
417 371
  372 +<p> OpenJDK 7 b112, IcedTea6 1.9 and IcedTea7 1.13 and later have been tested
  373 +and are known to work with LLVM 2.9 (and continue to work with older LLVM
  374 +releases &gt;= 2.6 as well).</p>
418 375 </div>
419 376
420 377 <!--=========================================================================-->
421   -<div class="doc_subsection">
422   -<a name="GHC">Glasgow Haskell Compiler (GHC)</a>
423   -</div>
424   -
  378 +<h2>Glasgow Haskell Compiler (GHC)</h2>
  379 +
425 380 <div class="doc_text">
426   -<p>
427   -<a href="http://www.haskell.org/ghc/">GHC</a> is an open source,
428   -state-of-the-art programming suite for
429   -Haskell, a standard lazy functional programming language. It includes
430   -an optimizing static compiler generating good code for a variety of
  381 +<p>GHC is an open source, state-of-the-art programming suite for Haskell,
  382 +a standard lazy functional programming language. It includes an
  383 +optimizing static compiler generating good code for a variety of
431 384 platforms, together with an interactive system for convenient, quick
432 385 development.</p>
433 386
434 387 <p>In addition to the existing C and native code generators, GHC 7.0 now
435   -supports an <a
436   -href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM">LLVM
437   -code generator</a>. GHC supports LLVM 2.7 and later.</p>
438   -
  388 +supports an LLVM code generator. GHC supports LLVM 2.7 and later.</p>
439 389 </div>
440 390
441 391 <!--=========================================================================-->
442   -<div class="doc_subsection">
443   -<a name="Clay">Clay Programming Language</a>
444   -</div>
445   -
  392 +<h2>Polly - Polyhedral optimizations for LLVM</h2>
  393 +
446 394 <div class="doc_text">
447   -<p>
448   -<a href="http://tachyon.in/clay/">Clay</a> is a new systems programming
449   -language that is specifically designed for generic programming. It makes
450   -generic programming very concise thanks to whole program type propagation. It
451   -uses LLVM as its backend.</p>
452   -
  395 +<p>Polly is a project that aims to provide advanced memory access optimizations
  396 +to better take advantage of SIMD units, cache hierarchies, multiple cores or
  397 +even vector accelerators for LLVM. Built around an abstract mathematical
  398 +description based on Z-polyhedra, it provides the infrastructure to develop
  399 +advanced optimizations in LLVM and to connect complex external optimizers. In
  400 +its first year of existence Polly already provides an exact value-based
  401 +dependency analysis as well as basic SIMD and OpenMP code generation support.
  402 +Furthermore, Polly can use PoCC(Pluto) an advanced optimizer for data-locality
  403 +and parallelism.</p>
453 404 </div>
454 405
455 406 <!--=========================================================================-->
456   -<div class="doc_subsection">
457   -<a name="llvm-py">llvm-py Python Bindings for LLVM</a>
458   -</div>
  407 +<h2>Rubinius</h2>
459 408
460 409 <div class="doc_text">
461   -<p>
462   -<a href="http://www.mdevan.org/llvm-py/">llvm-py</a> has been updated to work
463   -with LLVM 2.8. llvm-py provides Python bindings for LLVM, allowing you to write a
464   -compiler backend or a VM in Python.</p>
465   -
  410 + <p><a href="http://github.com/evanphx/rubinius">Rubinius</a> is an environment
  411 + for running Ruby code which strives to write as much of the implementation in
  412 + Ruby as possible. Combined with a bytecode interpreting VM, it uses LLVM to
  413 + optimize and compile ruby code down to machine code. Techniques such as type
  414 + feedback, method inlining, and deoptimization are all used to remove dynamism
  415 + from ruby execution and increase performance.</p>
466 416 </div>
467 417
468 418
@@ -477,118 +427,14 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
477 427 audio signal processing. The name FAUST stands for Functional AUdio STream. Its
478 428 programming model combines two approaches: functional programming and block
479 429 diagram composition. In addition with the C, C++, JAVA output formats, the
480   -Faust compiler can now generate LLVM bitcode, and works with LLVM 2.7 and
481   -2.8.</p>
482   -
483   -</div>
484   -
485   -<!--=========================================================================-->
486   -<div class="doc_subsection">
487   -<a name="jade">Jade Just-in-time Adaptive Decoder Engine</a>
488   -</div>
489   -
490   -<div class="doc_text">
491   -<p><a
492   -href="http://sourceforge.net/apps/trac/orcc/wiki/JadeDocumentation">Jade</a>
493   -(Just-in-time Adaptive Decoder Engine) is a generic video decoder engine using
494   -LLVM for just-in-time compilation of video decoder configurations. Those
495   -configurations are designed by MPEG Reconfigurable Video Coding (RVC) committee.
496   -MPEG RVC standard is built on a stream-based dataflow representation of
497   -decoders. It is composed of a standard library of coding tools written in
498   -RVC-CAL language and a dataflow configuration &#8212; block diagram &#8212;
499   -of a decoder.</p>
500   -
501   -<p>Jade project is hosted as part of the <a href="http://orcc.sf.net">Open
502   -RVC-CAL Compiler</a> and requires it to translate the RVC-CAL standard library
503   -of video coding tools into an LLVM assembly code.</p>
504   -
505   -</div>
506   -
507   -<!--=========================================================================-->
508   -<div class="doc_subsection">
509   -<a name="neko_llvm_jit">LLVM JIT for Neko VM</a>
510   -</div>
511   -
512   -<div class="doc_text">
513   -<p><a href="http://github.com/vava/neko_llvm_jit">Neko LLVM JIT</a>
514   -replaces the standard Neko JIT with an LLVM-based implementation. While not
515   -fully complete, it is already providing a 1.5x speedup on 64-bit systems.
516   -Neko LLVM JIT requires LLVM 2.8 or later.</p>
517   -
518   -</div>
519   -
520   -<!--=========================================================================-->
521   -<div class="doc_subsection">
522   -<a name="crack">Crack Scripting Language</a>
523   -</div>
524   -
525   -<div class="doc_text">
526   -<p>
527   -<a href="http://code.google.com/p/crack-language/">Crack</a> aims to provide
528   -the ease of development of a scripting language with the performance of a
529   -compiled language. The language derives concepts from C++, Java and Python,
530   -incorporating object-oriented programming, operator overloading and strong
531   -typing. Crack 0.2 works with LLVM 2.7, and the forthcoming Crack 0.2.1 release
532   -builds on LLVM 2.8.</p>
  430 +Faust compiler can now generate LLVM bitcode, and works with LLVM 2.7-2.9.</p>
533 431
534 432 </div>
535   -
536   -<!--=========================================================================-->
537   -<div class="doc_subsection">
538   -<a name="DresdenTM">Dresden TM Compiler (DTMC)</a>
539   -</div>
540   -
541   -<div class="doc_text">
542   -<p>
543   -<a href="http://tm.inf.tu-dresden.de">DTMC</a> provides support for
544   -Transactional Memory, which is an easy-to-use and efficient way to synchronize
545   -accesses to shared memory. Transactions can contain normal C/C++ code (e.g.,
546   -<code>__transaction { list.remove(x); x.refCount--; }</code>) and will be executed
547   -virtually atomically and isolated from other transactions.</p>
548   -
549   -</div>
550   -
551   -<!--=========================================================================-->
552   -<div class="doc_subsection">
553   -<a name="Kai">Kai Programming Language</a>
554   -</div>
555   -
556   -<div class="doc_text">
557   -<p>
558   -<a href="http://www.oriontransfer.co.nz/research/kai">Kai</a> (Japanese 会 for
559   -meeting/gathering) is an experimental interpreter that provides a highly
560   -extensible runtime environment and explicit control over the compilation
561   -process. Programs are defined using nested symbolic expressions, which are all
562   -parsed into first-class values with minimal intrinsic semantics. Kai can
563   -generate optimised code at run-time (using LLVM) in order to exploit the nature
564   -of the underlying hardware and to integrate with external software libraries.
565   -It is a unique exploration into world of dynamic code compilation, and the
566   -interaction between high level and low level semantics.</p>
567   -
568   -</div>
569   -
570   -<!--=========================================================================-->
571   -<div class="doc_subsection">
572   -<a name="OSL">OSL: Open Shading Language</a>
573   -</div>
574   -
575   -<div class="doc_text">
576   -<p>
577   -<a href="http://code.google.com/p/openshadinglanguage/">OSL</a> is a shading
578   -language designed for use in physically based renderers and in particular
579   -production rendering. By using LLVM instead of the interpreter, it was able to
580   -meet its performance goals (&gt;= C-code) while retaining the benefits of
581   -runtime specialization and a portable high-level language.
582   -</p>
583   -
584   -</div>
585   -
586   -
587   -
  433 +
588 434 <!-- *********************************************************************** -->
589   -<div class="doc_section">
590   - <a name="whatsnew">What's New in LLVM 2.8?</a>
591   -</div>
  435 +<h1>
  436 + <a name="whatsnew">What's New in LLVM 2.9?</a>
  437 +</h1>
592 438 <!-- *********************************************************************** -->
593 439
594 440 <div class="doc_text">
@@ -601,60 +447,66 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
601 447 </div>
602 448
603 449 <!--=========================================================================-->
604   -<div class="doc_subsection">
  450 +<h2>
605 451 <a name="majorfeatures">Major New Features</a>
606   -</div>
  452 +</h2>
607 453
608 454 <div class="doc_text">
609 455
610   -<p>LLVM 2.8 includes several major new capabilities:</p>
  456 +<p>LLVM 2.9 includes several major new capabilities:</p>
611 457
612 458 <ul>
613   -<li>As mentioned above, <a href="#libc++">libc++</a> and <a
614   - href="#lldb">LLDB</a> are major new additions to the LLVM collective.</li>
615   -<li>LLVM 2.8 now has pretty decent support for debugging optimized code. You
616   - should be able to reliably get debug info for function arguments, assuming
617   - that the value is actually available where you have stopped.</li>
618   -<li>A new 'llvm-diff' tool is available that does a semantic diff of .ll
619   - files.</li>
620   -<li>The <a href="#mc">MC subproject</a> has made major progress in this release.
621   - Direct .o file writing support for darwin/x86[-64] is now reliable and
622   - support for other targets and object file formats are in progress.</li>
623   -</ul>
  459 +
  460 +<li>Type Based Alias Analysis (TBAA) is now implemented and turned on by default
  461 + in Clang. This allows substantially better load/store optimization in some
  462 + cases. TBAA can be disabled by passing -fno-strict-aliasing.
  463 +</li>
  464 +
  465 +<li>This release has seen a continued focus on quality of debug information.
  466 + LLVM now generates much higher fidelity debug information, particularly when
  467 + debugging optimized code.</li>
  468 +
  469 +<li>Inline assembly now supports multiple alternative constraints.</li>
624 470
  471 +<li>A new backend for the NVIDIA PTX virtual ISA (used to target its GPUs) is
  472 + under rapid development. It is not generally useful in 2.9, but is making
  473 + rapid progress.</li>
  474 +
  475 +</ul>
  476 +
625 477 </div>
626 478
627 479 <!--=========================================================================-->
628   -<div class="doc_subsection">
  480 +<h2>
629 481 <a name="coreimprovements">LLVM IR and Core Improvements</a>
630   -</div>
  482 +</h2>
631 483
632 484 <div class="doc_text">
633 485 <p>LLVM IR has several new features for better support of new targets and that
634 486 expose new optimization opportunities:</p>
635 487
636 488 <ul>
637   -<li>The <a href="LangRef.html#int_libc">memcpy, memmove, and memset</a>
638   - intrinsics now take address space qualified pointers and a bit to indicate
639   - whether the transfer is "<a href="LangRef.html#volatile">volatile</a>" or not.
640   -</li>
641   -<li>Per-instruction debug info metadata is much faster and uses less memory by
642   - using the new DebugLoc class.</li>
643   -<li>LLVM IR now has a more formalized concept of "<a
644   - href="LangRef.html#trapvalues">trap values</a>", which allow the optimizer
645   - to optimize more aggressively in the presence of undefined behavior, while
646   - still producing predictable results.</li>
647   -<li>LLVM IR now supports two new <a href="LangRef.html#linkage">linkage
648   - types</a> (linker_private_weak and linker_private_weak_def_auto) which map
649   - onto some obscure MachO concepts.</li>
  489 +<li>The <a href="LangRef.html#bitwiseops">udiv, ashr, lshr, and shl</a>
  490 + instructions now have support exact and nuw/nsw bits to indicate that they
  491 + don't overflow or shift out bits. This is useful for optimization of <a
  492 + href="http://llvm.org/PR8862">pointer differences</a> and other cases.</li>
  493 +
  494 +<li>LLVM IR now supports the <a href="LangRef.html#globalvars">unnamed_addr</a>
  495 + attribute to indicate that constant global variables with identical
  496 + initializers can be merged. This fixed <a href="http://llvm.org/PR8927">an
  497 + issue</a> where LLVM would incorrectly merge two globals which were supposed
  498 + to have distinct addresses.</li>
  499 +
  500 +<li>The new <a href="LangRef.html#fnattrs">hotpatch attribute</a> has been added
  501 + to allow runtime patching of functions.</li>
650 502 </ul>
651 503
652 504 </div>
653 505
654 506 <!--=========================================================================-->
655   -<div class="doc_subsection">
  507 +<h2>
656 508 <a name="optimizer">Optimizer Improvements</a>
657   -</div>
  509 +</h2>
658 510
659 511 <div class="doc_text">
660 512
@@ -662,45 +514,67 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
662 514 release includes a few major enhancements and additions to the optimizers:</p>
663 515
664 516 <ul>
665   -<li>As mentioned above, the optimizer now has support for updating debug
666   - information as it goes. A key aspect of this is the new <a
667   - href="SourceLevelDebugging.html#format_common_value">llvm.dbg.value</a>
668   - intrinsic. This intrinsic represents debug info for variables that are
669   - promoted to SSA values (typically by mem2reg or the -scalarrepl passes).</li>
670   -
671   -<li>The JumpThreading pass is now much more aggressive about implied value
672   - relations, allowing it to thread conditions like "a == 4" when a is known to
673   - be 13 in one of the predecessors of a block. It does this in conjunction
674   - with the new LazyValueInfo analysis pass.</li>
675   -<li>The new RegionInfo analysis pass identifies single-entry single-exit regions
676   - in the CFG. You can play with it with the "opt -regions -analyze" or
677   - "opt -view-regions" commands.</li>
678   -<li>The loop optimizer has significantly improved strength reduction and analysis
679   - capabilities. Notably it is able to build on the trap value and signed
680   - integer overflow information to optimize &lt;= and &gt;= loops.</li>
681   -<li>The CallGraphSCCPassManager now has some basic support for iterating within
682   - an SCC when a optimizer devirtualizes a function call. This allows inlining
683   - through indirect call sites that are devirtualized by store-load forwarding
684   - and other optimizations.</li>
685   -<li>The new <A href="Passes.html#loweratomic">-loweratomic</a> pass is available
686   - to lower atomic instructions into their non-atomic form. This can be useful
687   - to optimize generic code that expects to run in a single-threaded
688   - environment.</li>
689   -</ul>
  517 +<li>Link Time Optimization (LTO) has been improved to use MC for parsing inline
  518 + assembly and now can build large programs like Firefox 4 on both Mac OS X and
  519 + Linux.</li>
  520 +
  521 +<li>The new -loop-idiom pass recognizes memset/memcpy loops (and memset_pattern
  522 + on darwin), turning them into library calls, which are typically better
  523 + optimized than inline code. If you are building a libc and notice that your
  524 + memcpy and memset functions are compiled into infinite recursion, please build
  525 + with -ffreestanding or -fno-builtin to disable this pass.</li>
  526 +
  527 +<li>A new -early-cse pass does a fast pass over functions to fold constants,
  528 + simplify expressions, perform simple dead store elimination, and perform
  529 + common subexpression elimination. It does a good job at catching some of the
  530 + trivial redundancies that exist in unoptimized code, making later passes more
  531 + effective.</li>
  532 +
  533 +<li>A new -loop-instsimplify pass is used to clean up loop bodies in the loop
  534 + optimizer.</li>
  535 +
  536 +<li>The new TargetLibraryInfo interface allows mid-level optimizations to know
  537 + whether the current target's runtime library has certain functions. For
  538 + example, the optimizer can now transform integer-only printf calls to call
  539 + iprintf, allowing reduced code size for embedded C libraries (e.g. newlib).
  540 +</li>
  541 +
  542 +<li>LLVM has a new <a href="WritingAnLLVMPass.html#RegionPass">RegionPass</a>
  543 + infrastructure for region-based optimizations.</li>
  544 +
  545 +<li>Several optimizer passes have been substantially sped up:
  546 + GVN is much faster on functions with deep dominator trees and lots of basic
  547 + blocks. The dominator tree and dominance frontier passes are much faster to
  548 + compute, and preserved by more passes (so they are computed less often). The
  549 + -scalar-repl pass is also much faster and doesn't use DominanceFrontier.
  550 +</li>
690 551
691   -<!--
692   -<p>In addition to these features that are done in 2.8, there is preliminary
693   - support in the release for Type Based Alias Analysis
694   - Preliminary work on TBAA but not usable in 2.8.
695   - New CorrelatedValuePropagation pass, not on by default in 2.8 yet.
696   --->
  552 +<li>The Dead Store Elimination pass is more aggressive optimizing stores of
  553 + different types: e.g. a large store following a small one to the same address.
  554 + The MemCpyOptimizer pass handles several new forms of memcpy elimination.</li>
  555 +
  556 +<li>LLVM now optimizes various idioms for overflow detection into check of the
  557 + flag register on various CPUs. For example, we now compile:
  558 +
  559 + <pre>
  560 + unsigned long t = a+b;
  561 + if (t &lt; a) ...
  562 + </pre>
  563 + into:
  564 + <pre>
  565 + addq %rdi, %rbx
  566 + jno LBB0_2
  567 + </pre>
  568 +</li>
  569 +
  570 +</ul>
697 571
698 572 </div>
699 573
700 574 <!--=========================================================================-->
701   -<div class="doc_subsection">
  575 +<h2>
702 576 <a name="mc">MC Level Improvements</a>
703   -</div>
  577 +</h2>
704 578
705 579 <div class="doc_text">
706 580 <p>
@@ -709,26 +583,39 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
709 583 and a number of other related areas that CPU instruction-set level tools work
710 584 in.</p>
711 585
712   -<p>The MC subproject has made great leaps in LLVM 2.8. For example, support for
713   - directly writing .o files from LLC (and clang) now works reliably for
714   - darwin/x86[-64] (including inline assembly support) and the integrated
715   - assembler is turned on by default in Clang for these targets. This provides
716   - improved compile times among other things.</p>
717   -
718 586 <ul>
719   -<li>The entire compiler has converted over to using the MCStreamer assembler API
720   - instead of writing out a .s file textually.</li>
721   -<li>The "assembler parser" is far more mature than in 2.7, supporting a full
722   - complement of directives, now supports assembler macros, etc.</li>
723   -<li>The "assembler backend" has been completed, including support for relaxation
724   - relocation processing and all the other things that an assembler does.</li>
725   -<li>The MachO file format support is now fully functional and works.</li>
726   -<li>The MC disassembler now fully supports ARM and Thumb. ARM assembler support
727   - is still in early development though.</li>
728   -<li>The X86 MC assembler now supports the X86 AES and AVX instruction set.</li>
729   -<li>Work on ELF and COFF object files and ARM target support is well underway,
730   - but isn't useful yet in LLVM 2.8. Please contact the llvmdev mailing list
731   - if you're interested in this.</li>
  587 +<li>ELF MC support has matured enough for the integrated assembler to be turned
  588 + on by default in Clang on X86-32 and X86-64 ELF systems.</li>
  589 +
  590 +<li>MC supports and CodeGen uses the <tt>.file</tt> and <tt>.loc</tt> directives
  591 + for producing line number debug info. This produces more compact line
  592 + tables and easier to read .s files.</li>
  593 +
  594 +<li>MC supports the <tt>.cfi_*</tt> directives for producing DWARF
  595 + frame information, but it is still not used by CodeGen by default.</li>
  596 +
  597 +
  598 +<li>The MC assembler now generates much better diagnostics for common errors,
  599 + is much faster at matching instructions, is much more bug-compatible with
  600 + the GAS assembler, and is now generally useful for a broad range of X86
  601 + assembly.</li>
  602 +
  603 +<li>We now have some basic <a href="CodeGenerator.html#mc">internals
  604 + documentation</a> for MC.</li>
  605 +
  606 +<li>.td files can now specify assembler aliases directly with the <a
  607 + href="CodeGenerator.html#na_instparsing">MnemonicAlias and InstAlias</a>
  608 + tblgen classes.</li>
  609 +
  610 +<li>LLVM now has an experimental format-independent object file manipulation
  611 + library (lib/Object). It supports both PE/COFF and ELF. The llvm-nm tool has
  612 + been extended to work with native object files, and the new llvm-objdump tool
  613 + supports disassembly of object files (but no relocations are displayed yet).
  614 +</li>
  615 +
  616 +<li>Win32 PE-COFF support in the MC assembler has made a lot of progress in the
  617 + 2.9 timeframe, but is still not generally useful.</li>
  618 +
732 619 </ul>
733 620
734 621 <p>For more information, please see the <a
@@ -736,13 +623,12 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
736 623 LLVM MC Project Blog Post</a>.
737 624 </p>
738 625
739   -</div>
740   -
  626 +</div>
741 627
742 628 <!--=========================================================================-->
743   -<div class="doc_subsection">
  629 +<h2>
744 630 <a name="codegen">Target Independent Code Generator Improvements</a>
745   -</div>
  631 +</h2>
746 632
747 633 <div class="doc_text">
748 634
@@ -751,343 +637,187 @@ <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
751 637 it run faster:</p>
752 638
753 639 <ul>
754   -<li>The clang/gcc -momit-leaf-frame-pointer argument is now supported.</li>
755   -<li>The clang/gcc -ffunction-sections and -fdata-sections arguments are now
756   - supported on ELF targets (like GCC).</li>
757   -<li>The MachineCSE pass is now tuned and on by default. It eliminates common
758   - subexpressions that are exposed when lowering to machine instructions.</li>
759   -<li>The "local" register allocator was replaced by a new "fast" register
760   - allocator. This new allocator (which is often used at -O0) is substantially
761   - faster and produces better code than the old local register allocator.</li>
762   -<li>A new LLC "-regalloc=default" option is available, which automatically
763   - chooses a register allocator based on the -O optimization level.</li>
764   -<li>The common code generator code was modified to promote illegal argument and
765   - return value vectors to wider ones when possible instead of scalarizing
766   - them. For example, &lt;3 x float&gt; will now pass in one SSE register
767   - instead of 3 on X86. This generates substantially better code since the
768   - rest of the code generator was already expecting this.</li>
769   -<li>The code generator uses a new "COPY" machine instruction. This speeds up
770   - the code generator and eliminates the need for targets to implement the
771   - isMoveInstr hook. Also, the copyRegToReg hook was renamed to copyPhysReg
772   - and simplified.</li>
773   -<li>The code generator now has a "LocalStackSlotPass", which optimizes stack
774   - slot access for targets (like ARM) that have limited stack displacement
775   - addressing.</li>
776   -<li>A new "PeepholeOptimizer" is available, which eliminates sign and zero
777   - extends, and optimizes away compare instructions when the condition result
778   - is available from a previous instruction.</li>
779   -<li>Atomic operations now get legalized into simpler atomic operations if not
780   - natively supported, easing the implementation burden on targets.</li>
781   -<li>We have added two new bottom-up pre-allocation register pressure aware schedulers:
782   -<ol>
783   -<li>The hybrid scheduler schedules aggressively to minimize schedule length when registers are available and avoid overscheduling in high pressure situations.</li>
784   -<li>The instruction-level-parallelism scheduler schedules for maximum ILP when registers are available and avoid overscheduling in high pressure situations.</li>
785   -</ol></li>
786   -<li>The tblgen type inference algorithm was rewritten to be more consistent and
787   - diagnose more target bugs. If you have an out-of-tree backend, you may
788   - find that it finds bugs in your target description. This support also
789   - allows limited support for writing patterns for instructions that return
790   - multiple results (e.g. a virtual register and a flag result). The
791   - 'parallel' modifier in tblgen was removed, you should use the new support
792   - for multiple results instead.</li>
793   -<li>A new (experimental) "-rendermf" pass is available which renders a
794   - MachineFunction into HTML, showing live ranges and other useful
795   - details.</li>
796   -<li>The new SubRegIndex tablegen class allows subregisters to be indexed
797   - symbolically instead of numerically. If your target uses subregisters you
798   - will need to adapt to use SubRegIndex when you upgrade to 2.8.</li>
799   -<!-- SplitKit -->
800   -
801   -<li>The -fast-isel instruction selection path (used at -O0 on X86) was rewritten
802   - to work bottom-up on basic blocks instead of top down. This makes it
803   - slightly faster (because the MachineDCE pass is not needed any longer) and
804   - allows it to generate better code in some cases.</li>
  640 +<li>The pre-register-allocation (preRA) instruction scheduler models register
  641 + pressure much more accurately in some cases. This allows the adoption of more
  642 + aggressive scheduling heuristics without causing spills to be generated.
  643 +</li>
  644 +
  645 +<li>LiveDebugVariables is a new pass that keeps track of debugging information
  646 + for user variables that are promoted to registers in optimized builds.</li>
805 647
  648 +<li>The scheduler now models operand latency and pipeline forwarding.</li>
  649 +
  650 +<li>A major register allocator infrastructure rewrite is underway. It is not on
  651 + by default for 2.9 and you are not advised to use it, but it has made
  652 + substantial progress in the 2.9 timeframe:
  653 + <ul>
  654 + <li>A new -regalloc=basic "basic" register allocator can be used as a simple
  655 + fallback when debugging. It uses the new infrastructure.</li>
  656 + <li>New infrastructure is in place for live range splitting. "SplitKit" can
  657 + break a live interval into smaller pieces while preserving SSA form, and
  658 + SpillPlacement can help find the best split points. This is a work in
  659 + progress so the API is changing quickly.</li>
  660 + <li>The inline spiller has learned to clean up after live range splitting. It
  661 + can hoist spills out of loops, and it can eliminate redundant spills.</li>
  662 + <li>Rematerialization works with live range splitting.</li>
  663 + <li>The new "greedy" register allocator using live range splitting. This will
  664 + be the default register allocator in the next LLVM release, but it is not
  665 + turned on by default in 2.9.</li>
  666 + </ul>
  667 +</li>
806 668 </ul>
807 669 </div>
808 670
809 671 <!--=========================================================================-->
810   -<div class="doc_subsection">
  672 +<h2>
811 673 <a name="x86">X86-32 and X86-64 Target Improvements</a>
812   -</div>
  674 +</h2>
813 675
814 676 <div class="doc_text">
815 677 <p>New features and major changes in the X86 target include:
816 678 </p>
817 679
818 680 <ul>
819   -<li>The X86 backend now supports holding X87 floating point stack values
820   - in registers across basic blocks, dramatically improving performance of code
821   - that uses long double, and when targeting CPUs that don't support SSE.</li>
822   -
823   -<li>The X86 backend now uses a SSEDomainFix pass to optimize SSE operations. On
824   - Nehalem ("Core i7") and newer CPUs there is a 2 cycle latency penalty on
825   - using a register in a different domain than where it was defined. This pass
826   - optimizes away these stalls.</li>
827   -
828   -<li>The X86 backend now promotes 16-bit integer operations to 32-bits when
829   - possible. This avoids 0x66 prefixes, which are slow on some
830   - microarchitectures and bloat the code on all of them.</li>
831   -
832   -<li>The X86 backend now supports the Microsoft "thiscall" calling convention,
833   - and a <a href="LangRef.html#callingconv">calling convention</a> to support
834   - <a href="#GHC">ghc</a>.</li>
835   -
836   -<li>The X86 backend supports a new "llvm.x86.int" intrinsic, which maps onto
837   - the X86 "int $42" and "int3" instructions.</li>
838   -
839   -<li>At the IR level, the &lt;2 x float&gt; datatype is now promoted and passed
840   - around as a &lt;4 x float&gt; instead of being passed and returned as an MMX
841   - vector. If you have a frontend that uses this, please pass and return a
842   - &lt;2 x i32&gt; instead (using bitcasts).</li>
843   -
844   -<li>When printing .s files in verbose assembly mode (the default for clang -S),
845   - the X86 backend now decodes X86 shuffle instructions and prints human
846   - readable comments after the most inscrutable of them, e.g.:
847   -
848   -<pre>
849   - insertps $113, %xmm3, %xmm0 <i># xmm0 = zero,xmm0[1,2],xmm3[1]</i>
850   - unpcklps %xmm1, %xmm0 <i># xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]</i>
851   - pshufd $1, %xmm1, %xmm1 <i># xmm1 = xmm1[1,0,0,0]</i>
852   -</pre>
  681 +<li>LLVM 2.9 includes a complete reimplementation of the MMX instruction set.
  682 + The reimplementation uses a new LLVM IR <a
  683 + href="LangRef.html#t_x86mmx">x86_mmx</a> type to ensure that MMX operations
  684 + are <em>only</em> generated from source that uses MMX builtin operations. With
  685 + this, random types like &lt;2 x i32&gt; are not turned into MMX operations
  686 + (which can be catastrophic without proper "emms" insertion). Because the X86
  687 + code generator always generates reliable code, the -disable-mmx flag is now
  688 + removed.
  689 +</li>
  690 +
  691 +<li>X86 support for FS/GS relative loads and stores using <a
  692 + href="CodeGenerator.html#x86_memory">address space 256/257</a> works reliably