This is USTC Principles and Techniques of Compiler 2023 course
Course Homepage link: https://ustc-compiler-principles.github.io/2023
Windows11
WSL2 Ubuntu 22.04.3 LTS
flex 2.6.4, bison 3.8.2,GNU gdb12.1,clang LLVM 14.0.0, GCC 11.4.0
cd Lab
mkdir build && cd build
cmake ..
sudo make install
test.cminus
for example
#Compile to IR
cminusfc -emit-llvm test.cminus
#Compile to assembly
cminusfc -S test.cminus
(The test examples you can find in tests)
#Compile to IR with optimization
cminusfc -emit-llvm -mem2reg test.cminus
#Compile to assembly with optimization
cminusfc -S -mem2reg test.cminus