[PM] Add a collection of no-op analysis passes and switch the new pass

manager tests to use them and be significantly more comprehensive.

This, naturally, uncovered a bug where the CGSCC pass manager wasn't
printing analyses when they were run.

The only remaining core manipulator is I think an invalidate pass
similar to the require pass. That'll be next. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225240 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth
2015-01-06 02:50:06 +00:00
parent 2e306caf39
commit 5b12a2f703
4 changed files with 57 additions and 7 deletions

View File

@ -62,8 +62,11 @@ CGSCCAnalysisManager::getResultImpl(void *PassID, LazyCallGraph::SCC &C) {
// If we don't have a cached result for this function, look up the pass and
// run it to produce a result, which we then add to the cache.
if (Inserted) {
auto &P = lookupPass(PassID);
if (DebugPM)
dbgs() << "Running CGSCC analysis: " << P.name() << "\n";
CGSCCAnalysisResultListT &ResultList = CGSCCAnalysisResultLists[&C];
ResultList.emplace_back(PassID, lookupPass(PassID).run(C, this));
ResultList.emplace_back(PassID, P.run(C, this));
RI->second = std::prev(ResultList.end());
}