diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-08-16 06:35:19 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-08-16 06:35:19 +0000 |
commit | 5efd530cbcd7595715d75593c94a01176ecc5cb8 (patch) | |
tree | 851dab9aadb2592cc1b914530258149210b43ea2 /llvm/lib | |
parent | 1a59e49f3caeacf5d8525351ac361abb56bc8fb1 (diff) | |
download | bcm5719-llvm-5efd530cbcd7595715d75593c94a01176ecc5cb8.tar.gz bcm5719-llvm-5efd530cbcd7595715d75593c94a01176ecc5cb8.zip |
Revert r244127: [PM] Remove a failed attempt to port the CallGraph
analysis ...
It turns out that we *do* need the old CallGraph ported to the new pass
manager. There are times where this model of a call graph is really
superior to the one provided by the LazyCallGraph. For example,
GlobalsModRef very specifically needs the model provided by CallGraph.
While here, I've tried to make the move semantics actually work. =]
llvm-svn: 245170
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/IPA/CallGraph.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp index 46c044a3843..083b22d0170 100644 --- a/llvm/lib/Analysis/IPA/CallGraph.cpp +++ b/llvm/lib/Analysis/IPA/CallGraph.cpp @@ -32,6 +32,15 @@ CallGraph::CallGraph(Module &M) Root = ExternalCallingNode; } +CallGraph::CallGraph(CallGraph &&Arg) + : M(Arg.M), FunctionMap(std::move(Arg.FunctionMap)), Root(Arg.Root), + ExternalCallingNode(Arg.ExternalCallingNode), + CallsExternalNode(std::move(Arg.CallsExternalNode)) { + Arg.FunctionMap.clear(); + Arg.Root = nullptr; + Arg.ExternalCallingNode = nullptr; +} + CallGraph::~CallGraph() { // CallsExternalNode is not in the function map, delete it explicitly. if (CallsExternalNode) @@ -253,6 +262,12 @@ void CallGraphNode::replaceCallEdge(CallSite CS, } //===----------------------------------------------------------------------===// +// Out-of-line definitions of CallGraphAnalysis class members. +// + +char CallGraphAnalysis::PassID; + +//===----------------------------------------------------------------------===// // Implementations of the CallGraphWrapperPass class methods. // |