llvm.org GIT mirror llvm / release_27
Commit 2.7 release notes. Update getting started guide for 2.7 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@102412 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 9 years ago
2 changed file(s) with 549 addition(s) and 271 deletion(s). Raw diff Collapse all Expand all
725725 subdirectories of the 'tags' directory:

726726
727727
728
  • Release 2.7: RELEASE_27
  • 728729
  • Release 2.6: RELEASE_26
  • 729730
  • Release 2.5: RELEASE_25
  • 730731
  • Release 2.4: RELEASE_24
  • 88
    99
    1010
    LLVM 2.7 Release Notes
    11
    12
    13 width="136" height="136" alt="LLVM Dragon Logo">
    1114
    1215
    1316
  • Introduction
  • 2427

    Written by the LLVM Team

    2528
    2629
    27 <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.7
    30 <!--
    31

    These are in-progress notes for the upcoming LLVM 2.8

    2832 release.
    2933 You may prefer the
    30 LLVM 2.6
    31 Release Notes.
    34 LLVM 2.7
    35 Release Notes.-->
    3236
    3337
    3438
    4751

    For more information about LLVM, including information about the latest

    4852 release, please check out the main LLVM
    4953 web site. If you have questions or comments, the
    50 href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's Mailing
    51 List is a good place to send them.

    54 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's
    55 Mailing List is a good place to send them.

    5256
    5357

    Note that if you are reading this file from a Subversion checkout or the

    5458 main LLVM web page, this document applies to the next release, not the
    6367 include/llvm/Analysis/LiveValues.h => Dan
    6468 lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8.
    6569 llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8.
    66 ABCD, SCCVN, GEPSplitterPass
    70 ABCD, GEPSplitterPass
    6771 MSIL backend?
    72 lib/Transforms/Utils/SSI.cpp -> ABCD depends on it.
    6873 -->
    6974
    7075
    7176
    8382
    8483
    9391
    9492
    116114
    117115
    118116
    119

    The Clang project is ...

    117

    Clang is an LLVM front end for the C,

    118 C++, and Objective-C languages. Clang aims to provide a better user experience
    119 through expressive diagnostics, a high level of conformance to language
    120 standards, fast compilation, and low memory use. Like LLVM, Clang provides a
    121 modular, library-based architecture that makes it suitable for creating or
    122 integrating with other development tools. Clang is considered a
    123 production-quality compiler for C and Objective-C on x86 (32- and 64-bit).

    120124
    121125

    In the LLVM 2.7 time-frame, the Clang team has made many improvements:

    122126
    123127
    124
  • ...
  • 128
    129
  • C++ Support: Clang is now capable of self-hosting! While still
  • 130 alpha-quality, Clang's C++ support has matured enough to build LLVM and Clang,
    131 and C++ is now enabled by default. See the
    132 href="http://clang.llvm.org/cxx_compatibility.html">Clang C++ compatibility
    133 page for common C++ migration issues.
    134
    135
  • Objective-C: Clang now includes experimental support for an updated
  • 136 Objective-C ABI on non-Darwin platforms. This includes support for non-fragile
    137 instance variables and accelerated proxies, as well as greater potential for
    138 future optimisations. The new ABI is used when compiling with the
    139 -fobjc-nonfragile-abi and -fgnu-runtime options. Code compiled with these
    140 options may be mixed with code compiled with GCC or clang using the old GNU ABI,
    141 but requires the libobjc2 runtime from the GNUstep project.
    142
    143
  • New warnings: Clang contains a number of new warnings, including
  • 144 control-flow warnings (unreachable code, missing return statements in a
    145 non-void function, etc.), sign-comparison warnings, and improved
    146 format-string warnings.
    147
    148
  • CIndex API and Python bindings: Clang now includes a C API as part of the
  • 149 CIndex library. Although we may make some changes to the API in the future, it
    150 is intended to be stable and has been designed for use by external projects. See
    151 the Clang
    152 doxygen CIndex
    153 documentation for more details. The CIndex API also includes a preliminary
    154 set of Python bindings.
    155
    156
  • ARM Support: Clang now has ABI support for both the Darwin and Linux ARM
  • 157 ABIs. Coupled with many improvements to the LLVM ARM backend, Clang is now
    158 suitable for use as a beta quality ARM compiler.
    159
    125160
    126161
    127162
    132167
    133168
    134169
    135

    Previously announced in the 2.4, 2.5, and 2.6 LLVM releases, the Clang project also

    136 includes an early stage static source code analysis tool for
    137 href="http://clang.llvm.org/StaticAnalysis.html">automatically finding bugs
    138 in C and Objective-C programs. The tool performs checks to find
    139 bugs that occur on a specific path within a program.

    140
    141

    In the LLVM 2.7 time-frame, the analyzer core has ...>

    170

    The Clang Static Analyzer>

    171 project is an effort to use static source code analysis techniques to
    172 automatically find bugs in C and Objective-C programs (and hopefully
    173 href="http://clang-analyzer.llvm.org/dev_cxx.html">C++ in the
    174 future!). The tool is very good at finding bugs that occur on specific
    175 paths through code, such as on error conditions.

    176
    177

    In the LLVM 2.7 time-frame, the analyzer core has made several major and

    178 minor improvements, including better support for tracking the fields of
    179 structures, initial support (not enabled by default yet) for doing
    180 interprocedural (cross-function) analysis, and new checks have been added.
    181

    142182
    143183
    144184
    155195 compilation.

    156196
    157197

    158 VMKit version ?? builds with LLVM 2.7 and you can find it on its
    159 web page. The release includes
    160 bug fixes, cleanup and new features. The major changes are:

    161
    162
    163
    164
  • ...
  • 198 With the release of LLVM 2.7, VMKit has shifted to a great framework for writing
    199 virtual machines. VMKit now offers precise and efficient garbage collection with
    200 multi-threading support, thanks to the MMTk memory management toolkit, as well
    201 as just in time and ahead of time compilation with LLVM. The major changes in
    202 VMKit 0.27 are:

    203
    204
    205
    206
  • Garbage collection: VMKit now uses the MMTk toolkit for garbage collectors.
  • 207 The first collector to be ported is the MarkSweep collector, which is precise,
    208 and drastically improves the performance of VMKit.
    209
  • Line number information in the JVM: by using the debug metadata of LLVM, the
  • 210 JVM now supports precise line number information, useful when printing a stack
    211 trace.
    212
  • Interface calls in the JVM: we implemented a variant of the Interface Method
  • 213 Table technique for interface calls in the JVM.
    214
    165215
    166216
    167217
    185235
    186236

    187237 All of the code in the compiler-rt project is available under the standard LLVM
    188 License, a "BSD-style" license.

    189
    190
    191
    192
    193
    194 KLEE: Symbolic Execution and Automatic Test Case Generator
    195
    196
    197
    198

    199 The new LLVM KLEE project is a symbolic
    200 execution framework for programs in LLVM bitcode form. KLEE tries to
    201 symbolically evaluate "all" paths through the application and records state
    202 transitions that lead to fault states. This allows it to construct testcases
    203 that lead to faults and can even be used to verify algorithms. For more
    204 details, please see the
    205 href="http://llvm.org/pubs/2008-12-OSDI-KLEE.html">OSDI 2008 paper about
    206 KLEE.

    207
    208
    209
    210
    211
    212 DragonEgg: GCC-4.5 as an LLVM frontend
    213
    214
    215
    216

    217 The goal of DragonEgg is to make
    218 gcc-4.5 act like llvm-gcc without requiring any gcc modifications whatsoever.
    219 DragonEgg is a shared library (dragonegg.so)
    220 that is loaded by gcc at runtime. It ...
    238 License, a "BSD-style" license. New in LLVM 2.7: compiler_rt now
    239 supports ARM targets.

    240
    241
    242
    243
    244
    245 DragonEgg: llvm-gcc ported to gcc-4.5
    246
    247
    248
    249

    250 DragonEgg is a port of llvm-gcc to
    251 gcc-4.5. Unlike llvm-gcc, which makes many intrusive changes to the underlying
    252 gcc-4.2 code, dragonegg in theory does not require any gcc-4.5 modifications
    253 whatsoever (currently one small patch is needed). This is thanks to the new
    254 gcc plugin architecture, which
    255 makes it possible to modify the behaviour of gcc at runtime by loading a plugin,
    256 which is nothing more than a dynamic library which conforms to the gcc plugin
    257 interface. DragonEgg is a gcc plugin that causes the LLVM optimizers to be run
    258 instead of the gcc optimizers, and the LLVM code generators instead of the gcc
    259 code generators, just like llvm-gcc. To use it, you add
    260 "-fplugin=path/dragonegg.so" to the gcc-4.5 command line, and gcc-4.5 magically
    261 becomes llvm-gcc-4.5!
    262

    263
    264

    265 DragonEgg is still a work in progress. Currently C works very well, while C++,
    266 Ada and Fortran work fairly well. All other languages either don't work at all,
    267 or only work poorly. For the moment only the x86-32 and x86-64 targets are
    268 supported, and only on linux and darwin (darwin needs an additional gcc patch).
    269

    270
    271

    272 DragonEgg is a new project which is seeing its first release with llvm-2.7.
    221273

    222274
    223275
    230282
    231283
    232284

    233 The LLVM Machine Code (MC) Toolkit project is ...
    234

    285 The LLVM Machine Code (aka MC) sub-project of LLVM was created to solve a number
    286 of problems in the realm of assembly, disassembly, object file format handling,
    287 and a number of other related areas that CPU instruction-set level tools work
    288 in. It is a sub-project of LLVM which provides it with a number of advantages
    289 over other compilers that do not have tightly integrated assembly-level tools.
    290 For a gentle introduction, please see the
    291 href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro to the
    292 LLVM MC Project Blog Post.
    293

    294
    295

    2.7 includes major parts of the work required by the new MC Project. A few

    296 targets have been refactored to support it, and work is underway to support a
    297 native assembler in LLVM. This work is not complete in LLVM 2.7, but it has
    298 made substantially more progress on LLVM mainline.

    299
    300

    One minor example of what MC can do is to transcode an AT&T syntax

    301 X86 .s file into intel syntax. You can do this with something like:

    302
    
                      
                    
    303 llvm-mc foo.s -output-asm-variant=1 -o foo-intel.s
    304
    235305
    236306
    237307
    248318 a lot of other language and tools projects. This section lists some of the
    249319 projects that have already been updated to work with LLVM 2.7.

    250320
    251
    252
    253
    254
    255 Rubinius
    256
    257
    258
    259

    Rubinius is an environment

    260 for running Ruby code which strives to write as much of the core class
    261 implementation in Ruby as possible. Combined with a bytecode interpreting VM, it
    262 uses LLVM to optimize and compile ruby code down to machine code. Techniques
    263 such as type feedback, method inlining, and uncommon traps are all used to
    264 remove dynamism from ruby execution and increase performance.

    265
    266

    Since LLVM 2.5, Rubinius has made several major leaps forward, implementing

    267 a counter based JIT, type feedback and speculative method inlining.
    268

    269
    270
    271
    272
    273
    274 MacRuby
    275
    276
    277
    278
    279

    280 MacRuby is an implementation of Ruby on top of
    281 core Mac OS X technologies, such as the Objective-C common runtime and garbage
    282 collector and the CoreFoundation framework. It is principally developed by
    283 Apple and aims at enabling the creation of full-fledged Mac OS X applications.
    284

    285
    286

    287 MacRuby uses LLVM for optimization passes, JIT and AOT compilation of Ruby
    288 expressions. It also uses zero-cost DWARF exceptions to implement Ruby exception
    289 handling.

    290
    291
    292
    293321
    294322
    295323
    307335 an easy-to-use C interface. The interpreter uses LLVM as a backend to
    308336 JIT-compile Pure programs to fast native code.

    309337
    310

    Pure versions ??? and later have been tested and are known to work with

    311 LLVM 2.7 (and continue to work with older LLVM releases >= 2.3 as well).
    312

    313
    314
    315
    316
    317
    318 LLVM D Compiler
    319
    320
    321
    322

    323 LDC is an implementation of
    324 the D Programming Language using the LLVM optimizer and code generator.
    325 The LDC project works great with the LLVM 2.6 release. General improvements in
    326 this
    327 cycle have included new inline asm constraint handling, better debug info
    328 support, general bug fixes and better x86-64 support. This has allowed
    329 some major improvements in LDC, getting it much closer to being as
    330 fully featured as the original DMD compiler from DigitalMars.
    331 </p>
    338 <p>Pure versions 0.43 and later have been tested and are known to work with
    339 LLVM 2.7 (and continue to work with older LLVM releases >= 2.5).

    340
    332341
    333342
    334343
    341350 Roadsend PHP (rphp) is an open
    342351 source implementation of the PHP programming
    343352 language that uses LLVM for its optimizer, JIT and static compiler. This is a
    344 reimplementation of an earlier project that is now based on LLVM.

    353 reimplementation of an earlier project that is now based on LLVM.
    354

    345355
    346356
    347357
    354364 Unladen Swallow is a
    355365 branch of Python intended to be fully
    356366 compatible and significantly faster. It uses LLVM's optimization passes and JIT
    357 compiler.

    358
    359
    360
    361
    362 llvm-lua
    363
    364
    365
    366

    367 LLVM-Lua uses LLVM to add JIT
    368 and static compiling support to the Lua VM. Lua bytecode is analyzed to
    369 remove type checks, then LLVM is used to compile the bytecode down to machine
    370 code.

    367 compiler.
    368

    369
    370
    371
    372
    373 TTA-based Codesign Environment (TCE)
    374
    375
    376
    377

    378 TCE is a toolset for designing
    379 application-specific processors (ASP) based on the Transport triggered
    380 architecture (TTA). The toolset provides a complete co-design flow from C/C++
    381 programs down to synthesizable VHDL and parallel program binaries. Processor
    382 customization points include the register files, function units, supported
    383 operations, and the interconnection network.

    384
    385

    TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target

    386 independent optimizations and also for parts of code generation. It generates
    387 new LLVM-based code generators "on the fly" for the designed TTA processors and
    388 loads them in to the compiler backend as runtime libraries to avoid per-target
    389 recompilation of larger parts of the compiler chain.

    390
    391
    392
    393
    394
    395 SAFECode Compiler
    396
    397
    398
    399

    400 SAFECode is a memory safe C
    401 compiler built using LLVM. It takes standard, unannotated C code, analyzes the
    402 code to ensure that memory accesses and array indexing operations are safe, and
    403 instruments the code with run-time checks when safety cannot be proven
    404 statically.
    405

    371406
    372407
    373408
    385420 to provide native code generation without introducing processor-dependent
    386421 code.
    387422

    388
    389
    423

    Icedtea6 1.8 and later have been tested and are known to work with

    424 LLVM 2.7 (and continue to work with older LLVM releases >= 2.6 as well).
    425

    426
    427
    428
    429
    430 LLVM-Lua
    431
    432
    433
    434

    435 LLVM-Lua uses LLVM
    436 to add JIT and static compiling support to the Lua VM. Lua
    437 bytecode is analyzed to remove type checks, then LLVM is used to compile the
    438 bytecode down to machine code.
    439

    440

    LLVM-Lua 1.2.0 have been tested and is known to work with LLVM 2.7.

    441

    442
    443
    444
    445
    446 MacRuby
    447
    448
    449
    450

    451 MacRuby is an implementation of Ruby based on
    452 core Mac OS technologies, sponsored by Apple Inc. It uses LLVM at runtime for
    453 optimization passes, JIT compilation and exception handling. It also allows
    454 static (ahead-of-time) compilation of Ruby code straight to machine code.
    455

    456

    The upcoming MacRuby 0.6 release works with LLVM 2.7.

    457

    458
    459
    460
    461
    462 Glasgow Haskell Compiler (GHC)
    463
    464
    465
    466

    467 GHC is an open source,
    468 state-of-the-art programming suite for Haskell, a standard lazy
    469 functional programming language. It includes an optimizing static
    470 compiler generating good code for a variety of platforms, together
    471 with an interactive system for convenient, quick development.

    472
    473

    In addition to the existing C and native code generators, GHC now

    474 supports an
    475 href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM">LLVM
    476 code generator. GHC supports LLVM 2.7.

    477
    478
    390479
    391480
    392481
    406495
    407496
    408497
    498 LLVM Community Changes
    499
    500
    501
    502
    503

    In addition to changes to the code, between LLVM 2.6 and 2.7, a number of

    504 organization changes have happened:
    505

    506
    507
    508
  • LLVM has a new official logo!
  • 509
    510
  • Ted Kremenek and Doug Gregor have stepped forward as
  • 511 href="http://llvm.org/docs/DeveloperPolicy.html#owners">Code Owners of the
    512 Clang static analyzer and the Clang frontend, respectively.
    513
    514
  • LLVM now has an official Blog at
  • 515 http://blog.llvm.org. This is a great way
    516 to learn about new LLVM-related features as they are implemented. Several
    517 features in this release are already explained on the blog.
    518
    519
  • The LLVM web pages are now checked into the SVN server, in the "www",
  • 520 "www-pubs" and "www-releases" SVN modules. Previously they were hidden in a
    521 largely inaccessible old CVS server.
    522
    523
  • llvm.org is now hosted on a new (and much
  • 524 faster) server. It is still graciously hosted at the University of Illinois
    525 of Urbana Champaign.
    526
    527
    528
    529
    530
    409531 Major New Features
    410532
    411533
    414536

    LLVM 2.7 includes several major new capabilities:

    415537
    416538
    417
  • ...
  • 539
  • 2.7 includes initial support for the
  • 540 href="http://en.wikipedia.org/wiki/MicroBlaze">MicroBlaze target.
    541 MicroBlaze is a soft processor core designed for Xilinx FPGAs.
    542
    543
  • 2.7 includes a new LLVM IR "extensible metadata" feature. This feature
  • 544 supports many different use cases, including allowing front-end authors to
    545 encode source level information into LLVM IR, which is consumed by later
    546 language-specific passes. This is a great way to do high-level optimizations
    547 like devirtualization, type-based alias analysis, etc. See the
    548 href="http://blog.llvm.org/2010/04/extensible-metadata-in-llvm-ir.html">
    549 Extensible Metadata Blog Post for more information.
    550
    551
  • 2.7 encodes debug information
  • 552 in a completely new way, built on extensible metadata. The new implementation
    553 is much more memory efficient and paves the way for improvements to optimized
    554 code debugging experience.
    555
    556
  • 2.7 now directly supports taking the address of a label and doing an
  • 557 indirect branch through a pointer. This is particularly useful for
    558 interpreter loops, and is used to implement the GCC "address of label"
    559 extension. For more information, see the
    560 href="http://blog.llvm.org/2010/01/address-of-label-and-indirect-branches.html">
    561 Address of Label and Indirect Branches in LLVM IR Blog Post.
    562
    563
  • 2.7 is the first release to start supporting APIs for assembling and
  • 564 disassembling target machine code. These APIs are useful for a variety of
    565 low level clients, and are surfaced in the new "enhanced disassembly" API.
    566 For more information see the
    567 href="http://blog.llvm.org/2010/01/x86-disassembler.html">The X86
    568 Disassembler Blog Post for more information.
    569
    570
  • 2.7 includes major parts of the work required by the new MC Project,
  • 571 see the MC update above for more information.
    572
    418573
    419574
    420575
    429584 expose new optimization opportunities:

    430585
    431586
    432
  • ...
  • 587
  • LLVM IR now supports a 16-bit "half float" data type through
  • 588 href="LangRef.html#int_fp16">two new intrinsics and APFloat support.
    589
  • LLVM IR supports two new function
  • 590 attributes: inlinehint and alignstack(n). The former is a hint to the
    591 optimizer that a function was declared 'inline' and thus the inliner should
    592 weight it higher when considering inlining it. The later
    593 indicates to the code generator that the function diverges from the platform
    594 ABI on stack alignment.
    595
  • The new llvm.objectsize intrinsic
  • 596 allows the optimizer to infer the sizes of memory objects in some cases.
    597 This intrinsic is used to implement the GCC __builtin_object_size
    598 extension.
    599
  • LLVM IR now supports marking load and store instructions with
  • 600 href="LangRef.html#i_load">"non-temporal" hints (building on the new
    601 metadata feature). This hint encourages the code
    602 generator to generate non-temporal accesses when possible, which are useful
    603 for code that is carefully managing cache behavior. Currently, only the
    604 X86 backend provides target support for this feature.
    605
    606
  • LLVM 2.7 has pre-alpha support for
  • 607 href="LangRef.html#t_union">unions in LLVM IR.
    608 Unfortunately, this support is not really usable in 2.7, so if you're
    609 interested in pushing it forward, please help contribute to LLVM mainline.
    610
    433611
    434612
    435613
    446624
    447625
    448626
    449
  • ...
  • 450
    451
    452
    453 <p>Also, -anders-aa was removed

    627 <li>The inliner reuses now merges arrays stack objects in different callees when
    628 inlining multiple call sites into one function. This reduces the stack size
    629 of the resultant function.
    630
  • The -basicaa alias analysis pass (which is the default) has been improved to
  • 631 be less dependent on "type safe" pointers. It can now look through bitcasts
    632 and other constructs more aggressively, allowing better load/store
    633 optimization.
    634
  • The load elimination optimization in the GVN Pass [
  • 635 href="http://blog.llvm.org/2009/12/introduction-to-load-elimination-in-gvn.html">intro
    636 blog post] has been substantially improved to be more aggressive about
    637 partial redundancy elimination and do more aggressive phi translation. Please
    638 see the
    639 href="http://blog.llvm.org/2009/12/advanced-topics-in-redundant-load.html">
    640 Advanced Topics in Redundant Load Elimination with a Focus on PHI Translation
    641 Blog Post for more details.
    642
  • The module target data string now
  • 643 includes a notion of 'native' integer data types for the target. This
    644 helps mid-level optimizations avoid promoting complex sequences of
    645 operations to data types that are not natively supported (e.g. converting
    646 i32 operations to i64 on 32-bit chips).
    647
  • The mid-level optimizer is now conservative when operating on a module with
  • 648 no target data. Previously, it would default to SparcV9 settings, which is
    649 not what most people expected.
    650
  • Jump threading is now much more aggressive at simplifying correlated
  • 651 conditionals and threading blocks with otherwise complex logic. It has
    652 subsumed the old "Conditional Propagation" pass, and -condprop has been
    653 removed from LLVM 2.7.
    654
  • The -instcombine pass has been refactored from being one huge file to being
  • 655 a library of its own. Internally, it uses a customized IRBuilder to clean
    656 it up and simplify it.
    657
    658
  • The optimal edge profiling pass is reliable and much more complete than in
  • 659 2.6. It can be used with the llvm-prof tool but isn't wired up to the
    660 llvm-gcc and clang command line options yet.
    661
    662
  • A new experimental alias analysis implementation, -scev-aa, has been added.
  • 663 It uses LLVM's Scalar Evolution implementation to do symbolic analysis of
    664 pointer offset expressions to disambiguate pointers. It can catch a few
    665 cases that basicaa cannot, particularly in complex loop nests.
    666
    667
  • The default pass ordering has been tweaked for improved optimization
  • 668 effectiveness.
    669
    670
    454671
    455672
    456673
    463680
    464681
    465682
    466
  • The JIT now
  • 467 href="http://llvm.org/viewvc/llvm-project?view=rev&revision=85295">defaults
    683
  • The JIT now supports generating debug information and is compatible with
  • 684 the new GDB 7.0 (and later) interfaces for registering dynamically generated
    685 debug info.
    686
    687
  • The JIT now defaults
  • 468688 to compiling eagerly to avoid a race condition in the lazy JIT.
    469689 Clients that still want the lazy JIT can switch it on by calling
    470690 ExecutionEngine::DisableLazyCompilation(false).
    691
    471692
  • It is now possible to create more than one JIT instance in the same process.
  • 472693 These JITs can generate machine code in parallel,
    473694 although you
    474695 still have to obey the other threading restrictions.
    696
    475697
    476698
    477699
    488710 it run faster:

    489711
    490712
    491
    492
  • ...
  • 713
  • The 'llc -asm-verbose' option (which is now the default) has been enhanced
  • 714 to emit many useful comments to .s files indicating information about spill
    715 slots and loop nest structure. This should make it much easier to read and
    716 understand assembly files. This is wired up in llvm-gcc and clang to
    717 the -fverbose-asm option.
    718
    719
  • New LSR with "full strength reduction" mode, which can reduce address
  • 720 register pressure in loops where address generation is important.
    721
    722
  • A new codegen level Common Subexpression Elimination pass (MachineCSE)
  • 723 is available and enabled by default. It catches redundancies exposed by
    724 lowering.
    725
  • A new pre-register-allocation tail duplication pass is available and enabled
  • 726 by default, it can substantially improve branch prediction quality in some
    727 cases.
    728
  • A new sign and zero extension optimization pass (OptimizeExtsPass)
  • 729 is available and enabled by default. This pass can takes advantage
    730 architecture features like x86-64 implicit zero extension behavior and
    731 sub-registers.
    732
  • The code generator now supports a mode where it attempts to preserve the
  • 733 order of instructions in the input code. This is important for source that
    734 is hand scheduled and extremely sensitive to scheduling. It is compatible
    735 with the GCC -fno-schedule-insns option.
    736
  • The target-independent code generator now supports generating code with
  • 737 arbitrary numbers of result values. Returning more values than was
    738 previously supported is handled by returning through a hidden pointer. In
    739 2.7, only the X86 and XCore targets have adopted support for this
    740 though.
    741
  • The code generator now supports generating code that follows the
  • 742 Glasgow Haskell Compiler Calling
    743 Convention and ABI.
    744
  • The "DAG instruction
  • 745 selection" phase of the code generator has been largely rewritten for
    746 2.7. Previously, tblgen spit out tons of C++ code which was compiled and
    747 linked into the target to do the pattern matching, now it emits a much
    748 smaller table which is read by the target-independent code. The primary
    749 advantages of this approach is that the size and compile time of various
    750 targets is much improved. The X86 code generator shrunk by 1.5MB of code,
    751 for example.
    752
  • Almost the entire code generator has switched to emitting code through the
  • 753 MC interfaces instead of printing textually to the .s file. This led to a
    754 number of cleanups and speedups. In 2.7, debug an exception handling
    755 information does not go through MC yet.
    493756
    494757
    495758
    503766

    504767
    505768
    506
    507
  • ...
  • 508
    509
    510
    511
    512
    513
    514
    515 PIC16 Target Improvements
    516
    517
    518
    519

    New features of the PIC16 target include:

    520

    521
    522
    523
  • ...
  • 524
    525
    526

    Things not yet supported:

    527
    528
    529
  • Variable arguments.
  • 530
  • Interrupts/programs.
  • 769
  • The X86 backend now optimizes tails calls much more aggressively for
  • 770 functions that use the standard C calling convention.
    771
  • The X86 backend now models scalar SSE registers as subregs of the SSE vector
  • 772 registers, making the code generator more aggressive in cases where scalars
    773 and vector types are mixed.
    774
    531775
    532776
    533777
    543787
    544788
    545789
    546
  • ...
  • 547
    548
    549
    550
    551
    552
    553
    554 Other Target Specific Improvements
    555
    556
    557
    558

    New features of other targets include:

    559

    560
    561
    562
  • ...
  • 563 </ul>
    790 <li>The ARM backend now generates instructions in unified assembly syntax.>
    791
    792
  • llvm-gcc now has complete support for the ARM v7 NEON instruction set. This
  • 793 support differs slightly from the GCC implementation. Please see the
    794
    795 href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">
    796 ARM Advanced SIMD (NEON) Intrinsics and Types in LLVM Blog Post for
    797 helpful information if migrating code from GCC to LLVM-GCC.
    798
    799
  • The ARM and Thumb code generators now use register scavenging for stack
  • 800 object address materialization. This allows the use of R3 as a general
    801 purpose register in Thumb1 code, as it was previous reserved for use in
    802 stack address materialization. Secondly, sequential uses of the same
    803 value will now re-use the materialized constant.
    804
    805
  • The ARM backend now has good support for ARMv4 targets and has been tested
  • 806 on StrongARM hardware. Previously, LLVM only supported ARMv4T and
    807 newer chips.
    808
    809
  • Atomic builtins are now supported for ARMv6 and ARMv7 (__sync_synchronize,
  • 810 __sync_fetch_and_add, etc.).
    811
    812
    813
    564814
    565815
    566816
    576826

    577827
    578828
    579
  • ...
  • 829
  • The optimizer uses the new CodeMetrics class to measure the size of code.
  • 830 Various passes (like the inliner, loop unswitcher, etc) all use this to make
    831 more accurate estimates of the code size impact of various
    832 optimizations.
    833
  • A new
  • 834 llvm/Analysis/InstructionSimplify.h interface is available for doing
    835 symbolic simplification of instructions (e.g. a+0 -> a)
    836 without requiring the instruction to exist. This centralizes a lot of
    837 ad-hoc symbolic manipulation code scattered in various passes.
    838
  • The optimizer now uses a new
  • 839 href="http://llvm.org/doxygen/SSAUpdater_8h-source.html">SSAUpdater
    840 class which efficiently supports
    841 doing unstructured SSA update operations. This centralized a bunch of code
    842 scattered throughout various passes (e.g. jump threading, lcssa,
    843 loop rotate, etc) for doing this sort of thing. The code generator has a
    844 similar
    845 MachineSSAUpdater class.
    846
  • The
  • 847 llvm/Support/Regex.h header exposes a platform independent regular
    848 expression API. Building on this, the
    849 href="TestingGuide.html#FileCheck">FileCheck utility now supports
    850 regular exressions.
    851
  • raw_ostream now supports a circular "debug stream" accessed with "dbgs()".
  • 852 By default, this stream works the same way as "errs()", but if you pass
    853 -debug-buffer-size=1000 to opt, the debug stream is capped to a
    854 fixed sized circular buffer and the output is printed at the end of the
    855 program's execution. This is helpful if you have a long lived compiler
    856 process and you're interested in seeing snapshots in time.
    580857
    581858
    582859
    591868

    Other miscellaneous features include:

    592869
    593870
    594
  • ...
  • 871
  • You can now build LLVM as a big dynamic library (e.g. "libllvm2.7.so"). To
  • 872 get this, configure LLVM with the --enable-shared option.
    873
    874
  • LLVM command line tools now overwrite their output by default. Previously,
  • 875 they would only do this with -f. This makes them more convenient to use, and
    876 behave more like standard unix tools.
    877
    878
  • The opt and llc tools now autodetect whether their input is a .ll or .bc
  • 879 file, and automatically do the right thing. This means you don't need to
    880 explicitly use the llvm-as tool for most things.
    595881
    596882
    597883
    609895 from the previous release.

    610896
    611897
    898
    899
  • 900 The Andersen's alias analysis ("anders-aa") pass, the Predicate Simplifier
    901 ("predsimplify") pass, the LoopVR pass, the GVNPRE pass, and the random sampling
    902 profiling ("rsprofiling") passes have all been removed. They were not being
    903 actively maintained and had substantial problems. If you are interested in
    904 these components, you are welcome to ressurect them from SVN, fix the
    905 correctness problems, and resubmit them to mainline.
    906
    907
  • LLVM now defaults to building most libraries with RTTI turned off, providing
  • 908 a code size reduction. Packagers who are interested in building LLVM to support
    909 plugins that require RTTI information should build with "make REQUIRE_RTTI=1"
    910 and should read the new Advice on Packaging LLVM
    911 document.
    912
    612913
  • The LLVM interpreter now defaults to not using libffi even
  • 613914 if you have it installed. This makes it more likely that an LLVM built on one
    614915 system will work when copied to a similar system. To use libffi,
    615 configure with --enable-libffi.
    616
    617
    618
    916 configure with --enable-libffi.
    917
    918
  • Debug information uses a completely different representation, an LLVM 2.6
  • 919 .bc file should work with LLVM 2.7, but debug info won't come forward.
    920
    921
  • The LLVM 2.6 (and earlier) "malloc" and "free" instructions got removed,
  • 922 along with LowerAllocations pass. Now you should just use a call to the
    923 malloc and free functions in libc. These calls are optimized as well as
    924 the old instructions were.
    925
    619926
    620927

    In addition, many APIs have changed in this release. Some of the major LLVM

    621928 API changes are:

    622929
    623930
    931
  • Just about everything has been converted to use raw_ostream instead of
  • 932 std::ostream.
    933
  • llvm/ADT/iterator.h has been removed, just use <iterator>
  • 934 instead.
    935
  • The Streams.h file and DOUT got removed, use DEBUG(errs() << ...);
  • 936 instead.
    937
  • The TargetAsmInfo interface was renamed to MCAsmInfo.
  • 624938
  • ModuleProvider has been
  • 625 href="http://llvm.org/viewvc/llvm-project?view=rev&revision=94686">removed
    939 href="http://llvm.org/viewvc/llvm-project?view=rev&amp;revision=94686">removed
    626940 and its methods moved to Module and GlobalValue.
    627941 Most clients can remove uses of ExistingModuleProvider,
    628942 replace getBitcodeModuleProvider with
    640954 GlobalValue::hasNotBeenReadFromBitcode with
    641955 GlobalValue::isMaterializable.
    642956
    643
  • FIXME: Debug info has been totally redone. Add pointers to new APIs. Substantial caveats about compatibility of .ll and .bc files.
  • 644
    645
  • The llvm/Support/DataTypes.h header has moved
  • 646 to llvm/System/DataTypes.h.
    647
    648957
  • The isInteger, isIntOrIntVector, isFloatingPoint,
  • 649958 isFPOrFPVector and isFPOrFPVector methods have been renamed
    650959 isIntegerTy, isIntOrIntVectorTy, isFloatingPointTy,
    651960 isFPOrFPVectorTy and isFPOrFPVectorTy respectively.
    961
    962
  • llvm::Instruction::clone() no longer takes argument.
  • 963
  • raw_fd_ostream's constructor now takes a flag argument, not individual
  • 964 booleans (see include/llvm/Support/raw_ostream.h for details).
    965
  • Some header files have been renamed:
  • 966
    967
  • llvm/Support/AIXDataTypesFix.h to
  • 968 llvm/System/AIXDataTypesFix.h
    969
  • llvm/Support/DataTypes.h to llvm/System/DataTypes.h
  • 970
  • llvm/Transforms/Utils/InlineCost.h to
  • 971 llvm/Analysis/InlineCost.h
    972
  • llvm/Support/Mangler.h to llvm/Target/Mangler.h
  • 973
  • llvm/Analysis/Passes.h to llvm/CodeGen/Passes.h
  • 974
    652975
    653976
    654977
    669992
  • Intel and AMD machines (IA32, X86-64, AMD64, EMT-64) running Red Hat
  • 670993 Linux, Fedora Core, FreeBSD and AuroraUX (and probably other unix-like
    671994 systems).
    672
  • PowerPC and X86-based Mac OS X systems, running 10.3 and above in 32-bit
  • 995
  • PowerPC and X86-based Mac OS X systems, running 10.4 and above in 32-bit
  • 673996 and 64-bit modes.
    674997
  • Intel and AMD machines running on Win32 using MinGW libraries (native).
  • 675998
  • Intel and AMD machines running on Win32 with the Cygwin libraries (limited
  • 6981021 href="http://llvm.org/bugs/">LLVM bug database and submit a bug if
    6991022 there isn't already one.

    7001023
    701
    702
  • The llvm-gcc bootstrap will fail with some versions of binutils (e.g. 2.15)
  • 703 with a message of "Error: can not do 8
    704 byte pc-relative relocation" when building C++ code. We intend to
    705 fix this on mainline, but a workaround is to upgrade to binutils 2.17 or
    706 later.
    707
    1024
    7081025
  • LLVM will not correctly compile on Solaris and/or OpenSolaris
  • 7091026 using the stock GCC 3.x.x series 'out the box',
    7101027 See: Broken versions of GCC and other tools.
    7301047 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list.

    7311048
    7321049
    733
  • The MSIL, Alpha, SPU, MIPS, PIC16, Blackfin, MSP430 and SystemZ backends are
  • 734 experimental.
    735
  • The llc "-filetype=asm" (the default) is the only
  • 736 supported value for this option. The ELF writer is experimental.
    1050
  • The MSIL, Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze
  • 1051 backends are experimental.
    1052
  • llc "-filetype=asm" (the default) is the only
  • 1053 supported value for this option. The MachO writer is experimental, and
    1054 works much better in mainline SVN.
    7371055
    7381056
    7391057
    7541072 to generate code for systems that don't have SSE2.
    7551073
  • Win64 code generation wasn't widely tested. Everything should work, but we
  • 7561074 expect small issues to happen. Also, llvm-gcc cannot build the mingw64
    757 runtime currently due
    758 to several
    759 bugs and due to lack of support for
    760 the
    761 'u' inline assembly constraint and for X87 floating point inline assembly.
    1075 runtime currently due to lack of support for the 'u' inline assembly
    1076 constraint and for X87 floating point inline assembly.
    7621077
  • The X86-64 backend does not yet support the LLVM IR instruction
  • 763 va_arg. Currently, the llvm-gcc and front-ends support variadic
    1078 va_arg. Currently, front-ends support variadic
    7641079 argument constructs on X86-64 by lowering them manually.
    7651080
    7661081
    7881103
    7891104
    7901105
    791
  • Support for the Advanced SIMD (Neon) instruction set is still incomplete
  • 792 and not well tested. Some features may not work at all, and the code quality
    793 may be poor in some cases.
    7941106
  • Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
  • 7951107 processors, thumb programs can crash or produce wrong
    7961108 results (PR1388).
    8641176
    8651177
    8661178
    867 Known problems with the llvm-gcc C front-end
    1179 Known problems with the llvm-gcc C and C++ front-end
    8681180
    8691181
    8701182
    8741186 are only supported on some targets. For example, trampolines are only
    8751187 supported on some targets (these are used when you take the address of a
    8761188 nested function).

    877
    878

    If you run into GCC extensions which are not supported, please let us know.

    879

    880
    881
    882
    883
    884
    885 Known problems with the llvm-gcc C++ front-end
    886
    887
    888
    889
    890

    The C++ front-end is considered to be fully

    891 tested and works for a number of non-trivial programs, including LLVM
    892 itself, Qt, Mozilla, etc.

    893
    894
    895
  • Exception handling works well on the X86 and PowerPC targets. Currently
  • 896 only Linux and Darwin targets are supported (both 32 and 64 bit).
    897
    8981189
    8991190
    9001191
    9501241
    9511242
    9521243
    953
    954
    955 Known problems with the O'Caml bindings
    956
    957
    958
    959
    960

    The Llvm.Linkage module is broken, and has incorrect values. Only

    961 Llvm.Linkage.External, Llvm.Linkage.Available_externally, and
    962 Llvm.Linkage.Link_once will be correct. If you need any of the other linkage
    963 modes, you'll have to write an external C library in order to expose the
    964 functionality. This has been fixed in the trunk.

    965
    966
    9671244
    9681245
    9691246 Additional Information