Skip to content

Commit 5220b77

Browse files
committed
Java/C: Improve performance when multiple configs use field flow.
1 parent d4551e5 commit 5220b77

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
private predicate storeCandFwd1(Content f, Configuration config) {
238238
exists(Node mid, Node node |
239239
not config.isBarrier(node) and
240-
useFieldFlow(unbind(config)) and
240+
useFieldFlow(config) and
241241
nodeCandFwd1(mid, _, config) and
242242
store(mid, f, node)
243243
)
@@ -312,7 +312,7 @@
312312
*/
313313
private predicate readCand1(Content f, Configuration config) {
314314
exists(Node mid, Node node |
315-
useFieldFlow(unbind(config)) and
315+
useFieldFlow(config) and
316316
nodeCandFwd1(node, true, unbind(config)) and
317317
read(node, f, mid) and
318318
storeCandFwd1(f, unbind(config)) and
@@ -548,7 +548,7 @@
548548
*/
549549
private predicate storeCandFwd2(Content f, Configuration config) {
550550
exists(Node mid, Node node |
551-
useFieldFlow(unbind(config)) and
551+
useFieldFlow(config) and
552552
nodeCand1(node, true, unbind(config)) and
553553
nodeCandFwd2(mid, _, _, config) and
554554
store(mid, f, node) and
@@ -616,7 +616,7 @@
616616
*/
617617
private predicate readCand2(Content f, Configuration config) {
618618
exists(Node mid, Node node |
619-
useFieldFlow(unbind(config)) and
619+
useFieldFlow(config) and
620620
nodeCandFwd2(node, _, true, unbind(config)) and
621621
read(node, f, mid) and
622622
storeCandFwd2(f, unbind(config)) and

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
private predicate storeCandFwd1(Content f, Configuration config) {
238238
exists(Node mid, Node node |
239239
not config.isBarrier(node) and
240-
useFieldFlow(unbind(config)) and
240+
useFieldFlow(config) and
241241
nodeCandFwd1(mid, _, config) and
242242
store(mid, f, node)
243243
)
@@ -312,7 +312,7 @@
312312
*/
313313
private predicate readCand1(Content f, Configuration config) {
314314
exists(Node mid, Node node |
315-
useFieldFlow(unbind(config)) and
315+
useFieldFlow(config) and
316316
nodeCandFwd1(node, true, unbind(config)) and
317317
read(node, f, mid) and
318318
storeCandFwd1(f, unbind(config)) and
@@ -548,7 +548,7 @@
548548
*/
549549
private predicate storeCandFwd2(Content f, Configuration config) {
550550
exists(Node mid, Node node |
551-
useFieldFlow(unbind(config)) and
551+
useFieldFlow(config) and
552552
nodeCand1(node, true, unbind(config)) and
553553
nodeCandFwd2(mid, _, _, config) and
554554
store(mid, f, node) and
@@ -616,7 +616,7 @@
616616
*/
617617
private predicate readCand2(Content f, Configuration config) {
618618
exists(Node mid, Node node |
619-
useFieldFlow(unbind(config)) and
619+
useFieldFlow(config) and
620620
nodeCandFwd2(node, _, true, unbind(config)) and
621621
read(node, f, mid) and
622622
storeCandFwd2(f, unbind(config)) and

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
private predicate storeCandFwd1(Content f, Configuration config) {
238238
exists(Node mid, Node node |
239239
not config.isBarrier(node) and
240-
useFieldFlow(unbind(config)) and
240+
useFieldFlow(config) and
241241
nodeCandFwd1(mid, _, config) and
242242
store(mid, f, node)
243243
)
@@ -312,7 +312,7 @@
312312
*/
313313
private predicate readCand1(Content f, Configuration config) {
314314
exists(Node mid, Node node |
315-
useFieldFlow(unbind(config)) and
315+
useFieldFlow(config) and
316316
nodeCandFwd1(node, true, unbind(config)) and
317317
read(node, f, mid) and
318318
storeCandFwd1(f, unbind(config)) and
@@ -548,7 +548,7 @@
548548
*/
549549
private predicate storeCandFwd2(Content f, Configuration config) {
550550
exists(Node mid, Node node |
551-
useFieldFlow(unbind(config)) and
551+
useFieldFlow(config) and
552552
nodeCand1(node, true, unbind(config)) and
553553
nodeCandFwd2(mid, _, _, config) and
554554
store(mid, f, node) and
@@ -616,7 +616,7 @@
616616
*/
617617
private predicate readCand2(Content f, Configuration config) {
618618
exists(Node mid, Node node |
619-
useFieldFlow(unbind(config)) and
619+
useFieldFlow(config) and
620620
nodeCandFwd2(node, _, true, unbind(config)) and
621621
read(node, f, mid) and
622622
storeCandFwd2(f, unbind(config)) and

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
private predicate storeCandFwd1(Content f, Configuration config) {
238238
exists(Node mid, Node node |
239239
not config.isBarrier(node) and
240-
useFieldFlow(unbind(config)) and
240+
useFieldFlow(config) and
241241
nodeCandFwd1(mid, _, config) and
242242
store(mid, f, node)
243243
)
@@ -312,7 +312,7 @@
312312
*/
313313
private predicate readCand1(Content f, Configuration config) {
314314
exists(Node mid, Node node |
315-
useFieldFlow(unbind(config)) and
315+
useFieldFlow(config) and
316316
nodeCandFwd1(node, true, unbind(config)) and
317317
read(node, f, mid) and
318318
storeCandFwd1(f, unbind(config)) and
@@ -548,7 +548,7 @@
548548
*/
549549
private predicate storeCandFwd2(Content f, Configuration config) {
550550
exists(Node mid, Node node |
551-
useFieldFlow(unbind(config)) and
551+
useFieldFlow(config) and
552552
nodeCand1(node, true, unbind(config)) and
553553
nodeCandFwd2(mid, _, _, config) and
554554
store(mid, f, node) and
@@ -616,7 +616,7 @@
616616
*/
617617
private predicate readCand2(Content f, Configuration config) {
618618
exists(Node mid, Node node |
619-
useFieldFlow(unbind(config)) and
619+
useFieldFlow(config) and
620620
nodeCandFwd2(node, _, true, unbind(config)) and
621621
read(node, f, mid) and
622622
storeCandFwd2(f, unbind(config)) and

0 commit comments

Comments
 (0)