From 164a2aa6f44956a242f4843c4c21f059a735411d Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 17 Jun 2016 00:11:01 +0000 Subject: [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 &` 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. llvm-svn: 272978 --- llvm/unittests/IR/PassManagerTest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'llvm/unittests/IR/PassManagerTest.cpp') diff --git a/llvm/unittests/IR/PassManagerTest.cpp b/llvm/unittests/IR/PassManagerTest.cpp index 3bfe22cf646..80ed723ae08 100644 --- a/llvm/unittests/IR/PassManagerTest.cpp +++ b/llvm/unittests/IR/PassManagerTest.cpp @@ -77,7 +77,7 @@ char TestModuleAnalysis::PassID; struct TestModulePass : PassInfoMixin { 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 { }; struct TestPreservingModulePass : PassInfoMixin { - 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(StringRef FunctionName) : Name(FunctionName) {} - PreservedAnalyses run(Function &F) { + PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM) { return F.getName() == Name ? PreservedAnalyses::none() : PreservedAnalyses::all(); } -- cgit v1.2.3