forked from OSchip/llvm-project
If pass reserves all analysis info then each info is not separately
included in PreservedSet. So check getPreservesAll() first. llvm-svn: 32319
This commit is contained in:
parent
f9d96b934d
commit
2e169c37ea
|
@ -436,8 +436,11 @@ void PMDataManager::recordAvailableAnalysis(Pass *P) {
|
||||||
void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
|
void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
|
||||||
AnalysisUsage AnUsage;
|
AnalysisUsage AnUsage;
|
||||||
P->getAnalysisUsage(AnUsage);
|
P->getAnalysisUsage(AnUsage);
|
||||||
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
|
||||||
|
|
||||||
|
if (AnUsage.getPreservesAll())
|
||||||
|
return;
|
||||||
|
|
||||||
|
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
||||||
for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(),
|
for (std::map<AnalysisID, Pass*>::iterator I = AvailableAnalysis.begin(),
|
||||||
E = AvailableAnalysis.end(); I != E; ++I ) {
|
E = AvailableAnalysis.end(); I != E; ++I ) {
|
||||||
if (std::find(PreservedSet.begin(), PreservedSet.end(), I->first) ==
|
if (std::find(PreservedSet.begin(), PreservedSet.end(), I->first) ==
|
||||||
|
@ -470,7 +473,7 @@ void PMDataManager::removeDeadPasses(Pass *P) {
|
||||||
|
|
||||||
/// Add pass P into the PassVector. Update
|
/// Add pass P into the PassVector. Update
|
||||||
/// AvailableAnalysis appropriately if ProcessAnalysis is true.
|
/// AvailableAnalysis appropriately if ProcessAnalysis is true.
|
||||||
void PMDataManager::addPassToManager (Pass *P,
|
void PMDataManager::addPassToManager(Pass *P,
|
||||||
bool ProcessAnalysis) {
|
bool ProcessAnalysis) {
|
||||||
|
|
||||||
if (ProcessAnalysis) {
|
if (ProcessAnalysis) {
|
||||||
|
|
Loading…
Reference in New Issue