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

Vikram Adve vadve at cs.uiuc.edu
Wed Jul 16 16:43:01 PDT 2003


Changes in directory llvm/lib/Analysis/DataStructure:

BottomUpClosure.cpp updated: 1.61 -> 1.62

---
Log message:

Rematerialize nodes from the globals graph into the current graph
after all callees are inlined into the current graph.

NOTE: There's also a major bug fix for the BU pass in DataStructure.cpp,
which ensures that resolvable indirect calls are not moved out to the
globals graph, so that they are eventually inlined (if possible).


---
Diffs of the changes:

Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.61 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.62
--- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.61	Wed Jul  2 18:42:48 2003
+++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp	Wed Jul 16 16:42:03 2003
@@ -283,11 +283,17 @@
 
   TempFCs.clear();
 
-  // Recompute the Incomplete markers.  If there are any function calls left
-  // now that are complete, we must loop!
+  // Re-materialize nodes from the globals graph.
+  // Do not ignore globals inlined from callees -- they are not up-to-date!
+  Graph.getInlinedGlobals().clear();
+  Graph.updateFromGlobalGraph();
+
+  // Recompute the Incomplete markers
   Graph.maskIncompleteMarkers();
   Graph.markIncompleteNodes(DSGraph::MarkFormalArgs);
-  // FIXME: materialize nodes from the globals graph as neccesary...
+
+  // Delete dead nodes.  Treat globals that are unreachable but that can
+  // reach live nodes as live.
   Graph.removeDeadNodes(DSGraph::KeepUnreachableGlobals);
 
   //Graph.writeGraphToFile(std::cerr, "bu_" + F.getName());





More information about the llvm-commits mailing list