Bump all mir_opt_level 3 to 4
This commit is contained in:
parent
fde8d6ee81
commit
f3b8920d4b
5 changed files with 7 additions and 7 deletions
|
@ -28,7 +28,7 @@ pub struct ConstGoto;
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for ConstGoto {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
if tcx.sess.mir_opt_level() < 3 {
|
||||
if tcx.sess.mir_opt_level() < 4 {
|
||||
return;
|
||||
}
|
||||
trace!("Running ConstGoto on {:?}", body.source);
|
||||
|
|
|
@ -725,7 +725,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
return None;
|
||||
}
|
||||
|
||||
if self.tcx.sess.mir_opt_level() >= 3 {
|
||||
if self.tcx.sess.mir_opt_level() >= 4 {
|
||||
self.eval_rvalue_with_identities(rvalue, place)
|
||||
} else {
|
||||
self.use_ecx(|this| this.ecx.eval_rvalue_into_place(rvalue, place))
|
||||
|
@ -1253,7 +1253,7 @@ impl<'mir, 'tcx> MutVisitor<'tcx> for ConstPropagator<'mir, 'tcx> {
|
|||
TerminatorKind::SwitchInt { ref mut discr, .. } => {
|
||||
// FIXME: This is currently redundant with `visit_operand`, but sadly
|
||||
// always visiting operands currently causes a perf regression in LLVM codegen, so
|
||||
// `visit_operand` currently only runs for propagates places for `mir_opt_level=3`.
|
||||
// `visit_operand` currently only runs for propagates places for `mir_opt_level=4`.
|
||||
self.propagate_operand(discr)
|
||||
}
|
||||
// None of these have Operands to const-propagate.
|
||||
|
|
|
@ -16,7 +16,7 @@ pub struct DeduplicateBlocks;
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for DeduplicateBlocks {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
if tcx.sess.mir_opt_level() < 3 {
|
||||
if tcx.sess.mir_opt_level() < 4 {
|
||||
return;
|
||||
}
|
||||
debug!("Running DeduplicateBlocks on `{:?}`", body.source);
|
||||
|
|
|
@ -10,7 +10,7 @@ pub struct MultipleReturnTerminators;
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for MultipleReturnTerminators {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
if tcx.sess.mir_opt_level() < 3 {
|
||||
if tcx.sess.mir_opt_level() < 4 {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ pub struct UnreachablePropagation;
|
|||
|
||||
impl MirPass<'_> for UnreachablePropagation {
|
||||
fn run_pass<'tcx>(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
if tcx.sess.mir_opt_level() < 3 {
|
||||
// Enable only under -Zmir-opt-level=3 as in some cases (check the deeply-nested-opt
|
||||
if tcx.sess.mir_opt_level() < 4 {
|
||||
// Enable only under -Zmir-opt-level=4 as in some cases (check the deeply-nested-opt
|
||||
// perf benchmark) LLVM may spend quite a lot of time optimizing the generated code.
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue