diff options
author | Devang Patel <dpatel@apple.com> | 2007-02-05 19:34:17 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-02-05 19:34:17 +0000 |
commit | 90f1ad7bf4d98a47b5919dc1e9fd66dc1c1905b4 (patch) | |
tree | 0b9b0208512478f899c794da354de0b5800341c7 /lib | |
parent | c8c692878185754d8a9f784bbc713e6c0694a8df (diff) | |
download | llvm-90f1ad7bf4d98a47b5919dc1e9fd66dc1c1905b4.tar.gz llvm-90f1ad7bf4d98a47b5919dc1e9fd66dc1c1905b4.tar.bz2 llvm-90f1ad7bf4d98a47b5919dc1e9fd66dc1c1905b4.tar.xz |
Fix PR1158
Do not insert Analysis pass, if it is already available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index f8b311be7e..02938710fa 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -377,6 +377,11 @@ void PMTopLevelManager::schedulePass(Pass *P) { // TODO : Allocate function manager for this pass, other wise required set // may be inserted into previous function manager + // If this Analysis is already requested by one of the previous pass + // and it is still available then do not insert new pass in the queue again. + if (findAnalysisPass(P->getPassInfo())) + return; + AnalysisUsage AnUsage; P->getAnalysisUsage(AnUsage); const std::vector<AnalysisID> &RequiredSet = AnUsage.getRequiredSet(); |