]> granicus.if.org Git - llvm/commit
[PM] Fold all three analysis managers into a single AnalysisManager
authorChandler Carruth <chandlerc@gmail.com>
Tue, 13 Jan 2015 02:51:47 +0000 (02:51 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 13 Jan 2015 02:51:47 +0000 (02:51 +0000)
commit6b1894aeae5422fdc1302dcbd917dcccba66d156
treee2e16aaa9e95964eafdb20e634b2a1bdf3dc6980
parentcd7eb37ca48ba8fb92e2604d3866a198b8a72a4e
[PM] Fold all three analysis managers into a single AnalysisManager
template.

This consolidates three copies of nearly the same core logic. It adds
"complexity" to the ModuleAnalysisManager in that it makes it possible
to share a ModuleAnalysisManager across multiple modules... But it does
so by deleting *all of the code*, so I'm OK with that. This will
naturally make fixing bugs in this code much simpler, etc.

The only down side here is that we have to use 'typename' and 'this->'
in various places, and the implementation is lifted into the header.
I'll take that for the code size reduction.

The convenient names are still typedef-ed and used throughout so that
users can largely ignore this aspect of the implementation.

The follow-up change to this will do the exact same refactoring for the
PassManagers. =D

It turns out that the interesting different code is almost entirely in
the adaptors. At the end, that should be essentially all that is left.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225757 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/CGSCCPassManager.h
include/llvm/Analysis/LazyCallGraph.h
include/llvm/IR/Module.h
include/llvm/IR/PassManager.h
lib/Analysis/CGSCCPassManager.cpp
lib/IR/PassManager.cpp
test/Other/new-pass-manager.ll
tools/opt/Passes.h