diff options
| author | bors <bors@rust-lang.org> | 2022-03-25 01:20:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-25 01:20:01 +0000 |
| commit | 661e8beec1fa5f3c58bf6e4362ae3c3fe0b4b1bd (patch) | |
| tree | 87cb397401b3b8a18e4d4b2356a05d1094d54ecf /compiler/rustc_mir_transform/src | |
| parent | 7941b3f1473331d2abb2b8796046adc0105c8f94 (diff) | |
| parent | 3716c4275f0c6aa29bd2c87954b483e9c7a97475 (diff) | |
| download | rust-661e8beec1fa5f3c58bf6e4362ae3c3fe0b4b1bd.tar.gz rust-661e8beec1fa5f3c58bf6e4362ae3c3fe0b4b1bd.zip | |
Auto merge of #95291 - Dylan-DPC:rollup-vrb4wlw, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #94391 (Fix ice when error reporting recursion errors) - #94655 (Clarify which kinds of MIR are allowed during which phases.) - #95179 (Try to evaluate in try unify and postpone resolution of constants that contain inference variables) - #95270 (debuginfo: Fix debuginfo for Box<T> where T is unsized.) - #95276 (add diagnostic items for clippy's `trim_split_whitespace`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/deaggregator.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/elaborate_drops.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/generator.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/lib.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/pass_manager.rs | 2 |
5 files changed, 11 insertions, 7 deletions
diff --git a/compiler/rustc_mir_transform/src/deaggregator.rs b/compiler/rustc_mir_transform/src/deaggregator.rs index 44753c5f631..616ba819982 100644 --- a/compiler/rustc_mir_transform/src/deaggregator.rs +++ b/compiler/rustc_mir_transform/src/deaggregator.rs @@ -6,6 +6,10 @@ use rustc_middle::ty::TyCtxt; pub struct Deaggregator; impl<'tcx> MirPass<'tcx> for Deaggregator { + fn phase_change(&self) -> Option<MirPhase> { + Some(MirPhase::Deaggregated) + } + fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut(); let local_decls = &*local_decls; diff --git a/compiler/rustc_mir_transform/src/elaborate_drops.rs b/compiler/rustc_mir_transform/src/elaborate_drops.rs index a4b1d86ff61..f78c7a084d8 100644 --- a/compiler/rustc_mir_transform/src/elaborate_drops.rs +++ b/compiler/rustc_mir_transform/src/elaborate_drops.rs @@ -20,7 +20,7 @@ pub struct ElaborateDrops; impl<'tcx> MirPass<'tcx> for ElaborateDrops { fn phase_change(&self) -> Option<MirPhase> { - Some(MirPhase::DropLowering) + Some(MirPhase::DropsLowered) } fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { diff --git a/compiler/rustc_mir_transform/src/generator.rs b/compiler/rustc_mir_transform/src/generator.rs index 8bc7f5e9ce2..ad96bf544cb 100644 --- a/compiler/rustc_mir_transform/src/generator.rs +++ b/compiler/rustc_mir_transform/src/generator.rs @@ -1235,7 +1235,7 @@ fn create_cases<'tcx>( impl<'tcx> MirPass<'tcx> for StateTransform { fn phase_change(&self) -> Option<MirPhase> { - Some(MirPhase::GeneratorLowering) + Some(MirPhase::GeneratorsLowered) } fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs index 45b8febf9f6..2fca498a125 100644 --- a/compiler/rustc_mir_transform/src/lib.rs +++ b/compiler/rustc_mir_transform/src/lib.rs @@ -342,7 +342,7 @@ fn inner_mir_for_ctfe(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) - pm::run_passes( tcx, &mut body, - &[&const_prop::ConstProp, &marker::PhaseChange(MirPhase::Optimization)], + &[&const_prop::ConstProp, &marker::PhaseChange(MirPhase::Optimized)], ); } } @@ -399,7 +399,7 @@ fn mir_drops_elaborated_and_const_checked<'tcx>( } run_post_borrowck_cleanup_passes(tcx, &mut body); - assert!(body.phase == MirPhase::DropLowering); + assert!(body.phase == MirPhase::Deaggregated); tcx.alloc_steal_mir(body) } @@ -460,7 +460,7 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { ], ); - assert!(body.phase == MirPhase::GeneratorLowering); + assert!(body.phase == MirPhase::GeneratorsLowered); // The main optimizations that we do on MIR. pm::run_passes( @@ -497,7 +497,7 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { &deduplicate_blocks::DeduplicateBlocks, // Some cleanup necessary at least for LLVM and potentially other codegen backends. &add_call_guards::CriticalCallEdges, - &marker::PhaseChange(MirPhase::Optimization), + &marker::PhaseChange(MirPhase::Optimized), // Dump the end result for testing and debugging purposes. &dump_mir::Marker("PreCodegen"), ], diff --git a/compiler/rustc_mir_transform/src/pass_manager.rs b/compiler/rustc_mir_transform/src/pass_manager.rs index 8725eae8709..740a2168b41 100644 --- a/compiler/rustc_mir_transform/src/pass_manager.rs +++ b/compiler/rustc_mir_transform/src/pass_manager.rs @@ -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)); } } |
