eliminate recursion from GuardControlFlowNode::dominates

This commit is contained in:
Erik Krogh Kristensen
2020-05-07 14:48:10 +02:00
parent 964b8478dc
commit 6d05b40d23

View File

@@ -379,8 +379,9 @@ class GuardControlFlowNode extends SyntheticControlFlowNode, @guard_node {
* is known to hold at `bb`.
*/
predicate dominates(ReachableBasicBlock bb) {
this = bb.getANode() or
dominates(bb.getImmediateDominator())
this = bb.getANode()
or
exists(ReachableBasicBlock prev | prev.strictlyDominates(bb) | this = prev.getANode())
}
}