1
Fork 0

Lazy dominator tree construction in borrowck

Motivated by the observation that sometimes constructed dominator tree
was never queried.
This commit is contained in:
Tomasz Miąsko 2023-01-17 00:00:00 +00:00
parent 159ba8a92c
commit 7fe68571fa
3 changed files with 12 additions and 12 deletions

View file

@ -268,10 +268,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()
}