mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-20 12:31:40 +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);
|
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
|
/// PMStack
|
||||||
/// Top level pass manager (see PasManager.cpp) maintains active Pass Managers
|
/// Top level pass manager (see PasManager.cpp) maintains active Pass Managers
|
||||||
/// using PMStack. Each Pass implements assignPassManager() to connect itself
|
/// using PMStack. Each Pass implements assignPassManager() to connect itself
|
||||||
|
@ -291,6 +291,10 @@ public:
|
|||||||
return PassVector.size();
|
return PassVector.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual PassManagerType getPassManagerType() {
|
||||||
|
assert ( 0 && "Invalid use of getPassManagerType");
|
||||||
|
return PMT_Unknown;
|
||||||
|
}
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// If a FunctionPass F is the last user of ModulePass info M
|
// If a FunctionPass F is the last user of ModulePass info M
|
||||||
@ -359,6 +363,10 @@ public:
|
|||||||
BasicBlockPass *BP = static_cast<BasicBlockPass *>(PassVector[N]);
|
BasicBlockPass *BP = static_cast<BasicBlockPass *>(PassVector[N]);
|
||||||
return BP;
|
return BP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual PassManagerType getPassManagerType() {
|
||||||
|
return PMT_BasicBlockPassManager;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -413,6 +421,9 @@ public:
|
|||||||
return FP;
|
return FP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual PassManagerType getPassManagerType() {
|
||||||
|
return PMT_FunctionPassManager;
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
// Active Pass Manager
|
// Active Pass Manager
|
||||||
BBPassManager *activeBBPassManager;
|
BBPassManager *activeBBPassManager;
|
||||||
@ -529,6 +540,7 @@ public:
|
|||||||
return MP;
|
return MP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual PassManagerType getPassManagerType() { return PMT_ModulePassManager; }
|
||||||
private:
|
private:
|
||||||
// Active Pass Manager
|
// Active Pass Manager
|
||||||
FPPassManager *activeFunctionPassManager;
|
FPPassManager *activeFunctionPassManager;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user