Commit Graph

3 Commits

Author SHA1 Message Date
pjh123 9d619cd9bb feat: liveness 驱动的精确二轮 dce_precise + is_top_level 标志(D-17/D-19/D-20) 2026-08-06 16:55:26 +08:00
pjh123 213a9820de feat: 实现 Pass A 可达性 + Pass B use 计数迭代删除
- Pass A 消费 build_cfg,entry 沿 succs DFS(含 Exception 边保守,Pitfall 4)展开指令粒度 keep
- Pass B 可达存活指令聚合 use 计数,def 无 use 且 is_pure 迭代删至不动点(D-02 连锁)
- Pass C 最小 mark-sweep 重建 insts + label_pos 重映射(死 label 置 None)
- 依赖 oxide_bytecode(测试需 OpCode 常量,Rust 无 crate 传递可见性,与 oxide_cfg 骨架一致)
- 单测 8 条:死链/负例/STORE_VAR 特判/if-else/死块/Exception 保守/死闭包/连锁
2026-08-06 11:33:27 +08:00
pjh123 b0ba874844 feat: 新建 oxide_dce crate 骨架并接入 workspace
- workspace.members 在 oxide_cfg 后追加 crates/oxide_dce
- Cargo.toml 骨架照抄 oxide_cfg(oxide_ir + oxide_cfg 依赖,dev-deps parser/emit/vm)
- lib.rs 中文文档头 + pub fn dce 入口(空函数退化先例,非空路径 Task 2/3 骨架)
2026-08-06 11:27:44 +08:00