Skip to content

Commit c1af8b9

Browse files
committed
C++: Better join-order fix.
1 parent d840796 commit c1af8b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/SSAUtils.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ library class SSAHelper extends int {
153153
* Modern Compiler Implementation by Andrew Appel.
154154
*/
155155
private predicate frontier_phi_node(StackVariable v, BasicBlock b) {
156-
exists(BasicBlock x | dominanceFrontier(pragma[only_bind_into](x), b) and ssa_defn_rec(v, x)) and
156+
exists(BasicBlock x |
157+
dominanceFrontier(x, pragma[only_bind_into](b)) and ssa_defn_rec(pragma[only_bind_into](v), x)
158+
) and
157159
/* We can also eliminate those nodes where the variable is not live on any incoming edge */
158-
live_at_start_of_bb(v, b)
160+
live_at_start_of_bb(pragma[only_bind_into](v), b)
159161
}
160162

161163
private predicate ssa_defn_rec(StackVariable v, BasicBlock b) {

0 commit comments

Comments
 (0)