Skip to content

Commit aac6adc

Browse files
committed
Remove ConstGoto and SeparateConstSwitch.
1 parent 5ec31b5 commit aac6adc

17 files changed

+289
-903
lines changed

compiler/rustc_mir_transform/src/const_goto.rs

Lines changed: 0 additions & 129 deletions
This file was deleted.

compiler/rustc_mir_transform/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ mod remove_place_mention;
5959
mod add_subtyping_projections;
6060
pub mod cleanup_post_borrowck;
6161
mod const_debuginfo;
62-
mod const_goto;
6362
mod const_prop;
6463
mod const_prop_lint;
6564
mod copy_prop;
@@ -101,7 +100,6 @@ mod remove_unneeded_drops;
101100
mod remove_zsts;
102101
mod required_consts;
103102
mod reveal_all;
104-
mod separate_const_switch;
105103
mod shim;
106104
mod ssa;
107105
// This pass is public to allow external drivers to perform MIR cleanup
@@ -576,7 +574,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
576574
&remove_storage_markers::RemoveStorageMarkers,
577575
&remove_zsts::RemoveZsts,
578576
&normalize_array_len::NormalizeArrayLen, // has to run after `slice::len` lowering
579-
&const_goto::ConstGoto,
580577
&remove_unneeded_drops::RemoveUnneededDrops,
581578
&ref_prop::ReferencePropagation,
582579
&sroa::ScalarReplacementOfAggregates,
@@ -586,10 +583,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
586583
&instsimplify::InstSimplify,
587584
&simplify::SimplifyLocals::BeforeConstProp,
588585
&copy_prop::CopyProp,
589-
// Perform `SeparateConstSwitch` after SSA-based analyses, as cloning blocks may
590-
// destroy the SSA property. It should still happen before const-propagation, so the
591-
// latter pass will leverage the created opportunities.
592-
&separate_const_switch::SeparateConstSwitch,
593586
&const_prop::ConstProp,
594587
&gvn::GVN,
595588
&simplify::SimplifyLocals::AfterGVN,

0 commit comments

Comments
 (0)