[PM] Remove weird marking of invalidated analyses as "preserved".
authorChandler Carruth <chandlerc@gmail.com>
Mon, 28 Nov 2016 10:42:21 +0000 (10:42 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 28 Nov 2016 10:42:21 +0000 (10:42 +0000)
commit0c6efff178103f5b2bdeb6d20e5468027b02c13e
treed4673ff4a457097216db0932961e43b746f42ff7
parent1642c5d8713a73da1865f320d3bad103f6274b76
[PM] Remove weird marking of invalidated analyses as "preserved".

This never made a lot of sense. They've been invalidated for one IR unit
but they aren't really preserved in any normal sense. It seemed like it
would be an elegant way of communicating to outer IR units that pass
managers and adaptors had already handled invalidation, but we've since
ended up adding sets that model this more clearly: we're now using
the 'AllAnalysesOn<IRUnitT>' set to handle cases where the trick of
"preserving" invalidated analyses didn't work.

This patch moves to rely on that technique exclusively and removes the
cumbersome API aspect of updating the preserved set when doing
invalidation. This in turn will simplify a *number* of upcoming patches.

This has a side benefit of exposing a number of places where we were
failing to mark the 'AllAnalysesOn<IRUnitT>' set as preserved. This
patch fixes those, and with those fixes shouldn't change any observable
behavior.

llvm-svn: 288023
llvm/include/llvm/Analysis/CGSCCPassManager.h
llvm/include/llvm/Analysis/LoopPassManager.h
llvm/include/llvm/IR/PassManager.h
llvm/lib/Analysis/CGSCCPassManager.cpp