Skip to content

Commit 7e22063

Browse files
authored
[mlir][docs] Rename OpTrait to Trait in ODS doc (#148276)
This makes the doc consistent with the code base.
1 parent 64c7e7e commit 7e22063

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
@@ -436,7 +436,7 @@ various traits in the `mlir::OpTrait` namespace.
436436
Both operation traits, [interfaces](../Interfaces.md/#utilizing-the-ods-framework),
437437
and constraints involving multiple operands/attributes/results are provided as
438438
the third template parameter to the `Op` class. They should be deriving from
439-
the `OpTrait` class. See [Constraints](#constraints) for more information.
439+
the `Trait` class. See [Constraints](#constraints) for more information.
440440

441441
### Builder methods
442442

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

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

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

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

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)