diff options
| author | Jannis Christopher Köhl <mail@koehl.dev> | 2022-10-07 01:24:24 +0200 |
|---|---|---|
| committer | Jannis Christopher Köhl <mail@koehl.dev> | 2022-11-07 10:35:21 +0100 |
| commit | 5696d06e2282b5570bfe75c16eceacd8b34ddf99 (patch) | |
| tree | dd059a512c39cad36d23b6c36f45a4a08a0e27dc | |
| parent | b9dbb81b5e4f62be117fd196723a85e45b84341d (diff) | |
| download | rust-5696d06e2282b5570bfe75c16eceacd8b34ddf99.tar.gz rust-5696d06e2282b5570bfe75c16eceacd8b34ddf99.zip | |
Use the same is_enabled as the current const prop
| -rw-r--r-- | compiler/rustc_mir_transform/src/dataflow_const_prop.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs index 8f77b2b0081..c7340270506 100644 --- a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs +++ b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs @@ -15,8 +15,7 @@ pub struct DataflowConstProp; impl<'tcx> MirPass<'tcx> for DataflowConstProp { fn is_enabled(&self, sess: &rustc_session::Session) -> bool { - // Choose different minimum level? - sess.mir_opt_level() >= 4 + sess.mir_opt_level() >= 1 } fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { |
