diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-06 18:00:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-06 18:00:49 +0000 |
commit | 8d5a16ca0b3d19fdde3d0d453dd16a9c46395345 (patch) | |
tree | e7e830f9ada578e84975837bf455fd86af078218 /lib/Analysis/IPA/CallGraph.cpp | |
parent | bf4bf53dfd447614a2f4178791a1f6cbd76d8137 (diff) |
Move call graph printing support out of Writer.h into Callgraph.h
remove dead global function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 713c181fbc..5618a747fa 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -1,4 +1,4 @@ -//===- CallGraph.cpp - Build a Module's call graph --------------------------=// +//===- CallGraph.cpp - Build a Module's call graph ------------------------===// // // This file implements call graph construction (from a module), and will // eventually implement call graph serialization and deserialization for @@ -11,7 +11,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/CallGraph.h" -#include "llvm/Analysis/Writer.h" #include "llvm/Module.h" #include "llvm/Method.h" #include "llvm/iOther.h" @@ -19,9 +18,9 @@ #include "llvm/Support/InstIterator.h"// FIXME: CallGraph should use method uses #include "Support/STLExtras.h" #include <algorithm> +#include <iostream> AnalysisID CallGraph::ID(AnalysisID::create<CallGraph>()); -//AnalysisID CallGraph::ID(AnalysisID::template AnalysisID<CallGraph>()); // getNodeFor - Return the node for the specified method or create one if it // does not already exist. @@ -126,22 +125,3 @@ Method *CallGraph::removeMethodFromModule(CallGraphNode *CGN) { return M; } - -// -// Checks if a method contains any call instructions. -// Note that this uses the call graph only if one is provided. -// It does not build the call graph. -// -bool IsLeafMethod(const Method* M, const CallGraph* CG) { - if (CG) { - const CallGraphNode *cgn = (*CG)[M]; - return (cgn->begin() == cgn->end()); - } - - for (const_inst_iterator I = inst_begin(M), E = inst_end(M); I != E; ++I) - if ((*I)->getOpcode() == Instruction::Call) - return false; - return true; -} - - |