Skip to content

Commit

Permalink
Remove ConstGoto and SeparateConstSwitch.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Dec 24, 2023
1 parent 4fb7562 commit 7891778
Show file tree
Hide file tree
Showing 17 changed files with 289 additions and 901 deletions.
128 changes: 0 additions & 128 deletions compiler/rustc_mir_transform/src/const_goto.rs

This file was deleted.

7 changes: 0 additions & 7 deletions compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ mod remove_place_mention;
mod add_subtyping_projections;
pub mod cleanup_post_borrowck;
mod const_debuginfo;
mod const_goto;
mod const_prop;
mod const_prop_lint;
mod copy_prop;
Expand Down Expand Up @@ -102,7 +101,6 @@ mod remove_unneeded_drops;
mod remove_zsts;
mod required_consts;
mod reveal_all;
mod separate_const_switch;
mod shim;
mod ssa;
// This pass is public to allow external drivers to perform MIR cleanup
Expand Down Expand Up @@ -574,7 +572,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
&remove_storage_markers::RemoveStorageMarkers,
&remove_zsts::RemoveZsts,
&normalize_array_len::NormalizeArrayLen, // has to run after `slice::len` lowering
&const_goto::ConstGoto,
&remove_unneeded_drops::RemoveUnneededDrops,
&ref_prop::ReferencePropagation,
&sroa::ScalarReplacementOfAggregates,
Expand All @@ -584,10 +581,6 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
&instsimplify::InstSimplify,
&simplify::SimplifyLocals::BeforeConstProp,
&copy_prop::CopyProp,
// Perform `SeparateConstSwitch` after SSA-based analyses, as cloning blocks may
// destroy the SSA property. It should still happen before const-propagation, so the
// latter pass will leverage the created opportunities.
&separate_const_switch::SeparateConstSwitch,
&const_prop::ConstProp,
&gvn::GVN,
&simplify::SimplifyLocals::AfterGVN,
Expand Down
Loading

0 comments on commit 7891778

Please sign in to comment.