diff options
author | Anna Zaks <ganna@apple.com> | 2012-03-09 21:14:01 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-03-09 21:14:01 +0000 |
commit | 394d07ea88d6f748b18a2571e7deb41ff81c9b6e (patch) | |
tree | 521e31b96d9828401aebfe6958af136bf3e873e2 /clang/lib/StaticAnalyzer/Core/CoreEngine.cpp | |
parent | c255577062e9b97d559ffdaaf258e99e07ce902e (diff) | |
download | bcm5719-llvm-394d07ea88d6f748b18a2571e7deb41ff81c9b6e.tar.gz bcm5719-llvm-394d07ea88d6f748b18a2571e7deb41ff81c9b6e.zip |
[analyzer] Add support for NoRedundancy inlining mode.
We do not reanalyze a function, which has already been analyzed as an
inlined callee. As per PRELIMINARY testing, this gives over
50% run time reduction on some benchmarks without decreasing of the
number of bugs found.
Turning the mode on by default.
llvm-svn: 152440
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CoreEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/CoreEngine.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp index e7c3d2a3b35..a350757a0f1 100644 --- a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp @@ -214,9 +214,16 @@ bool CoreEngine::ExecuteWorkList(const LocationContext *L, unsigned Steps, assert (false && "BlockExit location never occur in forward analysis."); break; - case ProgramPoint::CallEnterKind: - SubEng.processCallEnter(cast<CallEnter>(Node->getLocation()), Node); + case ProgramPoint::CallEnterKind: { + CallEnter CEnter = cast<CallEnter>(Node->getLocation()); + if (AnalyzedCallees) + if (const CallExpr* CE = + dyn_cast_or_null<CallExpr>(CEnter.getCallExpr())) + if (const Decl *CD = CE->getCalleeDecl()) + AnalyzedCallees->insert(CD); + SubEng.processCallEnter(CEnter, Node); break; + } case ProgramPoint::CallExitKind: SubEng.processCallExit(Node); |