Skip to content

Commit 9ebeac2

Browse files
authored
Merge pull request #1329 from hvitved/dataflow/performance
Data flow: performance improvements
2 parents 6468721 + bc00877 commit 9ebeac2

File tree

19 files changed

+5056
-3859
lines changed

19 files changed

+5056
-3859
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 336 additions & 257 deletions
Large diffs are not rendered by default.

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll

Lines changed: 336 additions & 257 deletions
Large diffs are not rendered by default.

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll

Lines changed: 336 additions & 257 deletions
Large diffs are not rendered by default.

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll

Lines changed: 336 additions & 257 deletions
Large diffs are not rendered by default.

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,15 @@ private module ImplCommon {
8989
enclosing = arg.getEnclosingCallable()
9090
}
9191

92+
pragma[noinline]
93+
private ParameterNode getAParameter(DataFlowCallable c) { result.getEnclosingCallable() = c }
94+
9295
pragma[noinline]
9396
private predicate viableParamArg0(int i, ArgumentNode arg, CallContext outercc, DataFlowCall call) {
9497
exists(DataFlowCallable c | argumentOf(call, i, arg, c) |
9598
outercc = TAnyCallContext()
9699
or
97-
exists(ParameterNode p | outercc = TSomeCall(p, _) | c = p.getEnclosingCallable())
100+
outercc = TSomeCall(getAParameter(c), _)
98101
or
99102
exists(DataFlowCall other | outercc = TSpecificCall(other, _, _) |
100103
reducedViableImplInCallContext(_, c, other)

0 commit comments

Comments
 (0)