[PM] Refactor the new pass manager to use a single template to implement
authorChandler Carruth <chandlerc@gmail.com>
Tue, 13 Jan 2015 11:13:56 +0000 (11:13 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 13 Jan 2015 11:13:56 +0000 (11:13 +0000)
commit92602ea18e3d3b1fb6b780a2aa0301004f2c7285
tree375d585f41f71ea75338cb7535639e066e9e5954
parent44ce0c866ca2b87a5e235a0ed0a3b5467c827f35
[PM] Refactor the new pass manager to use a single template to implement
the generic functionality of the pass managers themselves.

In the new infrastructure, the pass "manager" isn't actually interesting
at all. It just pipelines a single chunk of IR through N passes. We
don't need to know anything about the IR or the passes to do this really
and we can replace the 3 implementations of the exact same functionality
with a single generic PassManager template, complementing the single
generic AnalysisManager template.

I've left typedefs in place to give convenient names to the various
obvious instantiations of the template.

With this, I think I've nuked almost all of the redundant logic in the
managers, and I think the overall design is actually simpler for having
single templates that clearly indicate there is no special logic here.
The logging is made somewhat more annoying by this change, but I don't
think the difference is worth having heavy-weight traits to help log
things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225783 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/CGSCCPassManager.h
include/llvm/IR/PassManager.h
lib/Analysis/CGSCCPassManager.cpp
lib/IR/PassManager.cpp
test/Other/new-pass-manager.ll
test/Other/pass-pipeline-parsing.ll