llvm.org GIT mirror llvm / 488dc67
The pass manager is not able to schedule -loop-deletion -loop-index-split. The loop-deletion pass does not preserve dom frontier, which is required by loop-index-split. When the PM checks dom frontier for loop-index-split, it has already verified that lcssa is availalble. However, new dom frontier forces new loop pass manager, which does not have lcssa yet. The PM should recheck availability of required analysis passes in such cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54805 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 11 years ago
2 changed file(s) with 33 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
462462
463463 AnalysisUsage *AnUsage = findAnalysisUsage(P);
464464
465 const AnalysisUsage::VectorType &RequiredSet = AnUsage->getRequiredSet();
466 for (AnalysisUsage::VectorType::const_iterator I = RequiredSet.begin(),
467 E = RequiredSet.end(); I != E; ++I) {
468
469 Pass *AnalysisPass = findAnalysisPass(*I);
470 if (!AnalysisPass) {
471 AnalysisPass = (*I)->createPass();
472 // Schedule this analysis run first only if it is not a lower level
473 // analysis pass. Lower level analsyis passes are run on the fly.
474 if (P->getPotentialPassManagerType () >=
475 AnalysisPass->getPotentialPassManagerType())
476 schedulePass(AnalysisPass);
477 else
478 delete AnalysisPass;
465 bool checkAnalysis = true;
466 while (checkAnalysis) {
467 checkAnalysis = false;
468
469 const AnalysisUsage::VectorType &RequiredSet = AnUsage->getRequiredSet();
470 for (AnalysisUsage::VectorType::const_iterator I = RequiredSet.begin(),
471 E = RequiredSet.end(); I != E; ++I) {
472
473 Pass *AnalysisPass = findAnalysisPass(*I);
474 if (!AnalysisPass) {
475 AnalysisPass = (*I)->createPass();
476 if (P->getPotentialPassManagerType () ==
477 AnalysisPass->getPotentialPassManagerType())
478 // Schedule analysis pass that is managed by the same pass manager.
479 schedulePass(AnalysisPass);
480 else if (P->getPotentialPassManagerType () >
481 AnalysisPass->getPotentialPassManagerType()) {
482 // Schedule analysis pass that is managed by a new manager.
483 schedulePass(AnalysisPass);
484 // Recheck analysis passes to ensure that required analysises that
485 // are already checked are still available.
486 checkAnalysis = true;
487 }
488 else
489 // Do not schedule this analysis. Lower level analsyis
490 // passes are run on the fly.
491 delete AnalysisPass;
492 }
479493 }
480494 }
481495
0 ; RUN: llvm-as < %s | opt -loop-deletion -loop-index-split -disable-output
1 ; PR 2640
2 define i32 @test1() {
3 ret i32 0;
4 }