[llvm-commits] [poolalloc] r57516 - in /poolalloc/trunk: include/poolalloc_runtime/PoolAllocator.h lib/PoolAllocate/PoolAllocate.cpp lib/PoolAllocate/PoolOptimize.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Tue Oct 14 12:19:53 PDT 2008


Author: alenhar2
Date: Tue Oct 14 14:19:49 2008
New Revision: 57516

URL: http://llvm.org/viewvc/llvm-project?rev=57516&view=rev
Log:
silence some gcc warnings

Modified:
    poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h
    poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
    poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp

Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57516&r1=57515&r2=57516&view=diff

==============================================================================
--- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (original)
+++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Tue Oct 14 14:19:49 2008
@@ -13,22 +13,22 @@
     {}
     
     
-    //In-place new operator
-    static void* operator new( std::size_t s, void* p ) throw() {
-      return p;
-    }
+  //In-place new operator
+  static void* operator new( std::size_t s, void* p ) throw() {
+    return p;
+  }
     
-    //Allocate an object of size objsize
-    void* alloc() {
-      return slab_alloc(1);
-    }
+  //Allocate an object of size objsize
+  void* alloc() {
+    return slab_alloc(1);
+  }
     
-    //Allocate an array with num objects of size objsize
-    void* alloc_array(unsigned num) {
-      return slab_alloc(num);
-    }
+  //Allocate an array with num objects of size objsize
+  void* alloc_array(unsigned num) {
+    return slab_alloc(num);
+  }
     
-    //Free allocated object
+  //Free allocated object
   void dealloc(void* obj) {
     slab_free(obj);
   }

Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=57516&r1=57515&r2=57516&view=diff

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Tue Oct 14 14:19:49 2008
@@ -70,7 +70,7 @@
   STATISTIC (NumTSPools  , "Number of typesafe pools");
   STATISTIC (NumPoolFree , "Number of poolfree's elided");
   STATISTIC (NumNonprofit, "Number of DSNodes not profitable");
-  STATISTIC (NumColocated, "Number of DSNodes colocated");
+  //  STATISTIC (NumColocated, "Number of DSNodes colocated");
 
   const Type *VoidPtrTy;
 

Modified: poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp?rev=57516&r1=57515&r2=57516&view=diff

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp Tue Oct 14 14:19:49 2008
@@ -43,11 +43,12 @@
   // Get the Function out of the constant
   Function * F;
   ConstantExpr * CE;
-  if (!(F=dyn_cast<Function>(C)))
+  if (!(F=dyn_cast<Function>(C))) {
     if ((CE = dyn_cast<ConstantExpr>(C)) && (CE->isCast()))
       F = dyn_cast<Function>(CE->getOperand(0));
     else
       assert (0 && "Constant is not a Function of ConstantExpr!"); 
+  }
   Calls.clear();
   for (Value::use_iterator UI = F->use_begin(), E = F->use_end(); UI != E; ++UI)
     Calls.push_back(cast<CallInst>(*UI));





More information about the llvm-commits mailing list