aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/DependencyFile.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-03-22 21:15:28 +0000
committerJordan Rose <jordan_rose@apple.com>2013-03-22 21:15:28 +0000
commit228094a28f81ddba94427239dea5c6e59ff6aabc (patch)
treecc14e538ac5237be9b80af4d1a8a778201652d5d /lib/Frontend/DependencyFile.cpp
parent03af377b2755fb2ddb0621dea5dd91cd5fda631d (diff)
[analyzer] Use a forward BFS instead of a reverse BFS to find shortest paths.
For a given bug equivalence class, we'd like to emit the report with the shortest path. So far to do this we've been trimming the ExplodedGraph to only contain relevant nodes, then doing a reverse BFS (starting at all the error nodes) to find the shortest paths from the root. However, this is fairly expensive when we are suppressing many bug reports in the same equivalence class. r177468-9 tried to solve this problem by breaking cycles during graph trimming, then updating the BFS priorities after each suppressed report instead of recomputing the whole thing. However, breaking cycles is not a cheap operation because an analysis graph minus cycles is still a DAG, not a tree. This fix changes the algorithm to do a single forward BFS (starting from the root) and to use that to choose the report with the shortest path by looking at the error nodes with the lowest BFS priorities. This was Anna's idea, and has the added advantage of requiring no update step: we can just pick the error node with the next lowest priority to produce the next bug report. <rdar://problem/13474689> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/DependencyFile.cpp')
0 files changed, 0 insertions, 0 deletions