Normalize passes keep spans and clean warnings

This commit is contained in:
nyash-codex
2025-11-24 15:02:51 +09:00
parent 466e636af6
commit da1a5558e5
40 changed files with 547 additions and 362 deletions

View File

@ -119,7 +119,13 @@ impl super::MirBuilder {
self.start_new_block(merge_block)?;
// フェーズM: PHI はブロック先頭に配置cf_common 統一)
if let (Some(func), Some(cur_bb)) = (self.current_function.as_mut(), self.current_block) {
crate::mir::ssot::cf_common::insert_phi_at_head(func, cur_bb, result_val, phi_inputs);
crate::mir::ssot::cf_common::insert_phi_at_head_spanned(
func,
cur_bb,
result_val,
phi_inputs,
self.current_span,
);
} else {
self.emit_instruction(super::MirInstruction::Phi {
dst: result_val,