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:
commit
21f6839352
3 changed files with 12 additions and 12 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue