LLVM 231 optimization -- course project

CSE231 FA15

View the Project on GitHub salamanderrex/LLVM_231

LLVM_231

Build status progress Emotion

LLVM project for CSE 231Fall15

Project 2

Project 2 has 4 parts.

Analysis Use of Analysis Results
Constant Propagation Optimization: Constant Folding, Branch Folding
Available Expressions Optimization: Common Sub-expression Elminiation
Range Analysis Bug finder: Warn programmer if can't show array access in bounds
Intra-Procedural Pointer Analysis Catalyst: Improve all other analyses using this information

For this part, we modulaize three sections for implementation of this project. They are:

Work Flow:

flow

Lattice Structure

Lattice Structure

Run the

environment

source startenv.sh

#install artisan library
apt-get install python-gtk2 graphviz
sudo pip install xdot

run script

To save your life, we prepare the runscript for you to test the test case in P2.

/runscript/P2runAll.sh

An simple example to run the Guardian -> Artisan -> Miner

#guardian
./runscripts/guardian/runPointer.sh ${CSE231ROOT}/P2test/optimizerSimple

#artisan
./runscripts/artisan/draw.sh ${CSE231ROOT}/P2test/optimizerSimple

#miner
./runscripts/miner/dig.sh ${CSE231ROOT}/P2test/optimizerSimple

Project 1

There are three parts in Paroject 1

source file are at

/llvm/src/lib/CSE231
/extra/instrument

*benchmark

/extra/benchmarks/

## start environment

source startenv.sh


## complie library

make llvm

It compiles the code of project into CSE231.so

## run script
we prepare the runscript for you.
If you want to run section `x`

/runscripts/run-sectionx.sh


result will be in the `logs`.