#include "llvm/Analysis/Dominators.h"
#include "llvm-c/Core.h"
#include <algorithm>
+#include <cstdio>
#include <vector>
#include <map>
using namespace llvm;
// generate the analysis again. Stale analysis info should not be
// available at this point.
if (P->getPassInfo() &&
- P->getPassInfo()->isAnalysis() && findAnalysisPass(P->getPassInfo()))
+ P->getPassInfo()->isAnalysis() && findAnalysisPass(P->getPassInfo())) {
+ delete P;
return;
+ }
AnalysisUsage *AnUsage = findAnalysisUsage(P);
&& std::find(PreservedSet.begin(), PreservedSet.end(), Info->first) ==
PreservedSet.end()) {
// Remove this analysis
- AvailableAnalysis.erase(Info);
if (PassDebugging >= Details) {
Pass *S = Info->second;
cerr << " -- '" << P->getPassName() << "' is not preserving '";
cerr << S->getPassName() << "'\n";
}
+ AvailableAnalysis.erase(Info);
}
}