X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Report%2FMain%2FContext%2FLLVM.tex;h=0ba81fbd9bd9da60bcf49520df0a92efd4c5720f;hb=8a42b79a08ff544b66a1c7e3fc5e37fdfe64de5b;hp=e204102121fcaa2a7af15b5cc85883ab008c331a;hpb=99713a971023a195e42cf9e63a6b30e3e87d9880;p=matthijs%2Fprojects%2Finternship.git diff --git a/Report/Main/Context/LLVM.tex b/Report/Main/Context/LLVM.tex index e204102..0ba81fb 100644 --- a/Report/Main/Context/LLVM.tex +++ b/Report/Main/Context/LLVM.tex @@ -1,3 +1,26 @@ \section{Low Level Virtual Machine} -This section describes the Low Level Virtual Machine (LLVM) project. It -describes the project's aims, organisation and status. +\label{LLVM} +The Low Level Virtual Machine project (LLVM, \cite{LLVM}, \cite{Lattner:MSThesis02}) +is a framework for compiler construction. It provides its own intermediate +representation, the LLVM IR. This is a simple language that can be used to +express any program in a static single assignment (SSA) form that is easy to +reason with and apply transformations to. + +Additionally, LLVM provides a host of libraries to work with this IR. There is +code for: +\begin{itemize} +\item reading, writing, generating and manipulating LLVM IR. +\item transformation (optimization) of LLVM IR. +\item codegeneration for various architectures. +\item just-in-time codegeneration. +\end{itemize} + +In addition, the LLVM project provides two frontends for generating LLVM IR: +llvm-gcc, which uses gcc to compile a lot of languages with an LLVM backend (from +the gcc point of view) and Clang, which is a completely new project designed to +parse and emit LLVM IR for all c-like languages (C, ObjC, C++). + +From the LLVM project, we use a number of parts. In section \ref{MontiumC}, we +saw that Clang frontend is used directly in the Montium frontend. Also, a lot of +transformations from the LLVM project are used. Lastly, a number of small +library functions and components are used in the frontend.