Skip to content

Commit 8ca4f65

Browse files
Turn on UnreachablePropagation by default
1 parent 28928c7 commit 8ca4f65

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/rustc_mir/src/transform/unreachable_prop.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ use std::borrow::Cow;
1212
pub struct UnreachablePropagation;
1313

1414
impl MirPass<'_> for UnreachablePropagation {
15-
fn run_pass<'tcx>(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
16-
if tcx.sess.opts.debugging_opts.mir_opt_level < 3 {
17-
// Enable only under -Zmir-opt-level=3 as in some cases (check the deeply-nested-opt
18-
// perf benchmark) LLVM may spend quite a lot of time optimizing the generated code.
19-
return;
20-
}
21-
15+
fn run_pass<'tcx>(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
2216
let mut unreachable_blocks = FxHashSet::default();
2317
let mut replacements = FxHashMap::default();
2418

0 commit comments

Comments
 (0)