[llvm-commits] [poolalloc] r115539 - /poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp
John Criswell
criswell at uiuc.edu
Mon Oct 4 12:01:12 PDT 2010
Author: criswell
Date: Mon Oct 4 14:01:12 2010
New Revision: 115539
URL: http://llvm.org/viewvc/llvm-project?rev=115539&view=rev
Log:
Modified heuristic code to locate local DSNodes in function DSGraphs which are
mirrored in the Globals Graph. This should help ensure that values DSNodes are
consistently assigned the same pool regardless of how which DSNode is examined.
Modified:
poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp
Modified: poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp?rev=115539&r1=115538&r2=115539&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp Mon Oct 4 14:01:12 2010
@@ -301,6 +301,17 @@
GetNodesReachableFromGlobals (GG, GlobalHeapNodes);
//
+ // Now find all DSNodes belonging to function-local DSGraphs which are
+ // mirrored in the globals graph. These DSNodes require a global pool, too.
+ //
+ for (Module::iterator F = M->begin(); F != M->end(); ++F) {
+ if (Graphs->hasDSGraph(*F)) {
+ DSGraph* G = Graphs->getDSGraph(*F);
+ GetNodesReachableFromGlobals (G, GlobalHeapNodes);
+ }
+ }
+
+ //
// We do not want to create pools for all memory objects reachable from
// globals. We only want those that are or could be heap objects.
//
More information about the llvm-commits
mailing list