diff options
| author | Simon Vandel Sillesen <simon.vandel@gmail.com> | 2020-11-15 22:34:23 +0100 |
|---|---|---|
| committer | Simon Vandel Sillesen <simon.vandel@gmail.com> | 2020-11-15 22:34:53 +0100 |
| commit | 307c60843ce853cf6883f5330e71cde35838d78b (patch) | |
| tree | 114ceccb1d96d5db7a42ae070fd41a6cf81a45cf | |
| parent | 603ab5bd6e0ffefafa7411cd8bd23a6ca82bcff0 (diff) | |
Do not call super_rvalue if not needed
| -rw-r--r-- | compiler/rustc_mir/src/transform/instcombine.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir/src/transform/instcombine.rs b/compiler/rustc_mir/src/transform/instcombine.rs index 59b7db24319..b36633fbfb3 100644 --- a/compiler/rustc_mir/src/transform/instcombine.rs +++ b/compiler/rustc_mir/src/transform/instcombine.rs @@ -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 } } @@ -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 } } |
