[llvm-commits] [poolalloc] r120529 - /poolalloc/trunk/lib/DSA/DSGraph.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Tue Nov 30 18:03:41 PST 2010
Author: aggarwa4
Date: Tue Nov 30 20:03:40 2010
New Revision: 120529
URL: http://llvm.org/viewvc/llvm-project?rev=120529&view=rev
Log:
Comments added.
No functionality changes.
Modified:
poolalloc/trunk/lib/DSA/DSGraph.cpp
Modified: poolalloc/trunk/lib/DSA/DSGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DSGraph.cpp?rev=120529&r1=120528&r2=120529&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DSGraph.cpp (original)
+++ poolalloc/trunk/lib/DSA/DSGraph.cpp Tue Nov 30 20:03:40 2010
@@ -1102,6 +1102,8 @@
// from the caller's graph entirely. This is only appropriate to use when
// inlining graphs.
//
+// This function also clones information about globals back into the globals
+// graph before it deletes the nodes.
void DSGraph::removeDeadNodes(unsigned Flags) {
DEBUG(AssertGraphOK(); if (GlobalsGraph) GlobalsGraph->AssertGraphOK());
@@ -1118,10 +1120,14 @@
// Copy and merge all information about globals to the GlobalsGraph if this is
// not a final pass (where unreachable globals are removed).
//
- // Strip all alloca bits since the current function is only for the BU pass.
+ // Strip all alloca bits since we are merging information into the globals
+ // graph.
// Strip all incomplete bits since they are short-lived properties and they
// will be correctly computed when rematerializing nodes into the functions.
//
+ // This code merges information learned about the globals in 'this' graph
+ // back into the globals graph, before it deletes any such global nodes,
+ // (with some new information possibly) from 'this' current function graph.
ReachabilityCloner GGCloner(GlobalsGraph, this, DSGraph::StripAllocaBit |
DSGraph::StripIncompleteBit);
More information about the llvm-commits
mailing list