Skip to content

Commit

Permalink
Rollup merge of rust-lang#93813 - xldenis:public-mir-passes, r=wesley…
Browse files Browse the repository at this point in the history
…wiser

Make a few cleanup MIR passes public

Zulip Discussion: https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Making.20passes.20public.20again

This makes a few passes which used to be public, public again. I'd like to use these to clean up MIR code for my external rustc driver. The other option would be to make them all public, but I don't know if that's warranted / useful.

r? `@wesleywiser`
  • Loading branch information
matthiaskrgr authored Feb 9, 2022
2 parents 6db0f9c + c97302e commit 3238806
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ mod add_retag;
mod check_const_item_mutation;
mod check_packed_ref;
pub mod check_unsafety;
mod cleanup_post_borrowck;
// This pass is public to allow external drivers to perform MIR cleanup
pub mod cleanup_post_borrowck;
mod const_debuginfo;
mod const_goto;
mod const_prop;
Expand All @@ -65,7 +66,8 @@ mod match_branches;
mod multiple_return_terminators;
mod normalize_array_len;
mod nrvo;
mod remove_false_edges;
// This pass is public to allow external drivers to perform MIR cleanup
pub mod remove_false_edges;
mod remove_noop_landing_pads;
mod remove_storage_markers;
mod remove_uninit_drops;
Expand All @@ -75,7 +77,8 @@ mod required_consts;
mod reveal_all;
mod separate_const_switch;
mod shim;
mod simplify;
// This pass is public to allow external drivers to perform MIR cleanup
pub mod simplify;
mod simplify_branches;
mod simplify_comparison_integral;
mod simplify_try;
Expand Down

0 comments on commit 3238806

Please sign in to comment.