forked from OSchip/llvm-project
[NFC][PDL] Fix documentation typo, redundant test
Correct a documentation typo, and delete a duplicate test in `pdl-to-pdl-interp-rewriter.mlir`. Reviewed By: pr4tgpt, bondhugula, rriddle Differential Revision: https://reviews.llvm.org/D104688
This commit is contained in:
parent
1cb7849a55
commit
0e55112242
|
@ -35,8 +35,8 @@ def PDL_Dialect : Dialect {
|
|||
a `pdl.rewrite` that either dispatches to an external rewriter or contains
|
||||
a region for the rewrite specified via `pdl`. The types of values in `pdl`
|
||||
are handle types to MLIR C++ types, with `!pdl.attribute`, `!pdl.operation`,
|
||||
and `!pdl.type` directly mapping to `mlir::Attribute`, `mlir::Operation*`,
|
||||
and `mlir::Value` respectively.
|
||||
`!pdl.value`, and `!pdl.type` directly mapping to `mlir::Attribute`,
|
||||
`mlir::Operation*`, `mlir::Value`, and `mlir::Type` respectively.
|
||||
|
||||
An example pattern is shown below:
|
||||
|
||||
|
|
|
@ -73,28 +73,6 @@ module @operation_operands {
|
|||
|
||||
// -----
|
||||
|
||||
// CHECK-LABEL: module @operation_operands
|
||||
module @operation_operands {
|
||||
// CHECK: module @rewriters
|
||||
// CHECK: func @pdl_generated_rewriter(%[[OPERAND:.*]]: !pdl.value, %[[ROOT:.*]]: !pdl.operation)
|
||||
// CHECK: %[[NEWOP:.*]] = pdl_interp.create_operation "foo.op"(%[[OPERAND]] : !pdl.value)
|
||||
// CHECK: %[[OPERAND1:.*]] = pdl_interp.get_result 0 of %[[NEWOP]]
|
||||
// CHECK: pdl_interp.create_operation "foo.op2"(%[[OPERAND1]] : !pdl.value)
|
||||
pdl.pattern : benefit(1) {
|
||||
%operand = pdl.operand
|
||||
%root = pdl.operation "foo.op"(%operand : !pdl.value)
|
||||
pdl.rewrite %root {
|
||||
%type = pdl.type : i32
|
||||
%newOp = pdl.operation "foo.op"(%operand : !pdl.value) -> (%type : !pdl.type)
|
||||
%result = pdl.result 0 of %newOp
|
||||
%newOp1 = pdl.operation "foo.op2"(%result : !pdl.value)
|
||||
pdl.erase %root
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----
|
||||
|
||||
// CHECK-LABEL: module @operation_infer_types_from_replaceop
|
||||
module @operation_infer_types_from_replaceop {
|
||||
// CHECK: module @rewriters
|
||||
|
|
Loading…
Reference in New Issue