[PM] Don't run the machinery of invalidating all the analysis passes
authorChandler Carruth <chandlerc@gmail.com>
Mon, 5 Jan 2015 12:32:11 +0000 (12:32 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 5 Jan 2015 12:32:11 +0000 (12:32 +0000)
commit1ab487fdc7da348fea52b2f665bdff433a63b136
tree1616ff830f66ceee1714051cd8826604bb5143af
parent040ca449b243a48cf3f3000c66fb6b5c5670441b
[PM] Don't run the machinery of invalidating all the analysis passes
when all are being preserved.

We want to short-circuit this for a couple of reasons. One, I don't
really want passes to grow a dependency on actually receiving their
invalidate call when they've been preserved. I'm thinking about removing
this entirely. But more importantly, preserving everything is likely to
be the common case in a lot of scenarios, and it would be really good to
bypass all of the invalidation and preservation machinery there.
Avoiding calling N opaque functions to try to invalidate things that are
by definition still valid seems important. =]

This wasn't really inpsired by much other than seeing the spam in the
logging for analyses, but it seems better ot get it checked in rather
than forgetting about it.

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