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

Chris Lattner lattner at cs.uiuc.edu
Mon Apr 11 14:34:38 PDT 2005



Changes in directory llvm-poolalloc/lib/PoolAllocate:

Heuristic.cpp updated: 1.9 -> 1.10
---
Log message:

Change this prototype to make the base class so it actually overloads the
virtual method...  :-/


---
Diffs of the changes:  (+5 -4)

 Heuristic.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.9 llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.10
--- llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp:1.9	Wed Mar 16 16:46:45 2005
+++ llvm-poolalloc/lib/PoolAllocate/Heuristic.cpp	Mon Apr 11 16:34:22 2005
@@ -421,7 +421,7 @@
       ResultPools.push_back(OnePool(NodesToPA[i]));
   }
 
-  void HackFunctionBody(Function &F, std::map<DSNode*, Value*> &PDs);
+  void HackFunctionBody(Function &F, std::map<const DSNode*, Value*> &PDs);
 };
 
 /// getDynamicallyNullPool - Return a PoolDescriptor* that is always dynamically
@@ -447,13 +447,14 @@
 // Basically it replaces all uses of real pool descriptors with dynamically null
 // values.  However, it leaves pool init/destroy alone.
 void OnlyOverheadHeuristic::HackFunctionBody(Function &F,
-                                             std::map<DSNode*, Value*> &PDs) {
+                                             std::map<const DSNode*,
+                                             Value*> &PDs) {
   Function *PoolInit = PA->PoolInit;
   Function *PoolDestroy = PA->PoolDestroy;
 
   Value *NullPD = getDynamicallyNullPool(F.front().begin());
-  for (std::map<DSNode*, Value*>::iterator PDI = PDs.begin(), E = PDs.end();
-       PDI != E; ++PDI) {
+  for (std::map<const DSNode*, Value*>::iterator PDI = PDs.begin(),
+         E = PDs.end(); PDI != E; ++PDI) {
     Value *OldPD = PDI->second;
     std::vector<User*> OldPDUsers(OldPD->use_begin(), OldPD->use_end());
     for (unsigned i = 0, e = OldPDUsers.size(); i != e; ++i) {






More information about the llvm-commits mailing list