[llvm-commits] [poolalloc] r76067 - in /poolalloc/trunk/lib/PoolAllocate: PoolAllocate.cpp PoolOptimize.cpp TransformFunctionBody.cpp

John Criswell criswell at uiuc.edu
Thu Jul 16 08:10:58 PDT 2009


Author: criswell
Date: Thu Jul 16 10:10:48 2009
New Revision: 76067

URL: http://llvm.org/viewvc/llvm-project?rev=76067&view=rev
Log:
Updated to new LLVM API from SVN Revision 76039.

Modified:
    poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
    poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp
    poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp

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

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Thu Jul 16 10:10:48 2009
@@ -668,7 +668,7 @@
       // Create a pool descriptor for the pool.  The poolinit will be inserted
       // later.
       if (!IsMain) {
-        PoolDesc = new AllocaInst(*Context, PoolDescType, 0, "PD", InsertPoint);
+        PoolDesc = new AllocaInst(PoolDescType, 0, "PD", InsertPoint);
 
         // Create a node in DSG to represent the new alloca.
         DSNode *NewNode = DSG->addObjectToGraph(PoolDesc);

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

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp Thu Jul 16 10:10:48 2009
@@ -151,7 +151,7 @@
     // poolalloc(null, X) -> malloc(X)
     if (isa<Constant>(CI->getOperand(1)) && 
         cast<Constant>(CI->getOperand(1))->isNullValue()) {
-      Value *New = new MallocInst(*Context, Type::Int8Ty, CI->getOperand(2),
+      Value *New = new MallocInst(Type::Int8Ty, CI->getOperand(2),
                                   CI->getName(), CI);
       CI->replaceAllUsesWith(New);
       CI->eraseFromParent();

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

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Thu Jul 16 10:10:48 2009
@@ -739,8 +739,7 @@
           // Dinakar: We need pooldescriptors for allocas in the callee if it
           //          escapes
           BasicBlock::iterator InsertPt = TheCall->getParent()->getParent()->front().begin();
-          ArgVal =  new AllocaInst(getGlobalContext(),
-                                   PAInfo.getPoolType(),
+          ArgVal =  new AllocaInst(PAInfo.getPoolType(),
                                    0,
                                    "PD",
                                    InsertPt);





More information about the llvm-commits mailing list