[analyzer] Optimization heuristic: do not reanalyze every ObjC method as
authorAnna Zaks <ganna@apple.com>
Fri, 7 Dec 2012 21:51:47 +0000 (21:51 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 7 Dec 2012 21:51:47 +0000 (21:51 +0000)
commit5d484780fbb998725e4f61e9a9b0e57fb507cf2d
tree25f28a48d156ac89f81734301dc80809e2164cad
parentad0b5fbe8c60b46de44f5f484cfb0995ef333423
[analyzer] Optimization heuristic: do not reanalyze every ObjC method as
top level.

This heuristic is already turned on for non-ObjC methods
(inlining-mode=noredundancy). If a method has been previously analyzed,
while being inlined inside of another method, do not reanalyze it as top
level.

This commit applies it to ObjCMethods as well. The main caveat here is
that to catch the retain release errors, we are still going to reanalyze
all the ObjC methods but without inlining turned on.

Gives 21% performance increase on one heavy ObjC benchmark, which
suffered large performance regressions due to ObjC inlining.

llvm-svn: 169639
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
clang/test/Analysis/objc-method-coverage.m