diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-11-17 11:30:48 +0000 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-10-04 07:54:01 -0400 |
| commit | f810e600cd7b128ec167937bbd87cfabc52b403e (patch) | |
| tree | 3db2a8e3c5932ec58ed8038d4c96eeb23ec6313b /compiler/rustc_mir/src/dataflow | |
| parent | fa3e2fcbe4bb6c878d137eb427fc34daf49b8c69 (diff) | |
| download | rust-f810e600cd7b128ec167937bbd87cfabc52b403e.tar.gz rust-f810e600cd7b128ec167937bbd87cfabc52b403e.zip | |
Reduce the number of drop-flag assignments in unwind paths
Diffstat (limited to 'compiler/rustc_mir/src/dataflow')
| -rw-r--r-- | compiler/rustc_mir/src/dataflow/move_paths/builder.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_mir/src/dataflow/move_paths/builder.rs b/compiler/rustc_mir/src/dataflow/move_paths/builder.rs index 5c3e3538401..1f232554bf1 100644 --- a/compiler/rustc_mir/src/dataflow/move_paths/builder.rs +++ b/compiler/rustc_mir/src/dataflow/move_paths/builder.rs @@ -362,6 +362,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> { fn gather_terminator(&mut self, term: &Terminator<'tcx>) { match term.kind { TerminatorKind::Goto { target: _ } + | TerminatorKind::Return | TerminatorKind::Resume | TerminatorKind::Abort | TerminatorKind::GeneratorDrop @@ -369,10 +370,6 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> { | TerminatorKind::FalseUnwind { .. } | TerminatorKind::Unreachable => {} - TerminatorKind::Return => { - self.gather_move(Place::return_place()); - } - TerminatorKind::Assert { ref cond, .. } => { self.gather_operand(cond); } |
