#
a765bac7 |
| 31-Jul-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Turn -cfg-add-initializers on by default, and remove the flag.
llvm-svn: 161060
|
#
40b87fc1 |
| 05-Jul-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer stats from scan-build output.
llvm-svn: 159776
|
#
de21a1c9 |
| 02-Jul-2012 |
Ted Kremenek <kremenek@apple.com> |
Bail out the LiveVariables analysis when the CFG is very large, as we are encountering some scalability issues with memory usage. The appropriate long term fix is to make the analysis more scalable
Bail out the LiveVariables analysis when the CFG is very large, as we are encountering some scalability issues with memory usage. The appropriate long term fix is to make the analysis more scalable, but this will at least prevent the analyzer swapping when analyzing very large functions.
llvm-svn: 159578
show more ...
|
#
146ef384 |
| 02-Jul-2012 |
Ted Kremenek <kremenek@apple.com> |
Fix subtle bug in AnalysisConsumer where we would not analyze functions whose parent in the call graph had been inlined but for whatever reason we did not inline some of its callees.
Also, fix a rel
Fix subtle bug in AnalysisConsumer where we would not analyze functions whose parent in the call graph had been inlined but for whatever reason we did not inline some of its callees.
Also, fix a related traversal bug where we meant to do a BFS of the callgraph but instead were doing a DFS.
llvm-svn: 159577
show more ...
|
#
2774f999 |
| 31-May-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Cleanup for r157721. We should lock the number of elements after the initial parsing is complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can trigger lazy pch deserializat
[analyzer] Cleanup for r157721. We should lock the number of elements after the initial parsing is complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can trigger lazy pch deserialization resulting in more calls to HandleTopLevelDecl and appending to the LocalTUDecls list. We should ignore those.
llvm-svn: 157762
show more ...
|
#
34d89b7d |
| 30-May-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer]Fix another occurrence of iterator invalidation (LocalTUDecls)
Follow up in r155693, r155680.
Prevents a hard to reproduce crash with the following stack trace: 3 libsystem_c.dylib 0x000
[analyzer]Fix another occurrence of iterator invalidation (LocalTUDecls)
Follow up in r155693, r155680.
Prevents a hard to reproduce crash with the following stack trace: 3 libsystem_c.dylib 0x00007ff55a835050 _sigtramp + 18446744029881443184 4 clang 0x0000000106218e97 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) + 519 5 clang 0x0000000105cf3002 clang::ParseAST(clang::Sema&, bool, bool) + 690 6 clang 0x00000001059a41d8 clang::ASTFrontendAction::ExecuteAction() + 312 7 clang 0x00000001059a3df7 clang::FrontendAction::Execute() + 231 8 clang 0x00000001059b0ecc clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 860 9 clang 0x000000010595e451 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 961 10 clang 0x0000000105947f29 cc1_main(char const**, char const**, char const*, void*) + 969 11 clang 0x0000000105958259 main + 473 12 clang 0x0000000105947b34 start + 52
llvm-svn: 157721
show more ...
|
Revision tags: llvmorg-3.1.0 |
|
#
e7e7c9eb |
| 11-May-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Do not walk the types for call graph construction.
llvm-svn: 156661
|
Revision tags: llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2 |
|
#
4f8198e7 |
| 28-Apr-2012 |
Jordy Rose <jediknil@belkadan.com> |
[analyzer] Remove references to idx::TranslationUnit. Index is dead, cross-TU inlining never panned out.
llvm-svn: 155751
|
#
2964aac0 |
| 27-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Use a deque instead of an ImmutableList in AnalysisConsumer to preserve the file order that functions are visited. Should fix the buildbots.
llvm-svn: 155693
|
#
b2a47064 |
| 27-Apr-2012 |
Ted Kremenek <kremenek@apple.com> |
Change FunctionSummary.h's definition of SetOfDecls to be an ImmutableList instead of a mutable SmallPtrSet. While iterating over LocalTUDecls, there were cases where we could modify LocalTUDecls, w
Change FunctionSummary.h's definition of SetOfDecls to be an ImmutableList instead of a mutable SmallPtrSet. While iterating over LocalTUDecls, there were cases where we could modify LocalTUDecls, which could result in invalidating an iterator and an analyzer crash. Along the way, switch some uses of std::queue to std::dequeue, which should be slightly more efficient.
Unfortunately, this is a difficult case to create a test case for.
llvm-svn: 155680
show more ...
|
Revision tags: llvmorg-3.1.0-rc1 |
|
#
0481c8f2 |
| 13-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Remove the unused, unmaintained, incomplete 'Index' library.
llvm-svn: 154672
|
#
8e078528 |
| 12-Apr-2012 |
Anna Zaks <ganna@apple.com> |
[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 AS
[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
show more ...
|
#
8382e454 |
| 05-Apr-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Move stats calculation out of AnalysisConsumer destructor. The ASTConsumer does not get deleted with clang --analyze (for performance reasons), we still want the diagnostics to work.
llvm
[analyzer] Move stats calculation out of AnalysisConsumer destructor. The ASTConsumer does not get deleted with clang --analyze (for performance reasons), we still want the diagnostics to work.
llvm-svn: 154078
show more ...
|
#
cc24e45e |
| 03-Apr-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Record the basic blocks covered by the analyzes run.
Store this info inside the function summary generated for all analyzed functions. This is useful for coverage stats and can be helpful
[analyzer] Record the basic blocks covered by the analyzes run.
Store this info inside the function summary generated for all analyzed functions. This is useful for coverage stats and can be helpful for analyzer state space search strategies.
llvm-svn: 153923
show more ...
|
#
54fd4a07 |
| 30-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Do not inline functions which previously reached max block count.
This is an optimization for "retry without inlining" option. Here, if we failed to inline a function due to reaching the
[analyzer] Do not inline functions which previously reached max block count.
This is an optimization for "retry without inlining" option. Here, if we failed to inline a function due to reaching the basic block max count, we are going to store this information and not try to inline it again in the translation unit. This can be viewed as a function summary.
On sqlite, with this optimization, we are 30% faster then before and cover 10% more basic blocks (partially because the number of times we reach timeout is decreased by 20%).
llvm-svn: 153730
show more ...
|
#
72eee39d |
| 28-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Enable retry exhausted without inlining by default.
llvm-svn: 153591
|
#
5b3939fa |
| 27-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Add an option to re-analyze a dead-end path without inlining.
The analyzer gives up path exploration under certain conditions. For example, when the same basic block has been visited more
[analyzer] Add an option to re-analyze a dead-end path without inlining.
The analyzer gives up path exploration under certain conditions. For example, when the same basic block has been visited more than 4 times. With inlining turned on, this could lead to decrease in code coverage. Specifically, if we give up inside the inlined function, the rest of parent's basic blocks will not get analyzed.
This commit introduces an option to enable re-run along the failed path, in which we do not inline the last inlined call site. This is done by enqueueing the node before the processing of the inlined call site with a special policy encoded in the state. The policy tells us not to inline the call site along the path.
This lead to ~10% increase in the number of paths analyzed. Even though we expected a much greater coverage improvement.
The option is turned off by default for now.
llvm-svn: 153534
show more ...
|
#
23df6bb1 |
| 27-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Stats: Only count the number of times we run path sensitive analyzes.
(This method can be called twice on the same function.)
llvm-svn: 153531
|
#
943c6806 |
| 13-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Change the order in which we analyze the functions under inlining to be the reverse of their declaration.
This optimizes running time under inlining up to 20% since we do not re-analyze t
[analyzer] Change the order in which we analyze the functions under inlining to be the reverse of their declaration.
This optimizes running time under inlining up to 20% since we do not re-analyze the utility functions which are usually defined first in the translation unit if they have already been analyzed while inlined into the root functions.
llvm-svn: 152653
show more ...
|
#
ca70ed53 |
| 13-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Use BFS over call graph when analysing functions.
BFS should give slightly better performance. Ex: Suppose, we have two roots R1 and R2. A callee function C is reachable through both. How
[analyzer] Use BFS over call graph when analysing functions.
BFS should give slightly better performance. Ex: Suppose, we have two roots R1 and R2. A callee function C is reachable through both. However, C is not inlined when analyzing R1 due to inline stack depth limit. With DFS, C will be analyzed as top level even though it would be analyzed as inlined through R2. On the other hand, BFS could avoid analyzing C as top level.
llvm-svn: 152652
show more ...
|
#
32da47b9 |
| 13-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Refactor CallGraph to use Recursive AST visitor when collecting function Decls.
llvm-svn: 152651
|
#
14189514 |
| 13-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Use recursive AST visitor to drive simple visitation order in AnalysisConsumer.
As a result: - We now analyze the C++ methods which are defined within the class body. These were complete
[analyzer] Use recursive AST visitor to drive simple visitation order in AnalysisConsumer.
As a result: - We now analyze the C++ methods which are defined within the class body. These were completely skipped before.
- Ensure that AST checkers are called on functions in the order they are defined in the Translation unit.
llvm-svn: 152650
show more ...
|
#
aa19abe9 |
| 13-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Minor: factor out logic for determining if we should skip a function.
llvm-svn: 152649
|
#
e756ce0c |
| 13-Mar-2012 |
Anna Zaks <ganna@apple.com> |
[analyzer] Move the check for parser errors out of the loop over Decls.
llvm-svn: 152648
|
#
bbafb8a7 |
| 11-Mar-2012 |
David Blaikie <dblaikie@gmail.com> |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris La
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
show more ...
|