liveness: live 集改 u64 位集 + 不动点缓冲复用

LiveInfo 四矩阵由逐位 Vec<bool>(1 字节/位,长度 = max_vreg+1)改为
u64 压缩位集(1 字 64 位,长度 ÷8),dataflow 不动点 out/input 缓冲
提为循环外复用(clear + 覆盖,免逐迭代逐块分配)。dce_precise /
graph 建图 / call_window 三处消费方同步改为字内位移查询,越界语义
与旧 Vec<bool>::get 一致(越界 = 不 live)。位集遍历(call_window
存活上界)按 trailing_zeros 只走实际置位,活集小则近 O(活集) 而非
O(254)。

实测(debug,start-unicode-17.0.0.js):liveness 三趟合计
~536ms → ~118ms(-78%),矩阵内存 ÷8;graph 全 node 扫描为剩余
瓶颈,另行跟进。
This commit is contained in:
2026-08-16 03:20:02 +08:00
parent f899538535
commit 9bbe5ae67a
8 changed files with 117 additions and 82 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ fn smoke_try_catch() {
let (info, cfg, _) =
run_liveness("function x() {} function y(e) {} function f() { try { x(); } catch (e) { y(e); } } f()");
// entry 块 liveIn 不含 reg 0(异常边 reg0 截断在真实产物上成立)
assert!(!info.block_live_in[cfg.entry][0], "entry 块 liveIn 不得含 reg0");
assert!(!oxide_liveness::bitset_get(&info.block_live_in[cfg.entry], 0), "entry 块 liveIn 不得含 reg0");
}
#[test]