[llvm-commits] [llvm] r54446 - /llvm/trunk/lib/VMCore/PassManager.cpp
Chris Lattner
sabre at nondot.org
Thu Aug 7 00:34:50 PDT 2008
Author: lattner
Date: Thu Aug 7 02:34:50 2008
New Revision: 54446
URL: http://llvm.org/viewvc/llvm-project?rev=54446&view=rev
Log:
Don't verify passes when assertions are disabled.
Modified:
llvm/trunk/lib/VMCore/PassManager.cpp
Modified: llvm/trunk/lib/VMCore/PassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=54446&r1=54445&r2=54446&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/PassManager.cpp (original)
+++ llvm/trunk/lib/VMCore/PassManager.cpp Thu Aug 7 02:34:50 2008
@@ -598,8 +598,12 @@
return true;
}
-/// verifyPreservedAnalysis -- Verify analysis presreved by pass P.
+/// verifyPreservedAnalysis -- Verify analysis preserved by pass P.
void PMDataManager::verifyPreservedAnalysis(Pass *P) {
+ // Don't do this unless assertions are enabled.
+#ifdef NDEBUG
+ return;
+#endif
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
@@ -608,8 +612,7 @@
for (std::vector<AnalysisID>::const_iterator I = PreservedSet.begin(),
E = PreservedSet.end(); I != E; ++I) {
AnalysisID AID = *I;
- Pass *AP = findAnalysisPass(AID, true);
- if (AP)
+ if (Pass *AP = findAnalysisPass(AID, true))
AP->verifyAnalysis();
}
}
@@ -1318,7 +1321,7 @@
dumpPassInfo(MP, MODIFICATION_MSG, ON_MODULE_MSG,
M.getModuleIdentifier().c_str());
dumpAnalysisSetInfo("Preserved", MP, AnUsage.getPreservedSet());
-
+
verifyPreservedAnalysis(MP);
removeNotPreservedAnalysis(MP);
recordAvailableAnalysis(MP);
More information about the llvm-commits
mailing list