summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CallGraph.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-03-10 11:24:11 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-03-10 11:24:11 +0000
commit4c660f70870023d62e5fd353c7038359fd23391e (patch)
tree544bae0a5bdc791c067b8446191caf77350bffc5 /llvm/lib/Analysis/CallGraph.cpp
parentb95def749141e0d5c5985be74c3fb2a4ae308fb0 (diff)
downloadbcm5719-llvm-4c660f70870023d62e5fd353c7038359fd23391e.tar.gz
bcm5719-llvm-4c660f70870023d62e5fd353c7038359fd23391e.zip
[CG] Add a new pass manager printer pass for the old call graph and
actually finish wiring up the old call graph. There were bugs in the old call graph that hadn't been caught because it wasn't being tested. It wasn't being tested because it wasn't in the pipeline system and we didn't have a printing pass to run in tests. This fixes all of that. As for why I'm still keeping the old call graph alive its so that I can port GlobalsAA to the new pass manager with out forking it to work with the lazy call graph. That's clearly the right eventual design, but it seems pragmatic to defer that until its necessary. The old call graph works just fine for GlobalsAA. llvm-svn: 263104
Diffstat (limited to 'llvm/lib/Analysis/CallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/CallGraph.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/CallGraph.cpp b/llvm/lib/Analysis/CallGraph.cpp
index 235d0f61263..594e886e539 100644
--- a/llvm/lib/Analysis/CallGraph.cpp
+++ b/llvm/lib/Analysis/CallGraph.cpp
@@ -259,6 +259,12 @@ void CallGraphNode::replaceCallEdge(CallSite CS,
}
}
+PreservedAnalyses CallGraphPrinterPass::run(Module &M,
+ AnalysisManager<Module> *AM) {
+ AM->getResult<CallGraphAnalysis>(M).print(OS);
+ return PreservedAnalyses::all();
+}
+
//===----------------------------------------------------------------------===//
// Out-of-line definitions of CallGraphAnalysis class members.
//
OpenPOWER on IntegriCloud