Simplify back-edge logic.
This commit is contained in:
parent
ada7f1c2c4
commit
8c2c695c9e
@ -47,7 +47,7 @@ fn has_back_edge(
|
||||
return false;
|
||||
}
|
||||
// Check if any of the dominators of the node are also the node's successor.
|
||||
doms.dominators(node).any(|dom| node_data.terminator().successors().any(|succ| succ == dom))
|
||||
node_data.terminator().successors().any(|succ| doms.dominates(succ, node))
|
||||
}
|
||||
|
||||
fn insert_counter(basic_block_data: &mut BasicBlockData<'_>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user