1
Fork 0

Use the same is_enabled as the current const prop

This commit is contained in:
Jannis Christopher Köhl 2022-10-07 01:24:24 +02:00
parent b9dbb81b5e
commit 5696d06e22

View file

@ -15,8 +15,7 @@ pub struct DataflowConstProp;
impl<'tcx> MirPass<'tcx> for DataflowConstProp { impl<'tcx> MirPass<'tcx> for DataflowConstProp {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool { fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
// Choose different minimum level? sess.mir_opt_level() >= 1
sess.mir_opt_level() >= 4
} }
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) { fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {