summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-31 19:41:17 +0000
committerChris Lattner <sabre@nondot.org>2003-08-31 19:41:17 +0000
commit1da3398600971e89bf7465ad7e5e90cc71f5f4d0 (patch)
treeb38b4459bea0a630d4771f2c7768cc4c4eadfa90 /include
parent95008bca9eae5a7cfe150c377ea760ba63fcf0ec (diff)
downloadllvm-1da3398600971e89bf7465ad7e5e90cc71f5f4d0.tar.gz
llvm-1da3398600971e89bf7465ad7e5e90cc71f5f4d0.tar.bz2
llvm-1da3398600971e89bf7465ad7e5e90cc71f5f4d0.tar.xz
Cleanups, move the getAnalysisUsage method to the .cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/MemoryDepAnalysis.h41
1 files changed, 11 insertions, 30 deletions
diff --git a/include/llvm/Analysis/MemoryDepAnalysis.h b/include/llvm/Analysis/MemoryDepAnalysis.h
index 4263f395e5..82a0d77761 100644
--- a/include/llvm/Analysis/MemoryDepAnalysis.h
+++ b/include/llvm/Analysis/MemoryDepAnalysis.h
@@ -14,14 +14,13 @@
#define LLVM_ANALYSIS_MEMORYDEPANALYSIS_H
#include "llvm/Analysis/DependenceGraph.h"
-#include "llvm/Analysis/IPModRef.h"
-#include "llvm/Analysis/DataStructure.h"
#include "llvm/Pass.h"
#include "Support/TarjanSCCIterator.h"
#include "Support/hash_map"
-class Instruction;
class ModRefTable;
+class DSGraph;
+class FunctionModRefInfo;
///---------------------------------------------------------------------------
/// class MemoryDepGraph:
@@ -33,8 +32,7 @@ class ModRefTable;
/// allowed to use a FunctionPass such as this one.
///---------------------------------------------------------------------------
-class MemoryDepAnalysis: /* Use if FunctionPass: public DependenceGraph, */
- public Pass {
+class MemoryDepAnalysis : public Pass {
/// The following map and depGraph pointer are temporary until this class
/// becomes a FunctionPass instead of a module Pass. */
hash_map<Function*, DependenceGraph*> funcMap;
@@ -45,23 +43,16 @@ class MemoryDepAnalysis: /* Use if FunctionPass: public DependenceGraph, */
const FunctionModRefInfo* funcModRef;
/// Internal routine that processes each SCC of the CFG.
- void MemoryDepAnalysis::ProcessSCC(SCC<Function*>& S,
- ModRefTable& ModRefAfter);
+ void ProcessSCC(SCC<Function*>& S, ModRefTable& ModRefAfter);
friend class PgmDependenceGraph;
public:
- MemoryDepAnalysis()
- : /*DependenceGraph(),*/ funcDepGraph(NULL),
- funcGraph(NULL), funcModRef(NULL) { }
+ MemoryDepAnalysis() : funcDepGraph(0), funcGraph(0), funcModRef(0) {}
~MemoryDepAnalysis();
- ///------------------------------------------------------------------------
- /// TEMPORARY FUNCTIONS TO MAKE THIS A MODULE PASS ---
- /// These functions will go away once this class becomes a FunctionPass.
-
/// Driver function to compute dependence graphs for every function.
- bool run(Module& M);
+ bool run(Module &M);
/// getGraph() -- Retrieve the dependence graph for a function.
/// This is temporary and will go away once this is a FunctionPass.
@@ -83,21 +74,14 @@ public:
///
virtual void releaseMemory();
- ///----END TEMPORARY FUNCTIONS---------------------------------------------
-
/// Driver functions to compute the Load/Store Dep. Graph per function.
///
- bool runOnFunction(Function& _func);
-
- /// getAnalysisUsage - This does not modify anything.
- /// It uses the Top-Down DS Graph and IPModRef.
- ///
- void getAnalysisUsage(AnalysisUsage &AU) const {
- AU.setPreservesAll();
- AU.addRequired<TDDataStructures>();
- AU.addRequired<IPModRef>();
- }
+ bool runOnFunction(Function &F);
+
+ /// getAnalysisUsage - This does not modify anything. It uses the Top-Down DS
+ /// Graph and IPModRef.
+ void getAnalysisUsage(AnalysisUsage &AU) const;
/// Debugging support methods
///
@@ -105,7 +89,4 @@ public:
void dump() const;
};
-
-//===----------------------------------------------------------------------===//
-
#endif