[PM] Add names and debug logging for analysis passes to the new pass
authorChandler Carruth <chandlerc@gmail.com>
Mon, 5 Jan 2015 12:21:44 +0000 (12:21 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 5 Jan 2015 12:21:44 +0000 (12:21 +0000)
commit040ca449b243a48cf3f3000c66fb6b5c5670441b
treed0b84362951a5c096f9fb45a3e9d51b63b5054f9
parent9bf73516cb2e6709ea0a62d9053ec97ccc5e5388
[PM] Add names and debug logging for analysis passes to the new pass
manager.

This starts to allow us to test analyses more easily, but it's really
only the beginning. Some of the code here is still untestable without
manual changes to create analysis passes, but I wanted to factor it into
a small of chunks as possible.

Next up in order to be able to test things are, in no particular order:
- No-op analyses passes so we don't have to use real ones to exercise
  the pass maneger itself.
- Automatic way of generating dummy passes that require an analysis be
  run, including a variant that calls a 'print' method on a pass to make
  it even easier to print out the results of an analysis.
- Dummy passes that invalidate all analyses for their IR unit so we can
  test invalidation and re-runs.
- Automatic way to print each analysis pass as it is re-run.
- Automatic but optional verification of analysis passes everywhere
  possible.

I'm not claiming I'll get to all of these immediately, but that's what
is in the pipeline at some stage. I'm fleshing out exactly what I need
and what to prioritize by working on converting analyses and then trying
to test the conversion. =]

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