- get a copy of our modified llvm from here and build it
- modify
Makefile
to setCONFIG
to/path-to-custom-built-llvm/bin/llvm-config
- do
make
If you don't want to build LLVM, you can checkout executables from this repo as well (ug, create-server, add.bc, mul.bc, id.bc). WARNING: These executables were only tested on OS X Yosemite.
- compile testcase to llvm bitcode file. For example, you can do this
clang -c -emit-llvm add.c -o testcase
- run the superoptimizer like this
# in this case `add` is name of the function you would like to optimize
./ug -fadd testcase.bc