Skip to content

Commit 5a1227d

Browse files
Update SimplifyCfg
1 parent 7095aa6 commit 5a1227d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/rustc_mir_transform/src/simplify.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
//! naively generate still contains the `_a = ()` write in the unreachable block "after" the
2828
//! return.
2929
30-
use crate::MirPass;
30+
use crate::{MirPass, MirPassC};
3131
use rustc_index::vec::{Idx, IndexVec};
3232
use rustc_middle::mir::coverage::*;
3333
use rustc_middle::mir::visit::{MutVisitor, MutatingUseContext, PlaceContext, Visitor};
@@ -55,6 +55,10 @@ pub fn simplify_cfg(tcx: TyCtxt<'tcx>, body: &mut Body<'_>) {
5555
body.basic_blocks_mut().raw.shrink_to_fit();
5656
}
5757

58+
impl MirPassC for SimplifyCfg {
59+
const OPT_LEVEL: u32 = 0; // TODO: Only run if previous pass runs.
60+
}
61+
5862
impl<'tcx> MirPass<'tcx> for SimplifyCfg {
5963
fn name(&self) -> Cow<'_, str> {
6064
Cow::Owned(format!("SimplifyCfg-{}", self.label))

0 commit comments

Comments
 (0)