Skip to content

Commit 976e3a3

Browse files
committed
Perform JumpThreading in RPO order.
1 parent 3ab394d commit 976e3a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/jump_threading.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl<'tcx> crate::MirPass<'tcx> for JumpThreading {
8989
opportunities: Vec::new(),
9090
};
9191

92-
for bb in body.basic_blocks.indices() {
92+
for (bb, _) in traversal::reverse_postorder(body) {
9393
finder.start_from_switch(bb);
9494
}
9595

0 commit comments

Comments
 (0)