Skip to content

Commit

Permalink
Rollup merge of rust-lang#77582 - ecstatic-morse:disable-early-otherw…
Browse files Browse the repository at this point in the history
…ise-branch, r=wesleywiser

Move `EarlyOtherwiseBranch` to mir-opt-level 2

cc rust-lang#75119

This didn't have an [effect in most cases](https://perf.rust-lang.org/compare.html?start=81e02708f1f4760244756548981277d5199baa9a&end=2e0edc0f28c5647141bedba02e7a222d3a5dc9c3&stat=instructions:u), and is not trivially sound. Let it bake at `mir-opt-level=2` for a while.

Also, this missed the cutoff for beta, so we'll have to backport this.
r? @wesleywiser
  • Loading branch information
Dylan-DPC authored Oct 6, 2020
2 parents 5314c72 + af4b132 commit 6b4dbb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir/src/transform/early_otherwise_branch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct EarlyOtherwiseBranch;

impl<'tcx> MirPass<'tcx> for EarlyOtherwiseBranch {
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
if tcx.sess.opts.debugging_opts.mir_opt_level < 1 {
if tcx.sess.opts.debugging_opts.mir_opt_level < 2 {
return;
}
trace!("running EarlyOtherwiseBranch on {:?}", body.source);
Expand Down

0 comments on commit 6b4dbb1

Please sign in to comment.