Skip to content

Commit cf661be

Browse files
committed
Review comments, fix Windows test
1 parent 56747f1 commit cf661be

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

mlir/docs/DeclarativeRewrites.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ $in2)`, then this will be translated into C++ call `someFn($in1, $in2, $in0)`.
433433
In the case of properties, the placeholder will be bound to a value of the _interface_
434434
type of the property. Passing in a `StringProp` as an argument to a `NativeCodeCall`
435435
will pass a `StringRef` (as if the getter of the matched operation were called)
436-
and not a `std::string`.
436+
and not a `std::string`. See `mlir/include/mlir/IR/Properties.td` for details
437+
on interface vs. storage type.
437438

438439
Positional range placeholders will be substituted by multiple `dag` object
439440
parameters at the `NativeCodeCall` use site. For example, if we define

mlir/include/mlir/TableGen/Pattern.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ class DagLeaf {
9999
// Returns this DAG leaf as a constraint. Asserts if fails.
100100
Constraint getAsConstraint() const;
101101

102-
// Returns this DAG leaf as a property constraint. Asserts if fails.
102+
// Returns this DAG leaf as a property constraint. Asserts if fails. This
103+
// allows access to the interface type.
103104
PropConstraint getAsPropConstraint() const;
104105

105106
// Returns this DAG leaf as a property definition. Asserts if fails.
@@ -301,9 +302,8 @@ class SymbolInfoMap {
301302
//
302303
// * Properties not associated with an operation (ex. as arguments to
303304
// native code) have their corresponding PropConstraint stored in the
304-
// `dag` field,
305-
// and set `operandIndexOrNumValues` to -1 to indicate they aren't part of
306-
// an operation.
305+
// `dag` field. (They'll and set `operandIndexOrNumValues` to -1 to
306+
// indicate they aren't part of an operation.)
307307
//
308308
// * If a symbol is defined in a `variadic` DAG, `dag` specifies the DAG
309309
// of the parent operation, `operandIndexOrNumValues` specifies the

mlir/test/mlir-tblgen/rewriter-static-matcher.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ def : Pat<(COp $_, (BOp I32Attr:$attr, I32:$int)),
9494
// CHECK: [[$ARR]].push_back([[$VAR]]);
9595
def : Pat<(AOp $x), (DOp (variadic (Foo $x)))>;
9696

97-
// CHECK: if(::mlir::failed([[$DAG_MATCHER2]](rewriter, op1, tblgen_ops, z, x)
97+
// CHECK: if(::mlir::failed([[$DAG_MATCHER2]]({{.*}} x{{[,)]}}
9898
def : Pat<(AOp (EOp NonNegProp:$x, NonNegProp:$_, I32:$z)),
9999
(AOp $z)>;
100100

101-
// CHECK: if(::mlir::failed([[$DAG_MATCHER2]](rewriter, op1, tblgen_ops, z, x)
101+
// CHECK: if(::mlir::failed([[$DAG_MATCHER2]]({{.*}} x{{[,)]}}
102102
def : Pat<(FOp $_, (EOp NonNegProp:$x, NonNegProp:$_, I32:$z)),
103103
(COp $x, $z)>;

0 commit comments

Comments
 (0)