[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Fri Dec 8 14:32:47 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.64 -> 1.65
---
Log message:
Remove unused getAnalysisPass and getAnalysisPassFromManager
---
Diffs of the changes: (+0 -76)
PassManager.cpp | 76 --------------------------------------------------------
1 files changed, 76 deletions(-)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.64 llvm/lib/VMCore/PassManager.cpp:1.65
--- llvm/lib/VMCore/PassManager.cpp:1.64 Fri Dec 8 16:30:11 2006
+++ llvm/lib/VMCore/PassManager.cpp Fri Dec 8 16:32:32 2006
@@ -255,17 +255,6 @@
/// manager.
bool manageablePass(Pass *P);
- Pass *getAnalysisPass(AnalysisID AID) const {
-
- std::map<AnalysisID, Pass*>::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 @@
/// 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 @@
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 @@
/// 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 @@
/// 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 @@
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 @@
}
-/// 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 @@
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<ModulePassManager_New *>::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.
More information about the llvm-commits
mailing list