[llvm-commits] [poolalloc] r121636 - in /poolalloc/trunk: include/dsa/DataStructure.h lib/DSA/BottomUpClosure.cpp lib/DSA/CompleteBottomUp.cpp lib/DSA/EquivClassGraphs.cpp lib/DSA/StdLibPass.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Sun Dec 12 08:39:36 PST 2010


Author: aggarwa4
Date: Sun Dec 12 10:39:36 2010
New Revision: 121636

URL: http://llvm.org/viewvc/llvm-project?rev=121636&view=rev
Log:
Make DSA use cloning. This should make it easier
for clients to use it.

NOTE: This might cause some memory overhead. 

Modified:
    poolalloc/trunk/include/dsa/DataStructure.h
    poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
    poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
    poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp
    poolalloc/trunk/lib/DSA/StdLibPass.cpp

Modified: poolalloc/trunk/include/dsa/DataStructure.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=121636&r1=121635&r2=121636&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/DataStructure.h (original)
+++ poolalloc/trunk/include/dsa/DataStructure.h Sun Dec 12 10:39:36 2010
@@ -206,6 +206,7 @@
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
     AU.addRequired<LocalDataStructures>();
     AU.setPreservesCFG();
+    AU.setPreservesAll();
   }
 };
 
@@ -240,6 +241,7 @@
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
     AU.addRequired<StdLibDataStructures>();
     AU.setPreservesCFG();
+    AU.setPreservesAll();
   }
 
 protected:
@@ -288,6 +290,7 @@
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
     AU.addRequired<BUDataStructures>();
     AU.setPreservesCFG();
+    AU.setPreservesAll();
   }
 
 };
@@ -312,6 +315,7 @@
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
     AU.addRequired<CompleteBUDataStructures>();
     AU.setPreservesCFG();
+    AU.setPreservesAll();
   }
 
 };
@@ -369,6 +373,7 @@
       AU.addPreserved<BUDataStructures>();
     }
     AU.setPreservesCFG();
+    AU.setPreservesAll();
   }
 
 private:

Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=121636&r1=121635&r2=121636&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original)
+++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Sun Dec 12 10:39:36 2010
@@ -43,7 +43,7 @@
 // program.
 //
 bool BUDataStructures::runOnModule(Module &M) {
-  init(&getAnalysis<StdLibDataStructures>(), false, true, false, false );
+  init(&getAnalysis<StdLibDataStructures>(), true, true, false, false );
 
   return runOnModuleInternal(M);
 }

Modified: poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp?rev=121636&r1=121635&r2=121636&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp (original)
+++ poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp Sun Dec 12 10:39:36 2010
@@ -42,7 +42,7 @@
 //
 bool
 CompleteBUDataStructures::runOnModule (Module &M) {
-  init(&getAnalysis<BUDataStructures>(), false, true, false, true);
+  init(&getAnalysis<BUDataStructures>(), true, true, false, true);
 
 
   //

Modified: poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp?rev=121636&r1=121635&r2=121636&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp (original)
+++ poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp Sun Dec 12 10:39:36 2010
@@ -40,7 +40,7 @@
 // in the program.
 //
 bool EquivBUDataStructures::runOnModule(Module &M) {
-  init(&getAnalysis<CompleteBUDataStructures>(), false, true, false, true);
+  init(&getAnalysis<CompleteBUDataStructures>(), true, true, false, true);
 
   //make a list of all the DSGraphs
   std::set<DSGraph *>graphList;

Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=121636&r1=121635&r2=121636&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original)
+++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Sun Dec 12 10:39:36 2010
@@ -133,6 +133,8 @@
   {"strncat",    {YRET_YARGS, YRET_YARGS, NRET_NARGS,  true, true, true}},
 
   {"strcpy",     {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}},
+  {"memccpy",    {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}},
+  {"wmemccpy",   {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}},
   {"wcscpy",     {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}},
   {"strncpy",    {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}},
   {"wcsncpy",    {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}},
@@ -187,12 +189,6 @@
   {"getrusage",  {false, false, false, false,  true, false, false, false, false}},
   {"memmove",    {false,  true, false,  true,  true, false,  true,  true,  true}},
   {"bcopy",      {false, false, false,  true,  true, false,  true, false,  true}},
-  {"strcpy",     {false,  true, false,  true,  true, false,  true,  true,  true}},
-  {"strncpy",    {false,  true, false,  true,  true, false,  true,  true,  true}},
-  {"memccpy",    {false,  true, false,  true,  true, false,  true,  true,  true}},
-  {"wcscpy",     {false,  true, false,  true,  true, false,  true,  true,  true}},
-  {"wcsncpy",    {false,  true, false,  true,  true, false,  true,  true,  true}},
-  {"wmemccpy",   {false,  true, false,  true,  true, false,  true,  true,  true}},
   {"getcwd",     { true,  true,  true,  true,  true,  true, false,  true,  true}},
 #endif
   // C++ functions, as mangled on linux gcc 4.2
@@ -304,7 +300,7 @@
   //
   // Get the results from the local pass.
   //
-  init (&getAnalysis<LocalDataStructures>(), false, true, false, false);
+  init (&getAnalysis<LocalDataStructures>(), true, true, false, false);
 
   //
   // Fetch the DSGraphs for all defined functions within the module.





More information about the llvm-commits mailing list