[llvm-commits] [poolalloc] r115635 - /poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp

John Criswell criswell at uiuc.edu
Tue Oct 5 10:25:16 PDT 2010


Author: criswell
Date: Tue Oct  5 12:25:16 2010
New Revision: 115635

URL: http://llvm.org/viewvc/llvm-project?rev=115635&view=rev
Log:
Fixed regression; do not create local pools for DSNodes that will have their
pools passed in from the caller.

Modified:
    poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp

Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=115635&r1=115634&r2=115635&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Tue Oct  5 12:25:16 2010
@@ -1085,9 +1085,20 @@
   //
   // Ask the heuristic for the list of DSNodes which should get local pools.
   //
-  CurHeuristic->getLocalPoolNodes (F, FI.NodesToPA);
+  std::vector<const DSNode *> LocalNodes;
+  CurHeuristic->getLocalPoolNodes (F, LocalNodes);
 
   //
+  // Remove from the set all of the DSNodes which are poolallocated in a caller
+  // function.
+  //
+  for (unsigned index = 0; index < LocalNodes.size(); ++index) {
+    if (!(FI.MarkedNodes.count (LocalNodes[index]))) {
+      FI.NodesToPA.push_back (LocalNodes[index]);
+    }
+  }
+  
+  //
   // Add code to create the pools that are local to this function.
   //
   if (!FI.NodesToPA.empty()) {





More information about the llvm-commits mailing list