refactor(mir): phase260 p0 edge-args plumbing (strangler) + ssot api + docs

This commit is contained in:
2025-12-21 04:34:22 +09:00
parent 4496b6243d
commit 4dfe3349bf
42 changed files with 1044 additions and 187 deletions

View File

@ -132,6 +132,7 @@ impl IfMergeLowerer {
condition,
then_bb,
else_bb,
..
} => IfBranch {
cond: *condition,
then_block: *then_bb,

View File

@ -142,6 +142,7 @@ impl IfSelectLowerer {
condition,
then_bb,
else_bb,
..
} => IfBranch {
cond: *condition,
then_block: *then_bb,
@ -263,13 +264,13 @@ impl IfSelectLowerer {
) -> Option<BasicBlockId> {
// then が Jump で終わるか確認
let then_target = match then_block.terminator.as_ref()? {
MirInstruction::Jump { target } => *target,
MirInstruction::Jump { target, .. } => *target,
_ => return None,
};
// else が Jump で終わるか確認
let else_target = match else_block.terminator.as_ref()? {
MirInstruction::Jump { target } => *target,
MirInstruction::Jump { target, .. } => *target,
_ => return None,
};
@ -312,7 +313,7 @@ impl IfSelectLowerer {
// then ブロックが Jump で終わるか確認
let merge_block_id = match then_block.terminator.as_ref()? {
MirInstruction::Jump { target } => *target,
MirInstruction::Jump { target, .. } => *target,
_ => return None,
};
@ -339,7 +340,7 @@ impl IfSelectLowerer {
// else ブロックも同じ merge ブロックに Jump するか確認
let else_merge = match else_block.terminator.as_ref()? {
MirInstruction::Jump { target } => *target,
MirInstruction::Jump { target, .. } => *target,
_ => return None,
};