[llvm-commits] [poolalloc] r53643 - /poolalloc/branches/SVA/lib/DSA/Local.cpp

John Criswell criswell at uiuc.edu
Tue Jul 15 15:04:53 PDT 2008


Author: criswell
Date: Tue Jul 15 17:04:53 2008
New Revision: 53643

URL: http://llvm.org/viewvc/llvm-project?rev=53643&view=rev
Log:
Changed the pseudo allocator (pseudo_alloc()) to return a pointer to the
allocated memory just like the other heap allocators.

Modified:
    poolalloc/branches/SVA/lib/DSA/Local.cpp

Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Local.cpp?rev=53643&r1=53642&r2=53643&view=diff

==============================================================================
--- poolalloc/branches/SVA/lib/DSA/Local.cpp (original)
+++ poolalloc/branches/SVA/lib/DSA/Local.cpp Tue Jul 15 17:04:53 2008
@@ -348,7 +348,7 @@
   } else if (Constant *C = dyn_cast<Constant>(V)) {
     if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
       std::set<Value*> sources;
-      if (getSourcePointerValues(CE, sources)) {      
+      if (getSourcePointerValues(CE, sources)) {
         NH = createNode();
         for (std::set<Value*>::iterator ii = sources.begin(), ee = sources.end();
              ii != ee; ++ii)
@@ -1510,10 +1510,7 @@
     // allocation functions
     if (AllocList.end() != std::find(AllocList.begin(), AllocList.end(), F->getName())) {
       DSNodeHandle RetNH;
-      if (F->getName() == "pseudo_alloc")
-        RetNH = getValueDest(**CS.arg_begin());
-      else
-        RetNH = getValueDest(*CS.getInstruction());
+      RetNH = getValueDest(*CS.getInstruction());
       RetNH.getNode()->setHeapNodeMarker()->setModifiedMarker();
       RetNH.getNode()->getMP()->addCallSite(CS);
       return;





More information about the llvm-commits mailing list