[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 10 18:49:02 PST 2003
Changes in directory poolalloc/lib/PoolAllocate:
PoolAllocate.cpp updated: 1.43 -> 1.44
---
Log message:
Fix problem handling invoke instrs
---
Diffs of the changes: (+6 -5)
Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.43 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.44
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.43 Mon Nov 10 14:52:05 2003
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 18:47:53 2003
@@ -576,14 +576,15 @@
void PoolAllocate::CalculateLivePoolFreeBlocks(std::set<BasicBlock*>&LiveBlocks,
Value *PD) {
for (Value::use_iterator I = PD->use_begin(), E = PD->use_end(); I != E; ++I){
- // The only users of the pool should be call instructions.
- CallInst *U = cast<CallInst>(*I);
- if (U->getCalledValue() != PoolFree && U->getCalledValue() != PoolDestroy) {
+ // The only users of the pool should be call & invoke instructions.
+ CallSite U = CallSite::get(*I);
+ if (U.getCalledValue() != PoolFree && U.getCalledValue() != PoolDestroy) {
// This block and every block that can reach this block must keep pool
// frees.
for (idf_ext_iterator<BasicBlock*, std::set<BasicBlock*> >
- DI = idf_ext_begin(U->getParent(), LiveBlocks),
- DE = idf_ext_end(U->getParent(), LiveBlocks); DI != DE; ++DI)
+ DI = idf_ext_begin(U.getInstruction()->getParent(), LiveBlocks),
+ DE = idf_ext_end(U.getInstruction()->getParent(), LiveBlocks);
+ DI != DE; ++DI)
/* empty */;
}
}
More information about the llvm-commits
mailing list