[llvm-commits] [poolalloc] r123311 - in /poolalloc/trunk/lib: DSA/StdLibPass.cpp PoolAllocate/AllNodesHeuristic.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Tue Jan 11 21:45:52 PST 2011
Author: aggarwa4
Date: Tue Jan 11 23:45:52 2011
New Revision: 123311
URL: http://llvm.org/viewvc/llvm-project?rev=123311&view=rev
Log:
Formatting changes.
Modified:
poolalloc/trunk/lib/DSA/StdLibPass.cpp
poolalloc/trunk/lib/PoolAllocate/AllNodesHeuristic.cpp
Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=123311&r1=123310&r2=123311&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original)
+++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Tue Jan 11 23:45:52 2011
@@ -105,7 +105,7 @@
{"valloc", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}},
{"memalign", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}},
{"realloc", {NRET_NARGS, YRET_NARGS, YRET_YNARGS, false, true, true}},
- {"free", {NRET_NARGS, NRET_NARGS, NRET_YNARGS, false, false, false}},
+ {"free", {NRET_NARGS, NRET_NARGS, NRET_YNARGS, false, false, false}},
{"strdup", {NRET_YARGS, YRET_NARGS, YRET_NARGS, false, true, false}},
{"wcsdup", {NRET_YARGS, YRET_NARGS, YRET_NARGS, false, true, false}},
Modified: poolalloc/trunk/lib/PoolAllocate/AllNodesHeuristic.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/AllNodesHeuristic.cpp?rev=123311&r1=123310&r2=123311&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/AllNodesHeuristic.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/AllNodesHeuristic.cpp Tue Jan 11 23:45:52 2011
@@ -72,6 +72,7 @@
//
// Remove those global nodes which we know will never be pool allocated.
//
+
/*std::vector<const DSNode *> toRemove;
for (DenseSet<const DSNode*>::iterator I = NodesFromGlobals.begin(),
E = NodesFromGlobals.end(); I != E; ) {
@@ -167,23 +168,23 @@
DSGraph* G = Graphs->getDSGraph(*F);
DSGraph::NodeMapTy NodeMap;
G->computeGToGGMapping (NodeMap);
- //
- // Scan through all DSNodes in the local graph. If a local DSNode has a
- // corresponding DSNode in the globals graph that is reachable from a
- // global, then add the local DSNode to the set of DSNodes reachable from
- // a global.
- //
- DSGraph::node_iterator ni = G->node_begin();
- for (; ni != G->node_end(); ++ni) {
- DSNode * N = ni;
- DSNode * GGN = NodeMap[N].getNode();
-
- //assert (!GGN || GlobalHeapNodes.count (GGN));
- if (GGN && GlobalHeapNodes.count (GGN))
- PoolMap[GGN].NodesInPool.push_back (N);
- }
-
-
+ //
+ // Scan through all DSNodes in the local graph. If a local DSNode has a
+ // corresponding DSNode in the globals graph that is reachable from a
+ // global, then add the local DSNode to the set of DSNodes reachable from
+ // a global.
+ //
+ DSGraph::node_iterator ni = G->node_begin();
+ for (; ni != G->node_end(); ++ni) {
+ DSNode * N = ni;
+ DSNode * GGN = NodeMap[N].getNode();
+
+ //assert (!GGN || GlobalHeapNodes.count (GGN));
+ if (GGN && GlobalHeapNodes.count (GGN))
+ PoolMap[GGN].NodesInPool.push_back (N);
+ }
+
+
}
}
More information about the llvm-commits
mailing list