Do not derive CommonPassManagerImpl from Pass.

Now BasicBlockPassManager_New is a FunctionPass,
FunctionPassManager_New is a ModulePass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31744 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-11-15 01:11:27 +00:00
parent 33a400477b
commit abb81054d1

View File

@ -24,7 +24,7 @@ namespace llvm {
/// CommonPassManagerImpl helps pass manager analysis required by
/// the managed passes. It provides methods to add/remove analysis
/// available and query if certain analysis is available or not.
class CommonPassManagerImpl : public Pass {
class CommonPassManagerImpl {
public:
@ -124,7 +124,8 @@ private:
/// BasicBlockPassManager_New manages BasicBlockPass. It batches all the
/// pass together and sequence them to process one basic block before
/// processing next basic block.
class BasicBlockPassManager_New : public CommonPassManagerImpl {
class BasicBlockPassManager_New : public CommonPassManagerImpl,
public FunctionPass {
public:
BasicBlockPassManager_New() { }
@ -146,7 +147,8 @@ private:
/// It batches all function passes and basic block pass managers together and
/// sequence them to process one function at a time before processing next
/// function.
class FunctionPassManagerImpl_New : public CommonPassManagerImpl {
class FunctionPassManagerImpl_New : public CommonPassManagerImpl,
public ModulePass {
public:
FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ }
FunctionPassManagerImpl_New() {
@ -353,8 +355,8 @@ void CommonPassManagerImpl::addPassToManager (Pass *P,
// implementations it needs.
//
void CommonPassManagerImpl::initializeAnalysisImpl(Pass *P) {
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
for (std::vector<const PassInfo *>::const_iterator
I = AnUsage.getRequiredSet().begin(),