make reorder BB pass use cached RPO
This commit is contained in:
parent
4215859617
commit
8f6e65136c
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ impl<'tcx> MirPass<'tcx> for ReorderBasicBlocks {
|
||||||
|
|
||||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
let rpo: IndexVec<BasicBlock, BasicBlock> =
|
let rpo: IndexVec<BasicBlock, BasicBlock> =
|
||||||
body.basic_blocks.postorder().iter().copied().rev().collect();
|
body.basic_blocks.reverse_postorder().iter().copied().collect();
|
||||||
if rpo.iter().is_sorted() {
|
if rpo.iter().is_sorted() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue