The Low-Level Virtual Machine (LLVM) is a compiler infrastructure, a collection of libraries and tools that make it easy to build compilers, optimizers, Just-In-Time code generators, and many other compiler-related programs.
LLVM uses a single, language-independent virtual instruction set both as an offline code representation (to communicate code between compiler phases and to run-time systems) and as the compiler internal representation (to analyze and transform programs). This persistent code representation allows a common set of sophisticated compiler techniques to be applied at compile-time, link-time, install-time, run-time, or “idle-time” (between program runs).
The strengths of the LLVM infrastructure are its extremely simple design (which makes it easy to understand and use), source-language independence, powerful mid-level optimizer, automated compiler debugging support, extensibility, and its stability and reliability. LLVM is currently being used to host a wide variety of academic research projects and commercial projects. LLVM includes C and C++ front-ends (based on GCC 4.0.1), a front-end for a Forth-like language (Stacker), a young scheme front-end, and Java support is in development. LLVM can generate code for X86, SparcV9, PowerPC, or it can produce C code.
The clang project is an effort to build a set of new ‘LLVM native’ front-end technologies for the LLVM optimizer and code generator.
Key Features
- 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 dependencies, and pipelines them for efficiency.
- Includes an aggressive optimizer, including scalar, interprocedural, profile-driven, and some simple loop optimizations.
- 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, PIC16 MIPS, MSP430, SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, X86-64, 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.
- Supports a life-long compilation model, including link-time, install-time, run-time, and offline optimization.
Website: llvm.org
Support: Documentation
Developer: LLVM Developer Group
License: University of Illinois Open Source License
LLVM is written in C++. Learn C++ with our recommended free books and free tutorials.
Related Software
| Compilers | |
|---|---|
| GNU Compiler Collection | The standard compiler for most Unix-like operating systems |
| rustc | Compiler for the Rust programming language |
| AOCC | AMD Optimizing C/C++ Compiler |
| LLVM | Low-Level Virtual Machine (LLVM) compiler for C/C++ |
| ispc | Intel SPMD Program Compiler |
| Babel | JavaScript compiler - use next generation JavaScript |
| Glasgow Haskell Compiler | An optimizing compiler for Haskell, written in Haskell |
| Clang | C Language Family Frontend for LLVM |
| Nuitka | Optimizing Python compiler |
| CHICKEN | Compiler for the Scheme programming language |
| FreeBASIC | 32-bit BASIC compiler |
| Numba | Compiler for Python array and numerical functions |
| Free Pascal | Advanced Pascal compiler for Pascal and Object Pascal |
| NASM | Assembler for the x86 CPU architecture |
| Bigloo | Practical Scheme compiler |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Know a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

