@@ -1037,7 +1037,7 @@ def ResumeOp : CIR_Op<"resume", [ReturnLike, Terminator,
1037
1037
```
1038
1038
}];
1039
1039
1040
- let arguments = (ins Optional<VoidPtr >:$exception_ptr,
1040
+ let arguments = (ins Optional<CIR_VoidPtrType >:$exception_ptr,
1041
1041
Optional<CIR_UInt32>:$type_id,
1042
1042
UnitAttr:$rethrow);
1043
1043
let assemblyFormat = [{
@@ -2661,7 +2661,7 @@ def VTTAddrPointOp : CIR_Op<"vtt.address_point",
2661
2661
let arguments = (ins OptionalAttr<FlatSymbolRefAttr>:$name,
2662
2662
Optional<CIR_AnyType>:$sym_addr,
2663
2663
I32Attr:$offset);
2664
- let results = (outs Res< CIR_PointerType, "", []> :$addr);
2664
+ let results = (outs CIR_PointerType:$addr);
2665
2665
2666
2666
let assemblyFormat = [{
2667
2667
($name^)?
@@ -3114,7 +3114,7 @@ def GetMethodOp : CIR_Op<"get_method"> {
3114
3114
}];
3115
3115
3116
3116
let arguments = (ins CIR_MethodType:$method, RecordPtr:$object);
3117
- let results = (outs FuncPtr:$callee, VoidPtr :$adjusted_this);
3117
+ let results = (outs FuncPtr:$callee, CIR_VoidPtrType :$adjusted_this);
3118
3118
3119
3119
let assemblyFormat = [{
3120
3120
$method `,` $object
@@ -4345,7 +4345,7 @@ def CatchParamOp : CIR_Op<"catch_param"> {
4345
4345
```
4346
4346
}];
4347
4347
4348
- let arguments = (ins Optional<VoidPtr >:$exception_ptr,
4348
+ let arguments = (ins Optional<CIR_VoidPtrType >:$exception_ptr,
4349
4349
OptionalAttr<CatchParamKind>:$kind);
4350
4350
let results = (outs Optional<CIR_AnyType>:$param);
4351
4351
let assemblyFormat = [{
@@ -4384,7 +4384,7 @@ def EhInflightOp : CIR_Op<"eh.inflight_exception"> {
4384
4384
4385
4385
let arguments = (ins UnitAttr:$cleanup,
4386
4386
OptionalAttr<FlatSymbolRefArrayAttr>:$sym_type_list);
4387
- let results = (outs VoidPtr :$exception_ptr, CIR_UInt32:$type_id);
4387
+ let results = (outs CIR_VoidPtrType :$exception_ptr, CIR_UInt32:$type_id);
4388
4388
let assemblyFormat = [{
4389
4389
(`cleanup` $cleanup^)?
4390
4390
($sym_type_list^)?
@@ -4462,9 +4462,10 @@ def CopyOp : CIR_Op<"copy",
4462
4462
4463
4463
class CIR_MemOp<string mnemonic>
4464
4464
: CIR_Op<mnemonic, [AllTypesMatch<["dst", "src"]>]> {
4465
- dag commonArgs = (ins Arg<VoidPtr, "", [MemWrite]>:$dst,
4466
- Arg<VoidPtr, "", [MemRead]>:$src);
4467
- let hasVerifier = 0;
4465
+ dag commonArgs = (ins
4466
+ Arg<CIR_VoidPtrType, "", [MemWrite]>:$dst,
4467
+ Arg<CIR_VoidPtrType, "", [MemRead]>:$src
4468
+ );
4468
4469
}
4469
4470
4470
4471
def MemCpyOp : CIR_MemOp<"libc.memcpy"> {
@@ -4581,7 +4582,7 @@ def MemSetOp : CIR_Op<"libc.memset"> {
4581
4582
}];
4582
4583
4583
4584
let arguments = (ins
4584
- Arg<VoidPtr , "", [MemWrite]>:$dst,
4585
+ Arg<CIR_VoidPtrType , "", [MemWrite]>:$dst,
4585
4586
CIR_SInt32:$val,
4586
4587
CIR_AnyFundamentalUIntType:$len
4587
4588
);
@@ -4615,7 +4616,7 @@ def MemSetInlineOp : CIR_Op<"memset_inline"> {
4615
4616
}];
4616
4617
4617
4618
let arguments = (ins
4618
- Arg<VoidPtr , "", [MemWrite]>:$dst,
4619
+ Arg<CIR_VoidPtrType , "", [MemWrite]>:$dst,
4619
4620
CIR_SInt32:$val,
4620
4621
I64Attr:$len
4621
4622
);
@@ -4647,12 +4648,12 @@ def MemChrOp : CIR_Op<"libc.memchr"> {
4647
4648
// TODO: instead of using UInt64 for len, we could make it constrained on
4648
4649
// size_t (64 or 32) and have a builder that does the right job.
4649
4650
let arguments = (ins
4650
- Arg<VoidPtr , "", [MemRead]>:$src,
4651
+ Arg<CIR_VoidPtrType , "", [MemRead]>:$src,
4651
4652
CIR_SInt32:$pattern,
4652
4653
CIR_UInt64:$len
4653
4654
);
4654
4655
4655
- let results = (outs Res<VoidPtr, ""> :$result);
4656
+ let results = (outs CIR_VoidPtrType :$result);
4656
4657
4657
4658
let assemblyFormat = [{
4658
4659
`(`
@@ -4666,7 +4667,7 @@ def MemChrOp : CIR_Op<"libc.memchr"> {
4666
4667
4667
4668
class FuncAddrBuiltinOp<string mnemonic> : CIR_Op<mnemonic, []> {
4668
4669
let arguments = (ins CIR_UInt32:$level);
4669
- let results = (outs Res<VoidPtr, ""> :$result);
4670
+ let results = (outs CIR_VoidPtrType :$result);
4670
4671
let assemblyFormat = [{
4671
4672
`(` $level `)` attr-dict
4672
4673
}];
@@ -4931,7 +4932,7 @@ def AssumeSepStorageOp : CIR_Op<"assume.separate_storage", [SameTypeOperands]> {
4931
4932
builtin function.
4932
4933
}];
4933
4934
4934
- let arguments = (ins VoidPtr :$ptr1, VoidPtr :$ptr2);
4935
+ let arguments = (ins CIR_VoidPtrType :$ptr1, CIR_VoidPtrType :$ptr2);
4935
4936
4936
4937
let assemblyFormat = [{
4937
4938
$ptr1 `,` $ptr2 `:` qualified(type($ptr1)) attr-dict
@@ -5079,7 +5080,7 @@ def FreeExceptionOp : CIR_Op<"free.exception"> {
5079
5080
```
5080
5081
}];
5081
5082
5082
- let arguments = (ins VoidPtr :$ptr);
5083
+ let arguments = (ins CIR_VoidPtrType :$ptr);
5083
5084
let results = (outs);
5084
5085
5085
5086
let assemblyFormat = [{
@@ -5325,11 +5326,11 @@ def PrefetchOp : CIR_Op<"prefetch"> {
5325
5326
If $isWrite doesn't specified it means that prefetch is prepared for 'read'.
5326
5327
}];
5327
5328
5328
- let arguments = (
5329
- ins VoidPtr :$addr,
5330
- ConfinedAttr<I32Attr, [IntMinValue<0>,
5331
- IntMaxValue<3>]>:$locality,
5332
- UnitAttr:$isWrite );
5329
+ let arguments = (ins
5330
+ CIR_VoidPtrType :$addr,
5331
+ ConfinedAttr<I32Attr, [IntMinValue<0>, IntMaxValue<3>]>:$locality ,
5332
+ UnitAttr:$isWrite
5333
+ );
5333
5334
5334
5335
let assemblyFormat = [{
5335
5336
`(` $addr `:` qualified(type($addr)) `)`
@@ -5349,7 +5350,7 @@ def ClearCacheOp : CIR_Op<"clear_cache", [AllTypesMatch<["begin", "end"]>]> {
5349
5350
CIR representation for `__builtin___clear_cache`.
5350
5351
}];
5351
5352
5352
- let arguments = (ins VoidPtr :$begin, VoidPtr :$end);
5353
+ let arguments = (ins CIR_VoidPtrType :$begin, CIR_VoidPtrType :$end);
5353
5354
let assemblyFormat = [{
5354
5355
$begin `:` qualified(type($begin)) `,`
5355
5356
$end `,`
0 commit comments