[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp PointerCompress.cpp PoolAllocate.cpp PoolOptimize.cpp TransformFunctionBody.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Jan 25 14:07:48 PST 2006
Changes in directory llvm-poolalloc/lib/PoolAllocate:
AccessTrace.cpp updated: 1.3 -> 1.4
PointerCompress.cpp updated: 1.64 -> 1.65
PoolAllocate.cpp updated: 1.122 -> 1.123
PoolOptimize.cpp updated: 1.5 -> 1.6
TransformFunctionBody.cpp updated: 1.49 -> 1.50
---
Log message:
silence some gcc warnings
---
Diffs of the changes: (+29 -26)
AccessTrace.cpp | 4 ++--
PointerCompress.cpp | 8 ++++----
PoolAllocate.cpp | 17 +++++++++--------
PoolOptimize.cpp | 24 +++++++++++++-----------
TransformFunctionBody.cpp | 2 +-
5 files changed, 29 insertions(+), 26 deletions(-)
Index: llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp:1.3 llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp:1.4
--- llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp:1.3 Wed May 18 14:56:28 2005
+++ llvm-poolalloc/lib/PoolAllocate/AccessTrace.cpp Wed Jan 25 16:07:36 2006
@@ -61,9 +61,9 @@
VoidPtrTy = PointerType::get(Type::SByteTy);
AccessTraceInitFn = M.getOrInsertFunction("poolaccesstraceinit",
- Type::VoidTy,0);
+ Type::VoidTy,NULL);
PoolAccessTraceFn = M.getOrInsertFunction("poolaccesstrace", Type::VoidTy,
- VoidPtrTy, VoidPtrTy, 0);
+ VoidPtrTy, VoidPtrTy, NULL);
}
void PoolAccessTrace::InstrumentAccess(Instruction *I, Value *Ptr,
Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.64 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.65
--- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.64 Tue Jan 24 14:41:19 2006
+++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp Wed Jan 25 16:07:36 2006
@@ -899,7 +899,7 @@
const DSGraph *CG = 0;
Function *Callee = CI.getCalledFunction();
if (Callee)
- if (FI = PtrComp.getPoolAlloc()->getFuncInfoOrClone(*Callee))
+ if ((FI = PtrComp.getPoolAlloc()->getFuncInfoOrClone(*Callee)))
CG = &PtrComp.getGraphForFunc(FI);
if (!Callee) {
@@ -1415,11 +1415,11 @@
const Type *PoolDescPtrTy = PointerType::get(ArrayType::get(VoidPtrTy, 16));
PoolInitPC = M.getOrInsertFunction("poolinit_pc", VoidPtrTy, PoolDescPtrTy,
- Type::UIntTy, Type::UIntTy, 0);
+ Type::UIntTy, Type::UIntTy, NULL);
PoolDestroyPC = M.getOrInsertFunction("pooldestroy_pc", Type::VoidTy,
- PoolDescPtrTy, 0);
+ PoolDescPtrTy, NULL);
PoolAllocPC = M.getOrInsertFunction("poolalloc_pc", SCALARUINTTYPE,
- PoolDescPtrTy, Type::UIntTy, 0);
+ PoolDescPtrTy, Type::UIntTy, NULL);
// FIXME: Need bumppointer versions as well as realloc??/memalign??
}
Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.122 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.123
--- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.122 Tue Jan 24 14:41:19 2006
+++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp Wed Jan 25 16:07:36 2006
@@ -182,37 +182,38 @@
// Get poolinit function.
PoolInit = CurModule->getOrInsertFunction("poolinit", Type::VoidTy,
PoolDescPtrTy, Type::UIntTy,
- Type::UIntTy, 0);
+ Type::UIntTy, NULL);
// Get pooldestroy function.
PoolDestroy = CurModule->getOrInsertFunction("pooldestroy", Type::VoidTy,
- PoolDescPtrTy, 0);
+ PoolDescPtrTy, NULL);
// The poolalloc function.
PoolAlloc = CurModule->getOrInsertFunction("poolalloc",
VoidPtrTy, PoolDescPtrTy,
- Type::UIntTy, 0);
+ Type::UIntTy, NULL);
// The poolrealloc function.
PoolRealloc = CurModule->getOrInsertFunction("poolrealloc",
VoidPtrTy, PoolDescPtrTy,
- VoidPtrTy, Type::UIntTy, 0);
+ VoidPtrTy, Type::UIntTy, NULL);
// The poolmemalign function.
PoolMemAlign = CurModule->getOrInsertFunction("poolmemalign",
VoidPtrTy, PoolDescPtrTy,
- Type::UIntTy, Type::UIntTy, 0);
+ Type::UIntTy, Type::UIntTy,
+ NULL);
// Get the poolfree function.
PoolFree = CurModule->getOrInsertFunction("poolfree", Type::VoidTy,
- PoolDescPtrTy, VoidPtrTy, 0);
+ PoolDescPtrTy, VoidPtrTy, NULL);
#ifdef SAFECODE
//Get the poolregister function
PoolRegister = CurModule->getOrInsertFunction("poolregister", Type::VoidTy,
- PoolDescPtrTy, Type::UIntTy, VoidPtrTy, 0);
+ PoolDescPtrTy, Type::UIntTy, VoidPtrTy, NULL);
#endif
#ifdef BOUNDS_CHECK
PoolRegister = CurModule->getOrInsertFunction("poolregister", Type::VoidTy,
- PoolDescPtrTy, VoidPtrTy, Type::UIntTy, 0);
+ PoolDescPtrTy, VoidPtrTy, Type::UIntTy, NULL);
#endif
}
Index: llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp:1.5 llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp:1.6
--- llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp:1.5 Wed May 18 14:56:28 2005
+++ llvm-poolalloc/lib/PoolAllocate/PoolOptimize.cpp Wed Jan 25 16:07:36 2006
@@ -44,50 +44,52 @@
// Get poolinit function.
Function *PoolInit = M.getOrInsertFunction("poolinit", Type::VoidTy,
PoolDescPtrTy, Type::UIntTy,
- Type::UIntTy, 0);
+ Type::UIntTy, NULL);
// Get pooldestroy function.
Function *PoolDestroy = M.getOrInsertFunction("pooldestroy", Type::VoidTy,
- PoolDescPtrTy, 0);
+ PoolDescPtrTy, NULL);
// The poolalloc function.
Function *PoolAlloc = M.getOrInsertFunction("poolalloc",
VoidPtrTy, PoolDescPtrTy,
- Type::UIntTy, 0);
+ Type::UIntTy, NULL);
// The poolrealloc function.
Function *PoolRealloc = M.getOrInsertFunction("poolrealloc",
VoidPtrTy, PoolDescPtrTy,
- VoidPtrTy, Type::UIntTy, 0);
+ VoidPtrTy, Type::UIntTy, NULL);
// The poolmemalign function.
Function *PoolMemAlign = M.getOrInsertFunction("poolmemalign",
VoidPtrTy, PoolDescPtrTy,
- Type::UIntTy, Type::UIntTy, 0);
+ Type::UIntTy, Type::UIntTy,
+ NULL);
// Get the poolfree function.
Function *PoolFree = M.getOrInsertFunction("poolfree", Type::VoidTy,
- PoolDescPtrTy, VoidPtrTy, 0);
+ PoolDescPtrTy, VoidPtrTy, NULL);
// Get poolinit_bp function.
Function *PoolInitBP = M.getOrInsertFunction("poolinit_bp", Type::VoidTy,
- PoolDescPtrTy, Type::UIntTy, 0);
+ PoolDescPtrTy, Type::UIntTy,
+ NULL);
// Get pooldestroy_bp function.
Function *PoolDestroyBP = M.getOrInsertFunction("pooldestroy_bp",Type::VoidTy,
- PoolDescPtrTy, 0);
+ PoolDescPtrTy, NULL);
// The poolalloc_bp function.
Function *PoolAllocBP = M.getOrInsertFunction("poolalloc_bp",
VoidPtrTy, PoolDescPtrTy,
- Type::UIntTy, 0);
+ Type::UIntTy, NULL);
Function *Realloc = M.getOrInsertFunction("realloc",
VoidPtrTy, VoidPtrTy, Type::UIntTy,
- 0);
+ NULL);
Function *MemAlign = M.getOrInsertFunction("memalign",
VoidPtrTy, Type::UIntTy,
- Type::UIntTy, 0);
+ Type::UIntTy, NULL);
// Optimize poolreallocs
Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.49 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.50
--- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.49 Thu Dec 22 11:49:34 2005
+++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Wed Jan 25 16:07:36 2006
@@ -315,7 +315,7 @@
Type::VoidTy,
PointerType::get(Type::SByteTy),
Type::UByteTy, Type::UIntTy,
- Type::UIntTy, 0);
+ Type::UIntTy, NULL);
if (Ptr->getType() != PointerType::get(Type::SByteTy))
Ptr = new CastInst(Ptr, PointerType::get(Type::SByteTy), Ptr->getName(),
More information about the llvm-commits
mailing list