Skip to content

Commit 8f6e651

Browse files
committed
make reorder BB pass use cached RPO
1 parent 4215859 commit 8f6e651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/prettify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<'tcx> MirPass<'tcx> for ReorderBasicBlocks {
2424

2525
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
2626
let rpo: IndexVec<BasicBlock, BasicBlock> =
27-
body.basic_blocks.postorder().iter().copied().rev().collect();
27+
body.basic_blocks.reverse_postorder().iter().copied().collect();
2828
if rpo.iter().is_sorted() {
2929
return;
3030
}

0 commit comments

Comments
 (0)