@@ -1207,12 +1207,25 @@ private predicate onPath(DataFlow::Node nd, DataFlow::Configuration cfg, PathSum
1207
1207
not cfg .isLabeledBarrier ( nd , summary .getEndLabel ( ) )
1208
1208
or
1209
1209
exists ( DataFlow:: Node mid , PathSummary stepSummary |
1210
- reachableFromSource ( nd , cfg , summary ) and
1211
- flowStep ( nd , id ( cfg ) , mid , stepSummary ) and
1210
+ onPathStep ( nd , cfg , summary , stepSummary , mid ) and
1212
1211
onPath ( mid , id ( cfg ) , summary .append ( stepSummary ) )
1213
1212
)
1214
1213
}
1215
1214
1215
+ /**
1216
+ * Holds if `nd` can be reached from a source under `cfg`,
1217
+ * and there is a flowStep from `nd` (with summary `summary`) to `mid` (with summary `stepSummary`).
1218
+ *
1219
+ * This predicate has been outlined from `onPath` to give the optimizer a hint about join-ordering.
1220
+ */
1221
+ private predicate onPathStep (
1222
+ DataFlow:: Node nd , DataFlow:: Configuration cfg , PathSummary summary , PathSummary stepSummary ,
1223
+ DataFlow:: Node mid
1224
+ ) {
1225
+ reachableFromSource ( nd , cfg , summary ) and
1226
+ flowStep ( nd , id ( cfg ) , mid , stepSummary )
1227
+ }
1228
+
1216
1229
/**
1217
1230
* Holds if there is a configuration that has at least one source and at least one sink.
1218
1231
*/
0 commit comments