Propagate globals graph from the local to bu to td globals graphs. This
authorChris Lattner <sabre@nondot.org>
Sat, 28 Jun 2003 22:14:55 +0000 (22:14 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Jun 2003 22:14:55 +0000 (22:14 +0000)
fixes bug: DSGraph/buglobals.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6947 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/BottomUpClosure.cpp
lib/Analysis/DataStructure/TopDownClosure.cpp

index 9f504366b6f8ffcfb639e2b37aba281e5eeaaf62..4592867a4d8dd1fc0814e302336b99da61dd4557 100644 (file)
@@ -17,7 +17,7 @@ namespace {
   Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
   
   RegisterAnalysis<BUDataStructures>
-  X("budatastructure", "Bottom-up Data Structure Analysis Closure");
+  X("budatastructure", "Bottom-up Data Structure Analysis");
 }
 
 using namespace DS;
@@ -120,7 +120,8 @@ public:
 // program.
 //
 bool BUDataStructures::run(Module &M) {
-  GlobalsGraph = new DSGraph();
+  LocalDataStructures &LocalDSA = getAnalysis<LocalDataStructures>();
+  GlobalsGraph = new DSGraph(LocalDSA.getGlobalsGraph());
   GlobalsGraph->setPrintAuxCalls();
 
   Function *MainFunc = M.getMainFunction();
index 3138ada646178441d13c508f45513300f179170b..4058348397b308187100d8fbc3e66f989f2ba5da 100644 (file)
@@ -15,7 +15,7 @@
 
 namespace {
   RegisterAnalysis<TDDataStructures>   // Register the pass
-  Y("tddatastructure", "Top-down Data Structure Analysis Closure");
+  Y("tddatastructure", "Top-down Data Structure Analysis");
 }
 
 // run - Calculate the top down data structure graphs for each function in the
@@ -23,7 +23,7 @@ namespace {
 //
 bool TDDataStructures::run(Module &M) {
   BUDataStructures &BU = getAnalysis<BUDataStructures>();
-  GlobalsGraph = new DSGraph();
+  GlobalsGraph = new DSGraph(BU.getGlobalsGraph());
 
   // Calculate top-down from main...
   if (Function *F = M.getMainFunction())