refactor(mir): phase260 p0 edge-args plumbing (strangler) + ssot api + docs
This commit is contained in:
@ -55,7 +55,10 @@ pub fn build_simple_loop<L: LoopBuilderApi>(
|
||||
let after = lb.new_block();
|
||||
|
||||
// Jump to header
|
||||
lb.emit(MirInstruction::Jump { target: header })?;
|
||||
lb.emit(MirInstruction::Jump {
|
||||
target: header,
|
||||
edge_args: None,
|
||||
})?;
|
||||
|
||||
// Header: branch on provided condition
|
||||
lb.start_new_block(header)?;
|
||||
@ -63,12 +66,17 @@ pub fn build_simple_loop<L: LoopBuilderApi>(
|
||||
condition,
|
||||
then_bb: body,
|
||||
else_bb: after,
|
||||
then_edge_args: None,
|
||||
else_edge_args: None,
|
||||
})?;
|
||||
|
||||
// Body
|
||||
lb.start_new_block(body)?;
|
||||
build_body(lb)?;
|
||||
lb.emit(MirInstruction::Jump { target: header })?;
|
||||
lb.emit(MirInstruction::Jump {
|
||||
target: header,
|
||||
edge_args: None,
|
||||
})?;
|
||||
|
||||
// After: return void value
|
||||
lb.start_new_block(after)?;
|
||||
|
||||
Reference in New Issue
Block a user