summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-06-17 00:11:01 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-06-17 00:11:01 +0000
commit04d0fe9c10b2e1337fd99fd61b6917c1e460c301 (patch)
tree40f9aacb7c3ce17ca3a9de74333bf36bf377e8b4 /unittests
parent5e71c1e0a775ac9cbeb70e8b5fb82c731a0e9464 (diff)
[PM] Remove support for omitting the AnalysisManager argument to new
pass manager passes' `run` methods. This removes a bunch of SFINAE goop from the pass manager and just requires pass authors to accept `AnalysisManager<IRUnitT> &` as a dead argument. This is a small price to pay for the simplicity of the system as a whole, despite the noise that changing it causes at this stage. This will also helpfull allow us to make the signature of the run methods much more flexible for different kinds af passes to support things like intelligently updating the pass's progression over IR units. While this touches many, many, files, the changes are really boring. Mostly made with the help of my trusty perl one liners. Thanks to Sean and Hal for bouncing ideas for this with me in IRC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Analysis/CGSCCPassManagerTest.cpp2
-rw-r--r--unittests/IR/PassManagerTest.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/unittests/Analysis/CGSCCPassManagerTest.cpp b/unittests/Analysis/CGSCCPassManagerTest.cpp
index 7f6e4d13ff8..431fb62cdc9 100644
--- a/unittests/Analysis/CGSCCPassManagerTest.cpp
+++ b/unittests/Analysis/CGSCCPassManagerTest.cpp
@@ -199,7 +199,7 @@ struct TestSCCPass {
struct TestFunctionPass {
TestFunctionPass(int &RunCount) : RunCount(RunCount) {}
- PreservedAnalyses run(Function &M) {
+ PreservedAnalyses run(Function &F, AnalysisManager<Function> &) {
++RunCount;
return PreservedAnalyses::none();
}
diff --git a/unittests/IR/PassManagerTest.cpp b/unittests/IR/PassManagerTest.cpp
index 3bfe22cf646..80ed723ae08 100644
--- a/unittests/IR/PassManagerTest.cpp
+++ b/unittests/IR/PassManagerTest.cpp
@@ -77,7 +77,7 @@ char TestModuleAnalysis::PassID;
struct TestModulePass : PassInfoMixin<TestModulePass> {
TestModulePass(int &RunCount) : RunCount(RunCount) {}
- PreservedAnalyses run(Module &M) {
+ PreservedAnalyses run(Module &M, ModuleAnalysisManager &) {
++RunCount;
return PreservedAnalyses::none();
}
@@ -86,7 +86,9 @@ struct TestModulePass : PassInfoMixin<TestModulePass> {
};
struct TestPreservingModulePass : PassInfoMixin<TestPreservingModulePass> {
- PreservedAnalyses run(Module &M) { return PreservedAnalyses::all(); }
+ PreservedAnalyses run(Module &M, ModuleAnalysisManager &) {
+ return PreservedAnalyses::all();
+ }
};
struct TestMinPreservingModulePass
@@ -145,7 +147,7 @@ struct TestInvalidationFunctionPass
: PassInfoMixin<TestInvalidationFunctionPass> {
TestInvalidationFunctionPass(StringRef FunctionName) : Name(FunctionName) {}
- PreservedAnalyses run(Function &F) {
+ PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM) {
return F.getName() == Name ? PreservedAnalyses::none()
: PreservedAnalyses::all();
}