Skip to content

Commit 0350286

Browse files
committed
Distribute a recursive call into a recursive disjunction.
As the linearity of the disjuncts is different, this enables us to pick better join orders for each disjunct separately.
1 parent 479fca9 commit 0350286

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/semmle/code/cpp/valuenumbering/HashCons.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,14 +737,15 @@ private predicate mk_FieldCons(
737737
exists(Expr e |
738738
e = cal.getFieldExpr(f).getFullyConverted() and
739739
f.getInitializationOrder() = i and
740-
hc = hashCons(e) and
741740
(
742741
exists(HashCons head, Field f2, HC_Fields tail |
742+
hc = hashCons(e) and
743743
hcf = HC_FieldCons(c, i - 1, f2, head, tail) and
744744
f2.getInitializationOrder() = i - 1 and
745745
mk_FieldCons(c, i - 1, f2, head, tail, cal)
746746
)
747747
or
748+
hc = hashCons(e) and
748749
i = 0 and
749750
hcf = HC_EmptyFields(c)
750751
)

0 commit comments

Comments
 (0)