[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 2 23:34:40 PST 2004


Changes in directory poolalloc/lib/PoolAllocate:

PoolAllocate.cpp updated: 1.66 -> 1.67

---
Log message:

Tweak heuristics


---
Diffs of the changes:  (+8 -1)

Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.66 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.67
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.66	Fri Mar  5 09:09:56 2004
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp	Fri Apr  2 14:32:56 2004
@@ -565,7 +565,7 @@
     case AllNodes: break;
     case NoNodes: ShouldPoolAlloc = false; break;
     case SmartCoallesceNodes:
-#if 0
+#if 1
       if ((*I)->isArray() && !(*I)->isNodeCompletelyFolded())
         ShouldPoolAlloc = false;
 #endif
@@ -693,6 +693,13 @@
         
           // Update the PoolDescriptors map
           PoolDescriptors.insert(std::make_pair(N, AI));
+#if 1
+        } else if (N->isArray() && !N->isNodeCompletelyFolded()) {
+          // We never pool allocate array nodes.
+          PoolDescriptors[N] =
+            Constant::getNullValue(PointerType::get(PoolDescType));
+          ++NumNonprofit;
+#endif
         } else {
           // Otherwise the node is not self recursive.  If the node is not an
           // array, we can co-locate it with the pool of a predecessor node if





More information about the llvm-commits mailing list