Propagate globals graph from the local to bu to td globals graphs. This
fixes bug: DSGraph/buglobals.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6947 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 9f50436..4592867 100644
--- a/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/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();