Commit 65e6328
IrqlFloatStateMismatch: pragma[inline_late] on irqlChangesBetween
The `irqlChangesBetween/2` predicate is the hottest single predicate in
the IFSM query at HEAD (~109 s of CPU and 3.43 M result tuples in the
18-query suite measurement on the WDS sample database, accounting for
roughly a quarter of the IFSM query's total cost).
Without a planner hint, the predicate is materialized as a standalone
relation over every `(FunctionCall, FunctionCall)` pair in the codebase
that satisfies its constraints, and only then intersected with the
~25-row dataflow result set produced by `FloatStateFlow::flow`. With
`pragma[inline_late]` plus the matching `bindingset[saveCall,
restoreCall]`, the body is specialized at the single call site after
the dataflow result has bound both arguments, so the predicate body is
evaluated only on the small set of dataflow-derived pairs.
Validation on the WDS sample database (single-query run, cold cache):
- SARIF result count for cpp/drivers/irql-float-state-mismatch: 0
(matches the HEAD baseline of 0; correctness preserved)
- `irqlChangesBetween` no longer appears as a discrete predicate in
the evaluator log (it has been fully inlined into its call site)
- New top single-query predicate: 28.9 s, vs 109 s for the
standalone `irqlChangesBetween` in the baseline suite measurement
This is a planner-hint change only. The predicate body is byte-for-byte
unchanged, so the set of `(saveCall, restoreCall)` pairs the predicate
admits (and therefore the set of `select` rows the query produces) is
unchanged on every database. The `bindingset` is honest: the only
caller (line 215) binds both arguments via the `FloatStateFlow::flow`
result and the `asIndirectExpr` constraints in the same `where` clause.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ad1379a commit 65e6328
1 file changed
Lines changed: 16 additions & 0 deletions
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
160 | 174 | | |
| 175 | + | |
| 176 | + | |
161 | 177 | | |
162 | 178 | | |
163 | 179 | | |
| |||
0 commit comments