Don't call getAnalysisUsage unless -debug-pass is enabled. This speeds

up the passmgr by avoiding useless work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54528 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-08-08 15:14:09 +00:00
parent e1a4eda990
commit 0dabb7e8f3
4 changed files with 45 additions and 33 deletions
+2 -4
View File
@@ -91,11 +91,9 @@ bool CGPassManager::runOnModule(Module &M) {
// Run all passes on current SCC
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
Pass *P = getContainedPass(Index);
AnalysisUsage AnUsage;
P->getAnalysisUsage(AnUsage);
dumpPassInfo(P, EXECUTION_MSG, ON_CG_MSG, "");
dumpAnalysisSetInfo("Required", P, AnUsage.getRequiredSet());
dumpRequiredSet(P);
initializeAnalysisImpl(P);
@@ -120,7 +118,7 @@ bool CGPassManager::runOnModule(Module &M) {
if (Changed)
dumpPassInfo(P, MODIFICATION_MSG, ON_CG_MSG, "");
dumpAnalysisSetInfo("Preserved", P, AnUsage.getPreservedSet());
dumpPreservedSet(P);
verifyPreservedAnalysis(P);
removeNotPreservedAnalysis(P);