[llvm-commits] [poolalloc] r56556 - /poolalloc/trunk/lib/PoolAllocate/PASimple.cpp

John Criswell criswell at uiuc.edu
Wed Sep 24 08:08:18 PDT 2008


Author: criswell
Date: Wed Sep 24 10:08:18 2008
New Revision: 56556

URL: http://llvm.org/viewvc/llvm-project?rev=56556&view=rev
Log:
Removed unneeded header file.
Removed code that promotes stack allocations to heap allocations.  There is
another pass in SAFECode which performs this transform more selectively.

Modified:
    poolalloc/trunk/lib/PoolAllocate/PASimple.cpp

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

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Wed Sep 24 10:08:18 2008
@@ -24,7 +24,6 @@
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Constants.h"
-#include "llvm/ParameterAttributes.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
@@ -192,17 +191,6 @@
         Value* args[] = {TheGlobalPool, AllocSize};
         Instruction* x = CallInst::Create(PoolAlloc, &args[0], &args[2], MI->getName(), ii);
         ii->replaceAllUsesWith(CastInst::createPointerCast(x, ii->getType(), "", ii));
-      } else if (AllocaInst * AI = dyn_cast<AllocaInst>(ii)) {
-#if 0
-        DSNode * Node = ECG.getNodeForValue(AI).getNode();
-        FInfo.PoolDescriptors.insert(std::make_pair(Node,TheGlobalPool));
-        toDelete.push_back(ii);
-        //Fixme: fixup size
-        Value* args[] = {TheGlobalPool, ii->getOperand(0)};
-        Instruction* x = CallInst::Create(PoolAlloc, &args[0], &args[2], AI->getName(), ii);
-        ToFree.push_back(x);
-        ii->replaceAllUsesWith(CastInst::createPointerCast(x, ii->getType(), "", ii));
-#endif
       } else if (CallInst * CI = dyn_cast<CallInst>(ii)) {
         CallSite CS(CI);
         Function *CF = CS.getCalledFunction();





More information about the llvm-commits mailing list