[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp CompleteBottomUp.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Jan 27 15:51:05 PST 2004


Changes in directory llvm/lib/Analysis/DataStructure:

BottomUpClosure.cpp updated: 1.71 -> 1.72
CompleteBottomUp.cpp updated: 1.4 -> 1.5

---
Log message:

Get clone flags right, so we don't build InlinedGlobals only to clear them


---
Diffs of the changes:  (+5 -8)

Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.71 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.72
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.71	Thu Jan 22 19:44:52 2004
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp	Tue Jan 27 15:50:41 2004
@@ -187,8 +187,7 @@
       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 @@
     }
 
     // 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 @@
             << 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 @@
 
   // 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


Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp
diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.4 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.5
--- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.4	Thu Jan 22 19:44:53 2004
+++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp	Tue Jan 27 15:50:41 2004
@@ -141,8 +141,7 @@
     ValMap[NG] = ~0U;
 
     DSGraph::NodeMapTy NodeMap;
-    FG.cloneInto(*NG, FG.getScalarMap(), FG.getReturnNodes(), NodeMap,
-                 DSGraph::UpdateInlinedGlobals);
+    FG.cloneInto(*NG, FG.getScalarMap(), FG.getReturnNodes(), NodeMap);
 
     // Update the DSInfo map and delete the old graph...
     for (DSGraph::ReturnNodesTy::iterator I = NG->getReturnNodes().begin();
@@ -194,7 +193,7 @@
 
   // Re-materialize nodes from the globals graph.
   // Do not ignore globals inlined from callees -- they are not up-to-date!
-  G.getInlinedGlobals().clear();
+  assert(G.getInlinedGlobals().empty());
   G.updateFromGlobalGraph();
 
   // Recompute the Incomplete markers





More information about the llvm-commits mailing list