Lazy dominator tree construction in borrowck
Motivated by the observation that sometimes constructed dominator tree was never queried.
This commit is contained in:
parent
159ba8a92c
commit
7fe68571fa
3 changed files with 12 additions and 12 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue