Skip to content

Commit 4bf42c8

Browse files
committed
Bump all mir_opt_level 2 to 3
1 parent b5da6f8 commit 4bf42c8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

compiler/rustc_mir/src/transform/const_prop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1071,9 +1071,9 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
10711071
fn visit_operand(&mut self, operand: &mut Operand<'tcx>, location: Location) {
10721072
self.super_operand(operand, location);
10731073

1074-
// Only const prop copies and moves on `mir_opt_level=2` as doing so
1074+
// Only const prop copies and moves on `mir_opt_level=3` as doing so
10751075
// currently slightly increases compile time in some cases.
1076-
if self.tcx.sess.mir_opt_level() >= 2 {
1076+
if self.tcx.sess.mir_opt_level() >= 3 {
10771077
self.propagate_operand(operand)
10781078
}
10791079
}

compiler/rustc_mir/src/transform/dest_prop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ pub struct DestinationPropagation;
127127

128128
impl<'tcx> MirPass<'tcx> for DestinationPropagation {
129129
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
130-
// Only run at mir-opt-level=2 or higher for now (we don't fix up debuginfo and remove
130+
// Only run at mir-opt-level=3 or higher for now (we don't fix up debuginfo and remove
131131
// storage statements at the moment).
132-
if tcx.sess.mir_opt_level() < 2 {
132+
if tcx.sess.mir_opt_level() < 3 {
133133
return;
134134
}
135135

compiler/rustc_mir/src/transform/early_otherwise_branch.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct EarlyOtherwiseBranch;
2626

2727
impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
2828
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
29-
if tcx.sess.mir_opt_level() < 2 {
29+
if tcx.sess.mir_opt_level() < 3 {
3030
return;
3131
}
3232
trace!("running EarlyOtherwiseBranch on {:?}", body.source);

compiler/rustc_mir/src/transform/inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ crate fn is_enabled(tcx: TyCtxt<'_>) -> bool {
5252
return enabled;
5353
}
5454

55-
tcx.sess.mir_opt_level() >= 2
55+
tcx.sess.mir_opt_level() >= 3
5656
}
5757

5858
impl<'tcx> MirPass<'tcx> for Inline {

compiler/rustc_mir/src/transform/match_branches.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub struct MatchBranchSimplification;
4040
4141
impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
4242
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
43-
if tcx.sess.mir_opt_level() < 2 {
43+
if tcx.sess.mir_opt_level() < 3 {
4444
return;
4545
}
4646

0 commit comments

Comments
 (0)