]> granicus.if.org Git - clang/commit
[analyzer] Traverse the Call Graph in topological order.
authorAnna Zaks <ganna@apple.com>
Fri, 21 Dec 2012 01:19:22 +0000 (01:19 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 21 Dec 2012 01:19:22 +0000 (01:19 +0000)
commite34e1939ad67576293b2b205b2169488cc6b3b14
tree40f69118a91f266085fa5b35f70da14e5e6a66ca
parent4f858dfd42c89b67200dac0afc228a0baa323691
[analyzer] Traverse the Call Graph in topological order.

Modify the call graph by removing the parentless nodes. Instead all
nodes are children of root to ensure they are all reachable. Remove the
tracking of nodes that are "top level" or global. This information is
not used and can be obtained from the Decls stored inside
CallGraphNodes.

Instead of existing ordering hacks, analyze the functions in topological
order over the Call Graph.

Together with the addition of devirtualizable ObjC message sends and
blocks to the call graph, this gives around 6% performance improvement
on several large ObjC benchmarks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170826 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/CallGraph.h
lib/Analysis/CallGraph.cpp
lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
test/Analysis/debug-CallGraph.c