Low Level Virtual Machine |
Low Level Virtual Machine, generally known as LLVM, is a Compiler infrastructure designed for Compile time, link-time, run-time, and idle-time optimization of programs written in arbitrary programming languages.
Using LLVM, one can create a virtual machine for languages like Java programming language, a code generator for a specific machine architecture and optimizers independent from particular platforms or languages. LLVM is language and architecture independent; it lies between a language-specific module and a code generator for a machine. LLVM includes aggressive interprocedural optimization support, static and Just-in-time_compilation compilers, and has many components in various stages of development (including Java_programming_language bytecode and MSIL frontends, a Python_programming_language frontend, a new graph coloring register allocator, and more).
It currently supports the compilation of .
As of May 2005, LLVM 1.5 is available.
= Code representation =
LLVM supports a language-independent instruction set and type system. Most of instructions have a form similar to three address code. Each instruction is also a Static_single_assignment_form form, meaning each variable (called a typed register) is assigned once and is frozen for the rest of life; this helps simplify the analysis of the dependency among variables.
Any form of type conversion, from coercion to the downcast of an object, must be explicit and can be done by cast instruction. The program without casts, thus, can be considered to be type-safe. LLVM has basic types like integers of fixed sizes and exactly four derived types, namely, Pointers, arrays, composition (computer science)s and functions. A type construct in a concrete language can be represented by combining these types in LLVM. For example, a class in C++ can be represented by the combination of structures, fuctions and arrays of function pointers.
= External links =
|
|