[PM] Introduce an abstraction for all the analyses over a particular IR
authorChandler Carruth <chandlerc@gmail.com>
Sat, 20 Aug 2016 04:57:28 +0000 (04:57 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 20 Aug 2016 04:57:28 +0000 (04:57 +0000)
commit8abdf75d6b3857ce4e1e49e7596a5a98fc2bc435
tree893c6aca6ff0c260e598581e4e96c93e13a46d88
parent314364cbd2de2e2aadc1d5652cce0e832ea41239
[PM] Introduce an abstraction for all the analyses over a particular IR
unit for use in the PreservedAnalyses set.

This doesn't have any important functional change yet but it cleans
things up and makes the analysis substantially more efficient by
avoiding querying through the type erasure for every analysis.

I also think it makes it much easier to reason about how analyses are
preserved when walking across pass managers and across IR unit
abstractions.

Thanks to Sean and Mehdi both for the comments and suggestions.

Differential Revision: https://reviews.llvm.org/D23691

llvm-svn: 279360
llvm/include/llvm/IR/PassManager.h
llvm/lib/IR/PassManager.cpp
llvm/test/Other/new-pass-manager.ll