mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Propagate globals graph from the local to bu to td globals graphs. This
fixes bug: DSGraph/buglobals.ll llvm-svn: 6947
This commit is contained in:
parent
801e22514d
commit
1352a50cbb
@ -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();
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user