File: ops.td

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (35 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
include "include/interfaces.td"

def Test_Dialect : Dialect {
  let name = "test";
}

def OpAllEmpty : Op<Test_Dialect, "all_empty">;

def OpAllSingle : Op<Test_Dialect, "all_single"> {
  let arguments = (ins
    I64:$operand,
    I64Attr:$attr,
    ConfinedAttr<I64Attr, [IntNonNegative]>:$nonNegativeAttr
  );
  let results = (outs I64:$result);
}

def OpAllOptional : Op<Test_Dialect, "all_optional"> {
  let arguments = (ins Optional<I64>:$operand, OptionalAttr<I64Attr>:$attr);
  let results = (outs Optional<I64>:$result);
}

def OpAllVariadic : Op<Test_Dialect, "all_variadic"> {
  let arguments = (ins Variadic<I64>:$operands);
  let results = (outs Variadic<I64>:$results);
}

def OpMultipleSingleResult : Op<Test_Dialect, "multiple_single_result"> {
  let results = (outs I64:$result, I64:$result2);
}

def OpMultiVariadic : Op<Test_Dialect, "multi_variadic"> {
  let arguments = (ins Variadic<I64>:$operands1, Variadic<I64>:$operand2);
  let results = (outs Variadic<I64>:$results1, Variadic<I64>:$results2);
}