diff options
author | Justin Bogner <mail@justinbogner.com> | 2016-05-03 21:35:08 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2016-05-03 21:35:08 +0000 |
commit | e839c3e6ab376b7b2024b2323b5c52f61af00581 (patch) | |
tree | 7d1876f21d5eb42765bfdb46378254ba6749fd87 /llvm/unittests/Analysis/LoopPassManagerTest.cpp | |
parent | 27cb2f12252776825f656997ec4ee8f552259f08 (diff) | |
download | bcm5719-llvm-e839c3e6ab376b7b2024b2323b5c52f61af00581.tar.gz bcm5719-llvm-e839c3e6ab376b7b2024b2323b5c52f61af00581.zip |
PM: Check that loop passes preserve a basic set of analyses
A loop pass that didn't preserve this entire set of passes wouldn't
play well with other loop passes, since these are generally a basic
requirement to do any interesting transformations to a loop.
Adds a helper to get the set of analyses a loop pass should preserve,
and checks that any loop pass we run satisfies the requirement.
llvm-svn: 268444
Diffstat (limited to 'llvm/unittests/Analysis/LoopPassManagerTest.cpp')
-rw-r--r-- | llvm/unittests/Analysis/LoopPassManagerTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Analysis/LoopPassManagerTest.cpp b/llvm/unittests/Analysis/LoopPassManagerTest.cpp index 3cbe203e14d..5858e174aab 100644 --- a/llvm/unittests/Analysis/LoopPassManagerTest.cpp +++ b/llvm/unittests/Analysis/LoopPassManagerTest.cpp @@ -92,7 +92,7 @@ public: TestLoopInvalidatingPass(StringRef LoopName) : Name(LoopName) {} PreservedAnalyses run(Loop &L, AnalysisManager<Loop> &AM) { - return L.getName() == Name ? PreservedAnalyses::none() + return L.getName() == Name ? getLoopPassPreservedAnalyses() : PreservedAnalyses::all(); } |