Windows-Driver-Developer-Supplemental-Tools icon indicating copy to clipboard operation
Windows-Driver-Developer-Supplemental-Tools copied to clipboard

Improve performance of suppression library

Open NateD-MSFT opened this issue 7 months ago • 0 comments

The warning suppression library runs extremely slowly. Running in verbose moment with tuple counts, etc. shows most of the time is spent in this function in Suppression.qll (https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/blob/development/src/drivers/libraries/Suppression.qll):

 pragma[nomagic]
  override predicate appliesToLocation(Location l) {
    this.getFile() = l.getFile() and
    this.getLocation().getEndLine() <= l.getStartLine() and
    // If we're in a pragma push/pop, ensure the disable is too
    (
      exists(SuppressionPushPopSegment spps |
        spps.getADisablePragma() = this and
        spps.isInPushPopSegment(l)
      )
      or
      not exists(SuppressionPushPopSegment spps | spps.getADisablePragma() = this) and
      not exists(SuppressionPushPopSegment spps | spps.isInPushPopSegment(l))
    )
  }
}

This blocks #100 .

NateD-MSFT avatar Jun 21 '25 23:06 NateD-MSFT