]> granicus.if.org Git - clang/commit
[Analyzer] Don't cache report generation ExplodedNodes
authorBen Craig <ben.craig@codeaurora.org>
Thu, 23 Jun 2016 15:47:12 +0000 (15:47 +0000)
committerBen Craig <ben.craig@codeaurora.org>
Thu, 23 Jun 2016 15:47:12 +0000 (15:47 +0000)
commit75760690cfc5641189e196cffefc21b78ba5452b
tree705021fb9b4b527588e8066d2eb918e1c4fcbb50
parent465434bba5314276a479425b0b4d91be200c2db0
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273572 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
lib/StaticAnalyzer/Core/BugReporter.cpp
lib/StaticAnalyzer/Core/ExplodedGraph.cpp