LLVM

The LLVM compiler infrastructure project (formerly Low Level Virtual Machine) is a Compiler Infrastructure designed to be a set of reusable libraries with well-defined interfaces - wikipedia

LLVM. compiler backend for multiple programming languages - wikimedia

LLVM can translate from any language supported by gcc 4.2.1 (Ada, C, C++, Fortran, Java, Objective-C, or Objective-C++) or by clang to any of: C, C++, or MSIL by way of the "arch" command in llvm-gcc.

llvm-g++ -emit-llvm x.cpp -o program.bc -c llc -march=c program.bc -o x.c cc x.c -lstdc++ llvm-g++ x.cpp -o program.bc -c llc -march=msil program.bc -o program.msil

Translation to C has been removed from LLVM since version 3.1. It had numerous problems, to the point of not being able to compile any nontrivial program.

# History

LLVM is written in C++ and is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages.

Originally implemented for C and C++, the language-agnostic design (and the success) of LLVM has since spawned a wide variety of front ends: languages with compilers that use LLVM include (amongst others):

The LLVM project started in 2000 at the University of Illinois at Urbana–Champaign, under the direction of Vikram Adve and Chris Lattner. LLVM was originally developed as a research infrastructure to investigate dynamic compilation techniques for static and dynamic programming languages.

# See also