mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Add PassManagerType enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33065 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
65de742b8a
commit
25919cb780
@ -323,6 +323,18 @@ public:
|
||||
virtual void assignPassManager(PMStack &PMS);
|
||||
};
|
||||
|
||||
/// Different types of internal pass managers. External pass managers
|
||||
/// (PassManager and FunctionPassManager) are not represented here.
|
||||
/// Ordering of pass manager types is important here.
|
||||
enum PassManagerType {
|
||||
PMT_Unknown = 0,
|
||||
PMT_ModulePassManager = 1, /// MPPassManager
|
||||
PMT_CallGraphPassManager, /// CGPassManager
|
||||
PMT_FunctionPassManager, /// FPPassManager
|
||||
PMT_LoopPassManager, /// LPPassManager
|
||||
PMT_BasicBlockPassManager /// BBPassManager
|
||||
};
|
||||
|
||||
/// PMStack
|
||||
/// Top level pass manager (see PasManager.cpp) maintains active Pass Managers
|
||||
/// using PMStack. Each Pass implements assignPassManager() to connect itself
|
||||
|
@ -291,6 +291,10 @@ public:
|
||||
return PassVector.size();
|
||||
}
|
||||
|
||||
virtual PassManagerType getPassManagerType() {
|
||||
assert ( 0 && "Invalid use of getPassManagerType");
|
||||
return PMT_Unknown;
|
||||
}
|
||||
protected:
|
||||
|
||||
// If a FunctionPass F is the last user of ModulePass info M
|
||||
@ -359,6 +363,10 @@ public:
|
||||
BasicBlockPass *BP = static_cast<BasicBlockPass *>(PassVector[N]);
|
||||
return BP;
|
||||
}
|
||||
|
||||
virtual PassManagerType getPassManagerType() {
|
||||
return PMT_BasicBlockPassManager;
|
||||
}
|
||||
};
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -413,6 +421,9 @@ public:
|
||||
return FP;
|
||||
}
|
||||
|
||||
virtual PassManagerType getPassManagerType() {
|
||||
return PMT_FunctionPassManager;
|
||||
}
|
||||
private:
|
||||
// Active Pass Manager
|
||||
BBPassManager *activeBBPassManager;
|
||||
@ -529,6 +540,7 @@ public:
|
||||
return MP;
|
||||
}
|
||||
|
||||
virtual PassManagerType getPassManagerType() { return PMT_ModulePassManager; }
|
||||
private:
|
||||
// Active Pass Manager
|
||||
FPPassManager *activeFunctionPassManager;
|
||||
|
Loading…
Reference in New Issue
Block a user