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

John Criswell criswell at uiuc.edu
Tue Oct 5 09:50:52 PDT 2010


Author: criswell
Date: Tue Oct  5 11:50:51 2010
New Revision: 115630

URL: http://llvm.org/viewvc/llvm-project?rev=115630&view=rev
Log:
Removed dead code.
Also, I want to note something that I didn't mention in the last commit: a
local DSNode doesn't get a global pool just because it is incomplete anymore.
If using EQBU, function parameters are incomplete because they come from the
caller, but they shouldn't get global pools because the pools will be passed in.

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

Modified: poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp?rev=115630&r1=115629&r2=115630&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp Tue Oct  5 11:50:51 2010
@@ -339,37 +339,6 @@
     }
   }
 
-#if 0
-  //
-  // We do not want to create pools for all memory objects reachable from
-  // globals.  We only want those that are or could be heap objects.
-  //
-  std::vector<const DSNode *> toRemove;
-  for (DenseSet<const DSNode*>::iterator I = GlobalHeapNodes.begin(),
-         E = GlobalHeapNodes.end(); I != E; ) {
-    DenseSet<const DSNode*>::iterator Last = I; ++I;
-
-    //
-    // Nodes that escape to external code could be reachable from globals.
-    // Nodes that are incomplete could be heap nodes.
-    // Unknown nodes could be anything.
-    //
-    const DSNode *tmp = *Last;
-    if (!(tmp->isHeapNode() ||
-          tmp->isExternalNode() ||
-          tmp->isIncompleteNode() ||
-          tmp->isUnknownNode()))
-      toRemove.push_back (tmp);
-  }
-  
-  //
-  // Remove all globally reachable DSNodes which do not require pools.
-  //
-  for (unsigned index = 0; index < toRemove.size(); ++index) {
-    GlobalHeapNodes.erase(toRemove[index]);
-  }
-#endif
-
   //
   // Scan through all the local graphs looking for DSNodes which may be
   // reachable by a global.  These nodes may not end up in the globals graph 





More information about the llvm-commits mailing list