Don't assume DAG

This commit is contained in:
mi_sawa 2022-02-23 13:38:48 +09:00
parent 6daa6d5ffe
commit 6d2a04250c

View file

@ -762,7 +762,6 @@ impl TransitiveRelation {
fn reachable_from(&self, a: mir::Local, domain_size: usize) -> HybridBitSet<mir::Local> {
let mut seen = HybridBitSet::new_empty(domain_size);
seen.insert(a);
let mut stack = vec![a];
while let Some(u) = stack.pop() {
if let Some(edges) = self.relations.get(&u) {
@ -773,7 +772,6 @@ impl TransitiveRelation {
}
}
}
seen.remove(a);
seen
}
}