/// 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 PMDataManager,
- public ModulePass {
+class FunctionPassManagerImpl_New : public ModulePass,
+ public PMDataManager,
+ public PMTopLevelManager {
public:
FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ }
FunctionPassManagerImpl_New() {
}
~FunctionPassManagerImpl_New() { /* TODO */ };
+ inline void addTopLevelPass(Pass *P) {
+ addPass(P);
+ }
+
/// add - Add a pass to the queue of passes to run. This passes
/// ownership of the Pass to the PassManager. When the
/// PassManager_X is destroyed, the pass will be destroyed as well, so
};
/// PassManager_New manages ModulePassManagers
-class PassManagerImpl_New : public PMDataManager {
+class PassManagerImpl_New : public PMDataManager,
+ public PMTopLevelManager {
public:
Info.setPreservesAll();
}
+ inline void addTopLevelPass(Pass *P) {
+ addPass(P);
+ }
+
private:
/// Add a pass into a passmanager queue.