summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-04-16 18:51:25 +0000
committerDevang Patel <dpatel@apple.com>2007-04-16 18:51:25 +0000
commit8f93b7fc36dbeba428c6dd122c07fe0777baa664 (patch)
tree1feed84037e7354dfe0743243e70977776fb391e
parent62dc4dd5226ee47fd2d563b05816a5aae517bc41 (diff)
downloadllvm-8f93b7fc36dbeba428c6dd122c07fe0777baa664.tar.gz
llvm-8f93b7fc36dbeba428c6dd122c07fe0777baa664.tar.bz2
llvm-8f93b7fc36dbeba428c6dd122c07fe0777baa664.tar.xz
Add getPotentialPassManagerType(). No functionality change, yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36149 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/LoopPass.h4
-rw-r--r--include/llvm/CallGraphSCCPass.h5
-rw-r--r--include/llvm/Pass.h23
3 files changed, 31 insertions, 1 deletions
diff --git a/include/llvm/Analysis/LoopPass.h b/include/llvm/Analysis/LoopPass.h
index dd9480f0aa..4163a09d33 100644
--- a/include/llvm/Analysis/LoopPass.h
+++ b/include/llvm/Analysis/LoopPass.h
@@ -57,6 +57,10 @@ class LoopPass : public Pass {
virtual void assignPassManager(PMStack &PMS,
PassManagerType PMT = PMT_LoopPassManager);
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const {
+ return PMT_LoopPassManager;
+ }
};
class LPPassManager : public FunctionPass, public PMDataManager {
diff --git a/include/llvm/CallGraphSCCPass.h b/include/llvm/CallGraphSCCPass.h
index f68e44774b..af5cb849a3 100644
--- a/include/llvm/CallGraphSCCPass.h
+++ b/include/llvm/CallGraphSCCPass.h
@@ -54,6 +54,11 @@ struct CallGraphSCCPass : public Pass {
virtual void assignPassManager(PMStack &PMS,
PassManagerType PMT = PMT_CallGraphPassManager);
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const {
+ return PMT_CallGraphPassManager;
+ }
+
/// getAnalysisUsage - For this class, we declare that we require and preserve
/// the call graph. If the derived class implements this method, it should
/// always explicitly call the implementation here.
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 30ddede85f..cef45011ce 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -126,6 +126,11 @@ public:
PassManagerType T = PMT_Unknown) {}
/// Check if available pass managers are suitable for this pass or not.
virtual void preparePassManager(PMStack &PMS) {}
+
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const {
+ return PMT_Unknown;
+ }
// Access AnalysisResolver
inline void setResolver(AnalysisResolver *AR) { Resolver = AR; }
@@ -193,7 +198,7 @@ public:
template<typename AnalysisType>
AnalysisType &getAnalysisID(const PassInfo *PI) const;
-
+
};
inline std::ostream &operator<<(std::ostream &OS, const Pass &P) {
@@ -216,6 +221,12 @@ public:
virtual void assignPassManager(PMStack &PMS,
PassManagerType T = PMT_ModulePassManager);
+
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const {
+ return PMT_ModulePassManager;
+ }
+
// Force out-of-line virtual method.
virtual ~ModulePass();
};
@@ -283,6 +294,11 @@ public:
virtual void assignPassManager(PMStack &PMS,
PassManagerType T = PMT_FunctionPassManager);
+
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const {
+ return PMT_FunctionPassManager;
+ }
};
@@ -338,6 +354,11 @@ public:
virtual void assignPassManager(PMStack &PMS,
PassManagerType T = PMT_BasicBlockPassManager);
+
+ /// Return what kind of Pass Manager can manage this pass.
+ virtual PassManagerType getPotentialPassManagerType() const {
+ return PMT_BasicBlockPassManager;
+ }
};
/// PMStack