Move the getAnalysisUsage method from the header file
authorChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 19:40:57 +0000 (19:40 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 19:40:57 +0000 (19:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8264 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
lib/Analysis/IPA/MemoryDepAnalysis.cpp

index 417b4be0eec2f185f3e6568da1ca864407d2079f..685b2eeed768380f31a4b0b3a96b4cfcb7e44d97 100644 (file)
@@ -41,8 +41,7 @@
 /// not copied over from one table to another since it is no longer useful.
 ///--------------------------------------------------------------------------
 
-struct ModRefTable
-{
+struct ModRefTable {
   typedef hash_map<Instruction*, ModRefInfo> ModRefMap;
   typedef ModRefMap::const_iterator                 const_map_iterator;
   typedef ModRefMap::      iterator                        map_iterator;
@@ -198,6 +197,17 @@ public:
 // class MemoryDepAnalysis: A dep. graph for load/store/call instructions
 //----------------------------------------------------------------------------
 
+
+/// getAnalysisUsage - This does not modify anything.  It uses the Top-Down DS
+/// Graph and IPModRef.
+///
+void MemoryDepAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
+  AU.setPreservesAll();
+  AU.addRequired<TDDataStructures>();
+  AU.addRequired<IPModRef>();
+}
+
+
 /// Basic dependence gathering algorithm, using TarjanSCCIterator on CFG:
 /// 
 /// for every SCC S in the CFG in PostOrder on the SCC DAG
index 417b4be0eec2f185f3e6568da1ca864407d2079f..685b2eeed768380f31a4b0b3a96b4cfcb7e44d97 100644 (file)
@@ -41,8 +41,7 @@
 /// not copied over from one table to another since it is no longer useful.
 ///--------------------------------------------------------------------------
 
-struct ModRefTable
-{
+struct ModRefTable {
   typedef hash_map<Instruction*, ModRefInfo> ModRefMap;
   typedef ModRefMap::const_iterator                 const_map_iterator;
   typedef ModRefMap::      iterator                        map_iterator;
@@ -198,6 +197,17 @@ public:
 // class MemoryDepAnalysis: A dep. graph for load/store/call instructions
 //----------------------------------------------------------------------------
 
+
+/// getAnalysisUsage - This does not modify anything.  It uses the Top-Down DS
+/// Graph and IPModRef.
+///
+void MemoryDepAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
+  AU.setPreservesAll();
+  AU.addRequired<TDDataStructures>();
+  AU.addRequired<IPModRef>();
+}
+
+
 /// Basic dependence gathering algorithm, using TarjanSCCIterator on CFG:
 /// 
 /// for every SCC S in the CFG in PostOrder on the SCC DAG