- 创建IR库的cbuild.toml配置文件,添加对scc_core的依赖 - 新增ir_def.h头文件,定义IR类型、节点、基本块和函数的数据结构 - 添加ir_builtin.h和ir_builtin.c,提供内置的i32类型和零值常量 - 实现ir_dump.h和ir_dump.c,提供IR转储功能的接口 - 创建scc_ir.h和scc_ir.c,实现IR对象的初始化和分配功能 - 添加测试文件test_ir.c用于验证IR库功能 - 定义了完整的IR节点类型枚举和操作类型枚举
Simple Models C Compiler
Smaller Compiler(SMCC)
This is a simple C compiler that generates executable code from a simple c99 sub programming language. The language supports basic operations such as arithmetic, logical, conditional statements and if else while for switch case statements and function calls and system calls.
Features
-
隔离标准库
-
轻量化
-
模块化
-
自举构建
Description
Languages
C
69.5%
C++
26.3%
Python
3.3%
Makefile
0.9%