[llvm-commits] [poolalloc] r115944 - /poolalloc/trunk/lib/DSA/BottomUpClosure.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Thu Oct 7 11:22:29 PDT 2010


Author: aggarwa4
Date: Thu Oct  7 13:22:29 2010
New Revision: 115944

URL: http://llvm.org/viewvc/llvm-project?rev=115944&view=rev
Log:
Changed the order of invocation of BuildCallGraph and RemoveDeadNodes, to ensure, that call graph is complete, and no call site to function call mapping is lost due to the removal of DSCallSites.

Modified:
    poolalloc/trunk/lib/DSA/BottomUpClosure.cpp

Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=115944&r1=115943&r2=115944&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Thu Oct  7 13:22:29 2010
@@ -791,6 +791,13 @@
   Graph->maskIncompleteMarkers();
   Graph->markIncompleteNodes(DSGraph::MarkFormalArgs);
 
+  
+  //
+  // Update the callgraph with the new information that we have gleaned.
+  // NOTE : This must be called before removeDeadNodes, so that no 
+  // information is lost due to deletion of DSCallNodes.
+  Graph->buildCallGraph(callgraph,filterCallees);
+  
   // Delete dead nodes.  Treat globals that are unreachable but that can
   // reach live nodes as live.
   Graph->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
@@ -798,10 +805,6 @@
   cloneIntoGlobals(Graph);
   //Graph.writeGraphToFile(cerr, "bu_" + F.getName());
 
-  //
-  // Update the callgraph with the new information that we have gleaned.
-  //
-  Graph->buildCallGraph(callgraph,filterCallees);
 }
 
 //For Entry Points





More information about the llvm-commits mailing list