refactor(mir): phase260 p0 edge-args plumbing (strangler) + ssot api + docs
This commit is contained in:
@ -132,6 +132,7 @@ impl IfMergeLowerer {
|
||||
condition,
|
||||
then_bb,
|
||||
else_bb,
|
||||
..
|
||||
} => IfBranch {
|
||||
cond: *condition,
|
||||
then_block: *then_bb,
|
||||
|
||||
@ -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,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user