The
LLVM compiler system for C and C++ includes the
following:
- Front-ends for C, C++, Objective-C, Fortran, etc based on the GCC 4.2
parsers.
They support the ANSI-standard C and C++ languages to the same degree that
GCC supports them. Additionally, many GCC extensions are supported.
- A stable implementation of the LLVM instruction set, which serves
as both the online and offline code representation, together with assembly
(ASCII) and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes
(including analysis, transformation, and code-generation passes) based on
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of
analyses and transformations, including sophisticated whole-program pointer
analysis, call graph construction, and support for profile-guided
optimizations.
- An easily retargettable code generator, which currently supports X86,
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU,
MIPS, MSP430, SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports
X86, X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM
components.
Strengths of the LLVM System
- LLVM uses a simple low-level language with
strictly defined semantics.
- It includes front-ends for C and
C++. Front-ends for
Java, Scheme, and other languages are in development.
- It includes an aggressive optimizer, including scalar, interprocedural,
profile-driven, and some simple loop optimizations.
- It supports a life-long
compilation model, including link-time, install-time, run-time, and
offline optimization.
- LLVM has full support for accurate
garbage collection.
- The LLVM code generator is relatively easy to retarget, and makes use of
a powerful target description language.
- LLVM has extensive documentation and has
hosted many projects of various sorts.
- Many third-party users have claimed that LLVM is easy to work with and
develop for. For example, the (now removed) Stacker front-end was written
in 4 days by someone who started knowing nothing about LLVM. Additionally,
LLVM has tools to make
development easier.
- 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.
- LLVM is freely available under an OSI-approved "three-clause BSD" license.
- LLVM is currently used by several commercial entities, who contribute
many extensions and new features.
LLVM Audience
LLVM can be used in many different kinds of projects. You might be
interested in LLVM if you are:
- A compiler researcher interested in compile-time, link-time
(interprocedural), and runtime transformations for C and C++ programs.
- A virtual machine researcher/developer interested in a portable,
language-independent instruction set and compilation framework.
- An architecture researcher interested in compiler/hardware
techniques.
- A security researcher interested in static analysis or
instrumentation.
- An instructor or developer interested in a system for quick prototyping of
compiler transformations.
- An end-user who wants to get better performance out of your code.
Want to Know More?
You can
browse the documentation online,
try
LLVM in your web browser, or
download the source code.
LLVM Debian/Ubuntu nightly packages
Download
The goal is to provide Debian and Ubuntu nightly packages ready to be installed with minimal impact on the distribution.
Packages
are available for amd64 and i386 and for both the stable, qualification
and development branches (currently 3.7, 3.8 and 3.9).
The packages provide
LLVM +
Clang +
compiler-rt +
polly +
LLDB
Debian
Jessie (Debian stable) - Last update : Sat, 23 Apr 2016 19:38:36 UTC / Revision: 267277
deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie main
deb-src http://llvm.org/apt/jessie/ llvm-toolchain-jessie main
# 3.7
deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.7 main
deb-src http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.7 main
# 3.8
deb http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.8 main
deb-src http://llvm.org/apt/jessie/ llvm-toolchain-jessie-3.8 main
sid (unstable) - Last update : Sat, 23 Apr 2016 03:22:23 UTC / Revision: 267209
deb http://llvm.org/apt/unstable/ llvm-toolchain main
deb-src http://llvm.org/apt/unstable/ llvm-toolchain main
# 3.7
deb http://llvm.org/apt/unstable/ llvm-toolchain-3.7 main
deb-src http://llvm.org/apt/unstable/ llvm-toolchain-3.7 main
# 3.8
deb http://llvm.org/apt/unstable/ llvm-toolchain-3.8 main
deb-src http://llvm.org/apt/unstable/ llvm-toolchain-3.8 main
Ubuntu
gcc backport (ppa) is necessary on Precise (for libstdc++).
Quantal, Raring, Saucy and Utopic are no longer supported by Ubuntu.
Precise (12.04) - Last update : Fri, 22 Apr 2016 15:52:37 UTC / Revision: 267128
deb http://llvm.org/apt/precise/ llvm-toolchain-precise main
deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main
# 3.7
deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.7 main
deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise-3.7 main
# 3.8
deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.8 main
deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise-3.8 main
# Common
deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main
Trusty (14.04) - Last update : Thu, 21 Apr 2016 21:08:54 UTC / Revision: 266994
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
# 3.7
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main
# 3.8
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main
Wily (15.10) - Last update : Sat, 23 Apr 2016 11:08:55 UTC / Revision: 267280
deb http://llvm.org/apt/wily/ llvm-toolchain-wily main
deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily main
# 3.7
deb http://llvm.org/apt/wily/ llvm-toolchain-wily-3.7 main
deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily-3.7 main
# 3.8
deb http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main
deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main
Xenial (15.10) - Last update : Sat, 23 Apr 2016 20:47:56 UTC / Revision: 267293
deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial main
deb-src http://llvm.org/apt/xenial/ llvm-toolchain-xenial main
# 3.7
deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.7 main
deb-src http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.7 main
# 3.8
deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.8 main
deb-src http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.8 main
Install
(stable branch)
To retrieve the archive signature:
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
To install just clang and lldb (3.7 release):
apt-get install clang-3.7 lldb-3.7
To install all packages:
apt-get install clang-3.7 clang-3.7-doc libclang-common-3.7-dev
libclang-3.7-dev libclang1-3.7 libclang1-3.7-dbg libllvm-3.7-ocaml-dev
libllvm3.7 libllvm3.7-dbg lldb-3.7 llvm-3.7 llvm-3.7-dev llvm-3.7-doc
llvm-3.7-examples llvm-3.7-runtime clang-modernize-3.7 clang-format-3.7
python-clang-3.7 lldb-3.7-dev
Install
(qualification branch)
To retrieve the archive signature:
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
To install just clang and lldb (3.8 release):
apt-get install clang-3.8 lldb-3.8
To install all packages:
apt-get install clang-3.8 clang-3.8-doc libclang-common-3.8-dev
libclang-3.8-dev libclang1-3.8 libclang1-3.8-dbg libllvm-3.8-ocaml-dev
libllvm3.8 libllvm3.8-dbg lldb-3.8 llvm-3.8 llvm-3.8-dev llvm-3.8-doc
llvm-3.8-examples llvm-3.8-runtime clang-modernize-3.8 clang-format-3.8
python-clang-3.8 lldb-3.8-dev liblldb-3.8-dbg
Install
(development branch)
To retrieve the archive signature:
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
To install just clang and lldb (3.9 release):
apt-get install clang-3.9 lldb-3.9
To install all packages:
apt-get install clang-3.9 clang-3.9-doc libclang-common-3.9-dev
libclang-3.9-dev libclang1-3.9 libclang1-3.9-dbg libllvm-3.9-ocaml-dev
libllvm3.9 libllvm3.9-dbg lldb-3.9 llvm-3.9 llvm-3.9-dev llvm-3.9-doc
llvm-3.9-examples llvm-3.9-runtime clang-modernize-3.9 clang-format-3.9
python-clang-3.9 lldb-3.9-dev liblldb-3.9-dbg
Technical aspects
Packages are rebuilt against the trunk of the various LLVM projects.
They are rebuild through a Jenkins instance:
http://llvm-jenkins.debian.net
Bugs
Bugs should be reported on the
LLVM bug tracker (deb packages).
Workflow
Twice a day, each jenkins job will checkout the debian/ directory
necessary to build the packages. The repository is available on the
Debian hosting infrastructure:
http://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/.
In the
llvm-toolchain-*-source, the following tasks will be performed:
- upstream sources will be checkout
- tarballs will be created. They are named:
- llvm-toolchain_X.Y~svn123456.orig-lldb.tar.bz2
- llvm-toolchain_X.Y~svn123456.orig-compiler-rt.tar.bz2
- llvm-toolchain_X.Y~svn123456.orig.tar.bz2
- llvm-toolchain_X.Y~svn123456.orig-clang.tar.bz2
- llvm-toolchain_X.Y~svn123456.orig-polly.tar.bz2
- Debian .dsc package description is created
- Start the jenkins job llvm-toolchain-X-binary
Then, the job
llvm-toolchain-X-binary will:
- Create a chroot using cowbuilder or update it is already existing
- Build all the packages
- Launch lintian, the Debian static analyzer
- Publish the result on the LLVM repository
Note that a
few patches are applied over the
LLVM tarballs (and should be merged upstream at some point).
Extra
With the Jenkins instance, several reports are produced:
Overview
Warning
If you are using a released version of LLVM, see
the download page to find your documentation.
The LLVM compiler infrastructure supports a wide range of projects, from
industrial strength compilers to specialized JIT applications to small
research projects.
Similarly, documentation is broken down into several high-level groupings
targeted at different audiences:
Development Process Documentation
Information about LLVM’s development process.
- LLVM Developer Policy
- The LLVM project’s policy towards developers and their contributions.
- Creating an LLVM Project
- How-to guide and templates for new projects that use the LLVM
infrastructure. The templates (directory organization, Makefiles, and test
tree) allow the project code to be located outside (or inside) the llvm/
tree, while using LLVM header files and libraries.
- LLVMBuild Guide
- Describes the LLVMBuild organization and files used by LLVM to specify
component descriptions.
- How To Release LLVM To The Public
- This is a guide to preparing LLVM releases. Most developers can ignore it.
- How To Validate a New Release
- This is a guide to validate a new release, during the release process. Most developers can ignore it.
- Advice on Packaging LLVM
- Advice on packaging LLVM into a distribution.
- Code Reviews with Phabricator
- Describes how to use the Phabricator code review tool hosted on
http://reviews.llvm.org/ and its command line interface, Arcanist.