LLVM is a compiler infrastructure designed for compile-time, link-time, runtime, and "idle-time" optimization of programs from arbitrary programming languages. LLVM currently supports compilation of C++ and C programs, using front-ends derived from gcc 3.4.
There is a demonstration front end, Stacker, which provides a simple forth-like language. Work is currently under way to provide a Java class file front-end, as well as other significant improvements.
- A compilation strategy designed to enable effective program optimization across the entire lifetime of a program. LLVM supports effective optimization at compile time, link-time (particularly interprocedural), run-time and offline (i.e., after software is installed), while remaining transparent to developers and maintaining compatibility with existing build scripts.
- A virtual instruction set - LLVM is a low-level object code representation that uses simple RISC-like instructions, but provides rich, language-independent, type information and dataflow (SSA) information about operands. This combination enables sophisticated transformations on object code, while remaining light-weight enough to be attached to the executable. This combination is key to allowing link-time, run-time, and offline transformations.
- A compiler infrastructure - LLVM is also a collection of source code that implements the language and compilation strategy. The primary components of the LLVM infrastructure are a GCC-based C & C++ front-end, a link-time optimization framework with a growing set of global and interprocedural analyses and transformations, static back-ends for the X86, PowerPC, IA-64, Alpha, & SPARC V9 architectures, a back-end which emits portable C code, and a Just-In-Time compiler for X86, PowerPC, and SPARC V9 processors.
LLVM does not imply things that you would expect from a high-level virtual machine. It does not require garbage collection or run-time code generation (In fact, LLVM makes a great static compiler!). Note that optional LLVM components can be used to build high-level virtual machines and other systems that need these services.
LLVM is a robust system, particularly well suited for developing new mid-level language-independent analyses and optimizations of all sorts, including those that require extensive interprocedural analysis.
LLVM is also a great target for front-end development for conventional or research programming languages, including those which require compile-time, link-time, or run-time optimization for effective implementation, proper tail calls or garbage collection.
We have an incomplete list of projects which have used LLVM for various purposes, showing that you can get up-and-running quickly with LLVM, giving time to do interesting things, even if you only have a semester in a University course. We also have a list of ideas for projects in LLVM.
Product's homepage
What's New in This Release: [ read full changelog ]
· Greatly improved support for building C++ applications, with greater stability and better diagnostics.
· Improved support for the C++ 2011 standard (aka "C++'0x"), including implementations of non-static data member initializers, alias templates, delegating constructors, range-based for loops, and implicitly-generated move constructors and move assignment operators, among others.
· Implemented support for some features of the upcoming C1x standard, including static assertions and generic selections.
· Better detection of include and linking paths for system headers and libraries, especially for Linux distributions.
Several improvements to Objective-C support, including:
· Automatic Reference Counting (ARC) and an improved memory model cleanly separating object and C memory.
· A migration tool for moving manual retain/release code to ARC
· Better support for data hiding, allowing instance variables to be declared in implementation contexts or class extensions
· Weak linking support for Objective-C classes
· Improved static type checking by inferring the return type of methods such as +alloc and -init.
· Some new Objective-C features require either the Mac OS X 10.7 / iOS 5 Objective-C runtime, or version 1.6 or later of the GNUstep Objective-C runtime version.
· Implemented a number of optimizations in libclang, the Clang C interface, to improve the performance of code completion and the mapping from source locations to abstract syntax tree nodes.