Skip to content

Commit 25344f0

Browse files
author
Jian Cai
committed
[mlir][docs] Rename OpTrait to Trait in ODS doc
This makes the doc consistent with the code base.
1 parent a0fcb50 commit 25344f0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mlir/docs/DefiningDialects/Operations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ their semantics via a special [TableGen backend][TableGenBackend]:
8989
help of the following constructs.
9090
* The `Dialect` class: Operations belonging to one logical group are placed in
9191
the same dialect. The `Dialect` class contains dialect-level information.
92-
* The `OpTrait` class hierarchy: They are used to specify special properties
92+
* The `Trait` class hierarchy: They are used to specify special properties
9393
and constraints of the operation, including whether the operation has side
9494
effect or whether its output has the same shape as the input.
9595
* The `ins`/`outs` marker: These are two special markers builtin to the
@@ -434,7 +434,7 @@ various traits in the `mlir::OpTrait` namespace.
434434
Both operation traits, [interfaces](../Interfaces.md/#utilizing-the-ods-framework),
435435
and constraints involving multiple operands/attributes/results are provided as
436436
the third template parameter to the `Op` class. They should be deriving from
437-
the `OpTrait` class. See [Constraints](#constraints) for more information.
437+
the `Trait` class. See [Constraints](#constraints) for more information.
438438

439439
### Builder methods
440440

@@ -1353,7 +1353,7 @@ results. These constraints should be specified as the `Op` class template
13531353
parameter as described in
13541354
[Operation traits and constraints](#operation-traits-and-constraints).
13551355

1356-
Multi-entity constraints are modeled as `PredOpTrait` (a subclass of `OpTrait`)
1356+
Multi-entity constraints are modeled as `PredOpTrait` (a subclass of `Trait`)
13571357
in [`OpBase.td`][OpBase].A bunch of constraint primitives are provided to help
13581358
specification. See [`OpBase.td`][OpBase] for the complete list.
13591359

@@ -1364,7 +1364,7 @@ commutative or not, whether is a terminator, etc. These constraints should be
13641364
specified as the `Op` class template parameter as described in
13651365
[Operation traits and constraints](#operation-traits-and-constraints).
13661366

1367-
Traits are modeled as `NativeOpTrait` (a subclass of `OpTrait`) in
1367+
Traits are modeled as `NativeTrait` (a subclass of `Trait`) in
13681368
[`OpBase.td`][OpBase]. They are backed and will be translated into the
13691369
corresponding C++ `mlir::OpTrait` classes.
13701370

mlir/include/mlir/IR/OpBase.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ include "mlir/IR/Utils.td"
2222
include "mlir/IR/AttrTypeBase.td"
2323

2424
//===----------------------------------------------------------------------===//
25-
// OpTrait definitions
25+
// *OpTrait definitions
2626
//===----------------------------------------------------------------------===//
2727

2828
// A trait that describes the structure of operation will be marked with

0 commit comments

Comments
 (0)