[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 10 14:05:03 PST 2003
Changes in directory poolalloc/lib/PoolAllocate:
PoolAllocate.cpp updated: 1.41 -> 1.42
---
Log message:
Oops, only delete poolfrees which are not in live blocks
---
Diffs of the changes: (+5 -2)
Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.41 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.42
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.41 Mon Nov 10 13:52:23 2003
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 14:04:39 2003
@@ -742,7 +742,10 @@
std::set<std::pair<AllocaInst*, CallInst*> >::iterator PFI =
PoolFrees.lower_bound(std::make_pair(PD, (CallInst*)0));
if (PFI != PoolFrees.end() && PFI->first < PD) ++PFI;
- for (; PFI != PoolFrees.end() && PFI->first == PD; )
- DeleteIfIsPoolFree((PFI++)->second, PD, PoolFrees);
+ for (; PFI != PoolFrees.end() && PFI->first == PD; ) {
+ CallInst *PoolFree = (PFI++)->second;
+ if (!LiveBlocks.count(PoolFree->getParent()))
+ DeleteIfIsPoolFree(PoolFree, PD, PoolFrees);
+ }
}
}
More information about the llvm-commits
mailing list