Normalize passes keep spans and clean warnings
This commit is contained in:
@ -72,7 +72,13 @@ impl MirBuilder {
|
||||
// 統一された挿入ロジック(既存パターンと完全互換)
|
||||
if let (Some(func), Some(cur_bb)) = (self.current_function.as_mut(), self.current_block) {
|
||||
// CFG経由の正規化挿入(predecessor順序の正規化を含む)
|
||||
crate::mir::ssot::cf_common::insert_phi_at_head(func, cur_bb, phi_val, inputs);
|
||||
crate::mir::ssot::cf_common::insert_phi_at_head_spanned(
|
||||
func,
|
||||
cur_bb,
|
||||
phi_val,
|
||||
inputs,
|
||||
self.current_span,
|
||||
);
|
||||
} else {
|
||||
// フォールバック: 直接emit(主にテストや特殊ケース用)
|
||||
self.emit_instruction(MirInstruction::Phi {
|
||||
@ -131,7 +137,13 @@ impl MirBuilder {
|
||||
// 統一された挿入ロジック(既存パターンと完全互換)
|
||||
if let (Some(func), Some(cur_bb)) = (self.current_function.as_mut(), self.current_block) {
|
||||
// CFG経由の正規化挿入(predecessor順序の正規化を含む)
|
||||
crate::mir::ssot::cf_common::insert_phi_at_head(func, cur_bb, dst, inputs);
|
||||
crate::mir::ssot::cf_common::insert_phi_at_head_spanned(
|
||||
func,
|
||||
cur_bb,
|
||||
dst,
|
||||
inputs,
|
||||
self.current_span,
|
||||
);
|
||||
} else {
|
||||
// フォールバック: 直接emit(主にテストや特殊ケース用)
|
||||
self.emit_instruction(MirInstruction::Phi { dst, inputs })?;
|
||||
|
||||
Reference in New Issue
Block a user