Generated by DeepSeek V3.2| LLVM | |
|---|---|
![]() | |
| Name | LLVM |
| Developer | LLVM Developer Group |
| Released | 24 October 2003 |
| Programming language | C++ |
| Operating system | Cross-platform |
| Genre | Compiler |
| License | University of Illinois/NCSA Open Source License |
| Website | https://llvm.org |
LLVM. It is an open-source compiler infrastructure project designed as a collection of modular and reusable libraries for compiler and toolchain development. Originally standing for "Low Level Virtual Machine," the acronym is now the official project name. The project provides a language-independent intermediate representation (IR) and a suite of sophisticated optimization and code generation tools for various CPU architectures. It is widely used in both academic research and industrial production for building compilers, runtime environments, and performance analysis tools.
The project was initiated by Vikram Adve and Chris Lattner at the University of Illinois at Urbana-Champaign in 2000. Its primary innovation is the LLVM Intermediate Representation, a static single-assignment form instruction set that enables powerful, multi-stage optimizations. This design allows front-end compilers for languages like C, C++, and Swift to translate source code into LLVM IR, which is then optimized and converted into machine code for platforms such as x86, ARM, and PowerPC. Major technology companies, including Apple Inc., Google, and NVIDIA, heavily utilize and contribute to its codebase for products like the Clang compiler and the Metal (API) shader compiler.
The central component is the LLVM Core library, which contains the intermediate representation, the IR optimizer, and target code generators. The Clang compiler serves as a production-quality front end for the C language family, replacing the GNU Compiler Collection in many toolchains. The LLDB project provides a high-performance debugger built as a set of reusable components. Other critical libraries include the libc++ standard library implementation, the compiler-rt runtime library for low-level operations like profiling, and the Polly loop optimizer for high-level loop transformations. The LLVM Bitcode format provides a serialized representation of the IR for distribution and Just-in-time compilation.
Its architecture is defined by a strict separation between the front end, the middle-end optimizer, and the back-end code generator, connected through the well-defined LLVM IR. This three-phase design allows new programming languages, such as Rust or Julia, to target the infrastructure by implementing a front end that emits the standard IR. The optimizer performs a vast array of analyses and transformations, including dead code elimination, loop unrolling, and interprocedural optimization, using a pass manager. The back end supports numerous instruction set architectures through table-driven instruction descriptions, allowing retargeting to new CPU designs like RISC-V.
The research began as a doctoral project under Vikram Adve at the University of Illinois. Chris Lattner led the initial implementation, with the first public release occurring in 2003. In 2005, Apple Inc. hired Lattner and began using the technology as the foundation for its OpenGL stack and developer tools, leading to the creation of Clang and LLDB. The project transitioned to a new governance model with the formation of the LLVM Foundation in 2014. Key milestones include its adoption as the default compiler system in FreeBSD, its use for graphics shader compilation in the Mesa 3D library, and its integration into the Android Native Development Kit.
It is the backbone for numerous commercial and open-source compilers, most notably the Clang/LLVM toolchain that compiles the macOS, iOS, and Fuchsia operating systems. The Rust compiler uses it as its back end for code generation. In high-performance computing, it is used by the ROCM platform from AMD and the NVCC compiler driver from NVIDIA for GPU programming. It also enables sophisticated static analysis and source-code transformation tools, such as the Clang Static Analyzer and the KLEE symbolic execution engine. Furthermore, projects like Emscripten use it to compile C++ code to WebAssembly for execution in web browsers.
Category:Compilers Category:Free software projects Category:Software using the NCSA license