Reduce the number of drop-flag assignments in unwind paths

This commit is contained in:
Matthew Jasper
2019-11-17 11:30:48 +00:00
committed by Aaron Hill
parent fa3e2fcbe4
commit f810e600cd
2 changed files with 12 additions and 39 deletions

View File

@@ -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);
}