diff options
| author | Ben Craig <ben.craig@codeaurora.org> | 2016-06-23 15:47:12 +0000 |
|---|---|---|
| committer | Ben Craig <ben.craig@codeaurora.org> | 2016-06-23 15:47:12 +0000 |
| commit | 4067e35faec08a63af3eb453ce0f84d445c8f1c7 (patch) | |
| tree | 3c6a1b8fb5d4e4c92f837d0e37a0154555f693db /clang/lib/StaticAnalyzer/Core/BugReporter.cpp | |
| parent | 02d5315237151cb27fe58939d76aea7048fd06cb (diff) | |
| download | bcm5719-llvm-4067e35faec08a63af3eb453ce0f84d445c8f1c7.tar.gz bcm5719-llvm-4067e35faec08a63af3eb453ce0f84d445c8f1c7.zip | |
[Analyzer] Don't cache report generation ExplodedNodes
During the core analysis, ExplodedNodes are added to the
ExplodedGraph, and those nodes are cached for deduplication purposes.
After core analysis, reports are generated. Here, trimmed copies of
the ExplodedGraph are made. Since the ExplodedGraph has already been
deduplicated, there is no need to deduplicate again.
This change makes it possible to add ExplodedNodes to an
ExplodedGraph without the overhead of deduplication. "Uncached" nodes
also cannot be iterated over, but none of the report generation code
attempts to iterate over all nodes. This change reduces the analysis
time of a large .C file from 3m43.941s to 3m40.256s (~1.6% speedup).
It should slightly reduce memory consumption. Gains should be roughly
proportional to the number (and path length) of static analysis
warnings.
This patch enables future work that should remove the need for an
InterExplodedGraphMap inverse map. I plan on using the (now unused)
ExplodedNode link to connect new nodes to the original nodes.
http://reviews.llvm.org/D21229
llvm-svn: 273572
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index f546a6636d3..488126b0088 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -2922,7 +2922,7 @@ bool TrimmedGraph::popNextReportGraph(ReportGraph &GraphWrapper) { while (true) { // Create the equivalent node in the new graph with the same state // and location. - ExplodedNode *NewN = GNew->getNode(OrigN->getLocation(), OrigN->getState(), + ExplodedNode *NewN = GNew->createUncachedNode(OrigN->getLocation(), OrigN->getState(), OrigN->isSink()); // Store the mapping to the original node. |

