From 95008bca9eae5a7cfe150c377ea760ba63fcf0ec Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 31 Aug 2003 19:40:57 +0000 Subject: 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 --- lib/Analysis/DataStructure/MemoryDepAnalysis.cpp | 14 ++++++++++++-- lib/Analysis/IPA/MemoryDepAnalysis.cpp | 14 ++++++++++++-- 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 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(); + AU.addRequired(); +} + + /// 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 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(); + AU.addRequired(); +} + + /// Basic dependence gathering algorithm, using TarjanSCCIterator on CFG: /// /// for every SCC S in the CFG in PostOrder on the SCC DAG -- cgit v1.2.3