From 73907623bb49f5c8f7a40e55f6fe57542a2326d2 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Mon, 12 Oct 2026 11:54:29 +0000 Subject: [PATCH] =?UTF-8?q?style:=20=E8=87=AA=E5=8A=A8=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_dce/src/lib.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/crates/oxide_dce/src/lib.rs b/crates/oxide_dce/src/lib.rs index 85e17468..9d22e0b7 100644 --- a/crates/oxide_dce/src/lib.rs +++ b/crates/oxide_dce/src/lib.rs @@ -72,16 +72,12 @@ pub struct PreciseOutcome { pub fn dce_precise(f: &mut IRFunction, live: &LiveInfo) -> PreciseOutcome { // 空函数无指令可删,直接返回(no-op,f 不变);未改任何指令,活集可复用。 if f.insts.is_empty() { - return PreciseOutcome { - live_reusable: true, - }; + return PreciseOutcome { live_reusable: true }; } // 维度守卫:live 与 insts 对齐才可信(删改后的过期 LiveInfo 索引错位会误删活指令); // 守卫不过时活集必过期,调用方须重建。 if live.inst_live_after.len() != f.insts.len() { - return PreciseOutcome { - live_reusable: false, - }; + return PreciseOutcome { live_reusable: false }; } let mut keep = vec![true; f.insts.len()]; precise_sweep::pass_dead_with_liveness(f, live, &mut keep); @@ -91,7 +87,5 @@ pub fn dce_precise(f: &mut IRFunction, live: &LiveInfo) -> PreciseOutcome { rebuild::pass_c_sweep(f, &keep); } // 零删除 ⇒ 函数未变 ⇒ 第一轮活集仍有效(复用守卫与零删除判定同源)。 - PreciseOutcome { - live_reusable: dead == 0, - } + PreciseOutcome { live_reusable: dead == 0 } }