PDLDialect being a somewhat user-facing dialect and whose ops contain exclusively other PDL ops in their regions can take advantage of `OpAsmOpInterface` to provide nicer IR. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D117828
11 lines
242 B
MLIR
11 lines
242 B
MLIR
// RUN: mlir-opt -canonicalize %s | FileCheck %s
|
|
|
|
pdl.pattern @operation_op : benefit(1) {
|
|
%root = operation "foo.op"
|
|
rewrite %root {
|
|
// CHECK: operation "bar.unused"
|
|
%unused_rewrite = operation "bar.unused"
|
|
erase %root
|
|
}
|
|
}
|