This unifies analysis management for all IRUnitT's and adds dependency tracking.
The two are fairly of interrelated, since recursively invalidating transitive dependencies is difficult to do across separate analysis managers. Also, keeping track of the stack of analyses we are currently computing is difficult across separate analysis managers.
test/Other/analysis-manager/transitive-invalidation.ll shows a compelling test case.
I've used this in combination with http://reviews.llvm.org/D21921 to run the LTO pipeline on test-suite + SPEC cpu2006 with Asserts+ASan.
The two failures that remain are not related to this patch or approach (https://llvm.org/bugs/show_bug.cgi?id=28825 and https://llvm.org/bugs/show_bug.cgi?id=28888).
I've tried to retain the basic structure of the existing analysis manager code, but it still required touching quite a few lines and so the diff makes it look like it was totally rewritten.
A more incremental view of the patch can be seen here: https://github.com/llvm-mirror/llvm/compare/master...chisophugis:analysis-manager?expand=1
This patch requires making a small adjustment to every analysis and transform pass in tree (mostly, removing template parameters from AnalysisManager, and also removing use of the proxies), so there's a large number of mechanical changes.
This tracks downward invalidation using a dummy analysis called ParentIRUnitTrackingAnalysis.
By reusing the dependency tracking machinery, we get fine-grained invalidation of inner IRUnit's.
E.g. invaliding analyses on a single function doesn't invalidate loop analyses on all functions, which is a bug / fallout of the proxy approach (the InnerAnalysisManagerProxy calls "clear" on the entire LoopAnalysisManager).
TODO: test case for that
Wasn't the point of the refactoring with typedef to avoid this kind of diff?