- 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 保守/死闭包/连锁
- 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 骨架)