Assignment 1: Introduction to LLVM

Due: 10:30am, Thursday, January 31

Materials: pdf LivenessHistogram.cpp Benchmark Source Code

We will be using the Low Level Virtual Machine (LLVM) compiler infrastructure developed at the University of Illinois Urbana-Champaign for our project work. We assume you have access to an x86 based machine (preferably running Linux, although Windows and Mac OS X should work as well).

In this project you will write a simple program analysis and familiarize yourself with the LLVM source code. You will write a liveness dataflow analysis from which you will produce a histogram of simultaneously live values.

Install LLVM

First download, install, and build the LLVM 2.1 source code from Follow the instructions on the website for your particular machine configuration. You do not need to build the gcc frontend from source; you can use the prebuilt binaries. We recommend that you install the LLVM gcc frontend in a different directory than your existing gcc install (e.g., /usr0/local instead of /usr/local). Do not get the source from SVN; we will be working off of the 2.1 release. Make sure you can build LLVM from within your preferred development environment (Eclipse for C++ kind of works, emacs is better if you're already an expert). Note that in order use a debugger on the LLVM binaries you will need to pass {\tt --enable-debug-runtime --disable-optimized} to the configure script.

Peruse through the documentation. The LLVM Programmer's Manual and Writing an LLVM Pass tutorial are particularly useful.

The rest of the assignment is provided in the above pdf file.


Top General Info Schedule Projects Assignments Papers Useful Info