Skip to content

Commit c8f6bb4

Browse files
authored
[mlir][doc] Remove duplicate syntax formats (#73343)
Some operations defined their syntax both in the documentation and via `assemblyFormat`. This leads to two `Syntax:` subheadings in the documentation, see for example the documentation for [`arith.maximumf`](https://mlir.llvm.org/docs/Dialects/ArithOps/#arithmaximumf-arithmaximumfop). Since the `assemblyFormat` is used to generate the actual parsers and printer implementations, this PR suggest to remove the manual syntax descriptions.
1 parent 26cf3aa commit c8f6bb4

File tree

4 files changed

+0
-42
lines changed

4 files changed

+0
-42
lines changed

mlir/include/mlir/Dialect/Arith/IR/ArithOps.td

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -838,12 +838,6 @@ def Arith_SubFOp : Arith_FloatBinaryOp<"subf"> {
838838
def Arith_MaximumFOp : Arith_FloatBinaryOp<"maximumf", [Commutative]> {
839839
let summary = "floating-point maximum operation";
840840
let description = [{
841-
Syntax:
842-
843-
```
844-
operation ::= ssa-id `=` `arith.maximumf` ssa-use `,` ssa-use `:` type
845-
```
846-
847841
Returns the maximum of the two arguments, treating -0.0 as less than +0.0.
848842
If one of the arguments is NaN, then the result is also NaN.
849843

@@ -864,12 +858,6 @@ def Arith_MaximumFOp : Arith_FloatBinaryOp<"maximumf", [Commutative]> {
864858
def Arith_MaxNumFOp : Arith_FloatBinaryOp<"maxnumf", [Commutative]> {
865859
let summary = "floating-point maximum operation";
866860
let description = [{
867-
Syntax:
868-
869-
```
870-
operation ::= ssa-id `=` `arith.maxnumf` ssa-use `,` ssa-use `:` type
871-
```
872-
873861
Returns the maximum of the two arguments.
874862
If the arguments are -0.0 and +0.0, then the result is either of them.
875863
If one of the arguments is NaN, then the result is the other argument.
@@ -910,12 +898,6 @@ def Arith_MaxUIOp : Arith_TotalIntBinaryOp<"maxui", [Commutative]> {
910898
def Arith_MinimumFOp : Arith_FloatBinaryOp<"minimumf", [Commutative]> {
911899
let summary = "floating-point minimum operation";
912900
let description = [{
913-
Syntax:
914-
915-
```
916-
operation ::= ssa-id `=` `arith.minimumf` ssa-use `,` ssa-use `:` type
917-
```
918-
919901
Returns the minimum of the two arguments, treating -0.0 as less than +0.0.
920902
If one of the arguments is NaN, then the result is also NaN.
921903

@@ -936,12 +918,6 @@ def Arith_MinimumFOp : Arith_FloatBinaryOp<"minimumf", [Commutative]> {
936918
def Arith_MinNumFOp : Arith_FloatBinaryOp<"minnumf", [Commutative]> {
937919
let summary = "floating-point minimum operation";
938920
let description = [{
939-
Syntax:
940-
941-
```
942-
operation ::= ssa-id `=` `arith.minnumf` ssa-use `,` ssa-use `:` type
943-
```
944-
945921
Returns the minimum of the two arguments.
946922
If the arguments are -0.0 and +0.0, then the result is either of them.
947923
If one of the arguments is NaN, then the result is the other argument.

mlir/include/mlir/Dialect/Complex/IR/ComplexOps.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,6 @@ def ExpOp : ComplexUnaryOp<"exp", [SameOperandsAndResultType]> {
280280
def Expm1Op : ComplexUnaryOp<"expm1", [SameOperandsAndResultType]> {
281281
let summary = "computes exponential of a complex number minus 1";
282282
let description = [{
283-
Syntax:
284-
285-
```
286-
operation ::= ssa-id `=` `complex.expm1` ssa-use `:` type
287-
```
288-
289283
complex.expm1(x) := complex.exp(x) - 1
290284

291285
Example:

mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,6 @@ def MemRef_CastOp : MemRef_Op<"cast", [
447447
]> {
448448
let summary = "memref cast operation";
449449
let description = [{
450-
Syntax:
451-
452-
```
453-
operation ::= ssa-id `=` `memref.cast` ssa-use `:` type `to` type
454-
```
455-
456450
The `memref.cast` operation converts a memref from one type to an equivalent
457451
type with a compatible shape. The source and destination types are
458452
compatible if:

mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,12 +2203,6 @@ def Vector_TypeCastOp :
22032203
super-vectorization operational. It can be seen as a special case of the
22042204
`view` operation but scoped in the super-vectorization context.
22052205

2206-
Syntax:
2207-
2208-
```
2209-
operation ::= `vector.type_cast` ssa-use : memref-type to memref-type
2210-
```
2211-
22122206
Example:
22132207

22142208
```mlir

0 commit comments

Comments
 (0)