X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FPassManagers.h;h=ed1e80eae69cb477342722a887835734eef4ae28;hb=a782e75d487006cafffdc256b3c623307fee4dcf;hp=dffc24a41ca734deb8e4b8e9fb77c9cd6d3c199b;hpb=2928c83b010f7cfdb0f819199d806f6942a7d995;p=oota-llvm.git diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h index dffc24a41ca..ed1e80eae69 100644 --- a/include/llvm/PassManagers.h +++ b/include/llvm/PassManagers.h @@ -273,6 +273,8 @@ public: } virtual ~PMDataManager(); + + virtual Pass *getAsPass() = 0; /// Augment AvailableAnalysis by adding analysis made available by pass P. void recordAvailableAnalysis(Pass *P); @@ -392,8 +394,8 @@ private: const AnalysisUsage::VectorType &Set) const; // Set of available Analysis. This information is used while scheduling - // pass. If a pass requires an analysis which is not not available then - // equired analysis pass is scheduled to run before the pass itself is + // pass. If a pass requires an analysis which is not available then + // the required analysis pass is scheduled to run before the pass itself is // scheduled to run. std::map AvailableAnalysis; @@ -411,9 +413,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 FPPassManager : public ModulePass, public PMDataManager { - public: static char ID; explicit FPPassManager(int Depth) @@ -435,6 +435,9 @@ public: /// bool doFinalization(Module &M); + virtual PMDataManager *getAsPMDataManager() { return this; } + virtual Pass *getAsPass() { return this; } + /// Pass Manager itself does not invalidate any analysis info. void getAnalysisUsage(AnalysisUsage &Info) const { Info.setPreservesAll(); @@ -458,8 +461,7 @@ public: } }; -extern Timer *StartPassTimer(Pass *); -extern void StopPassTimer(Pass *, Timer *); +Timer *getPassTimer(Pass *); }