[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Dec 14 15:16:48 PST 2004
Changes in directory poolalloc/lib/PoolAllocate:
PoolAllocate.cpp updated: 1.95 -> 1.96
---
Log message:
Fix a bug in computation of # typesafe pools
---
Diffs of the changes: (+5 -1)
Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.95 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.96
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.95 Tue Dec 14 14:16:24 2004
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Tue Dec 14 17:16:38 2004
@@ -482,9 +482,13 @@
// later.
if (!IsMain)
PoolDesc = new AllocaInst(PoolDescType, 0, "PD", InsertPoint);
- else
+ else {
PoolDesc = CreateGlobalPool(Pool.PoolSize, Pool.PoolAlignment,
InsertPoint);
+ if (Pool.NodesInPool.size() == 1 &&
+ !Pool.NodesInPool[0]->isNodeCompletelyFolded())
+ ++NumTSPools;
+ }
}
for (unsigned N = 0, e = Pool.NodesInPool.size(); N != e; ++N) {
PoolDescriptors[Pool.NodesInPool[N]] = PoolDesc;
More information about the llvm-commits
mailing list