s/PassManagerAnalysisHelper/CommonPassManagerImpl

Inherit CommonPassManagerImpl from Pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31642 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-11-10 21:33:13 +00:00
parent d6373bcd82
commit 37a84c7d8b
2 changed files with 14 additions and 20 deletions

View File

@ -92,10 +92,10 @@ class ModulePassManager_New;
class PassManagerImpl_New;
class FunctionPassManagerImpl_New;
/// PassManagerAnalysisHelper helps pass manager analysis required by
/// 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 PassManagerAnalysisHelper {
class CommonPassManagerImpl : public Pass{
public:
@ -124,8 +124,7 @@ private:
};
/// PassManager_New manages ModulePassManagers
class PassManager_New : public Pass,
public PassManagerAnalysisHelper {
class PassManager_New : public CommonPassManagerImpl {
public:
@ -150,8 +149,7 @@ private:
};
/// FunctionPassManager_New manages FunctionPasses and BasicBlockPassManagers.
class FunctionPassManager_New : public Pass,
public PassManagerAnalysisHelper {
class FunctionPassManager_New : public CommonPassManagerImpl {
public:
FunctionPassManager_New(ModuleProvider *P) { /* TODO */ }
FunctionPassManager_New();

View File

@ -22,8 +22,7 @@ namespace llvm {
/// 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 Pass,
public PassManagerAnalysisHelper {
class BasicBlockPassManager_New : public CommonPassManagerImpl {
public:
BasicBlockPassManager_New() { }
@ -44,8 +43,7 @@ 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 Pass,
public PassManagerAnalysisHelper {
class FunctionPassManagerImpl_New : public CommonPassManagerImpl {
public:
FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ }
FunctionPassManagerImpl_New() {
@ -79,8 +77,7 @@ private:
/// ModulePassManager_New manages ModulePasses and function pass managers.
/// It batches all Module passes passes and function pass managers together and
/// sequence them to process one module.
class ModulePassManager_New : public Pass,
public PassManagerAnalysisHelper {
class ModulePassManager_New : public CommonPassManagerImpl {
public:
ModulePassManager_New() { activeFunctionPassManager = NULL; }
@ -101,8 +98,7 @@ private:
};
/// PassManager_New manages ModulePassManagers
class PassManagerImpl_New : public Pass,
public PassManagerAnalysisHelper {
class PassManagerImpl_New : public CommonPassManagerImpl {
public:
@ -137,11 +133,11 @@ private:
} // End of llvm namespace
// PassManagerAnalysisHelper implementation
// CommonPassManagerImpl implementation
/// Return true IFF pass P's required analysis set does not required new
/// manager.
bool PassManagerAnalysisHelper::manageablePass(Pass *P) {
bool CommonPassManagerImpl::manageablePass(Pass *P) {
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
@ -153,26 +149,26 @@ bool PassManagerAnalysisHelper::manageablePass(Pass *P) {
}
/// Return true IFF AnalysisID AID is currently available.
bool PassManagerAnalysisHelper::analysisCurrentlyAvailable(AnalysisID AID) {
bool CommonPassManagerImpl::analysisCurrentlyAvailable(AnalysisID AID) {
// TODO
return false;
}
/// Augment RequiredSet by adding analysis required by pass P.
void PassManagerAnalysisHelper::noteDownRequiredAnalysis(Pass *P) {
void CommonPassManagerImpl::noteDownRequiredAnalysis(Pass *P) {
// TODO
}
/// Remove AnalysisID from the RequiredSet
void PassManagerAnalysisHelper::removeAnalysis(AnalysisID AID) {
void CommonPassManagerImpl::removeAnalysis(AnalysisID AID) {
// TODO
}
/// Remove Analyss not preserved by Pass P
void PassManagerAnalysisHelper::removeNotPreservedAnalysis(Pass *P) {
void CommonPassManagerImpl::removeNotPreservedAnalysis(Pass *P) {
// TODO
}