function-signature ::= symbol-ref-id `(` argument-list `)`
(`->` function-result-type)?
-argument-list ::= named-argument (`,` named-argument)* | /*empty*/
-argument-list ::= type attribute-dict? (`,` type attribute-dict?)* | /*empty*/
+argument-list ::= (named-argument (`,` named-argument)*) | /*empty*/
+argument-list ::= (type attribute-dict? (`,` type attribute-dict?)*) | /*empty*/
named-argument ::= ssa-id `:` type attribute-dict?
function-attributes ::= `attributes` attribute-dict
Example:
```mlir {.mlir}
-func $@accelerator_compute(i64, i1) -> i64 {
+func @accelerator_compute(i64, i1) -> i64 {
^bb0(%a: i64, %cond: i1): // Code dominated by ^bb0 may refer to %a
cond_br %cond, ^bb1, ^bb2
``` {.ebnf}
operation ::= `dma_start` ssa-use`[`ssa-use-list`]` `,`
ssa-use`[`ssa-use-list`]` `,` ssa-use `,`
- ssa-use`[`ssa-use-list`]` (`,` ssa-use, ssa-use)?
+ ssa-use`[`ssa-use-list`]` (`,` ssa-use `,` ssa-use)?
`:` memref-type `,` memref-type `,` memref-type
```
%tag = alloc() : memref<1 x i32, (d0) -> (d0), 4>
%idx = constant 0 : index
dma_start %src[%i, %j], %dst[%k, %l], %size, %tag[%idx] :
- memref<40 x 8 x vector<16xf32>, (d0) -> (d0), 0>,
- memref<2 x 4 x vector<16xf32>, (d0) -> (d0), 2>,
+ memref<40 x 8 x vector<16xf32>, (d0, d1) -> (d0, d1), 0>,
+ memref<2 x 4 x vector<16xf32>, (d0, d1) -> (d0, d1), 2>,
memref<1 x i32>, (d0) -> (d0), 4>
```
Example:
```mlir {.mlir}
-dma_wait %tag[%index], %num_elements : memref<1 x i32, (d0) -> (d0), 4>
+dma_wait %tag[%idx], %size : memref<1 x i32, (d0) -> (d0), 4>
```
#### 'extract_element' operation
#### 'addi' operation
+Syntax:
+
+``` {.ebnf}
+operation ::= ssa-id `=` `addi` ssa-use `,` ssa-use `:` type
+```
+
Examples:
```mlir {.mlir}
#### 'addf' operation
+Syntax:
+
+``` {.ebnf}
+operation ::= ssa-id `=` `addf` ssa-use `,` ssa-use `:` type
+```
+
Examples:
```mlir {.mlir}
Syntax:
``` {.ebnf}
-operation ::= ssa-id `=` `and` ssa-use, ssa-use `:` type
+operation ::= ssa-id `=` `and` ssa-use `,` ssa-use `:` type
```
Examples:
#### 'cmpi' operation
+Syntax:
+
+``` {.ebnf}
+operation ::= ssa-id `=` `cmpi` string-literal `,` ssa-id `,` ssa-id `:` type
+```
+
Examples:
```mlir {.mlir}
// Generic form of the same operation.
%x = "std.cmpi"(%lhs, %rhs){predicate: 0}
- : (vector<4xi64>, vector<4xi64> -> vector<4xi1>
+ : (vector<4xi64>, vector<4xi64>) -> vector<4xi1>
```
The `cmpi` operation is a generic comparison for integer-like types. Its two
Syntax:
``` {.ebnf}
-operation ::= ssa-id `=` `divis` ssa-use, ssa-use `:` type
+operation ::= ssa-id `=` `divis` ssa-use `,` ssa-use `:` type
```
Examples:
Syntax:
``` {.ebnf}
-operation ::= ssa-id `=` `diviu` ssa-use, ssa-use `:` type
+operation ::= ssa-id `=` `diviu` ssa-use `,` ssa-use `:` type
```
Examples:
#### 'mulf' operation
+Syntax:
+
+``` {.ebnf}
+operation ::= ssa-id `=` `mulf` ssa-use `,` ssa-use `:` type
+```
+
Examples:
```mlir {.mlir}
Syntax:
``` {.ebnf}
-operation ::= ssa-id `=` `or` ssa-use, ssa-use `:` type
+operation ::= ssa-id `=` `or` ssa-use `,` ssa-use `:` type
```
Examples:
Syntax:
``` {.ebnf}
-operation ::= ssa-id `=` `remis` ssa-use, ssa-use `:` type
+operation ::= ssa-id `=` `remis` ssa-use `,` ssa-use `:` type
```
Examples:
Syntax:
``` {.ebnf}
-operation ::= ssa-id `=` `remiu` ssa-use, ssa-use `:` type
+operation ::= ssa-id `=` `remiu` ssa-use `,` ssa-use `:` type
```
Examples:
Syntax:
``` {.ebnf}
-operation ::= ssa-id `=` `select` ssa-use, ssa-use, ssa-use `:` type
+operation ::= ssa-id `=` `select` ssa-use `,` ssa-use `,` ssa-use `:` type
```
Examples: