Skip to content

Commit 9298dfa

Browse files
committed
Early exit if no candidates.
1 parent ffcc38a commit 9298dfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_mir_transform/src/dest_prop.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ impl<'tcx> crate::MirPass<'tcx> for DestinationPropagation {
185185
// results?
186186
candidates.reset_and_find(body, &borrowed);
187187
trace!(?candidates);
188+
if candidates.c.is_empty() {
189+
break;
190+
}
191+
188192
dest_prop_mir_dump(tcx, body, &points, &live, round_count);
189193

190194
let mut filter = FilterInformation::filter_liveness(

0 commit comments

Comments
 (0)