Skip to content

Commit f134101

Browse files
committed
remove unused postorder CFG cache
1 parent 0b4b086 commit f134101

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compiler/rustc_middle/src/mir/basic_blocks.rs

-9
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ struct Cache {
2626
predecessors: OnceCell<Predecessors>,
2727
switch_sources: OnceCell<SwitchSources>,
2828
is_cyclic: OnceCell<bool>,
29-
postorder: OnceCell<Vec<BasicBlock>>,
3029
reverse_postorder: OnceCell<Vec<BasicBlock>>,
3130
dominators: OnceCell<Dominators<BasicBlock>>,
3231
}
@@ -63,14 +62,6 @@ impl<'tcx> BasicBlocks<'tcx> {
6362
})
6463
}
6564

66-
/// Returns basic blocks in a postorder.
67-
#[inline]
68-
pub fn postorder(&self) -> &[BasicBlock] {
69-
self.cache.postorder.get_or_init(|| {
70-
Postorder::new(&self.basic_blocks, START_BLOCK).map(|(bb, _)| bb).collect()
71-
})
72-
}
73-
7465
/// Returns basic blocks in a reverse postorder.
7566
#[inline]
7667
pub fn reverse_postorder(&self) -> &[BasicBlock] {

0 commit comments

Comments
 (0)