llvm-capstone/mlir/test/Pass/invalid-interface-pass.mlir
rkayaith 13bd410962 [mlir][Pass] Include anchor op in -pass-pipeline
In D134622 the printed form of a pass manager is changed to include the
name of the op that the pass manager is anchored on. This updates the
`-pass-pipeline` argument format to include the anchor op as well, so
that the printed form of a pipeline can be directly passed to
`-pass-pipeline`. In most cases this requires updating
`-pass-pipeline='pipeline'` to
`-pass-pipeline='builtin.module(pipeline)'`.

This also fixes an outdated assert that prevented running a
`PassManager` anchored on `'any'`.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D134900
2022-11-03 11:36:12 -04:00

10 lines
334 B
MLIR

// RUN: not mlir-opt %s -pass-pipeline='builtin.module(test-interface-pass)' 2>&1 | FileCheck %s
// Test that we emit an error when an interface pass is added to a pass manager it can't be scheduled on.
// CHECK: unable to schedule pass '{{.*}}' on a PassManager intended to run on 'builtin.module'!
func.func @main() {
return
}