@@ -98,8 +98,8 @@ def CastOp : CIR_Op<"cast", [Pure]> {
98
98
```
99
99
}];
100
100
101
- let arguments = (ins CastKind:$kind, AnyType :$src);
102
- let results = (outs AnyType :$result);
101
+ let arguments = (ins CastKind:$kind, CIR_AnyType :$src);
102
+ let results = (outs CIR_AnyType :$result);
103
103
104
104
let assemblyFormat = [{
105
105
`(` $kind `,` $src `:` type($src) `)`
@@ -168,10 +168,10 @@ def PtrDiffOp : CIR_Op<"ptr_diff", [Pure, SameTypeOperands]> {
168
168
}];
169
169
170
170
let results = (outs CIR_IntType:$result);
171
- let arguments = (ins AnyType :$lhs, AnyType :$rhs);
171
+ let arguments = (ins CIR_PointerType :$lhs, CIR_PointerType :$rhs);
172
172
173
173
let assemblyFormat = [{
174
- `(` $lhs `,` $rhs `)` `:` type($lhs) `->` type($result) attr-dict
174
+ `(` $lhs `,` $rhs `)` `:` qualified( type($lhs)) `->` qualified( type($result) ) attr-dict
175
175
}];
176
176
177
177
// Already covered by the traits
@@ -198,12 +198,12 @@ def PtrStrideOp : CIR_Op<"ptr_stride",
198
198
```
199
199
}];
200
200
201
- let arguments = (ins AnyType :$base, CIR_IntType:$stride);
202
- let results = (outs AnyType :$result);
201
+ let arguments = (ins CIR_PointerType :$base, CIR_IntType:$stride);
202
+ let results = (outs CIR_PointerType :$result);
203
203
204
204
let assemblyFormat = [{
205
- `(` $base `:` type($base) `,` $stride `:` qualified(type($stride)) `)`
206
- `,` type($result) attr-dict
205
+ `(` $base `:` qualified( type($base) ) `,` $stride `:` qualified(type($stride)) `)`
206
+ `,` qualified( type($result) ) attr-dict
207
207
}];
208
208
209
209
let extraClassDeclaration = [{
@@ -241,8 +241,8 @@ def ConstantOp : CIR_Op<"const",
241
241
// The constant operation takes an attribute as the only input.
242
242
let arguments = (ins TypedAttrInterface:$value);
243
243
244
- // The constant operation returns a single value of AnyType .
245
- let results = (outs AnyType :$res);
244
+ // The constant operation returns a single value of CIR_AnyType .
245
+ let results = (outs CIR_AnyType :$res);
246
246
247
247
let assemblyFormat = [{
248
248
`(` custom<ConstantValue>($value) `)` attr-dict `:` type($res)
@@ -389,7 +389,7 @@ def LoadOp : CIR_Op<"load", [
389
389
390
390
let arguments = (ins Arg<CIR_PointerType, "the address to load from",
391
391
[MemRead]>:$addr, UnitAttr:$isDeref);
392
- let results = (outs AnyType :$result);
392
+ let results = (outs CIR_AnyType :$result);
393
393
394
394
// FIXME: we should not be printing `cir.ptr` below, that should come
395
395
// from the pointer type directly.
@@ -423,7 +423,7 @@ def StoreOp : CIR_Op<"store", [
423
423
```
424
424
}];
425
425
426
- let arguments = (ins AnyType :$value,
426
+ let arguments = (ins CIR_AnyType :$value,
427
427
Arg<CIR_PointerType, "the address to store the value",
428
428
[MemWrite]>:$addr);
429
429
@@ -458,7 +458,7 @@ def ReturnOp : CIR_Op<"return", [HasParent<"FuncOp, ScopeOp, IfOp, SwitchOp, Loo
458
458
459
459
// The return operation takes an optional input operand to return. This
460
460
// value must match the return type of the enclosing function.
461
- let arguments = (ins Variadic<AnyType >:$input);
461
+ let arguments = (ins Variadic<CIR_AnyType >:$input);
462
462
463
463
// The return operation only emits the input in the format if it is present.
464
464
let assemblyFormat = "($input^ `:` type($input))? attr-dict ";
@@ -561,7 +561,7 @@ def TernaryOp : CIR_Op<"ternary",
561
561
let arguments = (ins CIR_BoolType:$cond);
562
562
let regions = (region SizedRegion<1>:$trueRegion,
563
563
SizedRegion<1>:$falseRegion);
564
- let results = (outs Optional<AnyType >:$result);
564
+ let results = (outs Optional<CIR_AnyType >:$result);
565
565
566
566
let skipDefaultBuilders = 1;
567
567
let builders = [
@@ -671,7 +671,7 @@ def YieldOp : CIR_Op<"yield", [ReturnLike, Terminator,
671
671
}];
672
672
673
673
let arguments = (ins OptionalAttr<YieldOpKind>:$kind,
674
- Variadic<AnyType >:$args);
674
+ Variadic<CIR_AnyType >:$args);
675
675
let builders = [
676
676
OpBuilder<(ins), [{ /* nothing to do */ }]>,
677
677
OpBuilder<(ins "YieldOpKind":$kind), [{
@@ -739,7 +739,7 @@ def ScopeOp : CIR_Op<"scope", [
739
739
will be inserted implicitly.
740
740
}];
741
741
742
- let results = (outs Optional<AnyType >:$results);
742
+ let results = (outs Optional<CIR_AnyType >:$results);
743
743
let regions = (region AnyRegion:$scopeRegion);
744
744
745
745
let hasVerifier = 1;
@@ -799,8 +799,8 @@ def UnaryOp : CIR_Op<"unary", [Pure, SameOperandsAndResultType]> {
799
799
```
800
800
}];
801
801
802
- let results = (outs AnyType :$result);
803
- let arguments = (ins Arg<UnaryOpKind, "unary op kind">:$kind, Arg<AnyType >:$input);
802
+ let results = (outs CIR_AnyType :$result);
803
+ let arguments = (ins Arg<UnaryOpKind, "unary op kind">:$kind, Arg<CIR_AnyType >:$input);
804
804
805
805
let assemblyFormat = [{
806
806
`(` $kind `,` $input `)` `:` type($input) `,` type($result) attr-dict
@@ -852,10 +852,10 @@ def BinOp : CIR_Op<"binop", [Pure,
852
852
```
853
853
}];
854
854
855
- // TODO: get more accurate than AnyType
856
- let results = (outs AnyType :$result);
855
+ // TODO: get more accurate than CIR_AnyType
856
+ let results = (outs CIR_AnyType :$result);
857
857
let arguments = (ins Arg<BinOpKind, "binop kind">:$kind,
858
- AnyType :$lhs, AnyType :$rhs);
858
+ CIR_AnyType :$lhs, CIR_AnyType :$rhs);
859
859
860
860
let assemblyFormat = [{
861
861
`(` $kind `,` $lhs `,` $rhs `)` `:` type($lhs) attr-dict
@@ -929,10 +929,10 @@ def CmpOp : CIR_Op<"cmp", [Pure, SameTypeOperands]> {
929
929
```
930
930
}];
931
931
932
- // TODO: get more accurate than AnyType
933
- let results = (outs AnyType :$result);
932
+ // TODO: get more accurate than CIR_AnyType
933
+ let results = (outs CIR_AnyType :$result);
934
934
let arguments = (ins Arg<CmpOpKind, "cmp kind">:$kind,
935
- AnyType :$lhs, AnyType :$rhs);
935
+ CIR_AnyType :$lhs, CIR_AnyType :$rhs);
936
936
937
937
let assemblyFormat = [{
938
938
`(` $kind `,` $lhs `,` $rhs `)` `:` type($lhs) `,` type($result) attr-dict
@@ -1066,7 +1066,7 @@ def BrOp : CIR_Op<"br",
1066
1066
}]>
1067
1067
];
1068
1068
1069
- let arguments = (ins Variadic<AnyType >:$destOperands);
1069
+ let arguments = (ins Variadic<CIR_AnyType >:$destOperands);
1070
1070
let successors = (successor AnySuccessor:$dest);
1071
1071
let assemblyFormat = [{
1072
1072
$dest (`(` $destOperands^ `:` type($destOperands) `)`)? attr-dict
@@ -1111,8 +1111,8 @@ def BrCondOp : CIR_Op<"brcond",
1111
1111
];
1112
1112
1113
1113
let arguments = (ins CIR_BoolType:$cond,
1114
- Variadic<AnyType >:$destOperandsTrue,
1115
- Variadic<AnyType >:$destOperandsFalse);
1114
+ Variadic<CIR_AnyType >:$destOperandsTrue,
1115
+ Variadic<CIR_AnyType >:$destOperandsFalse);
1116
1116
let successors = (successor AnySuccessor:$destTrue, AnySuccessor:$destFalse);
1117
1117
let assemblyFormat = [{
1118
1118
$cond
@@ -1420,7 +1420,7 @@ def VTableAddrPointOp : CIR_Op<"vtable.address_point",
1420
1420
}];
1421
1421
1422
1422
let arguments = (ins OptionalAttr<FlatSymbolRefAttr>:$name,
1423
- Optional<AnyType >:$sym_addr,
1423
+ Optional<CIR_AnyType >:$sym_addr,
1424
1424
I32Attr:$vtable_index,
1425
1425
I32Attr:$address_point_index);
1426
1426
let results = (outs Res<CIR_PointerType, "", []>:$addr);
@@ -1447,13 +1447,13 @@ def VTableAddrPointOp : CIR_Op<"vtable.address_point",
1447
1447
1448
1448
def SetBitfieldOp : CIR_Op<"set_bitfield"> {
1449
1449
let summary = "Set a bitfield";
1450
- let description = [{
1451
- The `cir.set_bitfield` operation provides a store-like access to
1450
+ let description = [{
1451
+ The `cir.set_bitfield` operation provides a store-like access to
1452
1452
a bit field of a record.
1453
1453
1454
1454
It expects an address of a storage where to store, a type of the storage,
1455
1455
a value being stored, a name of a bit field, a pointer to the storage in the
1456
- base record, a size of the storage, a size the bit field, an offset
1456
+ base record, a size of the storage, a size the bit field, an offset
1457
1457
of the bit field and a sign. Returns a value being stored.
1458
1458
1459
1459
Example.
@@ -1487,29 +1487,29 @@ def SetBitfieldOp : CIR_Op<"set_bitfield"> {
1487
1487
}];
1488
1488
1489
1489
let arguments = (ins
1490
- AnyType :$dst,
1491
- AnyType :$src,
1490
+ CIR_PointerType :$dst,
1491
+ CIR_AnyType :$src,
1492
1492
BitfieldInfoAttr:$bitfield_info
1493
1493
);
1494
1494
1495
1495
let results = (outs CIR_IntType:$result);
1496
1496
1497
- let assemblyFormat = [{ `(`$bitfield_info`,` $dst`:`type($dst)`,`
1497
+ let assemblyFormat = [{ `(`$bitfield_info`,` $dst`:`qualified( type($dst) )`,`
1498
1498
$src`:`type($src) `)` attr-dict `->` type($result) }];
1499
-
1499
+
1500
1500
let builders = [
1501
1501
OpBuilder<(ins "Type":$type,
1502
1502
"Value":$dst,
1503
1503
"Type":$storage_type,
1504
1504
"Value":$src,
1505
1505
"StringRef":$name,
1506
- "unsigned":$size,
1506
+ "unsigned":$size,
1507
1507
"unsigned":$offset,
1508
1508
"bool":$is_signed
1509
1509
),
1510
- [{
1511
- BitfieldInfoAttr info =
1512
- BitfieldInfoAttr::get($_builder.getContext(),
1510
+ [{
1511
+ BitfieldInfoAttr info =
1512
+ BitfieldInfoAttr::get($_builder.getContext(),
1513
1513
name, storage_type,
1514
1514
size, offset, is_signed);
1515
1515
build($_builder, $_state, type, dst, src, info);
@@ -1523,7 +1523,7 @@ def SetBitfieldOp : CIR_Op<"set_bitfield"> {
1523
1523
1524
1524
def GetBitfieldOp : CIR_Op<"get_bitfield"> {
1525
1525
let summary = "Get a bitfield";
1526
- let description = [{
1526
+ let description = [{
1527
1527
The `cir.get_bitfield` operation provides a load-like access to
1528
1528
a bit field of a record.
1529
1529
@@ -1561,14 +1561,14 @@ def GetBitfieldOp : CIR_Op<"get_bitfield"> {
1561
1561
}];
1562
1562
1563
1563
let arguments = (ins
1564
- AnyType :$addr,
1564
+ CIR_PointerType :$addr,
1565
1565
BitfieldInfoAttr:$bitfield_info
1566
1566
);
1567
1567
1568
1568
let results = (outs CIR_IntType:$result);
1569
1569
1570
- let assemblyFormat = [{ `(`$bitfield_info `,` $addr attr-dict `:`
1571
- type($addr) `)` `->` type($result) }];
1570
+ let assemblyFormat = [{ `(`$bitfield_info `,` $addr attr-dict `:`
1571
+ qualified( type($addr) ) `)` `->` type($result) }];
1572
1572
1573
1573
let builders = [
1574
1574
OpBuilder<(ins "Type":$type,
@@ -1580,8 +1580,8 @@ def GetBitfieldOp : CIR_Op<"get_bitfield"> {
1580
1580
"bool":$is_signed
1581
1581
),
1582
1582
[{
1583
- BitfieldInfoAttr info =
1584
- BitfieldInfoAttr::get($_builder.getContext(),
1583
+ BitfieldInfoAttr info =
1584
+ BitfieldInfoAttr::get($_builder.getContext(),
1585
1585
name, storage_type,
1586
1586
size, offset, is_signed);
1587
1587
build($_builder, $_state, type, addr, info);
@@ -1669,7 +1669,7 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure,
1669
1669
}];
1670
1670
1671
1671
let arguments = (ins CIR_VectorType:$vec, CIR_IntType:$index);
1672
- let results = (outs AnyType :$result);
1672
+ let results = (outs CIR_AnyType :$result);
1673
1673
1674
1674
let assemblyFormat = [{
1675
1675
$vec `[` $index `:` type($index) `]` type($vec) `->` type($result) attr-dict
@@ -1691,7 +1691,7 @@ def VecCreateOp : CIR_Op<"vec.create", [Pure]> {
1691
1691
in the vector type.
1692
1692
}];
1693
1693
1694
- let arguments = (ins Variadic<AnyType >:$elements);
1694
+ let arguments = (ins Variadic<CIR_AnyType >:$elements);
1695
1695
let results = (outs CIR_VectorType:$result);
1696
1696
1697
1697
let assemblyFormat = [{
@@ -1922,9 +1922,9 @@ def CallOp : CIR_Op<"call",
1922
1922
}];
1923
1923
1924
1924
let arguments = (ins OptionalAttr<FlatSymbolRefAttr>:$callee,
1925
- Variadic<AnyType >:$operands,
1925
+ Variadic<CIR_AnyType >:$operands,
1926
1926
OptionalAttr<ASTCallExprInterface>:$ast);
1927
- let results = (outs Variadic<AnyType >);
1927
+ let results = (outs Variadic<CIR_AnyType >);
1928
1928
1929
1929
let builders = [
1930
1930
OpBuilder<(ins "FuncOp":$callee, CArg<"ValueRange", "{}">:$operands), [{
@@ -2125,7 +2125,7 @@ def TryOp : CIR_Op<"try",
2125
2125
2126
2126
let regions = (region SizedRegion<1>:$body);
2127
2127
// FIXME: should be exception type.
2128
- let results = (outs AnyType :$result);
2128
+ let results = (outs CIR_AnyType :$result);
2129
2129
2130
2130
let assemblyFormat = [{
2131
2131
`{`
@@ -2161,7 +2161,7 @@ def CatchOp : CIR_Op<"catch",
2161
2161
let description = [{
2162
2162
}];
2163
2163
2164
- let arguments = (ins AnyType :$exception_info,
2164
+ let arguments = (ins CIR_AnyType :$exception_info,
2165
2165
OptionalAttr<CatchArrayAttr>:$catchers);
2166
2166
let regions = (region VariadicRegion<AnyRegion>:$regions);
2167
2167
@@ -2306,11 +2306,11 @@ def SameFirstSecondOperandAndResultType :
2306
2306
2307
2307
def StdFindOp : CIR_Op<"std.find", [SameFirstSecondOperandAndResultType]> {
2308
2308
let arguments = (ins FlatSymbolRefAttr:$original_fn,
2309
- AnyType :$first,
2310
- AnyType :$last,
2311
- AnyType :$pattern);
2309
+ CIR_AnyType :$first,
2310
+ CIR_AnyType :$last,
2311
+ CIR_AnyType :$pattern);
2312
2312
let summary = "std:find()";
2313
- let results = (outs AnyType :$result);
2313
+ let results = (outs CIR_AnyType :$result);
2314
2314
2315
2315
let description = [{
2316
2316
Search for `pattern` in data range from `first` to `last`. This currently
@@ -2342,9 +2342,9 @@ def StdFindOp : CIR_Op<"std.find", [SameFirstSecondOperandAndResultType]> {
2342
2342
//===----------------------------------------------------------------------===//
2343
2343
2344
2344
def IterBeginOp : CIR_Op<"iterator_begin"> {
2345
- let arguments = (ins FlatSymbolRefAttr:$original_fn, AnyType :$container);
2345
+ let arguments = (ins FlatSymbolRefAttr:$original_fn, CIR_AnyType :$container);
2346
2346
let summary = "Returns an iterator to the first element of a container";
2347
- let results = (outs AnyType :$result);
2347
+ let results = (outs CIR_AnyType :$result);
2348
2348
let assemblyFormat = [{
2349
2349
`(`
2350
2350
$original_fn `,` $container `:` type($container)
@@ -2354,10 +2354,10 @@ def IterBeginOp : CIR_Op<"iterator_begin"> {
2354
2354
}
2355
2355
2356
2356
def IterEndOp : CIR_Op<"iterator_end"> {
2357
- let arguments = (ins FlatSymbolRefAttr:$original_fn, AnyType :$container);
2357
+ let arguments = (ins FlatSymbolRefAttr:$original_fn, CIR_AnyType :$container);
2358
2358
let summary = "Returns an iterator to the element following the last element"
2359
2359
" of a container";
2360
- let results = (outs AnyType :$result);
2360
+ let results = (outs CIR_AnyType :$result);
2361
2361
let assemblyFormat = [{
2362
2362
`(`
2363
2363
$original_fn `,` $container `:` type($container)
@@ -2416,7 +2416,7 @@ def VACopyOp : CIR_Op<"va.copy">,
2416
2416
}
2417
2417
2418
2418
def VAArgOp : CIR_Op<"va.arg">,
2419
- Results<(outs AnyType :$result)>,
2419
+ Results<(outs CIR_AnyType :$result)>,
2420
2420
Arguments<(ins CIR_PointerType:$arg_list)> {
2421
2421
let summary = "Fetches next variadic element as a given type";
2422
2422
let assemblyFormat = "$arg_list attr-dict `:` functional-type(operands, $result)";
@@ -2498,7 +2498,7 @@ def ThrowOp : CIR_Op<"throw",
2498
2498
```
2499
2499
}];
2500
2500
2501
- let arguments = (ins Optional<AnyType >:$exception_ptr,
2501
+ let arguments = (ins Optional<CIR_AnyType >:$exception_ptr,
2502
2502
OptionalAttr<FlatSymbolRefAttr>:$type_info,
2503
2503
OptionalAttr<FlatSymbolRefAttr>:$dtor);
2504
2504
@@ -2593,19 +2593,19 @@ def CIR_InlineAsmOp : CIR_Op<"asm", [RecursiveMemoryEffects]> {
2593
2593
2594
2594
```
2595
2595
```mlir
2596
- cir.asm(x86_att, {"xyz"}) -> !void
2596
+ cir.asm(x86_att, {"xyz"}) -> !void
2597
2597
```
2598
2598
}];
2599
2599
2600
- let results = (outs Optional<AnyType >:$res);
2600
+ let results = (outs Optional<CIR_AnyType >:$res);
2601
2601
2602
2602
let arguments = (
2603
2603
ins StrAttr:$asm_string,
2604
- AsmFlavor:$asm_flavor);
2604
+ AsmFlavor:$asm_flavor);
2605
2605
2606
2606
let assemblyFormat = [{
2607
2607
`(`$asm_flavor`,` `{` $asm_string `}` `)` attr-dict `:` type($res)
2608
- }];
2608
+ }];
2609
2609
}
2610
2610
2611
- #endif // MLIR_CIR_DIALECT_CIR_OPS
2611
+ #endif // MLIR_CIR_DIALECT_CIR_OPS
0 commit comments