summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-31 19:40:57 +0000
committerChris Lattner <sabre@nondot.org>2003-08-31 19:40:57 +0000
commit95008bca9eae5a7cfe150c377ea760ba63fcf0ec (patch)
tree9556d90ba26ddbaff3d98575dae2dc481e74e40a
parenta04e51f4c0dd981af9b8f6e8b219df495cccaa45 (diff)
downloadllvm-95008bca9eae5a7cfe150c377ea760ba63fcf0ec.tar.gz
llvm-95008bca9eae5a7cfe150c377ea760ba63fcf0ec.tar.bz2
llvm-95008bca9eae5a7cfe150c377ea760ba63fcf0ec.tar.xz
Move the getAnalysisUsage method from the header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8264 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/DataStructure/MemoryDepAnalysis.cpp14
-rw-r--r--lib/Analysis/IPA/MemoryDepAnalysis.cpp14
2 files changed, 24 insertions, 4 deletions
diff --git a/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp b/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
index 417b4be0ee..685b2eeed7 100644
--- a/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
+++ b/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp
@@ -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
diff --git a/lib/Analysis/IPA/MemoryDepAnalysis.cpp b/lib/Analysis/IPA/MemoryDepAnalysis.cpp
index 417b4be0ee..685b2eeed7 100644
--- a/lib/Analysis/IPA/MemoryDepAnalysis.cpp
+++ b/lib/Analysis/IPA/MemoryDepAnalysis.cpp
@@ -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