diff --git a/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp b/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp index 417b4be0eec..685b2eeed76 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 417b4be0eec..685b2eeed76 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