lzkk
|
120d7197d8
|
fix(mir): 线性扫描活变量分析 def 位置记录 + callee-saved 寄存器限定 + CLI 标志修复
- InstLiveness: 反向扫描中记录 def vreg 的区间起点,修复 phi copy 的 MovReg
def 位置未被区间覆盖导致寄存器分配不一致的 bug(25_while_if 死循环)
- LinearScanAlloc: GP_ALLOCATABLE 限定为 callee-saved 寄存器(x19-x28),
避免跨函数调用时 caller-saved 寄存器被破坏导致段错误(54_hidden_var)
- CLI: 修复 --regalloc= 标志 strncmp 长度 off-by-one(12→11)
|
5 days ago |
lzkk
|
fbea91986d
|
feat(mir): 指令级活变量分析 + CLI/构建集成
- InstLiveness: 三阶段算法(块级 fixpoint + 指令反向扫描 + 区间构建)
- 支持 phi-copy 插入环境(非严格 SSA):union 区间
- CLI.h 添加 regalloc 字段,支持 --regalloc=linear/graphcoloring
|
5 days ago |
zhm
|
e9adbe38c7
|
Fix undefined behavior: signed overflow, negative left shift, float-to-int overflow
|
3 weeks ago |
安峻邑
|
ca2f3b6d79
|
Init
|
3 weeks ago |
安峻邑
|
04371dd7fa
|
Init
|
3 weeks ago |
安峻邑
|
55d92cda42
|
fix: 补全缺失的头文件目录
- 同步完整的 include 目录 (frontend, ir, irgen, sem, mir, utils)
- 同步必要的 third_party 依赖 (antlr4)
- 同步 .gitignore 和文档
- 修复编译时找不到头文件的问题
|
3 weeks ago |
安峻邑
|
dba0d6adc0
|
fix: 修正头文件包含路径为 include/ 前缀以适配评测系统
- 将所有源文件中的头文件包含路径从 'subdir/file.h' 改为 'include/subdir/file.h'
- 适配评测系统将 include 目录内容复制到 /extlibs 的行为
- 使得 #include "include/ir/IR.h" 可以在 -I/extlibs 环境下找到 /extlibs/include/ir/IR.h
|
3 weeks ago |
安峻邑
|
293c28fed4
|
fix: 修正头文件包含路径以适配评测系统
- 将所有头文件包含路径从 'include/subdir/file.h' 改为 'subdir/file.h'
- 修正了相对路径引用,如 '../../include/ir/IR.h' 改为 'ir/IR.h'
- 适配评测系统使用 -I. 或 -Iinclude 的包含路径设置
- 解决了 'file not found' 编译错误
|
3 weeks ago |
安峻邑
|
ac4be4ec7a
|
fix: 修复编译问题以支持测评程序直接编译
1. 修改所有include路径为相对于项目根目录
- frontend/ -> src/frontend/
- ir/ -> include/ir/
- irgen/ -> include/irgen/
- sem/ -> include/sem/
- mir/ -> include/mir/
- utils/ -> include/utils/
2. 生成ANTLR代码到src/frontend/目录
- 将SysYLexer/Parser等生成文件放在源码目录
- 移除third_party/antlr4-runtime避免重复定义
3. 添加build.sh和Makefile支持直接编译
4. 修复main.cpp的PassManager调用
|
3 weeks ago |
安峻邑
|
880fd01d51
|
feat: 支持比赛要求的CLI格式 (-S -o -O1)
- 添加 -S 参数生成汇编文件
- 添加 -o 参数指定输出文件路径
- 添加 -O1/-O2/-O3 优化级别支持
- 默认行为:未指定输出模式时默认生成汇编
- 兼容旧格式 (--emit-asm, --emit-ir 等)
|
3 weeks ago |
安峻邑
|
624f9e307f
|
已实现基本标量优化,实现部分寄存器优化
|
3 weeks ago |