From 0e55112242f644fdd59c382f774bf0f92143969f Mon Sep 17 00:00:00 2001 From: Vinayaka Bandishti Date: Wed, 23 Jun 2021 12:23:14 +0530 Subject: [PATCH] [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 --- mlir/include/mlir/Dialect/PDL/IR/PDLDialect.td | 4 ++-- .../PDLToPDLInterp/pdl-to-pdl-interp-rewriter.mlir | 22 ---------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/mlir/include/mlir/Dialect/PDL/IR/PDLDialect.td b/mlir/include/mlir/Dialect/PDL/IR/PDLDialect.td index 1c9de16..4c082c35 100644 --- a/mlir/include/mlir/Dialect/PDL/IR/PDLDialect.td +++ b/mlir/include/mlir/Dialect/PDL/IR/PDLDialect.td @@ -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: diff --git a/mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-rewriter.mlir b/mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-rewriter.mlir index 58d1c31..d2f1358 100644 --- a/mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-rewriter.mlir +++ b/mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-rewriter.mlir @@ -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 -- 2.7.4