[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 10 13:01:01 PST 2003


Changes in directory poolalloc/lib/PoolAllocate:

PoolAllocate.cpp updated: 1.38 -> 1.39
TransformFunctionBody.cpp updated: 1.6 -> 1.7

---
Log message:

Pool allocate collapsed nodes!


---
Diffs of the changes:  (+3 -31)

Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.38 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.39
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.38	Mon Nov 10 12:09:42 2003
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp	Mon Nov 10 13:00:32 2003
@@ -178,9 +178,6 @@
       ProcessFunctionBody(*I, FI != FuncMap.end() ? *FI->second : *I);
     }
 
-  if (CollapseFlag)
-    std::cerr << "Pool Allocation successful!"
-              << " However all data structures may not be pool allocated\n";
   return true;
 }
 


Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp
diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.6 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.7
--- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.6	Mon Nov 10 12:09:07 2003
+++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp	Mon Nov 10 13:00:32 2003
@@ -91,35 +91,11 @@
       return G.getScalarMap()[V];
     }
 
-    DSNodeHandle& getTDDSNodeHFor(Value *V) {
-      if (!FI.NewToOldValueMap.empty()) {
-        // If the NewToOldValueMap is in effect, use it.
-        std::map<Value*,const Value*>::iterator I = FI.NewToOldValueMap.find(V);
-        if (I != FI.NewToOldValueMap.end())
-          V = (Value*)I->second;
-      }
-
-      return TDG.getScalarMap()[V];
-    }
-
     Value *getPoolHandle(Value *V) {
       DSNode *Node = getDSNodeHFor(V).getNode();
       // Get the pool handle for this DSNode...
       std::map<DSNode*, Value*>::iterator I = FI.PoolDescriptors.find(Node);
-
-      if (I != FI.PoolDescriptors.end()) {
-	// Check that the node pointed to by V in the TD DS graph is not
-	// collapsed
-	DSNode *TDNode = getTDDSNodeHFor(V).getNode();
-	if (TDNode && TDNode->getType() != Type::VoidTy)
-	  return I->second;
-
-        PAInfo.CollapseFlag = 1;
-        return 0;
-      }
-      else
-	return 0;
-	  
+      return I != FI.PoolDescriptors.end() ? I->second : 0;
     }
     
     bool isFuncPtr(Value *V);
@@ -167,9 +143,8 @@
 
   // if V is not a constant
   DSNode *DSN = TDG.getNodeForValue(V).getNode();
-  if (!DSN) {
-    return 0;
-  }
+  if (!DSN) return 0;
+
   const std::vector<GlobalValue*> &Callees = DSN->getGlobals();
   if (Callees.size() > 0) {
     Function *calledF = dyn_cast<Function>(*Callees.begin());





More information about the llvm-commits mailing list