comparison mlir/test/Pass/pipeline-parsing.mlir @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // RUN: mlir-opt %s -pass-pipeline='module(test-module-pass,func(test-function-pass)),func(test-function-pass)' -pass-pipeline="func(cse,canonicalize)" -verify-each=false -pass-timing -pass-timing-display=pipeline 2>&1 | FileCheck %s
2 // RUN: mlir-opt %s -test-textual-pm-nested-pipeline -verify-each=false -pass-timing -pass-timing-display=pipeline 2>&1 | FileCheck %s --check-prefix=TEXTUAL_CHECK
3 // RUN: not mlir-opt %s -pass-pipeline='module(test-module-pass' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_1 %s
4 // RUN: not mlir-opt %s -pass-pipeline='module(test-module-pass))' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_2 %s
5 // RUN: not mlir-opt %s -pass-pipeline='module()(' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_3 %s
6 // RUN: not mlir-opt %s -pass-pipeline=',' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_4 %s
7
8 // CHECK_ERROR_1: encountered unbalanced parentheses while parsing pipeline
9 // CHECK_ERROR_2: encountered extra closing ')' creating unbalanced parentheses while parsing pipeline
10 // CHECK_ERROR_3: expected ',' after parsing pipeline
11 // CHECK_ERROR_4: does not refer to a registered pass or pass pipeline
12
13 func @foo() {
14 return
15 }
16
17 module {
18 func @foo() {
19 return
20 }
21 }
22
23 // CHECK: Pipeline Collection : ['func', 'module']
24 // CHECK-NEXT: 'func' Pipeline
25 // CHECK-NEXT: TestFunctionPass
26 // CHECK-NEXT: CSE
27 // CHECK-NEXT: DominanceInfo
28 // CHECK-NEXT: Canonicalizer
29 // CHECK-NEXT: 'module' Pipeline
30 // CHECK-NEXT: TestModulePass
31 // CHECK-NEXT: 'func' Pipeline
32 // CHECK-NEXT: TestFunctionPass
33
34 // TEXTUAL_CHECK: Pipeline Collection : ['func', 'module']
35 // TEXTUAL_CHECK-NEXT: 'func' Pipeline
36 // TEXTUAL_CHECK-NEXT: TestFunctionPass
37 // TEXTUAL_CHECK-NEXT: 'module' Pipeline
38 // TEXTUAL_CHECK-NEXT: TestModulePass
39 // TEXTUAL_CHECK-NEXT: 'func' Pipeline
40 // TEXTUAL_CHECK-NEXT: TestFunctionPass