[llvm-commits] CVS: llvm/lib/VMCore/PassManager.cpp
Devang Patel
dpatel at apple.com
Thu Dec 7 12:04:04 PST 2006
Changes in directory llvm/lib/VMCore:
PassManager.cpp updated: 1.43 -> 1.44
---
Log message:
If pass reserves all analysis info then each info is not separately
included in PreservedSet. So check getPreservesAll() first.
---
Diffs of the changes: (+6 -3)
PassManager.cpp | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
Index: llvm/lib/VMCore/PassManager.cpp
diff -u llvm/lib/VMCore/PassManager.cpp:1.43 llvm/lib/VMCore/PassManager.cpp:1.44
--- llvm/lib/VMCore/PassManager.cpp:1.43 Thu Dec 7 13:57:52 2006
+++ llvm/lib/VMCore/PassManager.cpp Thu Dec 7 14:03:49 2006
@@ -436,8 +436,11 @@
void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
- const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
+ 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; ++I ) {
if (std::find(PreservedSet.begin(), PreservedSet.end(), I->first) ==
@@ -470,8 +473,8 @@
/// Add pass P into the PassVector. Update
/// AvailableAnalysis appropriately if ProcessAnalysis is true.
-void PMDataManager::addPassToManager (Pass *P,
- bool ProcessAnalysis) {
+void PMDataManager::addPassToManager(Pass *P,
+ bool ProcessAnalysis) {
if (ProcessAnalysis) {
// Take a note of analysis required and made available by this pass
More information about the llvm-commits
mailing list