mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-13 08:35:46 +00:00
removeNotPreservedAnalysis().
Do not remove ImmutablePass from the list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32507 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
395ed73984
commit
54e247d2d0
@ -580,13 +580,17 @@ void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
|
||||
|
||||
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
||||
for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(),
|
||||
E = AvailableAnalysis.end(); I != E; ++I ) {
|
||||
E = AvailableAnalysis.end(); I != E; ) {
|
||||
if (std::find(PreservedSet.begin(), PreservedSet.end(), I->first) ==
|
||||
PreservedSet.end()) {
|
||||
// Remove this analysis
|
||||
std::map<AnalysisID, Pass*>::iterator J = I++;
|
||||
AvailableAnalysis.erase(J);
|
||||
}
|
||||
if (!dynamic_cast<ImmutablePass*>(I->second)) {
|
||||
std::map<AnalysisID, Pass*>::iterator J = I++;
|
||||
AvailableAnalysis.erase(J);
|
||||
} else
|
||||
++I;
|
||||
} else
|
||||
++I;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user