1
Fork 0

Only enable ConstProp at mir-opt-level >= 2.

This commit is contained in:
Camille GILLOT 2023-02-09 18:46:46 +00:00
parent 3312a3053b
commit 8a515aab76
8 changed files with 1 additions and 49 deletions

View file

@ -54,7 +54,7 @@ pub struct ConstProp;
impl<'tcx> MirPass<'tcx> for ConstProp {
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
sess.mir_opt_level() >= 1
sess.mir_opt_level() >= 2
}
#[instrument(skip(self, tcx), level = "debug")]