SSA: Update input to use member predicates.

This commit is contained in:
Anders Schack-Mulligen
2025-08-18 14:03:49 +02:00
parent 119837bb1d
commit bb3abc815f
24 changed files with 147 additions and 206 deletions

View File

@@ -1082,9 +1082,15 @@ class BasicBlock extends @py_flow_node {
* Dominance frontier of a node x is the set of all nodes `other` such that `this` dominates a predecessor
* of `other` but does not strictly dominate `other`
*/
pragma[noinline]
predicate dominanceFrontier(BasicBlock other) {
this.dominates(other.getAPredecessor()) and not this.strictlyDominates(other)
predicate dominanceFrontier(BasicBlock other) { this.inDominanceFrontier(other) }
predicate inDominanceFrontier(BasicBlock df) {
this = df.getAPredecessor() and not this = df.getImmediateDominator()
or
exists(BasicBlock prev | prev.inDominanceFrontier(df) |
this = prev.getImmediateDominator() and
not this = df.getImmediateDominator()
)
}
private ControlFlowNode firstNode() { result = this }