[llvm-commits] [poolalloc] r116708 - /poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
John Criswell
criswell at uiuc.edu
Mon Oct 18 09:18:05 PDT 2010
Author: criswell
Date: Mon Oct 18 11:18:05 2010
New Revision: 116708
URL: http://llvm.org/viewvc/llvm-project?rev=116708&view=rev
Log:
Removed dead code.
Added a comment on why our calloc() handling is incorrect (I think).
No functionality changes.
Modified:
poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=116708&r1=116707&r2=116708&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Mon Oct 18 11:18:05 2010
@@ -317,6 +317,13 @@
}
void FuncTransform::visitAllocaInst(AllocaInst &MI) {
+#if 0
+ if (MI.getType() != PoolAllocate::PoolDescPtrTy) {
+ Value *PH = getPoolHandle(&MI);
+ assert (PH && "Alloca has no pool handle!\n");
+ }
+#endif
+
// FIXME: We should remove SAFECode-specific functionality (and comments)
// SAFECode will register alloca instructions with the run-time, so do not
// do that here.
@@ -450,6 +457,8 @@
const Type* Int32Type = Type::getInt32Ty(CS.getInstruction()->getContext());
const Type* Int64Type = Type::getInt64Ty(CS.getInstruction()->getContext());
+ // FIXME: This transform is not correct; calloc does not zero the memory
+ // if NULL is returned.
// FIXME: Ensure that we use 32/64-bit object length sizes consistently
// FIXME: Rename 'useLong' to something more descriptive?
// FIXME: Introduce 'ObjectAllocationSize' variable
More information about the llvm-commits
mailing list