Bump all mir_opt_level 2 to 3
This commit is contained in:
parent
f3b8920d4b
commit
782c7b04cf
5 changed files with 7 additions and 7 deletions
|
@ -1071,9 +1071,9 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
|
||||||
fn visit_operand(&mut self, operand: &mut Operand<'tcx>, location: Location) {
|
fn visit_operand(&mut self, operand: &mut Operand<'tcx>, location: Location) {
|
||||||
self.super_operand(operand, location);
|
self.super_operand(operand, location);
|
||||||
|
|
||||||
// Only const prop copies and moves on `mir_opt_level=2` as doing so
|
// Only const prop copies and moves on `mir_opt_level=3` as doing so
|
||||||
// currently slightly increases compile time in some cases.
|
// currently slightly increases compile time in some cases.
|
||||||
if self.tcx.sess.mir_opt_level() >= 2 {
|
if self.tcx.sess.mir_opt_level() >= 3 {
|
||||||
self.propagate_operand(operand)
|
self.propagate_operand(operand)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,9 +127,9 @@ pub struct DestinationPropagation;
|
||||||
|
|
||||||
impl<'tcx> MirPass<'tcx> for DestinationPropagation {
|
impl<'tcx> MirPass<'tcx> for DestinationPropagation {
|
||||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
// Only run at mir-opt-level=2 or higher for now (we don't fix up debuginfo and remove
|
// Only run at mir-opt-level=3 or higher for now (we don't fix up debuginfo and remove
|
||||||
// storage statements at the moment).
|
// storage statements at the moment).
|
||||||
if tcx.sess.mir_opt_level() < 2 {
|
if tcx.sess.mir_opt_level() < 3 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ pub struct EarlyOtherwiseBranch;
|
||||||
|
|
||||||
impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
|
impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
|
||||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
if tcx.sess.mir_opt_level() < 2 {
|
if tcx.sess.mir_opt_level() < 3 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
trace!("running EarlyOtherwiseBranch on {:?}", body.source);
|
trace!("running EarlyOtherwiseBranch on {:?}", body.source);
|
||||||
|
|
|
@ -52,7 +52,7 @@ crate fn is_enabled(tcx: TyCtxt<'_>) -> bool {
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
tcx.sess.mir_opt_level() >= 2
|
tcx.sess.mir_opt_level() >= 3
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'tcx> MirPass<'tcx> for Inline {
|
impl<'tcx> MirPass<'tcx> for Inline {
|
||||||
|
|
|
@ -40,7 +40,7 @@ pub struct MatchBranchSimplification;
|
||||||
|
|
||||||
impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
|
impl<'tcx> MirPass<'tcx> for MatchBranchSimplification {
|
||||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
if tcx.sess.mir_opt_level() < 2 {
|
if tcx.sess.mir_opt_level() < 3 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue