Channels

Services

LLVM 3.2 now available

A few days after the intended release date, the LLVM developers have announced the availability of version 3.2 of the LLVM compiler infrastructure. The LLVM project encompasses a set of compiler tools such as the C/C++/Objective C compiler Clang, the runtime compiler library compiler-rt, the low-level debugger LLDB, a C++ standard library libc++ and the VMKit JVM which uses LLVM for static and JIT compilation.

With LLVM 3.2, the compiler includes a more powerful scalar replacements of aggregates (SROA) model that creates code which is can be optimised more easily further down the compilation chain. In the past, scaling has caused problems and SROA has been limited to small aggregates but, now, new algorithms have been introduced to prevent these problems occurring and the limits have been removed.

A new NVPTX backend replaces the existing PTX backend and is based on the LLVM code used by NVIDIA's CUDA and OpenCL compilers. NVPTX is compatible with the old backend and also supports the NVVM intrinsics defined in the NVIDIA Compiler SDK. A new loop vectoriser that works better with small loops is also included but is disabled by default. It can be enabled with the -mllvm-vectorize-loops flag.

Clang now has better diagnostics reporting with more issues caught and more explanatory messages. Also new is support for the tls_model attribute, which allows code to set what sort of thread local storage model they wish to use, and type safety improvements in the form of type safety attributes for checking varadic function arguments.Further details are available in the Clang 3.2 release notes.

Other changes in the release enable the DragonEgg GCC plugin to load plugins and support thread-local storage models. DragonEgg also no longer requires GCC to be built with LTO support. The compiler-rt runtime library now includes the ThreadSanitizer (TSan) data race detector and various improvements to the AddressSanitizer.

A complete list of changes in LLVM 3.2 and detailed explanations of the new features are available in the release notes. The source code foe LLVM 3.2 can be downloaded from the project's web site. The LLVM toolchain is being used by a number of companies and projects, including Apple and FreeBSD. The collection is licensed under the BSD-like University of Illinois/NCSA Open Source Licence, a permissive licence which allows commercial products to be derived from the LLVM project.