From 901ce767ce8f2c0b8f530802da68e8c12637ac72 Mon Sep 17 00:00:00 2001 From: tomoaki Date: Sun, 21 Dec 2025 09:39:26 +0900 Subject: [PATCH] refactor(verify): Phase 260 P2 - Remove dual-source edge-args validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Delete legacy jump_args consistency checks (62 lines from cfg.rs) - Metadata no longer exists, so dual-source validation is obsolete - Rely on existing SSA validation for PHI correctness Simplifies verification now that jump_args metadata is deleted and terminator operands are the sole source of truth. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/mir/verification/cfg.rs | 63 ------------------------------------- 1 file changed, 63 deletions(-) diff --git a/src/mir/verification/cfg.rs b/src/mir/verification/cfg.rs index 62e1445b..90ef8b24 100644 --- a/src/mir/verification/cfg.rs +++ b/src/mir/verification/cfg.rs @@ -26,69 +26,6 @@ pub fn check_control_flow(function: &MirFunction) -> Result<(), Vec { - if block.has_legacy_jump_args() { - let Some(legacy_layout) = block.legacy_jump_args_layout() else { - errors.push(VerificationError::ControlFlowError { - block: *block_id, - reason: "Legacy jump_args layout missing with edge-args present" - .to_string(), - }); - continue; - }; - let legacy_values = block.legacy_jump_args_values().unwrap_or_default(); - if edge_args.values.as_slice() != legacy_values { - errors.push(VerificationError::ControlFlowError { - block: *block_id, - reason: format!( - "Edge-args values mismatch: edge_args={:?}, legacy={:?}", - edge_args.values, legacy_values - ), - }); - } - if edge_args.layout != legacy_layout { - errors.push(VerificationError::ControlFlowError { - block: *block_id, - reason: format!( - "Edge-args layout mismatch: edge_args={:?}, legacy={:?}", - edge_args.layout, legacy_layout - ), - }); - } - } - } - MirInstruction::Jump { edge_args: None, .. } => { - if block.has_legacy_jump_args() { - errors.push(VerificationError::ControlFlowError { - block: *block_id, - reason: "Legacy jump_args present but Jump edge-args missing".to_string(), - }); - } - } - MirInstruction::Branch { .. } => { - if block.has_legacy_jump_args() { - errors.push(VerificationError::ControlFlowError { - block: *block_id, - reason: "Legacy jump_args present on Branch terminator".to_string(), - }); - } - } - _ => {} - } - } } // Unreachable blocks are allowed in MIR. // They are created intentionally by break/continue/return statements via