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

Chris Lattner lattner at cs.uiuc.edu
Mon Mar 14 11:27:46 PST 2005



Changes in directory llvm-poolalloc/lib/PoolAllocate:

PointerCompress.cpp updated: 1.54 -> 1.55
PoolAllocate.cpp updated: 1.108 -> 1.109
---
Log message:

Use the new computeGlobalGraphMapping method


---
Diffs of the changes:  (+6 -14)

 PointerCompress.cpp |   10 +++-------
 PoolAllocate.cpp    |   10 +++-------
 2 files changed, 6 insertions(+), 14 deletions(-)


Index: llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.54 llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.55
--- llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp:1.54	Sat Mar 12 06:10:52 2005
+++ llvm-poolalloc/lib/PoolAllocate/PointerCompress.cpp	Mon Mar 14 13:27:35 2005
@@ -1110,14 +1110,10 @@
   // from a global, we check to see if the global pool is compressed.
   DSGraph &GG = ECG->getGlobalsGraph();
 
+  // Map all node reachable from this global to the corresponding nodes in the
+  // globals graph.
   DSGraph::NodeMapTy GlobalsGraphNodeMapping;
-  for (DSScalarMap::global_iterator I = DSG.getScalarMap().global_begin(),
-         E = DSG.getScalarMap().global_end(); I != E; ++I) {
-    // Map all node reachable from this global to the corresponding nodes in
-    // the globals graph.
-    DSGraph::computeNodeMapping(DSG.getNodeForValue(*I), GG.getNodeForValue(*I),
-                                GlobalsGraphNodeMapping);
-  }
+  DSG.computeGlobalGraphMapping(GlobalsGraphNodeMapping);
 
   // See if there are nodes in this graph that correspond to nodes in the
   // globals graph, and if so, if it is compressed.


Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.108 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.109
--- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.108	Sat Mar 12 05:55:30 2005
+++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp	Mon Mar 14 13:27:35 2005
@@ -541,14 +541,10 @@
   // is required.
   DSGraph &GG = ECGraphs->getGlobalsGraph();
 
+  // Map all node reachable from this global to the corresponding nodes in
+  // the globals graph.
   DSGraph::NodeMapTy GlobalsGraphNodeMapping;
-  for (DSScalarMap::global_iterator I = G.getScalarMap().global_begin(),
-         E = G.getScalarMap().global_end(); I != E; ++I) {
-    // Map all node reachable from this global to the corresponding nodes in
-    // the globals graph.
-    DSGraph::computeNodeMapping(G.getNodeForValue(*I), GG.getNodeForValue(*I),
-                                GlobalsGraphNodeMapping);
-  }
+  G.computeGlobalGraphMapping(GlobalsGraphNodeMapping);
 
   // Loop over all of the nodes which are non-escaping, adding pool-allocatable
   // ones to the NodesToPA vector.






More information about the llvm-commits mailing list