|
|
|
|
Low Level Virtual Machine
|
| |
|
| |
The Low Level Virtual Machine, generally known as LLVM, is a compiler infrastructure, written in C++, which is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages. The LLVM project started in 2000 at the University of Illinois at Urbana-Champaign.
LLVM currently supports the compilation of C, C++, Fortran, Objective-C, Ada, D, using front-ends derived from version 4.0.1 and 4.2 of the GNU Compiler Collection (GCC).

Discussion
Ask a question about 'Low Level Virtual Machine'
Start a new discussion about 'Low Level Virtual Machine'
Answer questions from other users
|
Encyclopedia
The Low Level Virtual Machine, generally known as LLVM, is a compiler infrastructure, written in C++, which is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages. The LLVM project started in 2000 at the University of Illinois at Urbana-Champaign.
LLVM currently supports the compilation of C, C++, Fortran, Objective-C, Ada, D, using front-ends derived from version 4.0.1 and 4.2 of the GNU Compiler Collection (GCC). An alternative front-end for C-like languages is being developed under the name clang. The Essential Haskell Compiler can generate code for LLVM which, though the generator is in the early stages of development, has been shown in many cases to be more efficient than the C code generator.
Using LLVM, one can create compilers for languages like Java, code generators for specific machine architectures, and optimizers independent from particular platforms or languages. The LLVM intermediate representation (IR) is language and architecture independent; it lies between a language-specific module and a code generator for a specific machine. LLVM includes aggressive inter-procedural optimization support, static and JIT compilers.
It has many components in various stages of development; including, but not limited to, a Java bytecode front-end, a CIL front-end, a CPython front-end, and a new graph coloring register allocator. The LLVM JIT compiler is capable of optimizing unnecessary static branches out of a program at runtime, and is therefore useful for partial evaluation in cases where a program has many options—most of which can easily be determined unnecessary in a specific environment. Because of this, it is used in the OpenGL pipeline of Mac OS X v10.5 (Leopard) to provide support for missing hardware features.
Code representation
LLVM supports a language-independent instruction set and type system. Most of the instructions have a form similar to three address code. Each instruction is in static single assignment form (SSA), meaning that each variable (called a typed register) is assigned once and is frozen. This helps simplify the analysis of dependencies among variables.
Any form of type conversion, from coercion to the downcasting of an object, is performed explicitly using the cast instruction. LLVM has basic types, like integers of fixed sizes, and exactly five derived types: pointers, arrays, vectors, structures, and functions. A type construct in a concrete language can be represented by combining these basic types in LLVM. For example, a class in C++ can be represented by a combination of structures, functions and arrays of function pointers.
Licensing
LLVM and clang are publicly available under the University of Illinois/NCSA Open Source License, a GPL-compatible, OSI-approved license that is very similar to the BSD license.
See also
External links
- — a published paper by Chris Lattner and Vikram Adve.
- — describes the LLVM intermediate representation.
- — Google Tech Talk Presentation on LLVM 2.0
-
|
| |
|
|