Use the same is_enabled as the current const prop
This commit is contained in:
@@ -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>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user