diff options
author | Devang Patel <dpatel@apple.com> | 2007-07-19 05:36:09 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-07-19 05:36:09 +0000 |
commit | 9750b5d5779e6efec10a93633dd1d36c5f61dbc3 (patch) | |
tree | 775dd46d94a8f4d80d29443d74837e53ce8a3078 /lib/VMCore/PassManager.cpp | |
parent | b97819852a3e68c23aa9d663fdc4271b79ecc29c (diff) | |
download | external_llvm-9750b5d5779e6efec10a93633dd1d36c5f61dbc3.zip external_llvm-9750b5d5779e6efec10a93633dd1d36c5f61dbc3.tar.gz external_llvm-9750b5d5779e6efec10a93633dd1d36c5f61dbc3.tar.bz2 |
Set up ground work to verify preserved analysis info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/PassManager.cpp')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index af3cfb0..8d780e9 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -598,11 +598,18 @@ bool PMDataManager::preserveHigherLevelAnalysis(Pass *P) { void PMDataManager::removeNotPreservedAnalysis(Pass *P) { AnalysisUsage AnUsage; P->getAnalysisUsage(AnUsage); + const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet(); + // Verify preserved analysis + for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(), + E = AvailableAnalysis.end(); I != E; ++I) { + Pass *AP = I->second; + AP->verifyAnalysis(); + } + if (AnUsage.getPreservesAll()) return; - const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet(); for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(), E = AvailableAnalysis.end(); I != E; ) { std::map<AnalysisID, Pass*>::iterator Info = I++; |