Propagate globals graph from the local to bu to td globals graphs. This
fixes bug: DSGraph/buglobals.ll
llvm-svn: 6947
diff --git a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 9f50436..4592867 100644
--- a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
@@ -17,7 +17,7 @@
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 @@
// program.
//
bool BUDataStructures::run(Module &M) {
- GlobalsGraph = new DSGraph();
+ LocalDataStructures &LocalDSA = getAnalysis<LocalDataStructures>();
+ GlobalsGraph = new DSGraph(LocalDSA.getGlobalsGraph());
GlobalsGraph->setPrintAuxCalls();
Function *MainFunc = M.getMainFunction();