Skip to content

Commit 8afddbb

Browse files
committed
Remove ConstGoto and SeparateConstSwitch.
1 parent 8536b02 commit 8afddbb

17 files changed

+289
-901
lines changed

compiler/rustc_mir_transform/src/const_goto.rs

Lines changed: 0 additions & 128 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
@@ -60,7 +60,6 @@ mod remove_place_mention;
6060
mod add_subtyping_projections;
6161
pub mod cleanup_post_borrowck;
6262
mod const_debuginfo;
63-
mod const_goto;
6463
mod const_prop;
6564
mod const_prop_lint;
6665
mod copy_prop;
@@ -104,7 +103,6 @@ mod remove_unneeded_drops;
104103
mod remove_zsts;
105104
mod required_consts;
106105
mod reveal_all;
107-
mod separate_const_switch;
108106
mod shim;
109107
mod ssa;
110108
// This pass is public to allow external drivers to perform MIR cleanup
@@ -587,7 +585,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
587585

588586
// Has to run after `slice::len` lowering
589587
&normalize_array_len::NormalizeArrayLen,
590-
&const_goto::ConstGoto,
591588
&ref_prop::ReferencePropagation,
592589
&sroa::ScalarReplacementOfAggregates,
593590
&match_branches::MatchBranchSimplification,
@@ -596,10 +593,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
596593
&instsimplify::InstSimplify,
597594
&simplify::SimplifyLocals::BeforeConstProp,
598595
&copy_prop::CopyProp,
599-
// Perform `SeparateConstSwitch` after SSA-based analyses, as cloning blocks may
600-
// destroy the SSA property. It should still happen before const-propagation, so the
601-
// latter pass will leverage the created opportunities.
602-
&separate_const_switch::SeparateConstSwitch,
603596
&gvn::GVN,
604597
&simplify::SimplifyLocals::AfterGVN,
605598
&dataflow_const_prop::DataflowConstProp,

0 commit comments

Comments
 (0)