[NFC][PDL] Fix documentation typo, redundant test
authorVinayaka Bandishti <vinayaka@polymagelabs.com>
Wed, 23 Jun 2021 06:53:14 +0000 (12:23 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Wed, 23 Jun 2021 06:57:12 +0000 (12:27 +0530)
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
mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-rewriter.mlir

index 1c9de16..4c082c3 100644 (file)
@@ -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:
 
index 58d1c31..d2f1358 100644 (file)
@@ -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