Skip to content

Commit 497f350

Browse files
committed
Use shared inDominanceFrontier instead of inDominanceFrontierOf
Note that they are the opposite way round from each other.
1 parent 3cf4f57 commit 497f350

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

go/ql/lib/semmle/go/controlflow/BasicBlocks.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,4 @@ class ReachableBasicBlock extends BasicBlock {
6666
*/
6767
class ReachableJoinBlock extends ReachableBasicBlock {
6868
ReachableJoinBlock() { this.getFirstNode().isJoin() }
69-
70-
/**
71-
* Holds if this basic block belongs to the dominance frontier of `b`, that is
72-
* `b` dominates a predecessor of this block, but not this block itself.
73-
*
74-
* Algorithm from Cooper et al., "A Simple, Fast Dominance Algorithm" (Figure 5),
75-
* who in turn attribute it to Ferrante et al., "The program dependence graph and
76-
* its use in optimization".
77-
*/
78-
predicate inDominanceFrontierOf(ReachableBasicBlock b) { b.inDominanceFrontier(this) }
7969
}

go/ql/lib/semmle/go/dataflow/SsaImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private module Internal {
7171
private predicate inDefDominanceFrontier(ReachableJoinBlock bb, SsaSourceVariable v) {
7272
exists(ReachableBasicBlock defbb, SsaDefinition def |
7373
def.definesAt(defbb, _, v) and
74-
bb.inDominanceFrontierOf(defbb)
74+
defbb.inDominanceFrontier(bb)
7575
)
7676
}
7777

0 commit comments

Comments
 (0)