brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · 7f368c6 Raw
78 lines · plain
1// RUN: mlir-opt %s -mlir-disable-threading -pass-pipeline='builtin.module(builtin.module(test-module-pass,func.func(test-function-pass)),func.func(test-function-pass),func.func(cse,canonicalize))' -verify-each=false -mlir-timing -mlir-timing-display=tree 2>&1 | FileCheck %s2// RUN: mlir-opt %s -mlir-disable-threading -test-textual-pm-nested-pipeline -verify-each=false -mlir-timing -mlir-timing-display=tree 2>&1 | FileCheck %s --check-prefix=TEXTUAL_CHECK3// RUN: mlir-opt %s -mlir-disable-threading -pass-pipeline='builtin.module(builtin.module(test-module-pass),any(test-interface-pass),any(test-interface-pass),func.func(test-function-pass),any(canonicalize),func.func(cse))' -verify-each=false -mlir-timing -mlir-timing-display=tree 2>&1 | FileCheck %s --check-prefix=GENERIC_MERGE_CHECK4// RUN: mlir-opt %s -mlir-disable-threading -pass-pipeline=' builtin.module ( builtin.module( func.func( test-function-pass, print-op-stats{ json=false } ) ) ) ' -verify-each=false -mlir-timing -mlir-timing-display=tree 2>&1 | FileCheck %s --check-prefix=PIPELINE_STR_WITH_SPACES_CHECK5// RUN: not mlir-opt %s -pass-pipeline='any(builtin.module(test-module-pass)' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_1 %s6// RUN: not mlir-opt %s -pass-pipeline='builtin.module(test-module-pass))' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_2 %s7// RUN: not mlir-opt %s -pass-pipeline='any(builtin.module()()' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_3 %s8// RUN: not mlir-opt %s -pass-pipeline='any(,)' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_4 %s9// RUN: not mlir-opt %s -pass-pipeline='func.func(test-module-pass)' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_5 %s10 11// CHECK_ERROR_1: encountered unbalanced parentheses while parsing pipeline12// CHECK_ERROR_2: encountered extra closing ')' creating unbalanced parentheses while parsing pipeline13// CHECK_ERROR_3: expected ',' after parsing pipeline14// CHECK_ERROR_4: does not refer to a registered pass or pass pipeline15// CHECK_ERROR_5:  Can't add pass '{{.*}}TestModulePass' restricted to 'builtin.module' on a PassManager intended to run on 'func.func', did you intend to nest?16 17// RUN: not mlir-opt %s -pass-pipeline='' -cse 2>&1 | FileCheck --check-prefix=CHECK_ERROR_6 %s18// CHECK_ERROR_6: '-pass-pipeline' option can't be used with individual pass options19 20// RUN: not mlir-opt %s -pass-pipeline='wrong-op()' 2>&1 | FileCheck --check-prefix=CHECK_ERROR_7 %s21// CHECK_ERROR_7: can't run 'wrong-op' pass manager on 'builtin.module' op22 23// RUN: mlir-opt %s -pass-pipeline='any(cse)' -dump-pass-pipeline 2>&1 | FileCheck %s -check-prefix=CHECK_ROUNDTRIP24// CHECK_ROUNDTRIP: any(25// CHECK_ROUNDTRIP-NEXT: cse26// CHECK_ROUNDTRIP-NEXT: )27 28func.func @foo() {29  return30}31 32module {33  func.func @foo() {34    return35  }36}37 38// CHECK: Pipeline Collection : ['builtin.module', 'func.func']39// CHECK-NEXT:   'func.func' Pipeline40// CHECK-NEXT:     TestFunctionPass41// CHECK-NEXT:     CSE42// CHECK-NEXT:       DominanceInfo43// CHECK-NEXT:     Canonicalizer44// CHECK-NEXT:   'builtin.module' Pipeline45// CHECK-NEXT:     TestModulePass46// CHECK-NEXT:     'func.func' Pipeline47// CHECK-NEXT:       TestFunctionPass48 49// TEXTUAL_CHECK: Pipeline Collection : ['builtin.module', 'func.func']50// TEXTUAL_CHECK-NEXT:   'func.func' Pipeline51// TEXTUAL_CHECK-NEXT:     TestFunctionPass52// TEXTUAL_CHECK-NEXT:   'builtin.module' Pipeline53// TEXTUAL_CHECK-NEXT:     TestModulePass54// TEXTUAL_CHECK-NEXT:     'func.func' Pipeline55// TEXTUAL_CHECK-NEXT:       TestFunctionPass56 57// PIPELINE_STR_WITH_SPACES_CHECK:   'builtin.module' Pipeline58// PIPELINE_STR_WITH_SPACES_CHECK-NEXT:   'func.func' Pipeline59// PIPELINE_STR_WITH_SPACES_CHECK-NEXT:     TestFunctionPass60// PIPELINE_STR_WITH_SPACES_CHECK-NEXT:     PrintOpStats61 62// Check that generic pass pipelines are only merged when they aren't63// going to overlap with op-specific pipelines.64// GENERIC_MERGE_CHECK:      Pipeline Collection : ['builtin.module', 'any']65// GENERIC_MERGE_CHECK-NEXT:   'any' Pipeline66// GENERIC_MERGE_CHECK-NEXT:     TestInterfacePass67// GENERIC_MERGE_CHECK-NEXT:   'builtin.module' Pipeline68// GENERIC_MERGE_CHECK-NEXT:     TestModulePass69// GENERIC_MERGE_CHECK-NEXT: 'any' Pipeline70// GENERIC_MERGE_CHECK-NEXT:   TestInterfacePass71// GENERIC_MERGE_CHECK-NEXT: 'func.func' Pipeline72// GENERIC_MERGE_CHECK-NEXT:   TestFunctionPass73// GENERIC_MERGE_CHECK-NEXT: 'any' Pipeline74// GENERIC_MERGE_CHECK-NEXT:   Canonicalizer75// GENERIC_MERGE_CHECK-NEXT: 'func.func' Pipeline76// GENERIC_MERGE_CHECK-NEXT:   CSE77// GENERIC_MERGE_CHECK-NEXT:     (A) DominanceInfo78