Research Compiler using Graph IR for Code Optimizations and Code Generations
C++
50
192 commits
updated Apr 1, 2019
GRaph cOmpiler Solely for cS241
GROSS is a research compiler used for studying non-traditional Graph IR, which has advantages on both code optimization and code generations.
This compiler was originally created as a class project in Advanced Compiler Construction(CS241) in UC Irvine. The class was instructed by Prof. Michael Franz.
This project requires CMake (>= 3.5) and any compiler that supports C++11.
First, we need to boot up submodules
git submodule init
git submodule update
Then configure with CMake
mkdir build
cd build
cmake -G <generator> ..
There are two important CMake variables:
CMAKE_BUILD_TYPE. Set to Release, Debug or more advance configuration. Note that if it's set to Debug and you're using clang, the following sanitizer will be turned on by default:
GROSS_ENABLE_UNIT_TESTS will add unit tests and integration tests to build targets.For example, the following will generate a debug build with all tests included:
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DGROSS_ENABLE_UNIT_TESTS=True ..
Finally, build it
ninja
Use check-units to only run the unit tests, check-integrations for integration tests, and check-gross for all the above.
ninja check-units
ninja check-integrations
ninja check-gross
gross DriverThe gross tool under src/Driver simply runs the entire compilation pipeline and provides options for dumping intermediate IR graph. Please run gross --help for available options.
The Graph IR is inspired by TurboFan JIT compiler in V8 javascript engine, which is also called "Sea of Nodes" IR.
192 commits
C++
98.4%
CMake
1.5%
Research Compiler using Graph IR for Code Optimizations and Code Generations
C++
50
192 commits
updated Apr 1, 2019
GRaph cOmpiler Solely for cS241
GROSS is a research compiler used for studying non-traditional Graph IR, which has advantages on both code optimization and code generations.
This compiler was originally created as a class project in Advanced Compiler Construction(CS241) in UC Irvine. The class was instructed by Prof. Michael Franz.
This project requires CMake (>= 3.5) and any compiler that supports C++11.
First, we need to boot up submodules
git submodule init
git submodule update
Then configure with CMake
mkdir build
cd build
cmake -G <generator> ..
There are two important CMake variables:
CMAKE_BUILD_TYPE. Set to Release, Debug or more advance configuration. Note that if it's set to Debug and you're using clang, the following sanitizer will be turned on by default:
GROSS_ENABLE_UNIT_TESTS will add unit tests and integration tests to build targets.For example, the following will generate a debug build with all tests included:
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DGROSS_ENABLE_UNIT_TESTS=True ..
Finally, build it
ninja
Use check-units to only run the unit tests, check-integrations for integration tests, and check-gross for all the above.
ninja check-units
ninja check-integrations
ninja check-gross
gross DriverThe gross tool under src/Driver simply runs the entire compilation pipeline and provides options for dumping intermediate IR graph. Please run gross --help for available options.
The Graph IR is inspired by TurboFan JIT compiler in V8 javascript engine, which is also called "Sea of Nodes" IR.
192 commits
C++
98.4%
CMake
1.5%