Skip to content

Commit d402dc7

Browse files
committed
Remove ConstGoto and SeparateConstSwitch.
1 parent 8429c25 commit d402dc7

15 files changed

+125
-733
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
@@ -61,7 +61,6 @@ mod remove_place_mention;
6161
mod add_subtyping_projections;
6262
pub mod cleanup_post_borrowck;
6363
mod const_debuginfo;
64-
mod const_goto;
6564
mod const_prop;
6665
mod const_prop_lint;
6766
mod copy_prop;
@@ -105,7 +104,6 @@ mod remove_unneeded_drops;
105104
mod remove_zsts;
106105
mod required_consts;
107106
mod reveal_all;
108-
mod separate_const_switch;
109107
mod shim;
110108
mod ssa;
111109
// This pass is public to allow external drivers to perform MIR cleanup
@@ -588,7 +586,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
588586

589587
// Has to run after `slice::len` lowering
590588
&normalize_array_len::NormalizeArrayLen,
591-
&const_goto::ConstGoto,
592589
&ref_prop::ReferencePropagation,
593590
&sroa::ScalarReplacementOfAggregates,
594591
&match_branches::MatchBranchSimplification,
@@ -599,10 +596,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
599596
&dead_store_elimination::DeadStoreElimination::Initial,
600597
&gvn::GVN,
601598
&simplify::SimplifyLocals::AfterGVN,
602-
// Perform `SeparateConstSwitch` after SSA-based analyses, as cloning blocks may
603-
// destroy the SSA property. It should still happen before const-propagation, so the
604-
// latter pass will leverage the created opportunities.
605-
&separate_const_switch::SeparateConstSwitch,
606599
&dataflow_const_prop::DataflowConstProp,
607600
&const_debuginfo::ConstDebugInfo,
608601
&o1(simplify_branches::SimplifyConstCondition::AfterConstProp),

0 commit comments

Comments
 (0)