From 3279d4c781d74d2106589edc041e2e1571870f08 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 8 Dec 2006 22:32:32 +0000 Subject: [PATCH] Remove unused getAnalysisPass and getAnalysisPassFromManager git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32378 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/PassManager.cpp | 76 -------------------------------------- 1 file changed, 76 deletions(-) diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index d7684f07e70..67918eea13b 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -255,17 +255,6 @@ public: /// manager. bool manageablePass(Pass *P); - Pass *getAnalysisPass(AnalysisID AID) const { - - std::map::const_iterator I = - AvailableAnalysis.find(AID); - - if (I != AvailableAnalysis.end()) - return NULL; - else - return I->second; - } - /// Augment AvailableAnalysis by adding analysis made available by pass P. void recordAvailableAnalysis(Pass *P); @@ -360,10 +349,6 @@ public: /// whether any of the passes modifies the function, and if so, return true. bool runOnFunction(Function &F); - /// Return true IFF AnalysisID AID is currently available. - /// TODO : Replace this method with getAnalysisPass() - Pass *getAnalysisPassFromManager(AnalysisID AID); - /// Pass Manager itself does not invalidate any analysis info. void getAnalysisUsage(AnalysisUsage &Info) const { Info.setPreservesAll(); @@ -413,10 +398,6 @@ public: bool runOnModule(Module &M); bool runOnFunction(Function &F); - /// Return true IFF AnalysisID AID is currently available. - /// TODO : Replace this method with getAnalysisPass() - Pass *getAnalysisPassFromManager(AnalysisID AID); - /// doInitialization - Run all of the initializers for the function passes. /// bool doInitialization(Module &M); @@ -453,10 +434,6 @@ public: /// whether any of the passes modifies the module, and if so, return true. bool runOnModule(Module &M); - /// Return true IFF AnalysisID AID is currently available. - /// TODO : Replace this method with getAnalysisPass() - Pass *getAnalysisPassFromManager(AnalysisID AID); - /// Pass Manager itself does not invalidate any analysis info. void getAnalysisUsage(AnalysisUsage &Info) const { Info.setPreservesAll(); @@ -488,10 +465,6 @@ public: /// whether any of the passes modifies the module, and if so, return true. bool run(Module &M); - /// Return true IFF AnalysisID AID is currently available. - /// TODO : Replace this method with getAnalysisPass() - Pass *getAnalysisPassFromManager(AnalysisID AID); - /// Pass Manager itself does not invalidate any analysis info. void getAnalysisUsage(AnalysisUsage &Info) const { Info.setPreservesAll(); @@ -733,12 +706,6 @@ BasicBlockPassManager_New::runOnFunction(Function &F) { return Changed | doFinalization(F); } -/// Return true IFF AnalysisID AID is currently available. -/// TODO : Replace this method with getAnalysisPass() -Pass * BasicBlockPassManager_New::getAnalysisPassFromManager(AnalysisID AID) { - return getAnalysisPass(AID); -} - // Implement doInitialization and doFinalization inline bool BasicBlockPassManager_New::doInitialization(Module &M) { bool Changed = false; @@ -938,22 +905,6 @@ bool FunctionPassManagerImpl_New::runOnFunction(Function &F) { } -/// Return true IFF AnalysisID AID is currently available. -/// TODO : Replace this method with getAnalysisPass() -Pass *FunctionPassManagerImpl_New::getAnalysisPassFromManager(AnalysisID AID) { - - Pass *P = getAnalysisPass(AID); - if (P) - return P; - - if (activeBBPassManager && - activeBBPassManager->getAnalysisPass(AID) != 0) - return activeBBPassManager->getAnalysisPass(AID); - - // TODO : Check inactive managers - return NULL; -} - inline bool FunctionPassManagerImpl_New::doInitialization(Module &M) { bool Changed = false; @@ -1057,36 +1008,9 @@ ModulePassManager_New::runOnModule(Module &M) { return Changed; } -/// Return true IFF AnalysisID AID is currently available. -/// TODO : Replace this method with getAnalysisPass() -Pass *ModulePassManager_New::getAnalysisPassFromManager(AnalysisID AID) { - - Pass *P = getAnalysisPass(AID); - if (P) - return P; - - if (activeFunctionPassManager && - activeFunctionPassManager->getAnalysisPass(AID) != 0) - return activeFunctionPassManager->getAnalysisPass(AID); - - // TODO : Check inactive managers - return NULL; -} - //===----------------------------------------------------------------------===// // PassManagerImpl implementation -/// Return true IFF AnalysisID AID is currently available. -/// TODO : Replace this method with getAnalysisPass() -Pass *PassManagerImpl_New::getAnalysisPassFromManager(AnalysisID AID) { - - Pass *P = NULL; - for (std::vector::iterator itr = PassManagers.begin(), - e = PassManagers.end(); !P && itr != e; ++itr) - P = (*itr)->getAnalysisPassFromManager(AID); - return P; -} - // PassManager_New implementation /// Add P into active pass manager or use new module pass manager to /// manage it. -- 2.34.1