Skip to content

Commit

Permalink
Do not call super_rvalue if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
simonvandel committed Nov 15, 2020
1 parent 603ab5b commit 307c608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_mir/src/transform/instcombine.rs
Expand Up @@ -81,7 +81,7 @@ impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
*rvalue = Rvalue::Use(Operand::Copy(place));
}

self.super_rvalue(rvalue, location)
// We do not call super_rvalue as we are not interested in any other parts of the tree
}
}

Expand Down Expand Up @@ -285,7 +285,7 @@ impl Visitor<'tcx> for OptimizationFinder<'b, 'tcx> {

self.find_unneeded_equality_comparison(rvalue, location);

self.super_rvalue(rvalue, location)
// We do not call super_rvalue as we are not interested in any other parts of the tree
}
}

Expand Down

0 comments on commit 307c608

Please sign in to comment.