Skip to content
Matheus Silva Vilela edited this page Jul 20, 2015 · 1 revision

Our clone-based optimizations are implemented as passes on LLVM. This way, they can be compiled just like any other pass. For more information on how to compile a pass on LLVM, refer to the official guide:

http://llvm.org/docs/WritingAnLLVMPass.html

First, you should checkout our code. Considering your LLVM source code is on folder $LLVM_ROOT, you should do:

$ cd $LLVM_ROOT/lib/Transforms/
$ git clone https://github.com/matheusvilela/clone-based-opts.git

After that, each of our optimization can be compiled as individual passes. The following folders in our project are llvm passes:

  • add-noalias: implements Pointer Disambiguation;
  • clone-constant-args: implements Constant Propagation;
  • dead-store-elimination: implements Dead-Stores Elimination;
  • function-fusion: implements Function Fusion;
  • pur: implements Elimination of Unused Return Values;
  • static-profiler: implements Wu and Laru's static profiler.
Clone this wiki locally