forked from OSchip/llvm-project
[mlir] Prefix pass manager options with `mlir-`
With this change, there's going to be a clear distinction between LLVM and MLIR pass maanger options (e.g. `-mlir-print-after-all` vs `-print-after-all`). This change is desirable from the point of view of projects that depend on both LLVM and MLIR, e.g. Flang. For consistency, all pass manager options in MLIR are prefixed with `mlir-`, even options that don't have equivalents in LLVM . Differential Revision: https://reviews.llvm.org/D123495
This commit is contained in:
parent
fa087b4352
commit
fb16ed258c
|
@ -494,8 +494,8 @@ infrastructure as
|
|||
[`llvm::Statistic`](http://llvm.org/docs/ProgrammersManual.html#the-statistic-class-stats-option)
|
||||
and thus have similar usage constraints. Collected statistics can be dumped by
|
||||
the [pass manager](#pass-manager) programmatically via
|
||||
`PassManager::enableStatistics`; or via `-pass-statistics` and
|
||||
`-pass-statistics-display` on the command line.
|
||||
`PassManager::enableStatistics`; or via `-mlir-pass-statistics` and
|
||||
`-mlir-pass-statistics-display` on the command line.
|
||||
|
||||
An example is shown below:
|
||||
|
||||
|
@ -534,7 +534,7 @@ A pipeline view that models the structure of the pass manager, this is the
|
|||
default view:
|
||||
|
||||
```shell
|
||||
$ mlir-opt -pass-pipeline='func.func(my-pass,my-pass)' foo.mlir -pass-statistics
|
||||
$ mlir-opt -pass-pipeline='func.func(my-pass,my-pass)' foo.mlir -mlir-pass-statistics
|
||||
|
||||
===-------------------------------------------------------------------------===
|
||||
... Pass statistics report ...
|
||||
|
@ -553,7 +553,7 @@ A list view that aggregates the statistics of all instances of a specific pass
|
|||
together:
|
||||
|
||||
```shell
|
||||
$ mlir-opt -pass-pipeline='func.func(my-pass, my-pass)' foo.mlir -pass-statistics -pass-statistics-display=list
|
||||
$ mlir-opt -pass-pipeline='func.func(my-pass, my-pass)' foo.mlir -mlir-pass-statistics -mlir-pass-statistics-display=list
|
||||
|
||||
===-------------------------------------------------------------------------===
|
||||
... Pass statistics report ...
|
||||
|
@ -1082,13 +1082,13 @@ instrumentation can be added directly to the PassManager via the
|
|||
`enableIRPrinting` method. `mlir-opt` provides a few useful flags for utilizing
|
||||
this instrumentation:
|
||||
|
||||
* `print-ir-before=(comma-separated-pass-list)`
|
||||
* `mlir-print-ir-before=(comma-separated-pass-list)`
|
||||
* Print the IR before each of the passes provided within the pass list.
|
||||
* `print-ir-before-all`
|
||||
* `mlir-print-ir-before-all`
|
||||
* Print the IR before every pass in the pipeline.
|
||||
|
||||
```shell
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse)' -print-ir-before=cse
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse)' -mlir-print-ir-before=cse
|
||||
|
||||
*** IR Dump Before CSE ***
|
||||
func @simple_constant() -> (i32, i32) {
|
||||
|
@ -1098,13 +1098,13 @@ func @simple_constant() -> (i32, i32) {
|
|||
}
|
||||
```
|
||||
|
||||
* `print-ir-after=(comma-separated-pass-list)`
|
||||
* `mlir-print-ir-after=(comma-separated-pass-list)`
|
||||
* Print the IR after each of the passes provided within the pass list.
|
||||
* `print-ir-after-all`
|
||||
* `mlir-print-ir-after-all`
|
||||
* Print the IR after every pass in the pipeline.
|
||||
|
||||
```shell
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse)' -print-ir-after=cse
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse)' -mlir-print-ir-after=cse
|
||||
|
||||
*** IR Dump After CSE ***
|
||||
func @simple_constant() -> (i32, i32) {
|
||||
|
@ -1113,7 +1113,7 @@ func @simple_constant() -> (i32, i32) {
|
|||
}
|
||||
```
|
||||
|
||||
* `print-ir-after-change`
|
||||
* `mlir-print-ir-after-change`
|
||||
* Only print the IR after a pass if the pass mutated the IR. This helps to
|
||||
reduce the number of IR dumps for "uninteresting" passes.
|
||||
* Note: Changes are detected by comparing a hash of the operation before
|
||||
|
@ -1121,11 +1121,11 @@ func @simple_constant() -> (i32, i32) {
|
|||
the IR, and in some rare cases may result in false-positives depending
|
||||
on the collision rate of the hash algorithm used.
|
||||
* Note: This option should be used in unison with one of the other
|
||||
'print-ir-after' options above, as this option alone does not enable
|
||||
'mlir-print-ir-after' options above, as this option alone does not enable
|
||||
printing.
|
||||
|
||||
```shell
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse,cse)' -print-ir-after=cse -print-ir-after-change
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse,cse)' -mlir-print-ir-after=cse -mlir-print-ir-after-change
|
||||
|
||||
*** IR Dump After CSE ***
|
||||
func @simple_constant() -> (i32, i32) {
|
||||
|
@ -1134,13 +1134,13 @@ func @simple_constant() -> (i32, i32) {
|
|||
}
|
||||
```
|
||||
|
||||
* `print-ir-after-failure`
|
||||
* `mlir-print-ir-after-failure`
|
||||
* Only print IR after a pass failure.
|
||||
* This option should *not* be used with the other `print-ir-after` flags
|
||||
* This option should *not* be used with the other `mlir-print-ir-after` flags
|
||||
above.
|
||||
|
||||
```shell
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse,bad-pass)' -print-ir-failure
|
||||
$ mlir-opt foo.mlir -pass-pipeline='func.func(cse,bad-pass)' -mlir-print-ir-after-failure
|
||||
|
||||
*** IR Dump After BadPass Failed ***
|
||||
func @simple_constant() -> (i32, i32) {
|
||||
|
@ -1149,14 +1149,14 @@ func @simple_constant() -> (i32, i32) {
|
|||
}
|
||||
```
|
||||
|
||||
* `print-ir-module-scope`
|
||||
* `mlir-print-ir-module-scope`
|
||||
* Always print the top-level module operation, regardless of pass type or
|
||||
operation nesting level.
|
||||
* Note: Printing at module scope should only be used when multi-threading
|
||||
is disabled(`-mlir-disable-threading`)
|
||||
|
||||
```shell
|
||||
$ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline='func.func(cse)' -print-ir-after=cse -print-ir-module-scope
|
||||
$ mlir-opt foo.mlir -mlir-disable-threading -pass-pipeline='func.func(cse)' -mlir-print-ir-after=cse -mlir-print-ir-module-scope
|
||||
|
||||
*** IR Dump After CSE *** ('func.func' operation: @bar)
|
||||
func @bar(%arg0: f32, %arg1: f32) -> f32 {
|
||||
|
@ -1186,7 +1186,7 @@ The [pass manager](#pass-manager) in MLIR contains a builtin mechanism to
|
|||
generate reproducibles in the event of a crash, or a
|
||||
[pass failure](#pass-failure). This functionality can be enabled via
|
||||
`PassManager::enableCrashReproducerGeneration` or via the command line flag
|
||||
`pass-pipeline-crash-reproducer`. In either case, an argument is provided that
|
||||
`mlir-pass-pipeline-crash-reproducer`. In either case, an argument is provided that
|
||||
corresponds to the output `.mlir` file name that the reproducible should be
|
||||
written to. The reproducible contains the configuration of the pass manager that
|
||||
was executing, as well as the initial IR before any passes were run. A potential
|
||||
|
@ -1214,7 +1214,7 @@ to its stream.
|
|||
|
||||
An additional flag may be passed to
|
||||
`PassManager::enableCrashReproducerGeneration`, and specified via
|
||||
`pass-pipeline-local-reproducer` on the command line, that signals that the pass
|
||||
`mlir-pass-pipeline-local-reproducer` on the command line, that signals that the pass
|
||||
manager should attempt to generate a "local" reproducer. This will attempt to
|
||||
generate a reproducer containing IR right before the pass that fails. This is
|
||||
useful for situations where the crash is known to be within a specific pass, or
|
||||
|
|
|
@ -324,7 +324,7 @@ $ echo 'def main() { print([[1, 2], [3, 4]]); }' | ./bin/toyc-ch6 -emit=jit
|
|||
|
||||
You can also play with `-emit=mlir`, `-emit=mlir-affine`, `-emit=mlir-llvm`, and
|
||||
`-emit=llvm` to compare the various levels of IR involved. Also try options like
|
||||
[`--print-ir-after-all`](../../PassManagement.md/#ir-printing) to track the
|
||||
[`--mlir-print-ir-after-all`](../../PassManagement.md/#ir-printing) to track the
|
||||
evolution of the IR throughout the pipeline.
|
||||
|
||||
The example code used throughout this section can be found in
|
||||
|
|
|
@ -126,7 +126,7 @@ mlirContextGetNumLoadedDialects(MlirContext context);
|
|||
MLIR_CAPI_EXPORTED MlirDialect mlirContextGetOrLoadDialect(MlirContext context,
|
||||
MlirStringRef name);
|
||||
|
||||
/// Set threading mode (must be set to false to print-ir-after-all).
|
||||
/// Set threading mode (must be set to false to mlir-print-ir-after-all).
|
||||
MLIR_CAPI_EXPORTED void mlirContextEnableMultithreading(MlirContext context,
|
||||
bool enable);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ mlirPassManagerGetAsOpPassManager(MlirPassManager passManager);
|
|||
MLIR_CAPI_EXPORTED MlirLogicalResult
|
||||
mlirPassManagerRun(MlirPassManager passManager, MlirModule module);
|
||||
|
||||
/// Enable print-ir-after-all.
|
||||
/// Enable mlir-print-ir-after-all.
|
||||
MLIR_CAPI_EXPORTED void
|
||||
mlirPassManagerEnableIRPrinting(MlirPassManager passManager);
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ void mlir::python::populatePassManagerSubmodule(py::module &m) {
|
|||
[](PyPassManager &passManager) {
|
||||
mlirPassManagerEnableIRPrinting(passManager.get());
|
||||
},
|
||||
"Enable print-ir-after-all.")
|
||||
"Enable mlir-print-ir-after-all.")
|
||||
.def(
|
||||
"enable_verifier",
|
||||
[](PyPassManager &passManager, bool enable) {
|
||||
|
|
|
@ -21,11 +21,11 @@ struct PassManagerOptions {
|
|||
// Crash Reproducer Generator
|
||||
//===--------------------------------------------------------------------===//
|
||||
llvm::cl::opt<std::string> reproducerFile{
|
||||
"pass-pipeline-crash-reproducer",
|
||||
"mlir-pass-pipeline-crash-reproducer",
|
||||
llvm::cl::desc("Generate a .mlir reproducer file at the given output path"
|
||||
" if the pass manager crashes or fails")};
|
||||
llvm::cl::opt<bool> localReproducer{
|
||||
"pass-pipeline-local-reproducer",
|
||||
"mlir-pass-pipeline-local-reproducer",
|
||||
llvm::cl::desc("When generating a crash reproducer, attempt to generated "
|
||||
"a reproducer with the smallest pipeline."),
|
||||
llvm::cl::init(false)};
|
||||
|
@ -33,28 +33,28 @@ struct PassManagerOptions {
|
|||
//===--------------------------------------------------------------------===//
|
||||
// IR Printing
|
||||
//===--------------------------------------------------------------------===//
|
||||
PassNameCLParser printBefore{"print-ir-before",
|
||||
PassNameCLParser printBefore{"mlir-print-ir-before",
|
||||
"Print IR before specified passes"};
|
||||
PassNameCLParser printAfter{"print-ir-after",
|
||||
PassNameCLParser printAfter{"mlir-print-ir-after",
|
||||
"Print IR after specified passes"};
|
||||
llvm::cl::opt<bool> printBeforeAll{
|
||||
"print-ir-before-all", llvm::cl::desc("Print IR before each pass"),
|
||||
"mlir-print-ir-before-all", llvm::cl::desc("Print IR before each pass"),
|
||||
llvm::cl::init(false)};
|
||||
llvm::cl::opt<bool> printAfterAll{"print-ir-after-all",
|
||||
llvm::cl::opt<bool> printAfterAll{"mlir-print-ir-after-all",
|
||||
llvm::cl::desc("Print IR after each pass"),
|
||||
llvm::cl::init(false)};
|
||||
llvm::cl::opt<bool> printAfterChange{
|
||||
"print-ir-after-change",
|
||||
"mlir-print-ir-after-change",
|
||||
llvm::cl::desc(
|
||||
"When printing the IR after a pass, only print if the IR changed"),
|
||||
llvm::cl::init(false)};
|
||||
llvm::cl::opt<bool> printAfterFailure{
|
||||
"print-ir-after-failure",
|
||||
"mlir-print-ir-after-failure",
|
||||
llvm::cl::desc(
|
||||
"When printing the IR after a pass, only print if the pass failed"),
|
||||
llvm::cl::init(false)};
|
||||
llvm::cl::opt<bool> printModuleScope{
|
||||
"print-ir-module-scope",
|
||||
"mlir-print-ir-module-scope",
|
||||
llvm::cl::desc("When printing IR for print-ir-[before|after]{-all} "
|
||||
"always print the top-level operation"),
|
||||
llvm::cl::init(false)};
|
||||
|
@ -66,9 +66,10 @@ struct PassManagerOptions {
|
|||
// Pass Statistics
|
||||
//===--------------------------------------------------------------------===//
|
||||
llvm::cl::opt<bool> passStatistics{
|
||||
"pass-statistics", llvm::cl::desc("Display the statistics of each pass")};
|
||||
"mlir-pass-statistics",
|
||||
llvm::cl::desc("Display the statistics of each pass")};
|
||||
llvm::cl::opt<PassDisplayMode> passStatisticsDisplayMode{
|
||||
"pass-statistics-display",
|
||||
"mlir-pass-statistics-display",
|
||||
llvm::cl::desc("Display method for pass statistics"),
|
||||
llvm::cl::init(PassDisplayMode::Pipeline),
|
||||
llvm::cl::values(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Check that local reproducers will also traverse dynamic pass pipelines.
|
||||
// RUN: mlir-opt %s -pass-pipeline='test-module-pass,test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=test-pass-failure}' -pass-pipeline-crash-reproducer=%t -verify-diagnostics -pass-pipeline-local-reproducer --mlir-disable-threading
|
||||
// RUN: mlir-opt %s -pass-pipeline='test-module-pass,test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=test-pass-failure}' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics -mlir-pass-pipeline-local-reproducer --mlir-disable-threading
|
||||
// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL_DYNAMIC_FAILURE %s
|
||||
|
||||
// The crash recovery mechanism will leak memory allocated in the crashing thread.
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-module-pass, test-pass-crash)' -pass-pipeline-crash-reproducer=%t -verify-diagnostics
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-module-pass, test-pass-crash)' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics
|
||||
// RUN: cat %t | FileCheck -check-prefix=REPRO %s
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-module-pass, test-pass-crash)' -pass-pipeline-crash-reproducer=%t -verify-diagnostics -pass-pipeline-local-reproducer -mlir-disable-threading
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-module-pass, test-pass-crash)' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics -mlir-pass-pipeline-local-reproducer -mlir-disable-threading
|
||||
// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL %s
|
||||
|
||||
// Check that we correctly handle verifiers passes with local reproducer, this used to crash.
|
||||
// RUN: mlir-opt %s -test-module-pass -test-module-pass -test-module-pass -pass-pipeline-crash-reproducer=%t -pass-pipeline-local-reproducer -mlir-disable-threading
|
||||
// RUN: mlir-opt %s -test-module-pass -test-module-pass -test-module-pass -mlir-pass-pipeline-crash-reproducer=%t -mlir-pass-pipeline-local-reproducer -mlir-disable-threading
|
||||
// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL %s
|
||||
|
||||
// Check that local reproducers will also traverse dynamic pass pipelines.
|
||||
// RUN: mlir-opt %s -pass-pipeline='test-module-pass,test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=test-pass-crash}' -pass-pipeline-crash-reproducer=%t -verify-diagnostics -pass-pipeline-local-reproducer --mlir-disable-threading
|
||||
// RUN: mlir-opt %s -pass-pipeline='test-module-pass,test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=test-pass-crash}' -mlir-pass-pipeline-crash-reproducer=%t -verify-diagnostics -mlir-pass-pipeline-local-reproducer --mlir-disable-threading
|
||||
// RUN: cat %t | FileCheck -check-prefix=REPRO_LOCAL_DYNAMIC %s
|
||||
|
||||
// The crash recovery mechanism will leak memory allocated in the crashing thread.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1 dynamic-pipeline=cse})' --mlir-disable-threading -print-ir-before-all 2>&1 | FileCheck %s --check-prefix=NOTNESTED --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=cse})' --mlir-disable-threading -print-ir-before-all 2>&1 | FileCheck %s --check-prefix=NESTED --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1 dynamic-pipeline=cse})' --mlir-disable-threading -mlir-print-ir-before-all 2>&1 | FileCheck %s --check-prefix=NOTNESTED --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1 run-on-nested-operations=1 dynamic-pipeline=cse})' --mlir-disable-threading -mlir-print-ir-before-all 2>&1 | FileCheck %s --check-prefix=NESTED --check-prefix=CHECK
|
||||
|
||||
|
||||
// Verify that we can schedule a dynamic pipeline on a nested operation
|
||||
|
@ -12,7 +12,7 @@ func @f() {
|
|||
// CHECK-SAME: TestDynamicPipelinePass
|
||||
// CHECK-NEXT: module @inner_mod1
|
||||
module @inner_mod1 {
|
||||
// We use the print-ir-after-all dumps to check the granularity of the
|
||||
// We use the mlir-print-ir-after-all dumps to check the granularity of the
|
||||
// scheduling: if we are nesting we expect to see to individual "Dump Before
|
||||
// CSE" output: one for each of the function. If we don't nest, then we expect
|
||||
// the CSE pass to run on the `inner_mod1` module directly.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1, dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD1 --check-prefix=MOD1-ONLY --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod2, dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD2 --check-prefix=MOD2-ONLY --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1,inner_mod2, dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD1 --check-prefix=MOD2 --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD1 --check-prefix=MOD2 --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1, dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -mlir-print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD1 --check-prefix=MOD1-ONLY --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod2, dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -mlir-print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD2 --check-prefix=MOD2-ONLY --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{op-name=inner_mod1,inner_mod2, dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -mlir-print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD1 --check-prefix=MOD2 --check-prefix=CHECK
|
||||
// RUN: mlir-opt %s -pass-pipeline='builtin.module(test-dynamic-pipeline{dynamic-pipeline=func.func(cse,canonicalize)})' --mlir-disable-threading -mlir-print-ir-before-all 2>&1 | FileCheck %s --check-prefix=MOD1 --check-prefix=MOD2 --check-prefix=CHECK
|
||||
|
||||
|
||||
func @f() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -print-ir-before=cse -o /dev/null 2>&1 | FileCheck -check-prefix=BEFORE %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -print-ir-before-all -o /dev/null 2>&1 | FileCheck -check-prefix=BEFORE_ALL %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -print-ir-after=cse -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -print-ir-after-all -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER_ALL %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -print-ir-before=cse -print-ir-module-scope -o /dev/null 2>&1 | FileCheck -check-prefix=BEFORE_MODULE %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,cse)' -print-ir-after-all -print-ir-after-change -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER_ALL_CHANGE %s
|
||||
// RUN: not mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,test-pass-failure)' -print-ir-after-failure -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER_FAILURE %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -mlir-print-ir-before=cse -o /dev/null 2>&1 | FileCheck -check-prefix=BEFORE %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -mlir-print-ir-before-all -o /dev/null 2>&1 | FileCheck -check-prefix=BEFORE_ALL %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -mlir-print-ir-after=cse -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -mlir-print-ir-after-all -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER_ALL %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -mlir-print-ir-before=cse -mlir-print-ir-module-scope -o /dev/null 2>&1 | FileCheck -check-prefix=BEFORE_MODULE %s
|
||||
// RUN: mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,cse)' -mlir-print-ir-after-all -mlir-print-ir-after-change -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER_ALL_CHANGE %s
|
||||
// RUN: not mlir-opt %s -mlir-disable-threading=true -pass-pipeline='func.func(cse,test-pass-failure)' -mlir-print-ir-after-failure -o /dev/null 2>&1 | FileCheck -check-prefix=AFTER_FAILURE %s
|
||||
|
||||
func @foo() {
|
||||
%0 = arith.constant 0 : i32
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// REQUIRES: asserts
|
||||
// RUN: mlir-opt %s -verify-each=true -pass-pipeline='func.func(test-stats-pass,test-stats-pass)' -pass-statistics -pass-statistics-display=list 2>&1 | FileCheck -check-prefix=LIST %s
|
||||
// RUN: mlir-opt %s -verify-each=true -pass-pipeline='func.func(test-stats-pass,test-stats-pass)' -pass-statistics -pass-statistics-display=pipeline 2>&1 | FileCheck -check-prefix=PIPELINE %s
|
||||
// RUN: mlir-opt %s -verify-each=true -pass-pipeline='func.func(test-stats-pass,test-stats-pass)' -mlir-pass-statistics -mlir-pass-statistics-display=list 2>&1 | FileCheck -check-prefix=LIST %s
|
||||
// RUN: mlir-opt %s -verify-each=true -pass-pipeline='func.func(test-stats-pass,test-stats-pass)' -mlir-pass-statistics -mlir-pass-statistics-display=pipeline 2>&1 | FileCheck -check-prefix=PIPELINE %s
|
||||
|
||||
// LIST: Pass statistics report
|
||||
// LIST: TestStatisticPass
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// configuration: -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -print-ir-before=cse
|
||||
// configuration: -mlir-disable-threading=true -pass-pipeline='func.func(cse,canonicalize)' -mlir-print-ir-before=cse
|
||||
|
||||
// Test of the reproducer run option. The first line has to be the
|
||||
// configuration (matching what is produced by reproducer).
|
||||
|
|
Loading…
Reference in New Issue