[AliasAnalysis/NewPassManager] Invalidate AAManager less often.
authorAlina Sbirlea <asbirlea@google.com>
Tue, 30 Apr 2019 22:15:47 +0000 (22:15 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Tue, 30 Apr 2019 22:15:47 +0000 (22:15 +0000)
commitba48a2c5e856fd4221a0551d3b480a1b7fccac02
treedc57b4e930779b842f77877b354dc28007235469
parenta6322941ffc15275e837435eee7aabba0ca15211
[AliasAnalysis/NewPassManager] Invalidate AAManager less often.

Summary:
This is a redo of D60914.

The objective is to not invalidate AAManager, which is stateless, unless
there is an explicit invalidate in one of the AAResults.

To achieve this, this patch adds an API to PAC, to check precisely this:
is this analysis not invalidated explicitly == is this analysis not abandoned == is this analysis stateless, so preserved without explicitly being marked as preserved by everyone

Reviewers: chandlerc

Subscribers: mehdi_amini, jlebar, george.burgess.iv, llvm-commits

Tags: #llvm

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

llvm-svn: 359622
llvm/include/llvm/Analysis/AliasAnalysis.h
llvm/include/llvm/IR/PassManager.h
llvm/lib/Analysis/AliasAnalysis.cpp
llvm/test/Analysis/MemoryDependenceAnalysis/invalidation.ll
llvm/test/Other/new-pass-manager.ll
llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp