The LLVM Compiler Infrastructure
Site Map:
Download!
Download now: LLVM 1.2

Try the:
online demo

View the open-source
license

Status Updates
Useful Links
Maintained by:
Chris Lattner
LLVM Overview

Low Level Virtual Machine (LLVM) is:

  1. A compilation strategy - Fundamentally, LLVM is 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.

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

  3. 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 SPARC v9 and X86 architectures, a back-end which emits portable C code, and a Just-In-Time compiler for X86 and SPARC v9 processors. See "Current Projects" for information about other components under development.

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

LLVM is a product of the Lifelong Code Optimization Project, led by Vikram Adve in the Department of Computer Science at the University of Illinois, Urbana-Champaign. Since our public release, LLVM has grown to include contributions from several other people! We welcome external contributions, so please send e-mail to llvmdev@cs.uiuc.edu if you are interested in contributing code to the LLVM infrastructure.

Strengths of the LLVM System

  1. LLVM uses a simple low-level language with strictly defined semantics.
  2. It includes front-ends for C, C++, and Stacker (a forth-like language). Front-ends for Java, Microsoft CLI, and O-Caml are in early development.
  3. It includes an aggressive optimizer, including scalar, interprocedural, profile-driven, and some simple loop optimizations.
  4. It supports a life-long compilation model, including link-time, install-time, run-time, and offline optimization.
  5. It includes native code generators for X86 and Sparc (both of which work as JIT or static compilers). LLVM can also compile to C code, for portability. Other native backends are in development.
  6. LLVM has extensive documentation and has hosted many projects of various sorts.
  7. Many third-party users have claimed that LLVM is easy to work with and develop for. For example, the Stacker front-end was written in 4 days by someone who started knowing nothing about LLVM. Additionally, LLVM has tools to make development easier.
  8. LLVM is under active development and is constantly being extended, enhanced and improved. See the status updates on the left bar to see the rate of development.
  9. LLVM is freely available under an OSI-approved "three-clause BSD" license.

Want to learn more?

If you'd like to learn more about LLVM, please take a look at the extensive documentation for LLVM. In particular, all of the tools distributed with LLVM are described in the LLVM Command Guide. If you're interested in what source-language features and optimizations we support, please check out the LLVM demo page. If you'd like to browse through the source code, either check out doxygen or download the most recent release. Finally, if you're interested in LLVM, have questions, and can't find any answers, please ask on the LLVM developer's mailing list.

Public LLVM Release!

Mar 19, 2004: The LLVM 1.2 is now available for download! LLVM is publicly available under the OSI-certified University of Illinois Open-Source License. See answers to common licensing questions.



Try out LLVM in your browser

If you'd like to experiment with LLVM, but don't want to download it and compile it, we've got just the thing for you. You can now compile C and C++ in your browser, to see what the LLVM representation looks like, to see what various C/C++ constructs map to in LLVM, and try out some of the optimizers.



Funding

This work is sponsored by the NSF Next Generation Software program through grants EIA-0093426 (an NSF CAREER award) and EIA-0103756. It is also supported in part by the NSF Operating Systems and Compilers program (grant #CCR-9988482), by the NSF Embedded Systems program (grant #CCR-0209202), and by the MARCO/DARPA Gigascale Systems Research Center (GSRC).