[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
Dinakar Dhurjati
dhurjati at cs.uiuc.edu
Thu Dec 22 09:49:45 PST 2005
Changes in directory llvm-poolalloc/lib/PoolAllocate:
TransformFunctionBody.cpp updated: 1.48 -> 1.49
---
Log message:
*** empty log message ***
---
Diffs of the changes: (+2 -4)
TransformFunctionBody.cpp | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.48 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.49
--- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.48 Thu Dec 22 10:33:29 2005
+++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Thu Dec 22 11:49:34 2005
@@ -592,16 +592,14 @@
#ifdef BOUNDS_CHECK
if (ArgNodes[i]->isArray()) {
#endif
- if (1) {
- //Dinakar we need pooldescriptors for allocas in the callee if it escapes
+ if (!isa<InvokeInst>(TheCall)) {
+ //Dinakar we need pooldescriptors for allocas in the callee if it escapes
BasicBlock::iterator InsertPt = TheCall->getParent()->getParent()->front().begin();
Type *VoidPtrTy = PointerType::get(Type::SByteTy);
ArgVal = new AllocaInst(ArrayType::get(VoidPtrTy, 16), 0, "PD", InsertPt);
Value *ElSize = ConstantUInt::get(Type::UIntTy,0);
Value *Align = ConstantUInt::get(Type::UIntTy,0);
new CallInst(PAInfo.PoolInit, make_vector(ArgVal, ElSize, Align, 0),"", TheCall);
- //UGLY HACK this won't release some memory
- if (!isa<InvokeInst>(TheCall))
new CallInst(PAInfo.PoolDestroy, make_vector(ArgVal, 0), "",
TheCall->getNext());
}
More information about the llvm-commits
mailing list