1
Fork 0

Auto merge of #106976 - tmiasko:borrowck-lazy-dominators, r=cjgillot

Lazy dominator tree construction in borrowck

Motivated by the observation that sometimes constructed dominator tree was never queried.
This commit is contained in:
bors 2023-01-21 11:02:29 +00:00
commit 21f6839352
3 changed files with 12 additions and 12 deletions

View file

@ -271,10 +271,6 @@ pub struct Dominators<N: Idx> {
}
impl<Node: Idx> Dominators<Node> {
pub fn dummy() -> Self {
Self { post_order_rank: IndexVec::new(), immediate_dominators: IndexVec::new() }
}
pub fn is_reachable(&self, node: Node) -> bool {
self.immediate_dominators[node].is_some()
}