9552fe701ac1ce3ccb0b6b0d2f1cb02abc313828
[oota-llvm.git] / docs / ReleaseNotes.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2                       "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6   <link rel="stylesheet" href="llvm.css" type="text/css">
7   <title>LLVM 3.1 Release Notes</title>
8 </head>
9 <body>
10
11 <h1>LLVM 3.1 Release Notes</h1>
12
13 <div>
14 <img style="float:right" src="http://llvm.org/img/DragonSmall.png"
15      width="136" height="136" alt="LLVM Dragon Logo">
16 </div>
17
18 <ol>
19   <li><a href="#intro">Introduction</a></li>
20   <li><a href="#subproj">Sub-project Status Update</a></li>
21   <li><a href="#externalproj">External Projects Using LLVM 3.1</a></li>
22   <li><a href="#whatsnew">What's New in LLVM?</a></li>
23   <li><a href="GettingStarted.html">Installation Instructions</a></li>
24   <li><a href="#knownproblems">Known Problems</a></li>
25   <li><a href="#additionalinfo">Additional Information</a></li>
26 </ol>
27
28 <div class="doc_author">
29   <p>Written by the <a href="http://llvm.org/">LLVM Team</a></p>
30 </div>
31
32 <h1 style="color:red">These are in-progress notes for the upcoming LLVM 3.1
33 release.<br>
34 You may prefer the
35 <a href="http://llvm.org/releases/3.0/docs/ReleaseNotes.html">LLVM 3.0
36 Release Notes</a>.</h1>
37
38 <!-- *********************************************************************** -->
39 <h2>
40   <a name="intro">Introduction</a>
41 </h2>
42 <!-- *********************************************************************** -->
43
44 <div>
45
46 <p>This document contains the release notes for the LLVM Compiler
47    Infrastructure, release 3.1.  Here we describe the status of LLVM, including
48    major improvements from the previous release, improvements in various
49    subprojects of LLVM, and some of the current users of the code.
50    All LLVM releases may be downloaded from
51    the <a href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
52
53 <p>For more information about LLVM, including information about the latest
54    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>
58
59 <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>
63
64 </div>
65
66
67 <!-- *********************************************************************** -->
68 <h2>
69   <a name="subproj">Sub-project Status Update</a>
70 </h2>
71 <!-- *********************************************************************** -->
72
73 <div>
74
75 <p>The LLVM 3.1 distribution currently consists of code from the core LLVM
76    repository (which roughly includes the LLVM optimizers, code generators and
77    supporting tools), and the Clang repository.  In
78    addition to this code, the LLVM Project includes other sub-projects that are
79    in development.  Here we include updates on these subprojects.</p>
80
81 <!--=========================================================================-->
82 <h3>
83 <a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
84 </h3>
85
86 <div>
87
88 <p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
89    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
95    (32- and 64-bit), and for Darwin/ARM targets.</p>
96
97 <p>In the LLVM 3.1 time-frame, the Clang team has made many improvements:</p>
98 <ul>
99   <li>...</li>
100 </ul>
101
102   <p>For more details about the changes to Clang since the 2.9 release, see the
103 <a href="http://clang.llvm.org/docs/ReleaseNotes.html">Clang release notes</a>
104 </p>
105
106
107 <p>If Clang rejects your code but another compiler accepts it, please take a
108    look at the <a href="http://clang.llvm.org/compatibility.html">language
109    compatibility</a> guide to make sure this is not intentional or a known
110    issue.</p>
111
112 </div>
113
114 <!--=========================================================================-->
115 <h3>
116 <a name="dragonegg">DragonEgg: GCC front-ends, LLVM back-end</a>
117 </h3>
118
119 <div>
120 <p><a href="http://dragonegg.llvm.org/">DragonEgg</a> is a
121    <a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> that replaces GCC's
122    optimizers and code generators with LLVM's. It works with gcc-4.5 or gcc-4.6,
123    targets the x86-32 and x86-64 processor families, and has been successfully
124    used on the Darwin, FreeBSD, KFreeBSD, Linux and OpenBSD platforms.  It fully
125    supports Ada, C, C++ and Fortran.  It has partial support for Go, Java, Obj-C
126    and Obj-C++.</p>
127
128 <p>The 3.1 release has the following notable changes:</p>
129
130   <ul>
131
132   <li>...</li>
133
134 </ul>
135
136 </div>
137
138 <!--=========================================================================-->
139 <h3>
140 <a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
141 </h3>
142
143 <div>
144
145 <p>The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
146    is a simple library that provides an implementation of the low-level
147    target-specific hooks required by code generation and other runtime
148    components.  For example, when compiling for a 32-bit target, converting a
149    double to a 64-bit unsigned integer is compiled into a runtime call to the
150    "__fixunsdfdi" function. The compiler-rt library provides highly optimized
151    implementations of this and other low-level routines (some are 3x faster than
152    the equivalent libgcc routines).</p>
153
154 <p>....</p>
155
156 </div>
157
158 <!--=========================================================================-->
159 <h3>
160 <a name="lldb">LLDB: Low Level Debugger</a>
161 </h3>
162
163 <div>
164
165 <p>LLDB is a ground-up implementation of a command line debugger, as well as a
166    debugger API that can be used from other applications.  LLDB makes use of the
167    Clang parser to provide high-fidelity expression parsing (particularly for
168    C++) and uses the LLVM JIT for target support.</p>
169
170 <p>...</p>
171
172 </div>
173
174 <!--=========================================================================-->
175 <h3>
176 <a name="libc++">libc++: C++ Standard Library</a>
177 </h3>
178
179 <div>
180
181 <p>Like compiler_rt, libc++ is now <a href="DeveloperPolicy.html#license">dual
182    licensed</a> under the MIT and UIUC license, allowing it to be used more
183    permissively.</p>
184
185 <p>...</p>
186
187 </div>
188
189 <!--=========================================================================-->
190 <h3>
191 <a name="vmkit">VMKit</a>
192 </h3>
193
194 <div>
195
196   <p>The <a href="http://vmkit.llvm.org/">VMKit project</a> is an
197   implementation of a Java Virtual Machine (Java VM or JVM) that uses LLVM for
198   static and just-in-time compilation.
199
200   <p>In the LLVM 3.1 time-frame, VMKit has had significant improvements on both
201   runtime and startup performance:</p>
202
203   <ul>
204   <li>...</li>
205   </ul>
206
207 </div>
208
209
210 <!--=========================================================================-->
211 <h3>
212 <a name="Polly">Polly</a>
213 </h3>
214
215 <div>
216
217   <p><a href="http://polly.llvm.org/">Polly</a> is an <em>experimental</em>
218   optimizer for data locality and parallelism. It currently provides high-level
219   loop optimizations and automatic parallelisation (using the OpenMP run time).
220   Work in the area of automatic SIMD and accelerator code generation was
221   started.
222
223   <p>Within the LLVM 3.1 time-frame there were the following highlights:</p>
224
225   <ul>
226   <li>Polly became an official LLVM project</li>
227   <li>Polly can be loaded directly into clang (Enabled by '-O3 -mllvm -polly'
228   )</li>
229   <li>An automatic scheduling optimizer (derived from <a
230   href="http://pluto-compiler.sourceforge.net/">Pluto</a>) was integrated. It
231   performs loop transformations to optimize for data-locality and parallelism.
232   The transformations include, but are not limited to interchange, fusion,
233   fission, skewing and tiling.
234   </li>
235   </ul>
236
237 </div>
238
239 </div>
240
241 <!-- *********************************************************************** -->
242 <h2>
243   <a name="externalproj">External Open Source Projects Using LLVM 3.1</a>
244 </h2>
245 <!-- *********************************************************************** -->
246
247 <div>
248
249 <p>An exciting aspect of LLVM is that it is used as an enabling technology for
250    a lot of other language and tools projects.  This section lists some of the
251    projects that have already been updated to work with LLVM 3.1.</p>
252
253   ... to be filled in right before the release ...
254
255 </div>
256
257 <!-- *********************************************************************** -->
258 <h2>
259   <a name="whatsnew">What's New in LLVM 3.1?</a>
260 </h2>
261 <!-- *********************************************************************** -->
262
263 <div>
264
265 <p>This release includes a huge number of bug fixes, performance tweaks and
266    minor improvements.  Some of the major improvements and new features are
267    listed in this section.</p>
268
269 <!--=========================================================================-->
270 <h3>
271 <a name="majorfeatures">Major New Features</a>
272 </h3>
273
274 <div>
275
276   <!-- Features that need text if they're finished for 3.1:
277    ARM EHABI
278    combiner-aa?
279    strong phi elim
280    loop dependence analysis
281    CorrelatedValuePropagation
282    lib/Transforms/IPO/MergeFunctions.cpp => consider for 3.1.
283    Integrated assembler on by default for arm/thumb?
284
285    -->
286
287   <!-- Near dead:
288    Analysis/RegionInfo.h + Dom Frontiers
289    SparseBitVector: used in LiveVar.
290    llvm/lib/Archive - replace with lib object?
291    -->
292
293 <p>LLVM 3.1 includes several major changes and big features:</p>
294
295 <ul>
296   <li><a href="../tools/clang/docs/AddressSanitizer.html">AddressSanitizer</a>,
297       a fast memory error detector.</li>
298   <li><a href="CodeGenerator.html#machineinstrbundle">MachineInstr Bundles</a>,
299       Support to model instruction bundling / packing.</li>
300   <li><a href="#armintegratedassembler">ARM Integrated Assembler</a>,
301       A full featured assembler and direct-to-object support for ARM.</li>
302   <li>....</li>
303 </ul>
304
305 </div>
306
307
308 <!--=========================================================================-->
309 <h3>
310 <a name="coreimprovements">LLVM IR and Core Improvements</a>
311 </h3>
312
313 <div>
314
315 <p>LLVM IR has several new features for better support of new targets and that
316    expose new optimization opportunities:</p>
317
318   <ul>
319     <li>IR support for half float</li>
320     <li>IR support for vectors of pointers, including vector GEPs.</li>
321     <li>Module flags have been introduced. They convey information about the
322         module as a whole to LLVM subsystems.</li>
323     <li>Loads can now have range metadata attached to them to describe the
324         possible values being loaded.</li>
325     <li>....</li>
326   </ul>
327 </div>
328
329 <!--=========================================================================-->
330 <h3>
331 <a name="optimizer">Optimizer Improvements</a>
332 </h3>
333
334 <div>
335
336 <p>In addition to many minor performance tweaks and bug fixes, this
337    release includes a few major enhancements and additions to the
338    optimizers:</p>
339
340 <ul>
341   <li>The loop unroll pass now is able to unroll loops with run-time trip counts.
342       This feature is turned off by default, and is enabled with the
343       <code>-unroll-runtime</code> flag.</li>
344   <li>A new basic-block autovectorization pass is available. Pass
345       <code>-vectorize</code> to run this pass along with some associated
346       post-vectorization cleanup passes. For more information, see the EuroLLVM
347       2012 slides: <a href="http://llvm.org/devmtg/2012-04-12/Slides/Hal_Finkel.pdf">
348       Autovectorization with LLVM</a>.</li>
349   <li>....</li>
350 </ul>
351
352 </div>
353
354 <!--=========================================================================-->
355 <h3>
356 <a name="mc">MC Level Improvements</a>
357 </h3>
358
359 <div>
360
361 <p>The LLVM Machine Code (aka MC) subsystem was created to solve a number of
362    problems in the realm of assembly, disassembly, object file format handling,
363    and a number of other related areas that CPU instruction-set level tools work
364    in. For more information, please see
365   the <a href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro
366     to the LLVM MC Project Blog Post</a>.</p>
367
368 <ul>
369   <li>....</li>
370 </ul>
371
372 </div>
373
374 <!--=========================================================================-->
375 <h3>
376 <a name="codegen">Target Independent Code Generator Improvements</a>
377 </h3>
378
379 <div>
380
381 <p>We have changed the way that the Type Legalizer legalizes vectors. The type
382    legalizer now attempts to promote integer elements.  This enabled the
383    implementation of vector-select.  Additionally, we see a performance boost on
384    workloads which use vectors of chars and shorts, since they are now promoted
385    to 32-bit types, which are better supported by the SIMD instruction set.
386    Floating point types are still widened as before.</p>
387
388
389 <p>We have put a significant amount of work into the code generator
390    infrastructure, which allows us to implement more aggressive algorithms and
391    make it run faster:</p>
392
393 <ul>
394   <li>TableGen can now synthesize register classes that are only needed to
395       represent combinations of constraints from instructions and sub-registers.
396       The synthetic register classes inherit most of their properties form their
397       closest user-defined super-class.</li>
398   <li><code>MachineRegisterInfo</code> now allows the reserved registers to be
399       frozen when register allocation starts.  Target hooks should use the
400       <code>MRI-&gt;canReserveReg(FramePtr)</code> method to avoid accidentally
401       disabling frame pointer elimination during register allocation.</li>
402   <li>A new kind of <code>MachineOperand</code> provides a compact
403       representation of large clobber lists on call instructions.  The register
404       mask operand references a bit mask of preserved registers. Everything else
405       is clobbered.</li>
406 </ul>
407
408 <p> We added new TableGen infrastructure to support bundling for
409     Very Long Instruction Word (VLIW) architectures. TableGen can now
410     automatically generate a deterministic finite automaton from a VLIW
411     target's schedule description which can be queried to determine
412     legal groupings of instructions in a bundle.</p>
413
414 <p> We have added a new target independent VLIW packetizer based on the
415     DFA infrastructure to group machine instructions into bundles.</p>
416
417 </div>
418
419 <!--=========================================================================-->
420 <h3>
421 <a name="x86">X86-32 and X86-64 Target Improvements</a>
422 </h3>
423
424 <div>
425
426 <p>New features and major changes in the X86 target include:</p>
427
428 <ul>
429   <li>Bug fixes and improved support for AVX1</li>
430   <li>Support for AVX2 (still incomplete at this point)</li>
431   <li>Call instructions use the new register mask operands for faster compile
432   times and better support for different calling conventions.  The old WINCALL
433   instructions are no longer needed.</li>
434   <li>DW2 Exception Handling is enabled on Cygwin and MinGW.</li>
435   <li>Support for implicit TLS model used with MS VC runtime</li>
436 </ul>
437
438 </div>
439
440 <!--=========================================================================-->
441 <h3>
442 <a name="ARM">ARM Target Improvements</a>
443 </h3>
444
445 <div>
446
447 <p>New features of the ARM target include:</p>
448
449 <ul>
450   <li>The constant island pass now supports basic block and constant pool entry
451   alignments greater than 4 bytes.</li>
452   <li>On Darwin, the ARM target now has a full-featured integrated assembler.
453   </li>
454 </ul>
455
456 <h4>
457 <a name="armintegratedassembler">ARM Integrated Assembler</a>
458 </h4>
459 <div>
460 <p>The ARM target now includes a full featured macro assembler, including
461 direct-to-object module support for clang. The assembler is currently enabled
462 by default for Darwin only pending testing and any additional necessary
463 platform specific support for Linux.</p>
464
465 <p>Full support is included for Thumb1, Thumb2 and ARM modes, along with
466 subtarget and CPU specific extensions for VFP2, VFP3 and NEON.</p>
467
468 <p>The assembler is Unified Syntax only (see ARM Architecural Reference Manual
469 for details). While there is some, and growing, support for pre-unfied (divided)
470 syntax, there are still significant gaps in that support.</p>
471 </div>
472
473 </div>
474 <!--=========================================================================-->
475 <h3>
476 <a name="MIPS">MIPS Target Improvements</a>
477 </h3>
478
479 <div>
480
481 <p>This release has seen major new work on just about every aspect of the MIPS
482   backend.  Some of the major new features include:</p>
483
484 <ul>
485   <li>....</li>
486 </ul>
487 </div>
488
489 <!--=========================================================================-->
490 <h3>
491 <a name="OtherTS">Other Target Specific Improvements</a>
492 </h3>
493
494 <div>
495
496 <p>Support for Qualcomm's Hexagon VLIW processor has been added.</p>
497
498 <ul>
499   <li>....</li>
500
501
502 </ul>
503
504 </div>
505
506 <!--=========================================================================-->
507 <h3>
508 <a name="changes">Major Changes and Removed Features</a>
509 </h3>
510
511 <div>
512
513 <p>If you're already an LLVM user or developer with out-of-tree changes based on
514    LLVM 3.1, this section lists some "gotchas" that you may run into upgrading
515    from the previous release.</p>
516
517 <ul>
518   <li>LLVM 3.1 removes support for reading LLVM 2.9 bitcode files. Going
519       forward, we aim for all future versions of LLVM to read bitcode files and
520       <tt>.ll</tt> files produced by LLVM 3.0 and later.</li>
521   <li>The <tt>unwind</tt> instruction is now gone. With the introduction of the
522       new exception handling system in LLVM 3.0, the <tt>unwind</tt> instruction
523       became obsolete.</li>
524   <li>Floating point instructions can be annotated with <tt>fpmath</tt> metadata
525       to indicate relaxed precision requirements, such as those corresponding to
526       "fast math".</li>
527   <li>....</li>
528 </ul>
529
530 </div>
531
532 <!--=========================================================================-->
533 <h3>
534 <a name="api_changes">Internal API Changes</a>
535 </h3>
536
537 <div>
538
539 <p>In addition, many APIs have changed in this release.  Some of the major
540    LLVM API changes are:</p>
541
542 <ul>
543   <li>Target specific options have been moved from global variables to members
544       on the new <code>TargetOptions</code> class, which is local to each
545       <code>TargetMachine</code>. As a consequence, the associated flags will
546       no longer be accepted by <tt>clang -mllvm</tt>. This includes:
547 <ul>
548 <li><code>llvm::PrintMachineCode</code></li>
549 <li><code>llvm::NoFramePointerElim</code></li>
550 <li><code>llvm::NoFramePointerElimNonLeaf</code></li>
551 <li><code>llvm::DisableFramePointerElim(const MachineFunction &)</code></li>
552 <li><code>llvm::LessPreciseFPMADOption</code></li>
553 <li><code>llvm::LessPrecideFPMAD()</code></li>
554 <li><code>llvm::NoExcessFPPrecision</code></li>
555 <li><code>llvm::UnsafeFPMath</code></li>
556 <li><code>llvm::NoInfsFPMath</code></li>
557 <li><code>llvm::NoNaNsFPMath</code></li>
558 <li><code>llvm::HonorSignDependentRoundingFPMathOption</code></li>
559 <li><code>llvm::HonorSignDependentRoundingFPMath()</code></li>
560 <li><code>llvm::UseSoftFloat</code></li>
561 <li><code>llvm::FloatABIType</code></li>
562 <li><code>llvm::NoZerosInBSS</code></li>
563 <li><code>llvm::JITExceptionHandling</code></li>
564 <li><code>llvm::JITEmitDebugInfo</code></li>
565 <li><code>llvm::JITEmitDebugInfoToDisk</code></li>
566 <li><code>llvm::GuaranteedTailCallOpt</code></li>
567 <li><code>llvm::StackAlignmentOverride</code></li>
568 <li><code>llvm::RealignStack</code></li>
569 <li><code>llvm::DisableJumpTables</code></li>
570 <li><code>llvm::EnableFastISel</code></li>
571 <li><code>llvm::getTrapFunctionName()</code></li>
572 <li><code>llvm::EnableSegmentedStacks</code></li>
573 </ul></li>
574   <li>The MDBuilder class has been added to simplify the creation of
575       metadata.</li>
576   <li>....</li>
577 </ul>
578
579 </div>
580
581 <!--=========================================================================-->
582 <h3>
583 <a name="tools_changes">Tools Changes</a>
584 </h3>
585
586 <div>
587
588 <p>In addition, some tools have changed in this release. Some of the changes
589    are:</p>
590
591
592 <ul>
593   <li>llvm-stress is a command line tool for generating random .ll files to fuzz
594       different LLVM components. </li>
595   <li>....</li>
596 </ul>
597
598 <ul>
599   <li>....</li>
600 </ul>
601
602 </div>
603
604 </div>
605
606 <!-- *********************************************************************** -->
607 <h2>
608   <a name="knownproblems">Known Problems</a>
609 </h2>
610 <!-- *********************************************************************** -->
611
612 <div>
613
614 <p>LLVM is generally a production quality compiler, and is used by a broad range
615    of applications and shipping in many products.  That said, not every
616    subsystem is as mature as the aggregate, particularly the more obscure
617    targets.  If you run into a problem, please check the <a
618    href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
619    there isn't already one or ask on the <a
620     href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev
621     list</a>.</p>
622
623   <p>Known problem areas include:</p>
624
625 <ul>
626   <li>The Alpha, Blackfin, CellSPU, MSP430, PTX, SystemZ and
627       XCore backends are experimental, and the Alpha, Blackfin and SystemZ
628       targets have already been removed from mainline.</li>
629
630   <li>The integrated assembler, disassembler, and JIT is not supported by
631       several targets.  If an integrated assembler is not supported, then a
632       system assembler is required.  For more details, see the <a
633       href="CodeGenerator.html#targetfeatures">Target Features Matrix</a>.
634   </li>
635
636   <li>The C backend has numerous problems and is not being actively maintained.
637     Depending on it for anything serious is not advised.</li>
638 </ul>
639
640 </div>
641
642 <!-- *********************************************************************** -->
643 <h2>
644   <a name="additionalinfo">Additional Information</a>
645 </h2>
646 <!-- *********************************************************************** -->
647
648 <div>
649
650 <p>A wide variety of additional information is available on
651    the <a href="http://llvm.org/">LLVM web page</a>, in particular in
652    the <a href="http://llvm.org/docs/">documentation</a> section.  The web page
653    also contains versions of the API documentation which is up-to-date with the
654    Subversion version of the source code.  You can access versions of these
655    documents specific to this release by going into the "<tt>llvm/doc/</tt>"
656    directory in the LLVM tree.</p>
657
658 <p>If you have any questions or comments about LLVM, please feel free to contact
659    us via the <a href="http://llvm.org/docs/#maillist"> mailing lists</a>.</p>
660
661 </div>
662
663 <!-- *********************************************************************** -->
664
665 <hr>
666 <address>
667   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
668   src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
669   <a href="http://validator.w3.org/check/referer"><img
670   src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
671
672   <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
673   Last modified: $Date$
674 </address>
675
676 </body>
677 </html>