feat(ir): 添加MIR中间表示层并重构LIR相关代码

- 新增mir库模块,包含scc_mir、scc_mir_module、scc_mir_dump等组件
- 添加LIR到MIR的转换接口scc_lir2mir
- 定义MIR操作数类型和指令结构,支持虚拟寄存器、物理寄存器、立即数等
- 实现x86_64指令选择器,将LIR指令转换为MIR指令
- 重构LIR模块中函数参数命名,统一使用lir_module参数名
- 移除LIR中物理寄存器相关的代码和注释
- 更新cbuild.toml依赖配置,添加mir模块依赖
This commit is contained in:
zzy
2026-04-26 17:38:30 +08:00
parent e850b5c981
commit f57ba9bd31
21 changed files with 830 additions and 54 deletions

View File

@@ -11,6 +11,7 @@ dependencies = [
{ name = "ast2ir", path = "./libs/ast2ir" },
{ name = "hir", path = "./libs/ir/hir" },
{ name = "lir", path = "./libs/ir/lir" },
{ name = "mir", path = "./libs/ir/mir" },
# { name = "ir2mcode", path = "./libs/ir2mcode" },
# { name = "sccf2target", path = "./libs/target/sccf2target" },