File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
cpp/ql/src/semmle/code/cpp/controlflow Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,19 @@ import semmle.code.cpp.controlflow.SSA // must be imported for proper caching of
44import semmle.code.cpp.rangeanalysis.RangeSSA // must be imported for proper caching of SSAHelper
55
66/* The dominance frontier of a block `x` is the set of all blocks `w` such that
7- * `x` dominates a predecessor of `w` but does not strictly dominate `w`. */
8- pragma [ noinline]
7+ * `x` dominates a predecessor of `w` but does not strictly dominate `w`.
8+ *
9+ * This implementation is equivalent to:
10+ *
11+ * bbDominates(x, w.getAPredecessor()) and not bbStrictlyDominates(x, w)
12+ */
913private predicate dominanceFrontier ( BasicBlock x , BasicBlock w ) {
10- bbDominates ( x , w .getAPredecessor ( ) ) and not bbStrictlyDominates ( x , w )
14+ x = w .getAPredecessor ( ) and not bbIDominates ( x , w )
15+ or
16+ exists ( BasicBlock prev | dominanceFrontier ( prev , w ) |
17+ bbIDominates ( x , prev ) and
18+ not bbIDominates ( x , w )
19+ )
1120}
1221
1322/**
You can’t perform that action at this time.
0 commit comments