Gnalc is an optimizing compiler for SysY targeting ARM, RISC-V, and Brainfuck.
graph LR
IRText["IR Text"] --> IR
SysY --> AST --> SIR --> IR
IR --> MIR
IR --> LLVM[LLVM]
IR --> Brainfuck
MIR --> armv8[ARMv8]
MIR --> armv7[ARMv7]
MIR --> riscv64[RISCV64]
- cmake
- clang++
- python3
- aarch64-linux-gnu-gcc
git clone https://github.com/0x676e616c63/gnalc.git
cd gnalc
mkdir build && cd build
cmake .. && make gnalc -j$(nproc)
./gnalc -v- SysY 2022 Language Specification
- AST Design
- IR Instructions
- Optimizations
- Test & Benchmark
- Brainfuck Backend
The name gnalc is clang reversed.
Our team name 0x676e616c63 is the ASCII hex representation of gnalc.
- Engineering A Compiler 2nd
- Static Single Assignment Book
- Advanced Compiler Design & Implementation
- Compilers: Principles, Techniques, and Tools Second Edition
- 深入理解 LLVM:代码生成
- 多面体编译理论与深度学习实践
- Compiler Optimizations for a Time-constrained Environment
- Optimizing Compilers for Modern Architectures
- The LLVM Project Blog
- Enna1’s study notes about LLVM
- Enna1's website
- Understanding LLVM Transformation Passes
This project is licensed under the MIT License.
See LICENSE for details.