27 lines · plain
1// REQUIRES: asserts2// RUN: mlir-opt %s -verify-each=true -pass-pipeline='builtin.module(func.func(test-stats-pass,test-stats-pass))' -mlir-pass-statistics -mlir-pass-statistics-display=list 2>&1 | FileCheck -check-prefix=LIST %s3// RUN: mlir-opt %s -verify-each=true -pass-pipeline='builtin.module(func.func(test-stats-pass,test-stats-pass))' -mlir-pass-statistics -mlir-pass-statistics-display=pipeline 2>&1 | FileCheck -check-prefix=PIPELINE %s4 5// LIST: Pass statistics report6// LIST: TestStatisticPass7// LIST-NEXT: (S) {{0|8}} num-ops - Number of operations counted8// LIST-NEXT: (S) {{0|8}} num-ops2 - Number of operations counted one more time9// LIST-NOT: Verifier10 11// PIPELINE: Pass statistics report12// PIPELINE: 'func.func' Pipeline13// PIPELINE-NEXT: TestStatisticPass14// PIPELINE-NEXT: (S) {{0|4}} num-ops - Number of operations counted15// PIPELINE-NEXT: (S) {{0|4}} num-ops2 - Number of operations counted one more time16// PIPELINE-NEXT: TestStatisticPass17// PIPELINE-NEXT: (S) {{0|4}} num-ops - Number of operations counted18// PIPELINE-NEXT: (S) {{0|4}} num-ops2 - Number of operations counted one more time19 20func.func @foo() {21 return22}23 24func.func @bar() {25 return26}27