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: Polyhedral Optimizer</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><a href="#blockplacement">Basic Block Placement</a> 303 Probability driven basic block placement.</li> 304 <li>....</li> 305 </ul> 306 307 </div> 308 309 310 <!--=========================================================================--> 311 <h3> 312 <a name="coreimprovements">LLVM IR and Core Improvements</a> 313 </h3> 314 315 <div> 316 317 <p>LLVM IR has several new features for better support of new targets and that 318 expose new optimization opportunities:</p> 319 320 <ul> 321 <li>IR support for half float</li> 322 <li>IR support for vectors of pointers, including vector GEPs.</li> 323 <li>Module flags have been introduced. They convey information about the 324 module as a whole to LLVM subsystems.</li> 325 <li>Loads can now have range metadata attached to them to describe the 326 possible values being loaded.</li> 327 <li>Inline cost heuristics have been completely overhauled and now closely 328 model constant propagation through call sites, disregard trivially dead 329 code costs, and can model C++ STL iterator patterns.</li> 330 <li>....</li> 331 </ul> 332 </div> 333 334 <!--=========================================================================--> 335 <h3> 336 <a name="optimizer">Optimizer Improvements</a> 337 </h3> 338 339 <div> 340 341 <p>In addition to many minor performance tweaks and bug fixes, this 342 release includes a few major enhancements and additions to the 343 optimizers:</p> 344 345 <ul> 346 <li>The loop unroll pass now is able to unroll loops with run-time trip counts. 347 This feature is turned off by default, and is enabled with the 348 <code>-unroll-runtime</code> flag.</li> 349 <li>A new basic-block autovectorization pass is available. Pass 350 <code>-vectorize</code> to run this pass along with some associated 351 post-vectorization cleanup passes. For more information, see the EuroLLVM 352 2012 slides: <a href="http://llvm.org/devmtg/2012-04-12/Slides/Hal_Finkel.pdf"> 353 Autovectorization with LLVM</a>.</li> 354 <li>....</li> 355 </ul> 356 357 </div> 358 359 <!--=========================================================================--> 360 <h3> 361 <a name="mc">MC Level Improvements</a> 362 </h3> 363 364 <div> 365 366 <p>The LLVM Machine Code (aka MC) subsystem was created to solve a number of 367 problems in the realm of assembly, disassembly, object file format handling, 368 and a number of other related areas that CPU instruction-set level tools work 369 in. For more information, please see 370 the <a href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro 371 to the LLVM MC Project Blog Post</a>.</p> 372 373 <ul> 374 <li>....</li> 375 </ul> 376 377 </div> 378 379 <!--=========================================================================--> 380 <h3> 381 <a name="codegen">Target Independent Code Generator Improvements</a> 382 </h3> 383 384 <div> 385 386 <p>We have changed the way that the Type Legalizer legalizes vectors. The type 387 legalizer now attempts to promote integer elements. This enabled the 388 implementation of vector-select. Additionally, we see a performance boost on 389 workloads which use vectors of chars and shorts, since they are now promoted 390 to 32-bit types, which are better supported by the SIMD instruction set. 391 Floating point types are still widened as before.</p> 392 393 394 <p>We have put a significant amount of work into the code generator 395 infrastructure, which allows us to implement more aggressive algorithms and 396 make it run faster:</p> 397 398 <ul> 399 <li>TableGen can now synthesize register classes that are only needed to 400 represent combinations of constraints from instructions and sub-registers. 401 The synthetic register classes inherit most of their properties form their 402 closest user-defined super-class.</li> 403 <li><code>MachineRegisterInfo</code> now allows the reserved registers to be 404 frozen when register allocation starts. Target hooks should use the 405 <code>MRI->canReserveReg(FramePtr)</code> method to avoid accidentally 406 disabling frame pointer elimination during register allocation.</li> 407 <li>A new kind of <code>MachineOperand</code> provides a compact 408 representation of large clobber lists on call instructions. The register 409 mask operand references a bit mask of preserved registers. Everything else 410 is clobbered.</li> 411 </ul> 412 413 <p> We added new TableGen infrastructure to support bundling for 414 Very Long Instruction Word (VLIW) architectures. TableGen can now 415 automatically generate a deterministic finite automaton from a VLIW 416 target's schedule description which can be queried to determine 417 legal groupings of instructions in a bundle.</p> 418 419 <p> We have added a new target independent VLIW packetizer based on the 420 DFA infrastructure to group machine instructions into bundles.</p> 421 422 </div> 423 424 <h4> 425 <a name="blockplacement">Basic Block Placement</a> 426 </h4> 427 <div> 428 <p>A probability based block placement and code layout algorithm was added to 429 LLVM's code generator. This layout pass supports probabilities derived from 430 static heuristics as well as source code annotations such as 431 <code>__builtin_expect</code>.</p> 432 </div> 433 434 <!--=========================================================================--> 435 <h3> 436 <a name="x86">X86-32 and X86-64 Target Improvements</a> 437 </h3> 438 439 <div> 440 441 <p>New features and major changes in the X86 target include:</p> 442 443 <ul> 444 <li>Bug fixes and improved support for AVX1</li> 445 <li>Support for AVX2 (still incomplete at this point)</li> 446 <li>Call instructions use the new register mask operands for faster compile 447 times and better support for different calling conventions. The old WINCALL 448 instructions are no longer needed.</li> 449 <li>DW2 Exception Handling is enabled on Cygwin and MinGW.</li> 450 <li>Support for implicit TLS model used with MS VC runtime</li> 451 </ul> 452 453 </div> 454 455 <!--=========================================================================--> 456 <h3> 457 <a name="ARM">ARM Target Improvements</a> 458 </h3> 459 460 <div> 461 462 <p>New features of the ARM target include:</p> 463 464 <ul> 465 <li>The constant island pass now supports basic block and constant pool entry 466 alignments greater than 4 bytes.</li> 467 <li>On Darwin, the ARM target now has a full-featured integrated assembler. 468 </li> 469 </ul> 470 471 <h4> 472 <a name="armintegratedassembler">ARM Integrated Assembler</a> 473 </h4> 474 <div> 475 <p>The ARM target now includes a full featured macro assembler, including 476 direct-to-object module support for clang. The assembler is currently enabled 477 by default for Darwin only pending testing and any additional necessary 478 platform specific support for Linux.</p> 479 480 <p>Full support is included for Thumb1, Thumb2 and ARM modes, along with 481 subtarget and CPU specific extensions for VFP2, VFP3 and NEON.</p> 482 483 <p>The assembler is Unified Syntax only (see ARM Architecural Reference Manual 484 for details). While there is some, and growing, support for pre-unfied (divided) 485 syntax, there are still significant gaps in that support.</p> 486 </div> 487 488 </div> 489 <!--=========================================================================--> 490 <h3> 491 <a name="MIPS">MIPS Target Improvements</a> 492 </h3> 493 494 <div> 495 496 <p>This release has seen major new work on just about every aspect of the MIPS 497 backend. Some of the major new features include:</p> 498 499 <ul> 500 <li>....</li> 501 </ul> 502 </div> 503 504 <!--=========================================================================--> 505 <h3> 506 <a name="OtherTS">Other Target Specific Improvements</a> 507 </h3> 508 509 <div> 510 511 <p>Support for Qualcomm's Hexagon VLIW processor has been added.</p> 512 513 <ul> 514 <li>....</li> 515 516 517 </ul> 518 519 </div> 520 521 <!--=========================================================================--> 522 <h3> 523 <a name="changes">Major Changes and Removed Features</a> 524 </h3> 525 526 <div> 527 528 <p>If you're already an LLVM user or developer with out-of-tree changes based on 529 LLVM 3.1, this section lists some "gotchas" that you may run into upgrading 530 from the previous release.</p> 531 532 <ul> 533 <li>LLVM 3.1 removes support for reading LLVM 2.9 bitcode files. Going 534 forward, we aim for all future versions of LLVM to read bitcode files and 535 <tt>.ll</tt> files produced by LLVM 3.0 and later.</li> 536 <li>The <tt>unwind</tt> instruction is now gone. With the introduction of the 537 new exception handling system in LLVM 3.0, the <tt>unwind</tt> instruction 538 became obsolete.</li> 539 <li>....</li> 540 </ul> 541 542 </div> 543 544 <!--=========================================================================--> 545 <h3> 546 <a name="api_changes">Internal API Changes</a> 547 </h3> 548 549 <div> 550 551 <p>In addition, many APIs have changed in this release. Some of the major 552 LLVM API changes are:</p> 553 554 <ul> 555 <li>Target specific options have been moved from global variables to members 556 on the new <code>TargetOptions</code> class, which is local to each 557 <code>TargetMachine</code>. As a consequence, the associated flags will 558 no longer be accepted by <tt>clang -mllvm</tt>. This includes: 559 <ul> 560 <li><code>llvm::PrintMachineCode</code></li> 561 <li><code>llvm::NoFramePointerElim</code></li> 562 <li><code>llvm::NoFramePointerElimNonLeaf</code></li> 563 <li><code>llvm::DisableFramePointerElim(const MachineFunction &)</code></li> 564 <li><code>llvm::LessPreciseFPMADOption</code></li> 565 <li><code>llvm::LessPrecideFPMAD()</code></li> 566 <li><code>llvm::NoExcessFPPrecision</code></li> 567 <li><code>llvm::UnsafeFPMath</code></li> 568 <li><code>llvm::NoInfsFPMath</code></li> 569 <li><code>llvm::NoNaNsFPMath</code></li> 570 <li><code>llvm::HonorSignDependentRoundingFPMathOption</code></li> 571 <li><code>llvm::HonorSignDependentRoundingFPMath()</code></li> 572 <li><code>llvm::UseSoftFloat</code></li> 573 <li><code>llvm::FloatABIType</code></li> 574 <li><code>llvm::NoZerosInBSS</code></li> 575 <li><code>llvm::JITExceptionHandling</code></li> 576 <li><code>llvm::JITEmitDebugInfo</code></li> 577 <li><code>llvm::JITEmitDebugInfoToDisk</code></li> 578 <li><code>llvm::GuaranteedTailCallOpt</code></li> 579 <li><code>llvm::StackAlignmentOverride</code></li> 580 <li><code>llvm::RealignStack</code></li> 581 <li><code>llvm::DisableJumpTables</code></li> 582 <li><code>llvm::EnableFastISel</code></li> 583 <li><code>llvm::getTrapFunctionName()</code></li> 584 <li><code>llvm::EnableSegmentedStacks</code></li> 585 </ul></li> 586 <li>The MDBuilder class has been added to simplify the creation of 587 metadata.</li> 588 <li>....</li> 589 </ul> 590 591 </div> 592 593 <!--=========================================================================--> 594 <h3> 595 <a name="tools_changes">Tools Changes</a> 596 </h3> 597 598 <div> 599 600 <p>In addition, some tools have changed in this release. Some of the changes 601 are:</p> 602 603 604 <ul> 605 <li>llvm-stress is a command line tool for generating random .ll files to fuzz 606 different LLVM components. </li> 607 <li>....</li> 608 </ul> 609 610 <ul> 611 <li>....</li> 612 </ul> 613 614 </div> 615 616 </div> 617 618 <!-- *********************************************************************** --> 619 <h2> 620 <a name="knownproblems">Known Problems</a> 621 </h2> 622 <!-- *********************************************************************** --> 623 624 <div> 625 626 <p>LLVM is generally a production quality compiler, and is used by a broad range 627 of applications and shipping in many products. That said, not every 628 subsystem is as mature as the aggregate, particularly the more obscure 629 targets. If you run into a problem, please check the <a 630 href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if 631 there isn't already one or ask on the <a 632 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev 633 list</a>.</p> 634 635 <p>Known problem areas include:</p> 636 637 <ul> 638 <li>The Alpha, Blackfin, CellSPU, MSP430, PTX, SystemZ and 639 XCore backends are experimental, and the Alpha, Blackfin and SystemZ 640 targets have already been removed from mainline.</li> 641 642 <li>The integrated assembler, disassembler, and JIT is not supported by 643 several targets. If an integrated assembler is not supported, then a 644 system assembler is required. For more details, see the <a 645 href="CodeGenerator.html#targetfeatures">Target Features Matrix</a>. 646 </li> 647 648 <li>The C backend has numerous problems and is not being actively maintained. 649 Depending on it for anything serious is not advised.</li> 650 </ul> 651 652 </div> 653 654 <!-- *********************************************************************** --> 655 <h2> 656 <a name="additionalinfo">Additional Information</a> 657 </h2> 658 <!-- *********************************************************************** --> 659 660 <div> 661 662 <p>A wide variety of additional information is available on 663 the <a href="http://llvm.org/">LLVM web page</a>, in particular in 664 the <a href="http://llvm.org/docs/">documentation</a> section. The web page 665 also contains versions of the API documentation which is up-to-date with the 666 Subversion version of the source code. You can access versions of these 667 documents specific to this release by going into the "<tt>llvm/doc/</tt>" 668 directory in the LLVM tree.</p> 669 670 <p>If you have any questions or comments about LLVM, please feel free to contact 671 us via the <a href="http://llvm.org/docs/#maillist"> mailing lists</a>.</p> 672 673 </div> 674 675 <!-- *********************************************************************** --> 676 677 <hr> 678 <address> 679 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img 680 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a> 681 <a href="http://validator.w3.org/check/referer"><img 682 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a> 683 684 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br> 685 Last modified: $Date$ 686 </address> 687 688 </body> 689 </html> 690