X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=docs%2FReleaseNotes.html;h=e5378ba9602a0973df56db40ba8ed0d3ea22fc19;hp=0bc984db49b44998bc16e239f3edd3d8207490f8;hb=c0c186d140b75fc3b2e4e3632f826a40cf4f8626;hpb=98a493c7cef0b81d499eae82a1f9b748d5e59eeb diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index 0bc984db49b..e5378ba9602 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -4,11 +4,11 @@ - LLVM 1.5 Release Notes + LLVM 1.6 Release Notes -
LLVM 1.5 Release Notes
+
LLVM 1.6 Release Notes
  1. Introduction
  2. @@ -20,7 +20,7 @@
-

Written by the LLVM Team

+

Written by the LLVM Team

@@ -32,15 +32,15 @@

This document contains the release notes for the LLVM compiler -infrastructure, release 1.5. Here we describe the status of LLVM, including any +infrastructure, release 1.6. 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 1.5 web site. If you are +href="http://llvm.org/releases/1.6/">LLVM 1.6 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.

For more information about LLVM, including information about the latest -release, please check out the main LLVM +release, please check out the main LLVM web site. If you have questions or comments, the LLVM developer's mailing list is a good place to send them.

@@ -48,7 +48,7 @@ list is a good place to send them.

Note that if you are reading this file from CVS or the main LLVM web page, this document applies to the next release, not the current one. To see the release notes for the current or previous releases, see the releases page.

+href="http://llvm.org/releases/">releases page.

@@ -60,239 +60,191 @@ href="http://llvm.cs.uiuc.edu/releases/">releases page.

-

This is the sixth public release of the LLVM Compiler Infrastructure.

- -

At this time, LLVM is known to correctly compile a wide range of C and C++ -programs, including the SPEC CPU95 & 2000 suite. It includes bug fixes for -those problems found since the 1.4 release and a large number of new features -and enhancements, described below.

+

This is the seventh public release of the LLVM Compiler Infrastructure. This +release incorporates a large number of enhancements and additions (primarily in +the code generator), which combine to improve the quality of the code generated +by LLVM by up to 30% in some cases. This release is also the first release to +have first-class support for Mac OS X: all of the major bugs have been shaken +out and it is now as well supported as Linux on X86.

-New Features in LLVM 1.5 +New Features in LLVM 1.6
-
New Native Code -Generators
+
Instruction Selector +Generation from Target Description
-

-This release includes new native code generators for Alpha, IA-64, and SPARC-V8 (32-bit SPARC). These code generators are still -beta quality, but are progressing rapidly. -

-
+

LLVM now includes support for auto-generating large portions of the +instruction selectors from target descriptions. This allows us to +write patterns in the target .td file, instead of writing lots of +nasty C++ code. Most of the PowerPC instruction selector is now +generated from the PowerPC target description files and other targets +are adding support that will be live for LLVM 1.7.

- -
New Instruction -Selector Framework
+

For example, here are some patterns used by the PowerPC backend. A +floating-point multiply then subtract instruction (FMSUBS):

-
-

This release includes a new framework -for building instruction selectors, which has long been the hardest part of -building a new LLVM target. This framework handles a lot of the mundane (but -easy to get wrong) details of writing the instruction selector, such as -generating efficient code for getelementptr instructions, promoting -small integer types to larger types (e.g. for RISC targets with one size of -integer registers), expanding 64-bit integer operations for 32-bit hosts, etc. -Currently, the X86, PowerPC, Alpha, and IA-64 backends use this framework. The -SPARC backends will be migrated when time permits. -

-
+

+(set F4RC:$FRT, (fsub (fmul F4RC:$FRA, F4RC:$FRC), F4RC:$FRB)) +

- -
New Support For Custom -Calling Conventions
+

Exclusive-or by 16-bit immediate (XORI):

+ +

+(set GPRC:$dst, (xor GPRC:$src1, immZExt16:$src2)) +

+ +

Exclusive-or by 16-bit immediate shifted right 16-bits (XORIS):

+ +

+(set GPRC:$dst, (xor GPRC:$src1, imm16Shifted:$src2)) +

+ +

With these definitions, we teach the code generator how to combine these two +instructions to xor an abitrary 32-bit immediate with the following +definition. The first line specifies what to match (a xor with an arbitrary +immediate) the second line specifies what to produce:

+ +

+

def : Pat<(xor GPRC:$in, imm:$imm),
+          (XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
+
+

-
-

LLVM 1.5 adds supports for custom and -target-specific calling conventions. Traditionally, the LLVM code -generators match the native C calling conventions for a target. This is -important for compatibility, but is not very flexible. This release allows -custom calling conventions to be established for functions, and defines three -target-independent conventions (C call, fast call, and cold call) which may be -supported by code generators. When possible, the LLVM optimizer promotes C -functions to use the "fastcc" convention, allowing the use of more efficient -calling sequences (e.g., parameters are passed in registers in the X86 target). -

- -

Targets may now also define target-specific calling conventions, allowing -LLVM to fully support calling convention altering options (e.g. GCC's --mregparm flag) and well-defined target conventions (e.g. stdcall and -fastcall on X86).

-
New Support for -"Proper Tail Calls"
+
Instruction Scheduling +Support
-

The release now includes support for proper tail calls, as -required to implement languages like Scheme. Tail calls make use of two -features: custom calling conventions (described above), which allow the code -generator to emit code for the caller to deallocate its own stack when it -returns. The second feature is a flag on the call -instruction, which indicates that the callee does not access the caller's -stack frame (indicating that it is acceptable to deallocate the caller stack -before invoking the callee). LLVM proper tail calls run on the system stack (as -do normal calls), supports indirect tail calls, tail calls with arbitrary -numbers of arguments, tail calls where the callee requires more argument space -than the caller, etc. The only case not supported are varargs calls, but that -could be added if desired. -

- -

In order for a front-end to get guaranteed tail call, it must mark functions -as "fastcc", mark calls with the 'tail' marker, and follow the call with a -return of the called value (or void). The optimizer and code generator attempt -to handle more general cases, but the simple case will always work if the code -generator supports tail calls. Here is a simple example:

-
-    fastcc int %bar(int %X, int(double, int)* %FP) {       ; fastcc
-        %Y = tail call fastcc int %FP(double 0.0, int %X)  ; tail, fastcc
-        ret int %Y
-    }
-
+

Instruction selectors using the refined instruction selection framework can now +use a simple pre-pass scheduler included with LLVM 1.6. This scheduler is +currently simple (cannot be configured much by the targets), but will be +extended in the future.

+
-

In LLVM 1.5, the X86 code generator is the only target that has been enhanced -to support proper tail calls (other targets will be enhanced in future). -Further, because this support was added very close to the release, it is -disabled by default. Pass -enable-x86-fastcc to llc to enable it (this -will be enabled by default in the next release). The example above compiles to: -

+ +
Code Generator Subtarget +Support
-
-    bar:
-        sub ESP, 8                   # Callee uses more space than the caller
-        mov ECX, DWORD PTR [ESP + 8] # Get the old return address
-        mov DWORD PTR [ESP + 4], 0   # First half of 0.0
-        mov DWORD PTR [ESP + 8], 0   # Second half of 0.0
-        mov DWORD PTR [ESP], ECX     # Put the return address where it belongs
-        jmp EDX                      # Tail call "FP"
-
+
+

It is now straight-forward to parameterize a target implementation, and +provide a mapping from CPU names to sets of target parameters. LLC now supports +a -mcpu=cpu option that lets you choose a subtarget by CPU name: use +"llvm-as < /dev/null | llc -march=XXX -mcpu=help" to get a list of +supported CPUs for target "XXX". It also provides a +-mattr=+attr1,-attr2 option that can be used to control individual +features of a target (the previous command will list available features as +well).

-

-With fastcc on X86, the first two integer arguments are passed in EAX/EDX, the -callee pops its arguments off the stack, and the argument area is always a -multiple of 8 bytes in size. -

+

This functionality is nice when you want tell LLC something like "compile to +code that is specialized for the PowerPC G5, but doesn't use altivec code. In +this case, using "llc -march=ppc32 -mcpu=g5 -mattr=-altivec".

-
Other New Features
+
Other New Features
    -
  1. LLVM now includes an - Interprocedural Sparse Conditional Constant Propagation pass, named - -ipsccp, which is run by default at link-time.
  2. -
  3. LLVM 1.5 is now about 15% faster than LLVM 1.4 and its core data - structures use about 30% less memory.
  4. -
  5. Support for Microsoft Visual Studio is improved, and now documented.
  6. -
  7. Configuring LLVM to build a subset - of the available targets is now implemented, via the - --enable-targets= option.
  8. -
  9. LLVM can now create native shared libraries with 'llvm-gcc ... - -shared -Wl,-native' (or with -Wl,-native-cbe).
  10. -
  11. LLVM now supports a new "llvm.prefetch - " intrinsic, and llvm-gcc now supports __builtin_prefetch. -
  12. LLVM now supports intrinsics for bit - counting and llvm-gcc now implements the GCC - __builtin_popcount, __builtin_ctz, and - __builtin_clz builtins.
  13. -
  14. LLVM now builds on HP-UX with the HP aCC Compiler.
  15. -
  16. The LLVM X86 backend can now emit Cygwin-compatible .s files.
  17. -
  18. LLVM now includes workarounds in the code generator generator which - reduces the likelyhood of GCC - hitting swap during optimized builds.
  19. -
  20. The PowerPC backend generates far better code than in LLVM 1.4.
  21. +
  22. The JIT now uses mutexes to protect its internal data structures. This + allows multi-threaded programs to be run from the JIT or interpreter without + corruption of the internal data structures. See + PR418 and + PR540 for the details. +
  23. +
  24. LLVM on Win32 no longer requires sed, + flex, or bison when compiling with Visual C++.
  25. +
  26. The llvm-test suite can now use the NAG Fortran to C compiler to compile + SPEC FP programs if available (allowing us to test all of SPEC'95 & + 2000).
  27. +
  28. When bugpoint is grinding away and the user hits ctrl-C, it now + gracefully stops and gives what it has reduced so far, instead of + giving up completely. In addition, the JIT + debugging mode of bugpoint is much faster.
  29. +
  30. LLVM now includes Xcode project files in the llvm/Xcode directory.
  31. +
  32. LLVM now supports Mac OS X on Intel.
  33. +
  34. LLVM now builds cleanly with GCC 4.1.
-Code Quality Improvements in LLVM 1.5 +Code Quality Improvements in LLVM 1.6
    -
  1. The -globalopt pass now promotes non-address-taken static globals that are -only accessed in main to SSA registers.
  2. - -
  3. The new -simplify-libcalls pass improves code generated for well-known -library calls. The pass optimizes calls to many of the string, memory, and -standard I/O functions (e.g. replace the calls with simpler/faster calls) when -possible, given information known statically about the arguments to the call. -
  4. - -
  5. Loops with trip counts based on array pointer comparisons (e.g. "for (i -= 0; &A[i] != &A[100]; ++i) ...") are optimized better than before, -which primarily helps iterator-intensive C++ codes.
  6. - -
  7. The code generator now uses information about takes advantage of commutative -two-address instructions when performing register allocation.
  8. - - +
  9. The -globalopt pass can now statically evaluate C++ static + constructors when they are simple enough. For example, it can + now statically initialize "struct X { int a; X() : a(4) {} } g;". +
  10. +
  11. The Loop Strength Reduction pass has been completely rewritten, is far + more aggressive, and is turned on by default in the RISC targets. On PPC, + we find that it often speeds up programs from 10-40% depending on the + program.
  12. +
  13. The code produced when exception handling is enabled is far more + efficient in some cases, particularly on Mac OS X.
+
-Significant Bugs Fixed in LLVM 1.5 +Code Generator Improvements in LLVM 1.6
- - -

Bugs fixed in the LLVM Core:

    -
  1. [dse] DSE deletes stores that - are partially overwritten by smaller stores
  2. -
  3. [instcombine] miscompilation of - setcc or setcc in one case
  4. -
  5. Transition code for LLVM 1.0 style varargs was removed from the .ll file - parser. LLVM 1.0 bytecode files are still supported.
  6. +
  7. The Alpha backend is substantially more stable and robust than in LLVM 1.5. + For example, it now fully supports varargs functions. The Alpha backend + also now features beta JIT support.
  8. +
  9. The code generator contains a new component, the DAG Combiner. This allows + us to optimize lowered code (e.g. after 64-bit operations have been lowered + to use 32-bit registers on 32-bit targets) and do fine-grained bit-twiddling + optimizations for the backend.
  10. +
  11. The SelectionDAG infrastructure is far more capable and mature, able to + handle many new target peculiarities in a target-independent way.
  12. +
  13. The default register allocator is now far + faster on some testcases, + particularly on targets with a large number of registers (e.g. IA64 + and PPC).
+
-

Code Generator Bugs:

-
    -
  1. [cbackend] Logical constant - expressions (and/or/xor) not implemented
  2. -
  3. [cbackend] C backend does not - respect 'volatile'
  4. -
+ +
+Significant Bugs Fixed in LLVM 1.6 +
-

Bugs in the C/C++ front-end:

+
    -
  1. [llvmgcc] llvm-gcc incorrectly - rejects some constant initializers involving the addresses of array - elements
  2. -
  3. [llvm-g++] Crash compiling - anonymous union
  4. -
  5. [llvm-g++] Do not use dynamic - initialization where static init will do
  6. -
  7. [llvmgcc] Field offset - miscalculated for some structure fields following bit fields
  8. -
  9. [llvm-g++] Temporary lifetimes - incorrect for short circuit logical operations
  10. -
  11. [llvm-gcc] Crash compiling - bitfield <-> aggregate assignment
  12. -
  13. [llvm-g++] Error compiling - virtual function thunk with an unnamed argument
  14. -
  15. [llvm-gcc] Crash on certain - C99 complex number routines
  16. -
  17. [llvm-g++] Crash using placement - new on an array type
  18. +
  19. A vast number of bugs have been fixed in the PowerPC backend and in + llvm-gcc when configured for Mac OS X (particularly relating to ABI + issues). For example: + PR449, + PR594, + PR603, + PR609, + PR630, + PR643, + and several others without bugzilla bugs.
  20. +
  21. Several bugs in tail call support have been fixed.
  22. +
  23. configure does not correctly detect gcc + version on cygwin.
  24. +
  25. Many many other random bugs have been fixed. Query our bugzilla with a target of 1.6 for more + information.
-
@@ -306,12 +258,12 @@ two-address instructions when performing register allocation.

LLVM is known to work on the following platforms:

@@ -335,7 +287,7 @@ portability patches and reports of successful builds or error messages.

This section contains all known problems with the LLVM system, listed by component. As new problems are discovered, they will be added to these sections. If you run into a problem, please check the LLVM bug database and submit a bug if +href="http://llvm.org/bugs/">LLVM bug database and submit a bug if there isn't already one.

@@ -355,16 +307,28 @@ components, please contact us on the llvmdev list.

+ +
+ Known problems with the Build System +
+ +
+ + +
+ +
Known problems with the LLVM Core @@ -375,14 +339,6 @@ components, please contact us on the llvmdev list.

@@ -406,7 +362,7 @@ components, please contact us on the llvmdev list.

  • Initialization of global union variables can only be done with the largest union member.
  • +href="http://llvm.org/PR162">with the largest union member. @@ -578,12 +534,6 @@ itself.

  • The C++ front-end inherits all problems afflicting the C front-end.
  • -
  • IA-64 specific: The C++ front-end does not use IA64 ABI compliant layout of v-tables. -In particular, it just stores function pointers instead of function -descriptors in the vtable. This bug prevents mixing C++ code compiled with -LLVM with C++ objects compiled by other C++ compilers.
  • - @@ -625,27 +575,36 @@ href="http://gcc.gnu.org/gcc-3.4/changes.html">GCC 3.4 release notes.
    - Known problems with the X86 back-end + Known problems with the C back-end
    - Known problems with the SparcV9 back-end + Known problems with the X86 back-end
    @@ -665,22 +624,14 @@ several programs in the LLVM test suite
    - Known problems with the C back-end + Known problems with the SparcV9 back-end
    @@ -694,11 +645,8 @@ frontends. @@ -718,11 +666,17 @@ made where the argument is not 16-byte aligned, as required on IA64. (Strictly speaking this is not a bug in the IA64 back-end; it will also be encountered when building C++ programs using the C back-end.) -
  • There are a few ABI violations which will lead to problems -when mixing LLVM output with code built with other compilers, -particularly for C++ and floating-point programs.
  • +
  • The C++ front-end does not use IA64 +ABI compliant layout of v-tables. In particular, it just stores function +pointers instead of function descriptors in the vtable. This bug prevents +mixing C++ code compiled with LLVM with C++ objects compiled by other C++ +compilers.
  • + +
  • There are a few ABI violations which will lead to problems when mixing LLVM +output with code built with other compilers, particularly for floating-point +programs.
  • -
  • Vararg functions are not supported.
  • +
  • Defining vararg functions is not supported (but calling them is ok).
  • @@ -737,12 +691,8 @@ particularly for C++ and floating-point programs. - @@ -753,16 +703,17 @@ selection framework.
    -

    A wide variety of additional information is available on the LLVM web page, -including mailing lists and -publications describing algorithms and +

    A wide variety of additional information is available on the LLVM web page, including documentation and publications describing algorithms and components implemented in LLVM. The web page also contains versions of the API documentation which is up-to-date with the CVS version of the source code. You can access versions of these documents specific to this release by going into the "llvm/doc/" directory in the LLVM tree.

    If you have any questions or comments about LLVM, please feel free to contact -us via the mailing +us via the mailing lists.

    @@ -776,7 +727,7 @@ lists.

    Valid HTML 4.01! - The LLVM Compiler Infrastructure
    + The LLVM Compiler Infrastructure
    Last modified: $Date$