summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-01-15 00:26:18 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-01-15 00:26:18 +0000
commit2f19a324cb07c893ece46a45521c0a0bbd28a74a (patch)
treed044d647e8a544c7d77f7f5e4594a4aeddf79186 /llvm/unittests/Transforms
parent4b3dc18cf15aab6a0a05672f9794ce92e6ce8d64 (diff)
downloadbcm5719-llvm-2f19a324cb07c893ece46a45521c0a0bbd28a74a.tar.gz
bcm5719-llvm-2f19a324cb07c893ece46a45521c0a0bbd28a74a.zip
[PM] The assumption cache is fundamentally designed to be self-updating,
mark it as never invalidated in the new PM. The old PM already required this to work, and after a discussion with Hal this seems to really be the only sensible answer. The cache gracefully degrades as the IR is mutated, and most things which do this should already be incrementally updating the cache. This gets rid of a bunch of logic preserving and testing the invalidation of this analysis. llvm-svn: 292039
Diffstat (limited to 'llvm/unittests/Transforms')
-rw-r--r--llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp b/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
index a099e35c7f1..8f5a0c91b55 100644
--- a/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
+++ b/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
@@ -551,7 +551,6 @@ TEST_F(LoopPassManagerTest, InvalidationOfBundledAnalyses) {
EXPECT_CALL(MFPHandle, run(HasName("f"), _)).WillOnce(InvokeWithoutArgs([] {
auto PA = PreservedAnalyses::none();
// Not preserving `AAManager`.
- PA.preserve<AssumptionAnalysis>();
PA.preserve<DominatorTreeAnalysis>();
PA.preserve<LoopAnalysis>();
PA.preserve<LoopAnalysisManagerFunctionProxy>();
@@ -568,24 +567,6 @@ TEST_F(LoopPassManagerTest, InvalidationOfBundledAnalyses) {
EXPECT_CALL(MFPHandle, run(HasName("f"), _)).WillOnce(InvokeWithoutArgs([] {
auto PA = PreservedAnalyses::none();
PA.preserve<AAManager>();
- // Not preserving `AssumptionAnalysis`.
- PA.preserve<DominatorTreeAnalysis>();
- PA.preserve<LoopAnalysis>();
- PA.preserve<LoopAnalysisManagerFunctionProxy>();
- PA.preserve<ScalarEvolutionAnalysis>();
- return PA;
- }));
- EXPECT_CALL(MLAHandle, run(HasName("loop.0.0"), _, _));
- EXPECT_CALL(MLAHandle, run(HasName("loop.0.1"), _, _));
- EXPECT_CALL(MLAHandle, run(HasName("loop.0"), _, _));
- FPM.addPass(MFPHandle.getPass());
- FPM.addPass(createFunctionToLoopPassAdaptor(
- RequireAnalysisLoopPass<MockLoopAnalysisHandle::Analysis>()));
-
- EXPECT_CALL(MFPHandle, run(HasName("f"), _)).WillOnce(InvokeWithoutArgs([] {
- auto PA = PreservedAnalyses::none();
- PA.preserve<AAManager>();
- PA.preserve<AssumptionAnalysis>();
// Not preserving `DominatorTreeAnalysis`.
PA.preserve<LoopAnalysis>();
PA.preserve<LoopAnalysisManagerFunctionProxy>();
@@ -602,7 +583,6 @@ TEST_F(LoopPassManagerTest, InvalidationOfBundledAnalyses) {
EXPECT_CALL(MFPHandle, run(HasName("f"), _)).WillOnce(InvokeWithoutArgs([] {
auto PA = PreservedAnalyses::none();
PA.preserve<AAManager>();
- PA.preserve<AssumptionAnalysis>();
PA.preserve<DominatorTreeAnalysis>();
// Not preserving the `LoopAnalysis`.
PA.preserve<LoopAnalysisManagerFunctionProxy>();
@@ -619,7 +599,6 @@ TEST_F(LoopPassManagerTest, InvalidationOfBundledAnalyses) {
EXPECT_CALL(MFPHandle, run(HasName("f"), _)).WillOnce(InvokeWithoutArgs([] {
auto PA = PreservedAnalyses::none();
PA.preserve<AAManager>();
- PA.preserve<AssumptionAnalysis>();
PA.preserve<DominatorTreeAnalysis>();
PA.preserve<LoopAnalysis>();
// Not preserving the `LoopAnalysisManagerFunctionProxy`.
@@ -636,7 +615,6 @@ TEST_F(LoopPassManagerTest, InvalidationOfBundledAnalyses) {
EXPECT_CALL(MFPHandle, run(HasName("f"), _)).WillOnce(InvokeWithoutArgs([] {
auto PA = PreservedAnalyses::none();
PA.preserve<AAManager>();
- PA.preserve<AssumptionAnalysis>();
PA.preserve<DominatorTreeAnalysis>();
PA.preserve<LoopAnalysis>();
PA.preserve<LoopAnalysisManagerFunctionProxy>();
@@ -654,7 +632,7 @@ TEST_F(LoopPassManagerTest, InvalidationOfBundledAnalyses) {
// 'g' once with a requires pass and then run our mock pass over g a bunch
// but just get cached results each time.
EXPECT_CALL(MLAHandle, run(HasName("loop.g.0"), _, _));
- EXPECT_CALL(MFPHandle, run(HasName("g"), _)).Times(7);
+ EXPECT_CALL(MFPHandle, run(HasName("g"), _)).Times(6);
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
MPM.run(*M, MAM);
OpenPOWER on IntegriCloud