Skip to content

Commit a470cf8

Browse files
authored
Merge pull request #22892 from github/kaspersv/disable-rtjo-for-select-preds-cpp
CPP: Disable dynamic join ordering for select predicates
2 parents fcb928c + b1a336c commit a470cf8

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ private module Cached {
315315
* Holds if `asExpr(n1) = e1` and `e1 != e2` and `n2` is the first reachable node from
316316
* `n1` such that `asExpr(n2) = e2`.
317317
*/
318+
pragma[no_dynamic_join_order]
318319
private predicate localExprFlowStepImpl(Node n1, Expr e1, Node n2, Expr e2) {
319320
exists(Node n, Expr e | localExprFlowSingleExprStep(n1, e1, n, e) |
320321
// If `n.asExpr()` and `n1.asExpr()` both resolve to the same node (which can

‎cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ private float getTruncatedUpperBounds(Expr expr) {
10671067
}
10681068

10691069
/** Only to be called by `getTruncatedLowerBounds`. */
1070+
pragma[no_dynamic_join_order]
10701071
private float getLowerBoundsImpl(Expr expr) {
10711072
(
10721073
exists(Expr operand, float operandLow, float positive |
@@ -1277,6 +1278,7 @@ private float getLowerBoundsImpl(Expr expr) {
12771278
}
12781279

12791280
/** Only to be called by `getTruncatedUpperBounds`. */
1281+
pragma[no_dynamic_join_order]
12801282
private float getUpperBoundsImpl(Expr expr) {
12811283
(
12821284
exists(Expr operand, float operandHigh, float positive |

‎cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/Bound.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ private import semmle.code.cpp.ir.ValueNumbering
44

55
private newtype TBound =
66
TBoundZero() or
7+
pragma[no_dynamic_join_order]
78
TBoundValueNumber(ValueNumber vn) {
89
exists(Instruction i |
910
vn.getAnInstruction() = i and

0 commit comments

Comments
 (0)