diff options
author | Anna Zaks <ganna@apple.com> | 2012-04-12 22:36:48 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-04-12 22:36:48 +0000 |
commit | 8e0785286a8175cfb5315e29ca72a882e86e7d37 (patch) | |
tree | f13cb01f028351e88174995e04afc6ce009dde55 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 9fcb055917c4d757678895a324d78f7eb42c1037 (diff) | |
download | bcm5719-llvm-8e0785286a8175cfb5315e29ca72a882e86e7d37.tar.gz bcm5719-llvm-8e0785286a8175cfb5315e29ca72a882e86e7d37.zip |
[analyzer] PCH deserialization optimization.
We should not deserialize unused declarations from the PCH file. Achieve
this by storing the top level declarations during parsing
(HandleTopLevelDecl ASTConsumer callback) and analyzing/building a call
graph only for those.
Tested the patch on a sample ObjC file that uses PCH. With the patch,
the analyzes is 17.5% faster and clang consumes 40% less memory.
Got about 10% overall build/analyzes time decrease on a large Objective
C project.
A bit of CallGraph refactoring/cleanup as well..
llvm-svn: 154625
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index 30a511d6863..d2da9aaccb7 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -67,7 +67,7 @@ static inline Selector GetNullarySelector(const char* name, ASTContext &Ctx) { //===----------------------------------------------------------------------===// ExprEngine::ExprEngine(AnalysisManager &mgr, bool gcEnabled, - SetOfDecls *VisitedCallees, + SetOfConstDecls *VisitedCallees, FunctionSummariesTy *FS) : AMgr(mgr), AnalysisDeclContexts(mgr.getAnalysisDeclContextManager()), |