X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FReleaseNotes.html;h=d22a389da4e0c23ee97d6d69869fb964c65e2908;hb=bcd10f162dd6b97bb6fbe05aa66bdcb02e33277d;hp=e4b4148129bd0f1665fb679639aa8c2d47b93258;hpb=d3582daa22ebd0c20002e21901c6be78a851302f;p=oota-llvm.git diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index e4b4148129b..d22a389da4e 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -4,11 +4,11 @@ - LLVM 1.7 Release Notes + LLVM 2.0 Release Notes -
LLVM 1.7 Release Notes
+
LLVM 2.0 Release Notes
  1. Introduction
  2. @@ -32,12 +32,10 @@

    This document contains the release notes for the LLVM compiler -infrastructure, release 1.7. Here we describe the status of LLVM, including any -known problems and major improvements from the previous release. The most -up-to-date version of this document can be found on the LLVM releases web site. If you are -not reading this on the LLVM web pages, you should probably go there because -this document may be updated after the release.

    +infrastructure, release 2.0. Here we describe the status of LLVM, including any +known problems and major improvements from the previous release. All LLVM +releases may be downloaded from the LLVM +releases web site.

    For more information about LLVM, including information about the latest release, please check out the main LLVM @@ -60,218 +58,410 @@ href="http://llvm.org/releases/">releases page.

    -

    This is the eighth public release of the LLVM Compiler Infrastructure. This -release incorporates a large number of enhancements and new features, -including vector support (Intel SSE and Altivec), a new GCC4.0-based -C/C++ front-end, Objective C/C++ support, inline assembly support, and many -other big features. -

    +

    This is the eleventh public release of the LLVM Compiler Infrastructure. +Being the first major release since 1.0, this release is different in several +ways from our previous releases:

    + +
      +
    1. We took this as an opportunity to +break backwards compatibility with the LLVM 1.x bytecode and .ll file format. +If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we +recommend the use of the stand alone llvm-upgrade +tool (which is included with 2.0). We intend to keep compatibility with .ll +and .bc formats within the 2.x release series, like we did within the 1.x +series.
    2. +
    3. There are several significant change to the LLVM IR and internal APIs, such + as a major overhaul of the type system, the completely new bitcode file + format, etc.
    4. +
    5. We designed the release around a 6 month release cycle instead of the usual + 3-month cycle. This gave us extra time to develop and test some of the + more invasive features in this release.
    6. +
    7. LLVM 2.0 no longer supports the llvm-gcc3 front-end.
    8. +
    + +

    Note that while this is a major version bump, this release has been + extensively tested on a wide range of software. It is easy to say that this + is our best release yet, in terms of both features and correctness.

    - - +
    - -

    LLVM 1.7 includes a brand new llvm-gcc, based on GCC 4.0.1. This version -of llvm-gcc solves many serious long-standing problems with llvm-gcc, including -all of those blocked by the llvm-gcc 4 meta -bug. In addition, llvm-gcc4 implements support for many new features, -including GCC inline assembly, generic vector support, SSE and Altivec -intrinsics, and several new GCC attributes. Finally, llvm-gcc4 is -significantly faster than llvm-gcc3, respects -O options, its -c/-S options -correspond to GCC's (they emit native code), supports Objective C/C++, and -it has debugging support well underway.

    - -

    If you can use it, llvm-gcc4 offers significant new functionality, and we -hope that it will replace llvm-gcc3 completely in a future release. -Unfortunately, it does not currently support C++ exception handling at all, and -it only works on Apple Mac OS/X machines with X86 or PowerPC processors. +

    blah

    -
    + +
    -
    Intel SSE and PowerPC -Altivec support -
    - +
    llvm-gcc +Improvements
    - -

    The LLVM X86 backend now supports Intel SSE 1, 2, and 3, and now uses scalar -SSE operations to implement scalar floating point math when the target supports -SSE1 (for floats) or SSE2 (for doubles). Vector SSE instructions are generated -by llvm-gcc4 when the generic vector mechanism or specific SSE intrinsics are -used. +

    New features include:

    -

    The LLVM PowerPC backend now supports the Altivec instruction set, including -both GCC -maltivec and -faltivec modes. Altivec instructions are generated -by llvm-gcc4 when the generic vector mechanism or specific Altivec intrinsics -are used. -

    + +
    -
    Optimizer + -
    +

    New features include: +

    +
      -
    • The Loop Unswitching pass (-loop-unswitch) has had several bugs - fixed, has several new features, and is enabled by default in llvmgcc3 - now.
    • -
    • The Loop Strength Reduction pass (-loop-reduce) is now enabled for - the X86 and Alpha backends.
    • -
    • The Instruction Combining pass (-instcombine) now includes a - framework and implementation for simplifying code based on whether computed - bits are demanded or not.
    • -
    • The Scalar Replacement of Aggregates pass (-scalarrepl) can now - promote simple unions to registers.
    • -
    • The Reassociation pass (-reassociate) can now - factor expressions, e.g. turning "A*A+A*B" into "A*(A+B)".
    • -
    • Several LLVM passes are significantly -faster.
    • +
    • The pass manager has been entirely rewritten, making it significantly + smaller, simpler, and more extensible. Support has been added to run + FunctionPasses interlaced with CallGraphSCCPasses.
    • + +
    • The -scalarrepl pass can now promote unions containing FP values into + a register, it can also handle unions of vectors of the same size.
    • + +
    • The predicate simplifier pass has been improved, making it able to do + simple value range propagation and eliminate more conditionals.
    • + +
    • There is a new new LoopPass class. The passmanager has been + modified to support it, and all existing loop xforms have been + converted to use it.
    • + +
    • There is a new loop rotation pass, which converts "for loops" into + "do/while loops", where the condition is at the bottom of the loop.
    • + +
    • ModulePasses may now use the result of FunctionPasses.
    • + +
    • The [Post]DominatorSet classes have been removed from LLVM and clients switched to use the far-more-efficient ETForest class instead.
    • + +
    • The ImmediateDominator class has also been removed, and clients have been switched to use DominatorTree instead.
    • +
    +
    - +
    +

    +New features include: +

    +
      -
    • LLVM has a new prepass (before register allocation) list scheduler, which - supports bottom-up and top-down scheduling, pluggable priority functions and - pluggable hazard recognizers. The X86 backend uses this to reduce register - pressure and RISC targets schedule based on operation latency.
    • -
    • The tblgen-based target description framework introduced in LLVM 1.6 has - several new features, useful for targets that can fold loads and stores into - operations, and features that make the .td files more expressive.
    • -
    • The instruction selector is significantly faster in 1.7 than in 1.6.
    • -
    • The X86, Alpha and Itanium backends use new DAG-DAG instruction selectors, - making them easier to maintain and generate slightly better code.
    • -
    • The X86 backend now supports generation of Scalar SSE code for scalar FP - expressions. LLVM provides significantly better performance with Scalar SSE - instructions than it does with the Intel floating point stack - instructions.
    • -
    • The Itanium backend now has a bundling pass, which improves performance - by ~10% and reduces code size (previously it unconditionally inserted a stop - bit after every instruction).
    • +
    • Support for Zero-cost DWARF exception handling has been added. It is mostly + complete and just in need of continued bug fixes and optimizations at + this point.
    • + +
    • Progress has been made on a direct Mach-o .o file writer. Many small + apps work, but it is not quite complete yet.
    • + +
    • Support was added for software floating point routines.
    • + +
    • DWARF debug information generation has been improved. LLVM now passes + most of the GDB testsuite on MacOS and debug info is more dense.
    • + +
    • A new register scavenger has been implemented, which is useful for + finding free registers after register allocation. This is useful when + rewriting frame references on RISC targets, for example.
    • + +
    • Heuristics have been added to avoid coalescing vregs with very large live + ranges to physregs.
    • + +
    • Support now exists for very simple (but still very useful) + rematerialization the register allocator, enough to move + instructions like "load immediate" and constant pool loads.
    • + +
    • Significantly improved 'switch' lowering, improving codegen for + sparse switches that have dense subregions, and implemented support + for the shift/and trick.
    • + +
    • The code generator now has more accurate and general hooks for + describing addressing modes ("isLegalAddressingMode") to + optimizations like loop strength reduction and code sinking.
    • + +
    • The Loop Strength Reduction pass has been improved, and support added + for sinking expressions across blocks to reduce register pressure.
    • + +
    • Added support for tracking physreg sub-registers and super-registers + in the code generator, as well as extensive register + allocator changes to track them.
    • + +
    • There is initial support for virtreg sub-registers + (PR1350).
    • + +
    + +

    In addition, the LLVM target description format has itself been extended in + several ways:

    + +
      +
    • Extended TargetData to support better target parameterization in + the .ll/.bc files, eliminating the 'pointersize/endianness' attributes + in the files (PR761).
    • + +
    • TargetData was generalized for finer grained alignment handling, + handling of vector alignment, and handling of preferred alignment
    • + +
    • LLVM now supports describing target calling conventions + explicitly in .td files, reducing the amount of C++ code that needs + to be written for a port.
    • +
    +
    - +
    + +

    X86-Specific Code Generator Enhancements: +

    +
      -
    • The Mac OS/X PowerPC and X86 backends now have initial support for - Darwin DWARF - debugging information, however, debug info generation has been disabled for - the 1.7 release in llvmgcc4.
    • -
    • LLVM includes the new - llvm-config utility, which makes it easier to build and link programs - against the LLVM libraries when not using the LLVM makefiles.
    • -
    • LLVM now supports first class global ctor/dtor initialization lists, no - longer forcing targets to use "__main".
    • -
    • LLVM supports assigning globals and functions to a particular section - in the result executable using the GCC section attribute.
    • -
    • Adding intrinsics to LLVM is now - significantly easier.
    • -
    • llvmgcc4 now fully supports C99 Variable Length Arrays, including dynamic - stack deallocation.
    • +
    • The scheduler was improved to better reduce register pressure on + X86 and other targets that are register pressure sensitive
    • +
    • Linux/x86-64 support has been improved.
    • +
    • PIC support for linux/x86 has been added.
    • +
    • Support now exists for the GCC regparm attribute, and code in the X86 + backend to respect it.
    • +
    • Various improvements have been made for the X86-64 JIT, allowing it to + generate code in the large code model
    • +
    • LLVM now supports inline asm with multiple constraint letters per operand + (like "ri") which is common in X86 inline asms.
    • +
    • Early support has been added for X86 inline asm in the C backend.
    • +
    • Added support for the X86 MMX instruction set.
    + +

    ARM-Specific Code Generator Enhancements: +

    + +
      +
    • Several improvements have been made to the ARM backend, including basic + inline asm support, weak linkage support, static ctor/dtor support and + many bug fixes.
    • +
    • There are major enhancements to the ARM backend, including support for ARM + v4-v6, vfp support, soft float, pre/postinc support, load/store multiple + generation, constant pool entry motion (to support large functions), + and enhancements to ARM constant island pass. +
    • +
    • Added support for Thumb code generation (an ARM subtarget).
    • +
    • More aggressive size analysis for ARM inline asm strings was + implemented.
    • +
    + +

    Other Target-Specific Code Generator Enhancements: +

    + +
      +
    • The PowerPC 64 JIT now supports addressing code loaded above the 2G + boundary.
    • + +
    • Improved support for the Linux/ppc ABI and the linux/ppc JIT is fully + functional now. llvm-gcc and static compilation are not fully supported + yet though.
    • + +
    • Many bugs fixed for PowerPC 64.
    • + +
    • Support was added for the ARM AAPCS and EABI ABIs and PIC codegen on + arm/linux.
    • + +
    • Several bugs in DWARF debug emission on linux and cygwin/mingw were fixed. + Debugging basically works on these targets now.
    • + +
    • Support has been added for the X86-64 large code model to the JIT, + which is useful if JIT'd function bodies are more than 2G away from + library functions.
    • + +
    • Several bugs were fixed for DWARF debug info generation on arm/linux.
    • + +
    +
    - -
    -Significant Changes in LLVM 1.7 + + +
    + +

    This release includes many other improvements, including +performance work, specifically designed to tune datastructure +usage. This makes several critical components faster.

    + +

    More specific changes include:

    + +
      +
    • LLVM no longer relies on static destructors to shut itself down. Instead, + it lazily initializes itself and shuts down when llvm_shutdown() is + explicitly called.
    • + +
    • LLVM now has significantly fewer static constructors, reducing startup time. +
    • + +
    • Several classes have been refactored to reduce the amount of code that + gets linked into apps that use the JIT.
    • + +
    • Construction of intrinsic function declarations has been simplified.
    • + +
    • The llvm-upgrade tool now exists. This migrates LLVM 1.9 .ll files to + LLVM 2.0 syntax.
    • + +
    • The gccas/gccld tools have been removed.
    • + +
    • Support has been added to llvm-test for running on low-memory + or slow machines (make SMALL_PROBLEM_SIZE=1).
    • + +
    • llvm-test is now more portable and should build with MS Visual Studio.
    • + +
    + +
    + +

    LLVM 2.0 contains a revamp of the type system and several other significant +internal changes. If you are programming to the C++ API, be aware of the +following major changes:

    +
      -
    • The official LLVM URL is now - http://llvm.org/.
    • -
    • The LLVM intrinsics used to be overloaded based on type: for example, - llvm.ctpop could work with any - integer datatype. They are now separated into different intrinsics with - suffixes to denote their argument type (e.g. llvm.ctpop.i32)). Old - LLVM .ll and .bc files that use these intrinsics will continue to work with - new LLVM versions (they are transparently upgraded by the parsers), but will - cause a warning to be emitted.
    • -
    • The llvm.readport, llvm.writeport, llvm.readio, - and llvm.writeio intrinsics have been removed. The first two - were ever only supported by the X86 backend, the last two were never - correctly supported by any target, and none were accessible through the - C front-end. Inline assembly support can now be used to - implement these operations.
    • -
    • The llvm-db tool had basic support for stepping through code, which - used the JIT. This code has been removed, and DWARF emission support added - instead. llvm-db still exists in CVS if someone wanted to write a - ptrace backend for it.
    • +
    • Pass registration is slightly different in LLVM 2.0 (you now needs an + intptr_t in your constructor), as explained in the Writing an LLVM Pass + document.
    • + +
    • ConstantBool, ConstantIntegral and ConstantInt + classes have been merged together, we now just have + ConstantInt.
    • + +
    • Type::IntTy, Type::UIntTy, Type::SByteTy, ... are + replaced by Type::Int8Ty, Type::Int16Ty, etc. LLVM types + have always corresponded to fixed size types + (e.g. long was always 64-bits), but the type system no longer includes + information about the sign of the type.
    • + +
    • Several classes (CallInst, GetElementPtrInst, + ConstantArray, etc), that once took std::vector as + arguments now take ranges instead. For example, you can create a + GetElementPtrInst with code like: + +
      +      Value *Ops[] = { Op1, Op2, Op3 };
      +      GEP = new GetElementPtrInst(BasePtr, Ops, 3);
      +    
      + + This avoids creation of a temporary vector (and a call to malloc/free). If + you have an std::vector, use code like this: +
      +      std::vector<Value*> Ops = ...;
      +      GEP = new GetElementPtrInst(BasePtr, &Ops[0], Ops.size());
      +    
      + +
    • + +
    • CastInst is now abstract and its functionality is split into several parts, + one for each of the new cast + instructions.
    • + +
    • Instruction::getNext()/getPrev() are now private (along with + BasicBlock::getNext, etc), for efficiency reasons (they are now no + longer just simple pointers). Please use BasicBlock::iterator, etc instead. +
    • + +
    • Module::getNamedFunction() is now called + Module::getFunction().
    • + +
    • SymbolTable.h has been split into ValueSymbolTable.h and +TypeSymbolTable.h.
    @@ -289,10 +479,12 @@ Improvements
    @@ -332,11 +524,12 @@ there isn't already one.

    be broken or unreliable, or are in early development. These components should not be relied on, and bugs should not be filed against them, but they may be useful to some people. In particular, if you would like to work on one of these -components, please contact us on the llvmdev list.

    +components, please contact us on the LLVMdev list.

    -
  3. Although many GCC extensions are supported, some are not. In particular, - the following extensions are known to not be supported: -
      -
    1. Local Labels: Labels local to a block.
    2. -
    3. Nested Functions: As in Algol and Pascal, lexical scoping of functions.
    4. -
    5. Constructing Calls: Dispatching a call to another function.
    6. -
    7. Extended Asm: Assembler instructions with C expressions as operands.
    8. -
    9. Constraints: Constraints for asm operands.
    10. -
    11. Asm Labels: Specifying the assembler name to use for a C symbol.
    12. -
    13. Explicit Reg Vars: Defining variables residing in specified registers.
    14. -
    15. Vector Extensions: Using vector instructions through built-in functions.
    16. -
    17. Target Builtins: Built-in functions specific to particular targets.
    18. -
    19. Thread-Local: Per-thread variables.
    20. -
    21. Pragmas: Pragmas accepted by GCC.
    22. -
    -

    The following GCC extensions are partially supported. An ignored - attribute means that the LLVM compiler ignores the presence of the attribute, - but the code should still work. An unsupported attribute is one which is - ignored by the LLVM compiler and will cause a different interpretation of - the program.

    + + -
      -
    1. Variable Length: - Arrays whose length is computed at run time.
      - Supported, but allocated stack space is not freed until the function returns (noted above).
    2. + +
      Bugs
      -
    3. Function Attributes: +
      - Declaring that functions have no side effects or that they can never - return.
      +

      llvm-gcc4 does not currently support Link-Time +Optimization on most platforms "out-of-the-box". Please inquire on the +llvmdev mailing list if you are interested.

      - Supported: format, format_arg, non_null, - noreturn, constructor, destructor, - unused, used, - deprecated, warn_unused_result, weak
      +
      - Ignored: noinline, - always_inline, pure, const, nothrow, - malloc, no_instrument_function, cdecl
      + +
      + Notes +
      - Unsupported: section, alias, - visibility, regparm, stdcall, - fastcall, all other target specific attributes
    4. - -
    5. Variable Attributes: - Specifying attributes of variables.
      - Supported: cleanup, common, nocommon, - deprecated, transparent_union, - unused, used, weak
      +
      +
        - Unsupported: aligned, mode, packed, - section, shared, tls_model, - vector_size, dllimport, - dllexport, all target specific attributes. +
      • "long double" is silently transformed by the front-end into "double". There +is no support for floating point data types of any size other than 32 and 64 +bits.

      • + +
      • llvm-gcc does not support __builtin_apply yet. + See Constructing Calls: Dispatching a call to another function.

        +
      • -
      • Type Attributes: Specifying attributes of types.
        - Supported: transparent_union, unused, - deprecated, may_alias
        +
      • llvm-gcc partially supports tthese GCC extensions:

        +
          +
        1. Nested Functions: As in Algol and Pascal, lexical scoping of functions.
          + Nested functions are supported, but llvm-gcc does not support non-local + gotos or taking the address of a nested function.
        2. - Unsupported: aligned, packed, - all target specific attributes. +
        3. Function Attributes: -
        4. Other Builtins: - Other built-in functions.
          - We support all builtins which have a C language equivalent (e.g., - __builtin_cos), __builtin_alloca, - __builtin_types_compatible_p, __builtin_choose_expr, - __builtin_constant_p, and __builtin_expect - (currently ignored). We also support builtins for ISO C99 floating - point comparison macros (e.g., __builtin_islessequal), - __builtin_prefetch, __builtin_popcount[ll], - __builtin_clz[ll], and __builtin_ctz[ll].
        5. + Declaring that functions have no side effects or that they can never + return.
          + + Supported: alias, always_inline, cdecl, + constructor, destructor, + deprecated, fastcall, format, + format_arg, non_null, noreturn, regparm + section, stdcall, unused, used, + visibility, warn_unused_result, weak
          + + Ignored: noinline, pure, const, nothrow, + malloc, no_instrument_function
        +
      • -

        The following extensions are known to be supported:

        +
      • llvm-gcc supports the vast majority of GCC extensions, including:

          +
        1. Pragmas: Pragmas accepted by GCC.
        2. +
        3. Local Labels: Labels local to a block.
        4. +
        5. Other Builtins: + Other built-in functions.
        6. +
        7. Variable Attributes: + Specifying attributes of variables.
        8. +
        9. Type Attributes: Specifying attributes of types.
        10. +
        11. Thread-Local: Per-thread variables.
        12. +
        13. Variable Length: + Arrays whose length is computed at run time.
        14. Labels as Values: Getting pointers to labels and computed gotos.
        15. Statement Exprs: Putting statements and declarations inside expressions.
        16. Typeof: typeof: referring to the type of an expression.
        17. @@ -516,6 +743,12 @@ work:
        18. Empty Structures: Structures with no members.
        19. Variadic Macros: Macros with a variable number of arguments.
        20. Escaped Newlines: Slightly looser rules for escaped newlines.
        21. +
        22. Extended Asm: Assembler instructions with C expressions as operands.
        23. +
        24. Constraints: Constraints for asm operands.
        25. +
        26. Asm Labels: Specifying the assembler name to use for a C symbol.
        27. +
        28. Explicit Reg Vars: Defining variables residing in specified registers.
        29. +
        30. Vector Extensions: Using vector instructions through built-in functions.
        31. +
        32. Target Builtins: Built-in functions specific to particular targets.
        33. Subscripting: Any array can be subscripted, even if not an lvalue.
        34. Pointer Arith: Arithmetic on void-pointers and function pointers.
        35. Initializers: Non-constant initializers.
        36. @@ -553,33 +786,15 @@ lists, please let us know (also including whether or not they work).

          -

          For this release, the C++ front-end is considered to be fully +

          The C++ front-end is considered to be fully tested and works for a number of non-trivial programs, including LLVM -itself.

          - -
          - - -
          Bugs
          - -
          +itself, Qt, Mozilla, etc.

            -
          • The C++ front-end inherits all problems afflicting the C - front-end.
          • - -
          +
        37. llvm-gcc4 only has partial support for C++ +Exception Handling, and it is not enabled by default.
        38. -
          - - -
          - Notes -
          - -
          - -