[llvm-commits] [poolalloc] r56685 - /poolalloc/trunk/lib/PoolAllocate/PASimple.cpp

John Criswell criswell at uiuc.edu
Fri Sep 26 12:59:01 PDT 2008


Author: criswell
Date: Fri Sep 26 14:59:00 2008
New Revision: 56685

URL: http://llvm.org/viewvc/llvm-project?rev=56685&view=rev
Log:
Modified behavior to use either the EquivClassGraph or Top-Down DSA depending
on whether SAFECode will be used later.

Modified:
    poolalloc/trunk/lib/PoolAllocate/PASimple.cpp

Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=56685&r1=56684&r2=56685&view=diff

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Fri Sep 26 14:59:00 2008
@@ -124,14 +124,17 @@
   //
   // Merge all of the DSNodes in the DSGraphs.
   //
-  GlobalECs = &(TDGraphs->getGlobalECs());
-  CombinedDSGraph = new DSGraph (*GlobalECs, TD, &(TDGraphs->getGlobalsGraph()));
-  //CombinedDSGraph.cloneInto (TDGraphs->getGlobalsGraph());
+  if (SAFECodeEnabled)
+    GlobalECs = &(TDGraphs->getGlobalECs());
+  else
+    GlobalECs = &(ECGraphs->getGlobalECs());
+  CombinedDSGraph = new DSGraph (*GlobalECs, TD, &(getGlobalsGraph()));
+  //CombinedDSGraph.cloneInto (getGlobalsGraph());
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
-    if (TDGraphs->hasGraph (*I))
-      CombinedDSGraph->cloneInto (TDGraphs->getDSGraph(*I));
+    if (hasDSGraph (*I))
+      CombinedDSGraph->cloneInto (getDSGraph(*I));
   }
-  CombinedDSGraph->cloneInto (TDGraphs->getGlobalsGraph());
+  CombinedDSGraph->cloneInto (getGlobalsGraph());
   MergeNodesInDSGraph (*CombinedDSGraph);
 
   //
@@ -165,7 +168,7 @@
   //
   // Get the DSGraph for this function.
   //
-  DSGraph &ECG = TDGraphs->getDSGraph(F);
+  DSGraph &ECG = getDSGraph(F);
 
   for (Function::iterator i = F.begin(), e = F.end(); i != e; ++i)
     for (BasicBlock::iterator ii = i->begin(), ee = i->end(); ii != ee; ++ii) {





More information about the llvm-commits mailing list