Clarify which kinds of MIR are allowed during which phases.
This enhances documentation with these details and extends the validator to check these requirements more thoroughly. As a part of this, we add a new `Deaggregated` phase, and rename other phases so that their names more naturally correspond to what they represent.
This commit is contained in:
parent
547369d3d8
commit
fe40240e4d
8 changed files with 98 additions and 52 deletions
|
@ -114,7 +114,7 @@ pub fn run_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>, passes: &[&dyn
|
|||
}
|
||||
}
|
||||
|
||||
if validate || body.phase == MirPhase::Optimization {
|
||||
if validate || body.phase == MirPhase::Optimized {
|
||||
validate_body(tcx, body, format!("end of phase transition to {:?}", body.phase));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue