Simplify back-edge logic.
This commit is contained in:
parent
ada7f1c2c4
commit
8c2c695c9e
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ fn has_back_edge(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check if any of the dominators of the node are also the node's successor.
|
// 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<'_>) {
|
fn insert_counter(basic_block_data: &mut BasicBlockData<'_>) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue