[llvm-announce] LLVM 2.0 Release

Chris Lattner sabre at nondot.org
Wed May 23 13:05:48 PDT 2007


LLVM 2.0 is done!  Download it here:  http://llvm.org/releases/ or view 
the release notes: http://llvm.org/releases/2.0/docs/ReleaseNotes.html

LLVM 2.0 is a great release in many ways.  It includes a wide range of new 
features, new optimizations, better codegen, and new targets.  We were 
also able to signficantly revise several core aspects of the LLVM IR and 
design (such as the type system and bytecode format) based on lessons 
learned in the LLVM 1.x series.

One of the most exciting aspects of this release is seeing the strength of 
the community and the adoption that LLVM is receiving.  LLVM continues to 
be used for a broad variety of academic research projects (e.g. see 
http://llvm.org/pubs/ ), but is also being used for a wide range of 
commercial products and industrial development projects (see 
http://llvm.org/Users.html ).  We're seeing many different groups using 
LLVM for very different purposes, many of which we never envisioned :).

In any case, LLVM 2.0 includes a huge number of new features.  I list the 
significant changes from February below, but there were also another 42 
changes in February that are also a part of LLVM 2.0 (see the link below).

Here we go!:

New Features:

  1. Reid and Sheng contributed IR, optimizer, and interpreter support for
     arbitrary bitwidth integers which have sizes > 64 bits.  This means
     that LLVM IR can now express operations on 31337-bit wide integers,
     for example (however, for most people, 128-bit wide integers on 64-bit
     targets will be the most useful new integer type).  Currently neither
     llvm-gcc nor the native code generators support non-standard width
     integers yet though.

  2. The LLVM 1.x "bytecode" format has been replaced with a completely new
     binary representation, named 'bitcode'.  Because we plan to maintain
     binary compatibility between LLVM 2.x ".bc" files, this is an
     important change to get right.  Bitcode brings a number of advantages
     to the LLVM over the old bytecode format.  It is denser (files are
     smaller), more extensible, requires less memory to read, is easier to
     keep backwards compatible (so LLVM 2.5 will read 2.0 .bc files), and
     has many other nice features.  Please see
     http://llvm.org/docs/BitCodeFormat.html for more details.

  3. Christopher Lamb added support for alignment values on load and store
     instructions, finishing off PR400.  This allows the IR to express
     loads that are not sufficiently aligned (e.g. due to '#pragma packed')
     or to capture extra alignment information.

  4. Roman Samoilov contributed a new MSIL backend to LLVM.  llc
     -march=msil will now turn LLVM into MSIL (".net") bytecode.  This is
     still fairly early development with a number of limitations.

  5. Lauro implemented support for Thread Local Storage with the __thread
     keyword, and added codegen support for Linux on X86 and ARM.  Some
     front-end pieces will land in LLVM 2.1 though.

  6. Anton and Lauro implemented support for 'protected visibility' in ELF.

  7. Anton implemented support for ELF symbol aliases.

  8. Reid contributed support for 'polymorphic intrinsics', allowing things
     like llvm.ctpop to work on arbitrary width integers.


llvm-gcc Improvements:

  9. Duncan Sands contributed many enhancements to llvm-gcc, some of which
     are language independent and others that are aimed towards better Ada
     support.  He made improvements to NON_LVALUE_EXPR, arrays with
     non-zero base, structs with variable sized fields, VIEW_CONVERT_EXPR,
     CEIL_DIV_EXPR, and many other things.

10. Devang, Duncan and Andrew all contributed many patches to improve
     "attribute packed" support in the CFE, and handle many other obscure
     struct layout cases correctly.


Optimizer Improvements:

11. Devang implemented support for a new LoopPass class, implemented
     passmanager support for it, and converted existing loop transforms to
     use it. See: http://llvm.org/docs/WritingAnLLVMPass.html#LoopPass

12. Devang contributed a new loop rotation pass, which converts "for
     loops" into "do/while loops", where the condition is at the bottom of
     the loop.

13. Devang added support that allows ModulePasses to use the result of
     FunctionPasses.  This requires holding multiple FunctionPasses (e.g.
     dominator info) in memory at a time.

14. Owen and Devang both worked to eliminate the [Post]DominatorSet
     classes from LLVM, switching clients to use the far-more-efficient
     ETForest class instead.  Owen removed the ImmediateDominator class,
     switching clients to use DominatorTree instead.  These changes reduce
     memory usage and speed up the optimizer.


Target-Independent Code Generator Enhancements:

15. Jim, Anton and Duncan contributed many enhancements and improvements
     to C++/Ada zero-cost DWARF exception handling support.  While it is
     not yet solid, it is mostly complete and just in need of continued bug
     fixes and optimizations at this point.  Jim wrote
     http://llvm.org/docs/ExceptionHandling.html to describe the approach.

16. Many bugfixes and other improvements have been made to inline asm
     support. The two large missing features are support for 80-bit
     floating point stack registers on X86 (PR879), and support for inline
     asm in the C backend (PR802). If you run into other issues, please
     report them.

17. Evan implemented a new register scavenger, which is useful for finding
     free registers after register allocation.  This is useful when
     rewriting frame references on RISC targets, for example.

18. 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.

19. Evan contributed heuristics to avoid coallescing virtregs with very
     large live ranges to physregs.  This effectively pinned the physreg
     for the entire live range of the virtreg, which was very bad for code
     quality.

20. Evan implemented support for very simple (but still very useful)
     rematerialization in the register allocator, enough to move
     instructions like "load immediate" and constant pool loads.

21. Anton significantly improved 'switch' lowering, improving codegen for
     sparse switches that have dense subregions, and implemented support
     for the shift/and trick.

22. The code generator now has more accurate and general hooks for
     describing addressing modes ("isLegalAddressingMode") to optimizations
     like loop strength reduction and code sinking.

23. Dale and Evan contributed several improvements to the Loop Strength
     Reduction pass, and added support for sinking expressions across
     blocks to reduce register pressure.

24. Evan added support for tracking physreg sub-registers and
     super-registers in the code generator, as well as extensive register
     allocator changes to track them.

25. Nate contributed initial support for virtreg sub-registers.  See
     PR1350 for more information.


Target-Specific Code Generator Enhancements:

26. Nicolas Geoffray contributed 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.

27. Bill contributed support for the X86 MMX instruction set.

28. Dale contributed many enhancements to the ARM constant island pass,
     making ARM codegen significantly better for large functions.

29. Anton fixed several bugs in DWARF debug emission on linux and
     cygwin/mingw. Debugging basically works on these targets now.

30. Lauro contributed support for the ARM AAPCS/EABI ABI and PIC codegen
     on arm/linux.

31. Dale implemented more aggressive size analysis for ARM inline asm
     strings.

32. Raul Herbster contributed fixes for DWARF debug info generation on
     arm/linux.


Other Improvements:

33. Anton and Reid are working to migrate from CVS to SVN in June: See
     http://llvm.org/SVNMigration.html This will allow us to host llvm-gcc
     and llvm in the same repository again!

34. Lauro contributed support to llvm-test for running on low-memory or
     slow machines (make SMALL_PROBLEM_SIZE=1).

35. Jeff contributed many portability fixes to the llvm-test testsuite,
     and has done a great job keeping llvm itself building with MS Visual
     Studio.

In addition to the features above, this this release also includes 
hundreds of bug fixes, minor optimization improvements, compile-time 
speedups, etc.  LLVM has literally compiled millions of lines of code in 
several different environments.  For example, Anton has found that LLVM 
successfully (and correctly!) builds Qt 4.3rc1, Mozilla/Seamonkey, 
koffice, etc out of the box on linux/x86.

Also, be sure to glance through the February update, which includes a 
bunch of other new features and big changes that are also included in 2.0: 
http://lists.cs.uiuc.edu/pipermail/llvm-announce/2007-February/000021.html

This release wouldn't be possible without many people in the LLVM 
community: building new features, reporting bugs, testing the pre-release 
bits, and contributing in many other ways.  Tanya (our release manager) 
deserves a lot of credit for this being the smoothest and best release so 
far, as well keeping our releases coming out on time!

If you have any questions or comments, please contact the LLVMdev
mailing list (llvmdev at cs.uiuc.edu)!

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-announce mailing list