aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-09 21:12:07 +0000
committerChris Lattner <sabre@nondot.org>2002-11-09 21:12:07 +0000
commitaa0b468f6d0e4d30d4f31d528d499e4c9a67c4f2 (patch)
treeb0c006082bbc026983e495353411933f150e0872 /lib/Analysis/DataStructure/Local.cpp
parentdc26d45c710fda254b235852dc830f4b2e4bcb03 (diff)
Add globals graphs to all three passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index e159a6087e..311810644a 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -409,6 +409,16 @@ void GraphBuilder::visitCastInst(CastInst &CI) {
// LocalDataStructures Implementation
//===----------------------------------------------------------------------===//
+bool LocalDataStructures::run(Module &M) {
+ GlobalsGraph = new DSGraph();
+
+ // Calculate all of the graphs...
+ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
+ if (!I->isExternal())
+ DSInfo.insert(std::make_pair(I, new DSGraph(*I, GlobalsGraph)));
+ return false;
+}
+
// releaseMemory - If the pass pipeline is done with this pass, we can release
// our memory... here...
//
@@ -423,13 +433,3 @@ void LocalDataStructures::releaseMemory() {
delete GlobalsGraph;
GlobalsGraph = 0;
}
-
-bool LocalDataStructures::run(Module &M) {
- GlobalsGraph = new DSGraph();
-
- // Calculate all of the graphs...
- for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
- if (!I->isExternal())
- DSInfo.insert(std::make_pair(I, new DSGraph(*I, GlobalsGraph)));
- return false;
-}