From 318adc0e9d2d07046cabd0181084683c86b3bafd Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 7 Dec 2006 19:57:52 +0000 Subject: [PATCH] Pass Managers themselves do not invalidate any analysis info. llvm-svn: 32318 --- lib/VMCore/PassManager.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 0dff67f2720..9585b0dbce3 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -269,6 +269,11 @@ public: /// Return true IFF AnalysisID AID is currently available. Pass *getAnalysisPassFromManager(AnalysisID AID); + /// Pass Manager itself does not invalidate any analysis info. + void getAnalysisUsage(AnalysisUsage &Info) const { + Info.setPreservesAll(); + } + private: }; @@ -311,6 +316,12 @@ public: /// doFinalization - Run all of the initializers for the function passes. /// bool doFinalization(Module &M); + + /// Pass Manager itself does not invalidate any analysis info. + void getAnalysisUsage(AnalysisUsage &Info) const { + Info.setPreservesAll(); + } + private: // Active Pass Managers BasicBlockPassManager_New *activeBBPassManager; @@ -333,7 +344,12 @@ public: /// Return true IFF AnalysisID AID is currently available. Pass *getAnalysisPassFromManager(AnalysisID AID); - + + /// Pass Manager itself does not invalidate any analysis info. + void getAnalysisUsage(AnalysisUsage &Info) const { + Info.setPreservesAll(); + } + private: // Active Pass Manager FunctionPassManagerImpl_New *activeFunctionPassManager; @@ -357,6 +373,11 @@ public: /// Return true IFF AnalysisID AID is currently available. Pass *getAnalysisPassFromManager(AnalysisID AID); + /// Pass Manager itself does not invalidate any analysis info. + void getAnalysisUsage(AnalysisUsage &Info) const { + Info.setPreservesAll(); + } + private: /// Add a pass into a passmanager queue. This is used by schedulePasses