summaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-12 09:34:22 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-12 09:34:22 +0000
commite7687650c9ff5e52f572d8e70752f7c808ca707e (patch)
treef54cfd4d339974434ba44a10116bc26d46d0932e /test/Other
parent3d83eb48ac55f20e16997e210a59486f3717402a (diff)
downloadllvm-e7687650c9ff5e52f572d8e70752f7c808ca707e.tar.gz
llvm-e7687650c9ff5e52f572d8e70752f7c808ca707e.tar.bz2
llvm-e7687650c9ff5e52f572d8e70752f7c808ca707e.tar.xz
[PM] Add support for parsing function passes and function pass manager
nests to the opt commandline support. This also showcases the implicit-initial-manager support which will be most useful for testing. There are several bugs that I spotted by inspection here that I'll fix with test cases in subsequent commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199038 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/pass-pipeline-parsing.ll42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/Other/pass-pipeline-parsing.ll b/test/Other/pass-pipeline-parsing.ll
index 20d39c78d3..c7fab01d2b 100644
--- a/test/Other/pass-pipeline-parsing.ll
+++ b/test/Other/pass-pipeline-parsing.ll
@@ -16,3 +16,45 @@
; CHECK-NESTED-TWO-NOOP-MP: Running module pass: NoOpModulePass
; CHECK-NESTED-TWO-NOOP-MP: Finished module pass manager
; CHECK-NESTED-TWO-NOOP-MP: Finished module pass manager
+
+; RUN: opt -disable-output -debug-pass-manager \
+; RUN: -passes=no-op-function,no-op-function %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-TWO-NOOP-FP
+; CHECK-TWO-NOOP-FP: Starting module pass manager
+; CHECK-TWO-NOOP-FP: Running module pass: ModuleToFunctionPassAdaptor
+; CHECK-TWO-NOOP-FP: Starting function pass manager
+; CHECK-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
+; CHECK-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
+; CHECK-TWO-NOOP-FP: Finished function pass manager
+; CHECK-TWO-NOOP-FP: Finished module pass manager
+
+; RUN: opt -disable-output -debug-pass-manager \
+; RUN: -passes='function(no-op-function,no-op-function)' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-NESTED-TWO-NOOP-FP
+; CHECK-NESTED-TWO-NOOP-FP: Starting module pass manager
+; CHECK-NESTED-TWO-NOOP-FP: Running module pass: ModuleToFunctionPassAdaptor
+; CHECK-NESTED-TWO-NOOP-FP: Starting function pass manager
+; CHECK-NESTED-TWO-NOOP-FP: Running function pass: FunctionPassManager
+; CHECK-NESTED-TWO-NOOP-FP: Starting function pass manager
+; CHECK-NESTED-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
+; CHECK-NESTED-TWO-NOOP-FP: Running function pass: NoOpFunctionPass
+; CHECK-NESTED-TWO-NOOP-FP: Finished function pass manager
+; CHECK-NESTED-TWO-NOOP-FP: Finished function pass manager
+; CHECK-NESTED-TWO-NOOP-FP: Finished module pass manager
+
+; RUN: opt -disable-output -debug-pass-manager \
+; RUN: -passes='no-op-module,function(no-op-function,no-op-function),no-op-module' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-MIXED-FP-AND-MP
+; CHECK-MIXED-FP-AND-MP: Starting module pass manager
+; CHECK-MIXED-FP-AND-MP: Running module pass: NoOpModulePass
+; CHECK-MIXED-FP-AND-MP: Running module pass: ModuleToFunctionPassAdaptor
+; CHECK-MIXED-FP-AND-MP: Starting function pass manager
+; CHECK-MIXED-FP-AND-MP: Running function pass: NoOpFunctionPass
+; CHECK-MIXED-FP-AND-MP: Running function pass: NoOpFunctionPass
+; CHECK-MIXED-FP-AND-MP: Finished function pass manager
+; CHECK-MIXED-FP-AND-MP: Running module pass: NoOpModulePass
+; CHECK-MIXED-FP-AND-MP: Finished module pass manager
+
+define void @f() {
+ ret void
+}