e75166b732e6a79e59ce3f2a21b8142335360c3a
[matthijs/projects/internship.git] / Report / Main / Context / LLVM.tex
1 \section{Low Level Virtual Machine}
2 \label{LLVM}
3 The Low Level Virtual Machine project (LLVM, \cite{LLVM}, \cite{Lattner:MSThesis02})
4 is a framework for compiler construction. It provides its own intermediate
5 representation, the LLVM IR. This is a simple language that can be used to
6 expres any program in a static single assignment (SSA) form that is easy to
7 reason with and transform.
8
9 Additionally, LLVM provides a host of libraries to work with this IR. There is
10 code for:
11 \begin{itemize}
12 \item reading, writing, generating and manipulating LLVM IR.
13 \item transformation (optimization) of LLVM IR.
14 \item codegeneration for various architectures.
15 \item just-in-time codegeneration.
16 \end{itemize}
17
18 In addition, the LLVM project provides two frontends for generating LLVM IR:
19 llvm-gcc, which uses gcc to compile a lot of languages with a LLVM backend (from
20 the gcc point of view) and clang, which is a completely new project designed to
21 parse and emit LLVM IR for all c-like languages (C, ObjC, C++).