diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-01-11 11:52:05 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-01-11 11:52:05 +0000 |
commit | a13f27cc3405c71e8e8b702e8f3ce19a2fa73cb5 (patch) | |
tree | 4d9263ce13f5b6fca798eebfd9d637c178bbd3e8 /llvm/unittests/IR/PassManagerTest.cpp | |
parent | d7693d8444982118af05f6f8971ecb2908215b30 (diff) | |
download | bcm5719-llvm-a13f27cc3405c71e8e8b702e8f3ce19a2fa73cb5.tar.gz bcm5719-llvm-a13f27cc3405c71e8e8b702e8f3ce19a2fa73cb5.zip |
[PM] Add names to passes under the new pass manager, and a debug output
mode that can be used to debug the execution of everything.
No support for analyses here, that will come later. This already helps
show parts of the opt commandline integration that isn't working. Tests
of that will start using it as the bugs are fixed.
llvm-svn: 199004
Diffstat (limited to 'llvm/unittests/IR/PassManagerTest.cpp')
-rw-r--r-- | llvm/unittests/IR/PassManagerTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/unittests/IR/PassManagerTest.cpp b/llvm/unittests/IR/PassManagerTest.cpp index 8db9c67e7dd..7b2b46a934e 100644 --- a/llvm/unittests/IR/PassManagerTest.cpp +++ b/llvm/unittests/IR/PassManagerTest.cpp @@ -86,6 +86,8 @@ struct TestModulePass { return PreservedAnalyses::none(); } + static StringRef name() { return "TestModulePass"; } + int &RunCount; }; @@ -93,6 +95,8 @@ struct TestPreservingModulePass { PreservedAnalyses run(Module *M) { return PreservedAnalyses::all(); } + + static StringRef name() { return "TestPreservingModulePass"; } }; struct TestMinPreservingModulePass { @@ -105,6 +109,8 @@ struct TestMinPreservingModulePass { PA.preserve<FunctionAnalysisManagerModuleProxy>(); return PA; } + + static StringRef name() { return "TestMinPreservingModulePass"; } }; struct TestFunctionPass { @@ -138,6 +144,8 @@ struct TestFunctionPass { return PreservedAnalyses::all(); } + static StringRef name() { return "TestFunctionPass"; } + int &RunCount; int &AnalyzedInstrCount; int &AnalyzedFunctionCount; @@ -154,6 +162,8 @@ struct TestInvalidationFunctionPass { : PreservedAnalyses::all(); } + static StringRef name() { return "TestInvalidationFunctionPass"; } + StringRef Name; }; |