Reduce the number of drop-flag assignments in unwind paths
This commit is contained in:
committed by
Aaron Hill
parent
fa3e2fcbe4
commit
f810e600cd
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user