[llvm-commits] [poolalloc] r73769 - in /poolalloc/trunk: runtime/FL2Allocator/PoolAllocator.cpp tools/Pa/pa.cpp

John Criswell criswell at uiuc.edu
Fri Jun 19 10:03:53 PDT 2009


Author: criswell
Date: Fri Jun 19 12:03:36 2009
New Revision: 73769

URL: http://llvm.org/viewvc/llvm-project?rev=73769&view=rev
Log:
Modified code to remove compilation warnings.
No functionality changes (I hope).

Modified:
    poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp
    poolalloc/trunk/tools/Pa/pa.cpp

Modified: poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp?rev=73769&r1=73768&r2=73769&view=diff

==============================================================================
--- poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp (original)
+++ poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp Fri Jun 19 12:03:36 2009
@@ -372,13 +372,13 @@
   Pool->ObjFreeList = 0;     // This is our bump pointer.
   Pool->OtherFreeList = 0;   // This is our end pointer.
 
-  unsigned PID;
 #ifdef ENABLE_POOL_IDS
+  unsigned PID;
   PID = addPoolNumber(Pool);
-#endif
 
   DO_IF_TRACE(fprintf(stderr, "[%d] poolinit_bp(0x%X, %d)\n",
                       PID, Pool, ObjAlignment));
+#endif
   DO_IF_PNP(++PoolsInited);  // Track # pools initialized
   DO_IF_PNP(InitPrintNumPools<NormalPoolTraits>());
 }
@@ -435,11 +435,11 @@
 void pooldestroy_bp(PoolTy<NormalPoolTraits> *Pool) {
   assert(Pool && "Null pool pointer passed in to pooldestroy!\n");
 
-  unsigned PID;
 #ifdef ENABLE_POOL_IDS
+  unsigned PID;
   PID = removePoolNumber(Pool);
-#endif
   DO_IF_TRACE(fprintf(stderr, "[%d] pooldestroy_bp", PID));
+#endif
   DO_IF_POOLDESTROY_STATS(PrintPoolStats(Pool));
 
   // Free all allocated slabs.
@@ -494,13 +494,13 @@
 
   Pool->DeclaredSize = DeclaredSize;
 
-  unsigned PID;
 #ifdef ENABLE_POOL_IDS
+  unsigned PID;
   PID = addPoolNumber(Pool);
-#endif
   DO_IF_TRACE(fprintf(stderr, "[%d] poolinit%s(0x%X, %d, %d)\n",
                       PID, PoolTraits::getSuffix(),
                       Pool, DeclaredSize, ObjAlignment));
+#endif
   DO_IF_PNP(++PoolsInited);  // Track # pools initialized
   DO_IF_PNP(InitPrintNumPools<PoolTraits>());
 }
@@ -515,11 +515,11 @@
 void pooldestroy(PoolTy<NormalPoolTraits> *Pool) {
   assert(Pool && "Null pool pointer passed in to pooldestroy!\n");
 
-  unsigned PID;
 #ifdef ENABLE_POOL_IDS
+  unsigned PID;
   PID = removePoolNumber(Pool);
-#endif
   DO_IF_TRACE(fprintf(stderr, "[%d] pooldestroy", PID));
+#endif
   DO_IF_POOLDESTROY_STATS(PrintPoolStats(Pool));
 
   // Free all allocated slabs.
@@ -946,11 +946,11 @@
   if (Pool->Slabs == 0)
     return;   // no memory allocated from this pool.
 
-  unsigned PID;
 #ifdef ENABLE_POOL_IDS
+  unsigned PID;
   PID = removePoolNumber(Pool);
-#endif
   DO_IF_TRACE(fprintf(stderr, "[%d] pooldestroy_pc", PID));
+#endif
   DO_IF_POOLDESTROY_STATS(PrintPoolStats(Pool));
 
   // If there is space to remember this pool, do so.
@@ -1028,7 +1028,6 @@
 
 void poolaccesstrace(void *Ptr, void *PD) {
   static unsigned Time = ~0U;
-  static void *LastPtr = 0;
 
   // Not pool memory?
   if (PD == 0) return;

Modified: poolalloc/trunk/tools/Pa/pa.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/tools/Pa/pa.cpp?rev=73769&r1=73768&r2=73769&view=diff

==============================================================================
--- poolalloc/trunk/tools/Pa/pa.cpp (original)
+++ poolalloc/trunk/tools/Pa/pa.cpp Fri Jun 19 12:03:36 2009
@@ -85,7 +85,6 @@
       std::cerr << argv[0] << ": bytecode didn't read correctly.\n";
       return 1;
     }
-    Module &mod = *M.get();
 
     // Build up all of the passes that we want to do to the module...
     PassManager Passes;





More information about the llvm-commits mailing list