summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2003-07-16 21:42:03 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2003-07-16 21:42:03 +0000
commitcf01ed5f75c8a47b895aa8da2b78f0283baa0636 (patch)
treedef3ff4a43bad0186e78df09e826cca48cca664d /llvm/lib/Analysis
parent03be4a96f3178558b0b89c490275f0424f5ce56f (diff)
downloadbcm5719-llvm-cf01ed5f75c8a47b895aa8da2b78f0283baa0636.tar.gz
bcm5719-llvm-cf01ed5f75c8a47b895aa8da2b78f0283baa0636.zip
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). llvm-svn: 7189
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 94d0512fd25..aff74ac9206 100644
--- a/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
@@ -283,11 +283,17 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
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());
OpenPOWER on IntegriCloud