summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-01-25 19:13:54 +0000
committerTed Kremenek <kremenek@apple.com>2011-01-25 19:13:54 +0000
commitade45d97038e907f94e9d9492f6b5cec58d3563c (patch)
tree8be2116097f706451865ce9b8f1624271975041c /clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
parentbcf848f70a4246808f46f3de006fd0c51433563d (diff)
downloadbcm5719-llvm-ade45d97038e907f94e9d9492f6b5cec58d3563c.tar.gz
bcm5719-llvm-ade45d97038e907f94e9d9492f6b5cec58d3563c.zip
Recycle memory for GRStates that are never referenced
by ExplodedNodes. This leads to about a 4-8% reduction in memory footprint when analyzing functions in sqlite3. llvm-svn: 124214
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
index 53931dc607a..f311bea8778 100644
--- a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp
@@ -574,6 +574,9 @@ void ExprEngine::processCFGElement(const CFGElement E,
}
void ExprEngine::ProcessStmt(const CFGStmt S, StmtNodeBuilder& builder) {
+ // Recycle any unused states in the GRStateManager.
+ StateMgr.recycleUnusedStates();
+
currentStmt = S.getStmt();
PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
currentStmt->getLocStart(),
OpenPOWER on IntegriCloud