mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
SSA: Update input to use member predicates.
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user