[llvm-commits] [poolalloc] r57738 - in /poolalloc/trunk/lib/PoolAllocate: PASimple.cpp PoolAllocate.cpp

John Criswell criswell at uiuc.edu
Fri Oct 17 15:04:19 PDT 2008


Author: criswell
Date: Fri Oct 17 17:04:19 2008
New Revision: 57738

URL: http://llvm.org/viewvc/llvm-project?rev=57738&view=rev
Log:
When doing simple pool allocation or when doing real pool allocation for
SAFECode, use Top-Down EQ Really-Cool results.

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

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

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Fri Oct 17 17:04:19 2008
@@ -73,9 +73,9 @@
 
 void PoolAllocateSimple::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.addRequired<TargetData>();
-  AU.addRequiredTransitive<CompleteBUDataStructures>();
+  AU.addRequiredTransitive<EQTDDataStructures>();
 
-  AU.addPreserved<CompleteBUDataStructures>();
+  AU.addPreserved<EQTDDataStructures>();
 
   AU.setPreservesAll();
 }
@@ -101,7 +101,7 @@
   if (M.begin() == M.end()) return false;
 
   // Get the Target Data information and the Graphs
-  Graphs = &getAnalysis<CompleteBUDataStructures>();   // folded inlined CBU graphs
+  Graphs = &getAnalysis<EQTDDataStructures>();   // folded inlined CBU graphs
   assert (Graphs && "No ECGraphs pass available!\n");
   TargetData & TD = getAnalysis<TargetData>();
 

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

==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Fri Oct 17 17:04:19 2008
@@ -87,8 +87,13 @@
 }
 
 void PoolAllocate::getAnalysisUsage(AnalysisUsage &AU) const {
-  AU.addRequired<EquivBUDataStructures>();
-  AU.addPreserved<EquivBUDataStructures>();
+  if (SAFECodeEnabled) {
+    AU.addRequired<EQTDDataStructures>();
+    AU.addPreserved<EQTDDataStructures>();
+  } else {
+    AU.addRequired<EquivBUDataStructures>();
+    AU.addPreserved<EquivBUDataStructures>();
+  }
 
   // Preserve the pool information across passes
   if (SAFECodeEnabled)
@@ -100,6 +105,10 @@
 bool PoolAllocate::runOnModule(Module &M) {
   if (M.begin() == M.end()) return false;
   CurModule = &M;
+
+  if (SAFECodeEnabled)
+    Graphs = &getAnalysis<EQTDDataStructures>();   // folded inlined CBU graphs
+    else
   Graphs = &getAnalysis<EquivBUDataStructures>();   // folded inlined CBU graphs
 
   CurHeuristic = Heuristic::create();





More information about the llvm-commits mailing list