diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-27 21:50:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-27 21:50:41 +0000 |
commit | 825a02ae360d67326370fbe38ca7137dacd6c2ca (patch) | |
tree | 2d139bfad58582d91ad50066a5b061886f3c4980 /lib/Analysis/DataStructure/BottomUpClosure.cpp | |
parent | 660f1e90ec350509e2d78f9075aad421d9e78941 (diff) |
Get clone flags right, so we don't build InlinedGlobals only to clear them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/BottomUpClosure.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/BottomUpClosure.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp index f207c52352..1406da7738 100644 --- a/lib/Analysis/DataStructure/BottomUpClosure.cpp +++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp @@ -187,8 +187,7 @@ unsigned BUDataStructures::calculateGraphs(Function *F, if (&G != SCCGraph) { DSGraph::NodeMapTy NodeMap; SCCGraph->cloneInto(G, SCCGraph->getScalarMap(), - SCCGraph->getReturnNodes(), NodeMap, - DSGraph::UpdateInlinedGlobals); + SCCGraph->getReturnNodes(), NodeMap); // Update the DSInfo map and delete the old graph... DSInfo[*I] = SCCGraph; delete &G; @@ -196,7 +195,7 @@ unsigned BUDataStructures::calculateGraphs(Function *F, } // Clean up the graph before we start inlining a bunch again... - SCCGraph->removeTriviallyDeadNodes(); + SCCGraph->removeDeadNodes(DSGraph::RemoveUnreachableGlobals); // Now that we have one big happy family, resolve all of the call sites in // the graph... @@ -283,7 +282,6 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() << "+" << Graph.getAuxFunctionCalls().size() << "]\n"); - // Handle self recursion by resolving the arguments and return value Graph.mergeInGraph(CS, *Callee, GI, DSGraph::KeepModRefBits | DSGraph::StripAllocaBit | DSGraph::DontCloneCallNodes); @@ -304,7 +302,7 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) { // Re-materialize nodes from the globals graph. // Do not ignore globals inlined from callees -- they are not up-to-date! - Graph.getInlinedGlobals().clear(); + assert(Graph.getInlinedGlobals().empty()); Graph.updateFromGlobalGraph(); // Recompute the Incomplete markers |