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

@ -130,6 +130,8 @@ fn test_merge_use_before_phi_detected() {
condition: cond,
then_bb,
else_bb,
then_edge_args: None,
else_edge_args: None,
});
}
@ -139,7 +141,10 @@ fn test_merge_use_before_phi_detected() {
dst: v1,
value: ConstValue::String("A".to_string()),
});
b1.add_instruction(MirInstruction::Jump { target: merge_bb });
b1.add_instruction(MirInstruction::Jump {
target: merge_bb,
edge_args: None,
});
f.add_block(b1);
let v2 = f.next_value_id(); // %2
@ -148,7 +153,10 @@ fn test_merge_use_before_phi_detected() {
dst: v2,
value: ConstValue::String("B".to_string()),
});
b2.add_instruction(MirInstruction::Jump { target: merge_bb });
b2.add_instruction(MirInstruction::Jump {
target: merge_bb,
edge_args: None,
});
f.add_block(b2);
let mut b3 = BasicBlock::new(merge_bb);

View File

@ -146,7 +146,7 @@ fn build_string_const_mir_module() -> MirModule {
});
// return %str
block.terminator = Some(MirInstruction::Return {
block.set_terminator(MirInstruction::Return {
value: Some(str_value),
});
@ -193,7 +193,7 @@ fn build_multiple_string_const_mir_module() -> MirModule {
});
// return %str1
block.terminator = Some(MirInstruction::Return {
block.set_terminator(MirInstruction::Return {
value: Some(str1_value),
});