mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 09:22:31 +00:00
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
This commit is contained in:
parent
7a7cf6b984
commit
488dc6732d
@ -463,20 +463,34 @@ void PMTopLevelManager::schedulePass(Pass *P) {
|
||||
|
||||
AnalysisUsage *AnUsage = findAnalysisUsage(P);
|
||||
|
||||
const AnalysisUsage::VectorType &RequiredSet = AnUsage->getRequiredSet();
|
||||
for (AnalysisUsage::VectorType::const_iterator I = RequiredSet.begin(),
|
||||
E = RequiredSet.end(); I != E; ++I) {
|
||||
|
||||
Pass *AnalysisPass = findAnalysisPass(*I);
|
||||
if (!AnalysisPass) {
|
||||
AnalysisPass = (*I)->createPass();
|
||||
// Schedule this analysis run first only if it is not a lower level
|
||||
// analysis pass. Lower level analsyis passes are run on the fly.
|
||||
if (P->getPotentialPassManagerType () >=
|
||||
AnalysisPass->getPotentialPassManagerType())
|
||||
schedulePass(AnalysisPass);
|
||||
else
|
||||
delete AnalysisPass;
|
||||
bool checkAnalysis = true;
|
||||
while (checkAnalysis) {
|
||||
checkAnalysis = false;
|
||||
|
||||
const AnalysisUsage::VectorType &RequiredSet = AnUsage->getRequiredSet();
|
||||
for (AnalysisUsage::VectorType::const_iterator I = RequiredSet.begin(),
|
||||
E = RequiredSet.end(); I != E; ++I) {
|
||||
|
||||
Pass *AnalysisPass = findAnalysisPass(*I);
|
||||
if (!AnalysisPass) {
|
||||
AnalysisPass = (*I)->createPass();
|
||||
if (P->getPotentialPassManagerType () ==
|
||||
AnalysisPass->getPotentialPassManagerType())
|
||||
// Schedule analysis pass that is managed by the same pass manager.
|
||||
schedulePass(AnalysisPass);
|
||||
else if (P->getPotentialPassManagerType () >
|
||||
AnalysisPass->getPotentialPassManagerType()) {
|
||||
// Schedule analysis pass that is managed by a new manager.
|
||||
schedulePass(AnalysisPass);
|
||||
// Recheck analysis passes to ensure that required analysises that
|
||||
// are already checked are still available.
|
||||
checkAnalysis = true;
|
||||
}
|
||||
else
|
||||
// Do not schedule this analysis. Lower level analsyis
|
||||
// passes are run on the fly.
|
||||
delete AnalysisPass;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
5
test/Other/2008-08-14-PassManager.ll
Normal file
5
test/Other/2008-08-14-PassManager.ll
Normal file
@ -0,0 +1,5 @@
|
||||
; RUN: llvm-as < %s | opt -loop-deletion -loop-index-split -disable-output
|
||||
; PR 2640
|
||||
define i32 @test1() {
|
||||
ret i32 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user