CSU Sacramento compiler project.
We have a slack channel for easier communication. Sign up with your csus email.
- Ubuntu 16.04 is highly recommended
- gcc 4.8 built with plugin support
- g++ 4.8
- gfortran 4.8
- cmake 3.4.3 or later
- Clone the repository (CONTRIBUTING.md contains some tips on using git).
- Download the modified dragonegg from this google drive link.
- Extract dragonegg and copy it to the "Generic" directory
- If you are using Ubuntu, run the script CompileLLVMandDRAGONEGG.sh and follow the prompts to build LLVM and dragonegg.
- Run
./CompileLLVMandDRAGONEGG
in the base of the repository.
- Run
- Our scheduler's code is in the CodeGen directory.
- Source files can be found in lib/CodeGen/OptSched
- Headder files can be found in include/llvm/CodeGen/OptSched
- After modifying the code you can use the script CompileLLVMandDRAGONEGG to rebuild LLVM. Note that dragonegg is statically linked and must also be rebuilt after every change.
Our scheduler, "OptSched", is integrated as a "machine scheduler" within LLVM. To invoke our scheduler use the LLVM option -misched=optsched
. It is also nessessary to provide LLVM with the path to your configuration files. Do this with the -optsched-cfg
option.
By default "OptSchedCfg" is located at Generic/OptSchedCfg.
-
For example, to compile a program using our scheduler with clang use the command:
clang -O3 -mllvm -misched=optsched -mllvm -optsched-cfg=**/path/to/OptSchedCfg/** test.c
Dragonegg is a gcc plugin that allows us to compile FORTRAN benchmarks with the LLVM backend.
-
To compile a program using dragonegg use the command:
/usr/bin/gfortran-4.8 -O3 -fplugin=**/path/to/dragonegg/dragonegg.so** -fplugin-arg-dragonegg-llvm-option=-misched:optsched -fplugin-arg-dragonegg-llvm-option=-optsched-cfg:**/path/to/OptSchedCfg/** test.f