Skip to content

Commit 897ebe6

Browse files
committed
Regenerate dialects
1 parent 1e5e8a2 commit 897ebe6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+21490
-21151
lines changed

src/Dialects/16/Arith.jl

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,19 @@ attribute by the parser.
323323
%r3 = \"arith.cmpf\"(%0, %1) {predicate: 0} : (f8, f8) -> i1
324324
```
325325
"""
326-
function cmpf(lhs::Value, rhs::Value; result::IR.Type, predicate, location=Location())
327-
_results = IR.Type[result,]
326+
function cmpf(
327+
lhs::Value,
328+
rhs::Value;
329+
result=nothing::Union{Nothing,IR.Type},
330+
predicate,
331+
location=Location(),
332+
)
333+
_results = IR.Type[]
328334
_operands = Value[lhs, rhs]
329335
_owned_regions = Region[]
330336
_successors = Block[]
331337
_attributes = NamedAttribute[namedattribute("predicate", predicate),]
338+
!isnothing(result) && push!(_results, result)
332339

333340
return IR.create_operation(
334341
"arith.cmpf",
@@ -337,8 +344,8 @@ function cmpf(lhs::Value, rhs::Value; result::IR.Type, predicate, location=Locat
337344
owned_regions=_owned_regions,
338345
successors=_successors,
339346
attributes=_attributes,
340-
results=_results,
341-
result_inference=false,
347+
results=(length(_results) == 0 ? nothing : _results),
348+
result_inference=(length(_results) == 0 ? true : false),
342349
)
343350
end
344351

@@ -407,12 +414,19 @@ complement or large positives
407414
: (vector<4xi64>, vector<4xi64>) -> vector<4xi1>
408415
```
409416
"""
410-
function cmpi(lhs::Value, rhs::Value; result::IR.Type, predicate, location=Location())
411-
_results = IR.Type[result,]
417+
function cmpi(
418+
lhs::Value,
419+
rhs::Value;
420+
result=nothing::Union{Nothing,IR.Type},
421+
predicate,
422+
location=Location(),
423+
)
424+
_results = IR.Type[]
412425
_operands = Value[lhs, rhs]
413426
_owned_regions = Region[]
414427
_successors = Block[]
415428
_attributes = NamedAttribute[namedattribute("predicate", predicate),]
429+
!isnothing(result) && push!(_results, result)
416430

417431
return IR.create_operation(
418432
"arith.cmpi",
@@ -421,8 +435,8 @@ function cmpi(lhs::Value, rhs::Value; result::IR.Type, predicate, location=Locat
421435
owned_regions=_owned_regions,
422436
successors=_successors,
423437
attributes=_attributes,
424-
results=_results,
425-
result_inference=false,
438+
results=(length(_results) == 0 ? nothing : _results),
439+
result_inference=(length(_results) == 0 ? true : false),
426440
)
427441
end
428442

src/Dialects/16/Async.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,12 +738,15 @@ end
738738
The `async.runtime.load` operation loads the value from the runtime
739739
async.value storage.
740740
"""
741-
function runtime_load(storage::Value; result::IR.Type, location=Location())
742-
_results = IR.Type[result,]
741+
function runtime_load(
742+
storage::Value; result=nothing::Union{Nothing,IR.Type}, location=Location()
743+
)
744+
_results = IR.Type[]
743745
_operands = Value[storage,]
744746
_owned_regions = Region[]
745747
_successors = Block[]
746748
_attributes = NamedAttribute[]
749+
!isnothing(result) && push!(_results, result)
747750

748751
return IR.create_operation(
749752
"async.runtime.load",
@@ -752,8 +755,8 @@ function runtime_load(storage::Value; result::IR.Type, location=Location())
752755
owned_regions=_owned_regions,
753756
successors=_successors,
754757
attributes=_attributes,
755-
results=_results,
756-
result_inference=false,
758+
results=(length(_results) == 0 ? nothing : _results),
759+
result_inference=(length(_results) == 0 ? true : false),
757760
)
758761
end
759762

src/Dialects/16/Bufferization.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,15 @@ involving tensors and memrefs.
228228
If tensor load is used in the bufferization steps, mutating the source
229229
buffer after loading leads to undefined behavior.
230230
"""
231-
function to_tensor(memref::Value; result::IR.Type, location=Location())
232-
_results = IR.Type[result,]
231+
function to_tensor(
232+
memref::Value; result=nothing::Union{Nothing,IR.Type}, location=Location()
233+
)
234+
_results = IR.Type[]
233235
_operands = Value[memref,]
234236
_owned_regions = Region[]
235237
_successors = Block[]
236238
_attributes = NamedAttribute[]
239+
!isnothing(result) && push!(_results, result)
237240

238241
return IR.create_operation(
239242
"bufferization.to_tensor",
@@ -242,8 +245,8 @@ function to_tensor(memref::Value; result::IR.Type, location=Location())
242245
owned_regions=_owned_regions,
243246
successors=_successors,
244247
attributes=_attributes,
245-
results=_results,
246-
result_inference=false,
248+
results=(length(_results) == 0 ? nothing : _results),
249+
result_inference=(length(_results) == 0 ? true : false),
247250
)
248251
end
249252

src/Dialects/16/Complex.jl

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ The `abs` op takes a single complex number and computes its absolute value.
1515
%a = complex.abs %b : complex<f32>
1616
```
1717
"""
18-
function abs(complex::Value; result::IR.Type, location=Location())
19-
_results = IR.Type[result,]
18+
function abs(complex::Value; result=nothing::Union{Nothing,IR.Type}, location=Location())
19+
_results = IR.Type[]
2020
_operands = Value[complex,]
2121
_owned_regions = Region[]
2222
_successors = Block[]
2323
_attributes = NamedAttribute[]
24+
!isnothing(result) && push!(_results, result)
2425

2526
return IR.create_operation(
2627
"complex.abs",
@@ -29,8 +30,8 @@ function abs(complex::Value; result::IR.Type, location=Location())
2930
owned_regions=_owned_regions,
3031
successors=_successors,
3132
attributes=_attributes,
32-
results=_results,
33-
result_inference=false,
33+
results=(length(_results) == 0 ? nothing : _results),
34+
result_inference=(length(_results) == 0 ? true : false),
3435
)
3536
end
3637

@@ -78,12 +79,13 @@ The `angle` op takes a single complex number and computes its argument value wit
7879
%a = complex.angle %b : complex<f32>
7980
```
8081
"""
81-
function angle(complex::Value; result::IR.Type, location=Location())
82-
_results = IR.Type[result,]
82+
function angle(complex::Value; result=nothing::Union{Nothing,IR.Type}, location=Location())
83+
_results = IR.Type[]
8384
_operands = Value[complex,]
8485
_owned_regions = Region[]
8586
_successors = Block[]
8687
_attributes = NamedAttribute[]
88+
!isnothing(result) && push!(_results, result)
8789

8890
return IR.create_operation(
8991
"complex.angle",
@@ -92,8 +94,8 @@ function angle(complex::Value; result::IR.Type, location=Location())
9294
owned_regions=_owned_regions,
9395
successors=_successors,
9496
attributes=_attributes,
95-
results=_results,
96-
result_inference=false,
97+
results=(length(_results) == 0 ? nothing : _results),
98+
result_inference=(length(_results) == 0 ? true : false),
9799
)
98100
end
99101

@@ -403,12 +405,13 @@ The `im` op takes a single complex number and extracts the imaginary part.
403405
%a = complex.im %b : complex<f32>
404406
```
405407
"""
406-
function im(complex::Value; imaginary::IR.Type, location=Location())
407-
_results = IR.Type[imaginary,]
408+
function im(complex::Value; imaginary=nothing::Union{Nothing,IR.Type}, location=Location())
409+
_results = IR.Type[]
408410
_operands = Value[complex,]
409411
_owned_regions = Region[]
410412
_successors = Block[]
411413
_attributes = NamedAttribute[]
414+
!isnothing(imaginary) && push!(_results, imaginary)
412415

413416
return IR.create_operation(
414417
"complex.im",
@@ -417,8 +420,8 @@ function im(complex::Value; imaginary::IR.Type, location=Location())
417420
owned_regions=_owned_regions,
418421
successors=_successors,
419422
attributes=_attributes,
420-
results=_results,
421-
result_inference=false,
423+
results=(length(_results) == 0 ? nothing : _results),
424+
result_inference=(length(_results) == 0 ? true : false),
422425
)
423426
end
424427

@@ -630,12 +633,13 @@ The `re` op takes a single complex number and extracts the real part.
630633
%a = complex.re %b : complex<f32>
631634
```
632635
"""
633-
function re(complex::Value; real::IR.Type, location=Location())
634-
_results = IR.Type[real,]
636+
function re(complex::Value; real=nothing::Union{Nothing,IR.Type}, location=Location())
637+
_results = IR.Type[]
635638
_operands = Value[complex,]
636639
_owned_regions = Region[]
637640
_successors = Block[]
638641
_attributes = NamedAttribute[]
642+
!isnothing(real) && push!(_results, real)
639643

640644
return IR.create_operation(
641645
"complex.re",
@@ -644,8 +648,8 @@ function re(complex::Value; real::IR.Type, location=Location())
644648
owned_regions=_owned_regions,
645649
successors=_successors,
646650
attributes=_attributes,
647-
results=_results,
648-
result_inference=false,
651+
results=(length(_results) == 0 ? nothing : _results),
652+
result_inference=(length(_results) == 0 ? true : false),
649653
)
650654
end
651655

src/Dialects/16/LLVMIR.jl

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,15 @@ end
556556
`extractelement`
557557
558558
"""
559-
function extractelement(vector::Value, position::Value; res::IR.Type, location=Location())
560-
_results = IR.Type[res,]
559+
function extractelement(
560+
vector::Value, position::Value; res=nothing::Union{Nothing,IR.Type}, location=Location()
561+
)
562+
_results = IR.Type[]
561563
_operands = Value[vector, position]
562564
_owned_regions = Region[]
563565
_successors = Block[]
564566
_attributes = NamedAttribute[]
567+
!isnothing(res) && push!(_results, res)
565568

566569
return IR.create_operation(
567570
"llvm.extractelement",
@@ -570,8 +573,8 @@ function extractelement(vector::Value, position::Value; res::IR.Type, location=L
570573
owned_regions=_owned_regions,
571574
successors=_successors,
572575
attributes=_attributes,
573-
results=_results,
574-
result_inference=false,
576+
results=(length(_results) == 0 ? nothing : _results),
577+
result_inference=(length(_results) == 0 ? true : false),
575578
)
576579
end
577580

@@ -637,16 +640,17 @@ end
637640
function fcmp(
638641
lhs::Value,
639642
rhs::Value;
640-
res::IR.Type,
643+
res=nothing::Union{Nothing,IR.Type},
641644
predicate,
642645
fastmathFlags=nothing,
643646
location=Location(),
644647
)
645-
_results = IR.Type[res,]
648+
_results = IR.Type[]
646649
_operands = Value[lhs, rhs]
647650
_owned_regions = Region[]
648651
_successors = Block[]
649652
_attributes = NamedAttribute[namedattribute("predicate", predicate),]
653+
!isnothing(res) && push!(_results, res)
650654
!isnothing(fastmathFlags) &&
651655
push!(_attributes, namedattribute("fastmathFlags", fastmathFlags))
652656

@@ -657,8 +661,8 @@ function fcmp(
657661
owned_regions=_owned_regions,
658662
successors=_successors,
659663
attributes=_attributes,
660-
results=_results,
661-
result_inference=false,
664+
results=(length(_results) == 0 ? nothing : _results),
665+
result_inference=(length(_results) == 0 ? true : false),
662666
)
663667
end
664668

@@ -1249,12 +1253,19 @@ end
12491253
`icmp`
12501254
12511255
"""
1252-
function icmp(lhs::Value, rhs::Value; res::IR.Type, predicate, location=Location())
1253-
_results = IR.Type[res,]
1256+
function icmp(
1257+
lhs::Value,
1258+
rhs::Value;
1259+
res=nothing::Union{Nothing,IR.Type},
1260+
predicate,
1261+
location=Location(),
1262+
)
1263+
_results = IR.Type[]
12541264
_operands = Value[lhs, rhs]
12551265
_owned_regions = Region[]
12561266
_successors = Block[]
12571267
_attributes = NamedAttribute[namedattribute("predicate", predicate),]
1268+
!isnothing(res) && push!(_results, res)
12581269

12591270
return IR.create_operation(
12601271
"llvm.icmp",
@@ -1263,8 +1274,8 @@ function icmp(lhs::Value, rhs::Value; res::IR.Type, predicate, location=Location
12631274
owned_regions=_owned_regions,
12641275
successors=_successors,
12651276
attributes=_attributes,
1266-
results=_results,
1267-
result_inference=false,
1277+
results=(length(_results) == 0 ? nothing : _results),
1278+
result_inference=(length(_results) == 0 ? true : false),
12681279
)
12691280
end
12701281

src/Dialects/16/MemRef.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,18 @@ techniques. This is possible because of the
222222
[restrictions on dimensions and symbols](Affine.md/#restrictions-on-dimensions-and-symbols)
223223
in these contexts.
224224
"""
225-
function load(memref::Value, indices::Vector{Value}; result::IR.Type, location=Location())
226-
_results = IR.Type[result,]
225+
function load(
226+
memref::Value,
227+
indices::Vector{Value};
228+
result=nothing::Union{Nothing,IR.Type},
229+
location=Location(),
230+
)
231+
_results = IR.Type[]
227232
_operands = Value[memref, indices...]
228233
_owned_regions = Region[]
229234
_successors = Block[]
230235
_attributes = NamedAttribute[]
236+
!isnothing(result) && push!(_results, result)
231237

232238
return IR.create_operation(
233239
"memref.load",
@@ -236,8 +242,8 @@ function load(memref::Value, indices::Vector{Value}; result::IR.Type, location=L
236242
owned_regions=_owned_regions,
237243
successors=_successors,
238244
attributes=_attributes,
239-
results=_results,
240-
result_inference=false,
245+
results=(length(_results) == 0 ? nothing : _results),
246+
result_inference=(length(_results) == 0 ? true : false),
241247
)
242248
end
243249

0 commit comments

Comments
 (0)