276 Commits (667c342c51dbef97ce8d384ced32dd778232d6f3)
 

Author SHA1 Message Date
lzkk 667c342c51 perf(mir): Lowering 立即数折叠——AddRR/SubRR/CmpRR 常量 rhs 直接用 Imm
4 days ago
lzkk d51cbc49f1 perf(mir): RegAlloc 偏置着色调和(copy_edges coalescing)
4 days ago
lzkk 9095cbe0db perf(ir): 启用 LICM + 迭代优化循环(ConstFold/ConstProp/CSE/DCE 收敛)
4 days ago
lzkk 1993380d4a chore: 移除 git 冲突残留文件
4 days ago
lzkk ee3b42ac40 feat(opt): 切换至队友代码基线——100%功能正确
4 days ago
lzkk bfe105c2cd fix(mir): 别名无条件冲突 + per-round reserve防指针失效
4 days ago
lzkk d6f42a2a2e fix(mir): 回退到稳定版本——PhysReg映射+spill reload+别名无条件冲突
4 days ago
lzkk 0f1b545568 fix(mir): 分配顺序改为FirstUsePos + 别名无条件冲突 + per-round reserve
4 days ago
lzkk 83228a8123 fix(mir): GPR32/GPR64别名检查移除segments.empty()条件
4 days ago
lzkk 5fb106bde8 fix(mir): LLVM两遍分配 + 间隙分裂 + Assign安全网
4 days ago
lzkk 508f9d8ddc fix(mir): TrySplit引用失效修复 + LLVM Defer机制
4 days ago
lzkk 80dc583143 fix(mir): PhysReg映射修正 + spill reload分配独立vreg——避免寄存器冲突
4 days ago
lzkk ddaf8831a2 fix(mir): CMakeLists.txt 改用 GreedyAlloc.cpp 替代 LinearScanAlloc.cpp
4 days ago
lzkk da1e456133 feat(mir): 实现 LLVM-style 贪婪寄存器分配器 —— 统一架构
4 days ago
lzkk 0a29e6ac42 fix(mir): AsmPrinter 函数调用后失效帧基址缓存——修复 92_register_alloc
5 days ago
lzkk 363b809736 fix(mir): 大栈帧 asm 输出 x13 缓存失效 + 叶函数栈参数偏移修复 + IR 数组初始化阈值降低
5 days ago
lzkk 120d7197d8 fix(mir): 线性扫描活变量分析 def 位置记录 + callee-saved 寄存器限定 + CLI 标志修复
5 days ago
lzkk e1777c9eab fix(ir): CSE 安全门禁——非 SSA 函数跳过 Load/GEP CSE
5 days ago
lzkk 28c336728d fix(mir): 线性扫描区间分裂修复 + 多定义点 vreg 跳过逻辑修复
5 days ago
lzkk fbea91986d feat(mir): 指令级活变量分析 + CLI/构建集成
5 days ago
lzkk 8f3012cd9f fix(ir): CSE 扩展支持 LoadInst 和 GEPInst——修复 86_long_code2 编译超时
5 days ago
lzkk 28ad162de4 feat(mir): 线性扫描寄存器分配初始实现(WIP,--regalloc=linear 可用)
5 days ago
lzkk a9ebfdc0e0 feat(mir): 添加指令级活变量分析——精确 [start,end] 区间
5 days ago
lzkk 6c5441ff43 feat(mir): 添加 MIR 验证器和寄存器分配验证器
5 days ago
lzkk fb77d7e03c chore(ir): 清理 IRVerifier 死代码和注释
5 days ago
lzkk 0b589c77da feat(ir): 添加 IR 验证器,校验 SSA 支配性/终结指令/PHI 一致性
5 days ago
lzkk ef6eedee83 fix(infra): count_asm.sh 使用相对路径替代硬编码路径
5 days ago
lzkk c12b6830b8 fix(regalloc): MAX_SPILL_ROUNDS=1 + 保守修复阈值 20→200,修复 spill 错误代码
5 days ago
lzkk ca6c9fa540 docs: 记录 MAX_SPILL_ROUNDS 修复——mm1 指令数削减 99.4%
5 days ago
lzkk d238777f17 fix(regalloc): 根除 spill 代码指数级膨胀——MAX_SPILL_ROUNDS 统一为 3
5 days ago
lzkk 535ab08d32 feat(backend): AsmPrinter 帧基址缓存,避免连续栈访问重复计算地址
5 days ago
lzkk 3ab88232f7 fix(hooks): Stop hook 改为智能检测——仅在 src/ 有未提交改动时提醒
5 days ago
lzkk 6f14ee1a7a fix(infra): 编译器资源限制包装器 + 测试脚本超时防护,防止 OOM 闪退
5 days ago
lzkk 5300e2c1ec fix(hooks): 修复会话崩溃 + 优化开发规范配置
5 days ago
lzkk da5d618297 fix(hooks): memory-guard 输出合法 JSON,修复会话崩溃
6 days ago
lzkk 2d3a5ff998 perf(backend): Peephole 新增全局变量 store-load 转发和 load CSE
6 days ago
lzkk b2b7210f11 perf(backend): 除法/取模统一使用 sdiv,删除2的幂次移位序列
6 days ago
lzkk befdca6451 perf(backend): 叶函数跳过帧设置,节省 x29/x30 保存/恢复
6 days ago
lzkk 854168fb4e perf(backend): 消除连续全局变量访问的冗余 ADRP
6 days ago
lzkk acdac5391d fix(backend): EmitLargeImmediate 跳过前导零,避免冗余 movz #0
6 days ago
lzkk bb58aac749 fix(mem2reg): 添加大参数函数安全门禁,修复 87_many_params
6 days ago
lzkk fccd935a24 feat(backend): 新增 AddImm/SubImm 操作码,消除冗余 MovImm
6 days ago
lzkk bd7dcedb2a feat(backend): ICmp 降级常量折叠到 CmpImm,消除冗余 MovImm
6 days ago
黄熙哲 6b9cf3a448 fix(backend): add x16/x17 to GP allocatable set to fix segfaults
7 days ago
黄熙哲 5902060dae fix(backend): lower coalesce skip threshold to fix segfaults
7 days ago
黄熙哲 34cb79449f fix(backend): skip coalescing for large functions to prevent segfault\n\nFor functions with >150 vregs, discard move_preferences after\ncollection to skip active coalescing. Large functions like\nconv2d, 65_color, 68_brainfk have complex interference graphs\nthat cause coalescing to generate incorrect spill code.\n\nFixes segfaults in: conv2d-1/2/3, 65_color, 68_brainfk, 37_dct.\n\nKnown limitations: 30_many_dimensions and 39_fp_params still\nsegfault (pre-existing original compiler bugs in lowering/RA).\nMinor instruction count changes: h-8 +2.5%, matmul +7% etc.
7 days ago
黄熙哲 a84ffd210b chore: simplify baseline to single-column historical minimum\n\nRemove source baseline concept. Each test now tracks only its\nbest-ever instruction count. count_asm.sh updated to directly\nupdate baseline when a new lower value is found.
1 week ago
黄熙哲 b7e78ebd56 fix(backend): AsmPrinter large frame + RegAlloc spill limit\n\nApply only proven-safe fixes on clean baseline:\n- AsmPrinter: movz/movk for large stack offsets (>12KB)\n 30_many_dimensions: 7M -> 1455 lines (99.9% reduction)\n- RegAlloc: limit spill rounds to 3 for large functions (>120 vregs)\n 39_fp_params: >120s -> <1s compilation\n\nZero instruction count regression confirmed.\n57/60 performance tests at historical best baseline.
1 week ago
黄熙哲 2e368f86cf chore: update instruction count baseline after Mem2Reg threshold tuning\n\nKey improvements from PHI threshold relaxation:\n- many_mat_cal: 523->432 (-91 lines, 17.4%)\n- h-8: 504->407 (-97 lines, 19.2%)\n- matmul: 450->366 (-84 lines, 18.7%)\n\nCrypto and other complex functions unaffected (correctly skipped).
1 week ago
黄熙哲 cc9f4f9a76 feat(mem2reg): tune PHI threshold to allow Mem2Reg on moderate functions\n\nChange phi_threshold from max(50, block_count) to max(100, block_count*2).\nThe old threshold was too conservative for functions with many allocas\nlike many_mat_cal (~15 allocas, 60 blocks), causing premature skip.\nThe new threshold allows these while still blocking crypto-like functions\nwhere excessive PHI nodes hurt code quality.\n\nmany_mat_cal: -91 lines, matmul: -84 lines, h-8: -97 lines
1 week ago