Skip to content

About

서울대학교 소개원실 과목 - compiler 프로젝트

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

68 Commits

Folders and files

Repository files navigation

SWPP Compiler

This compiler converts LLVM IR to SWPP assembly.

NOTE: Use 'Use this template' function to create a private team repository. Then, the rest of the teammates should fork from the team repository. Watch out not to create another repos with this template!

Whenever there is a change in this repo, you can cherry-pick the new commits. Relevant links: here, here.

How to compile

To compile this project, you'll need to clone & build LLVM 22.1.0 first. You can either build LLVM on your own, or use the script we provided in the main repo

After LLVM 22.1.0 is successfully built, please run:

cmake -GNinja -Bbuild
cmake --build build --target swpp-compiler

If CMake fails to locate the installed LLVM or you have multiple LLVMs installed, you can instruct CMake to use the LLVM in specific location by setting the LLVM_ROOT variable in the CMakeLists.txt.

How to test

You should configure tests in the CMakeLists.txt

cd build
ctest

How to run

Compile LLVM IR input.ll into an assembly a.s using this command:

// adding --verbose prints the IR after each optimization step
build/swpp-compiler input.ll a.s [--verbose]

How to create documents

To build the document, you have to install Doxygen in your environment. We recommend you use the package manager, but you may build it on your own

After Doxygen is successfully built, please run:

cmake -GNinja -Bbuild
cmake --build build --target docs

The documents will be created in the docs directory.
You can read the document by opening docs/html/index.html with the web browser.

Important reminder

The compiler code other than src/lib/opt.cpp and files in src/lib/opt are only to be modified by TAs, and should not be modified by students participating in the project. They are out of your project scope.

At the end of the project, TAs will compare the content with the original skeleton code. If we find out that you modified the backend, we will place severe penalty!

About

서울대학교 소개원실 과목 - compiler 프로젝트

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages