Skip to content

Commit

Permalink
Some files were generated with a wrong tblgen version
Browse files Browse the repository at this point in the history
  • Loading branch information
jumerckx committed Jul 23, 2024
1 parent abc68a1 commit 98275af
Show file tree
Hide file tree
Showing 12 changed files with 190 additions and 116 deletions.
9 changes: 5 additions & 4 deletions src/Dialects/15/Arithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,13 @@ forms simple integer and floating point constants.
%1 = \"arith.constant\"() {value = 42 : i32} : () -> i32
```
"""
function constant(; result::IR.Type, value, location=Location())
_results = IR.Type[result,]
function constant(; result=nothing::Union{Nothing,IR.Type}, value, location=Location())
_results = IR.Type[]
_operands = Value[]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[namedattribute("value", value),]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"arith.constant",
Expand All @@ -410,8 +411,8 @@ function constant(; result::IR.Type, value, location=Location())
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down
66 changes: 42 additions & 24 deletions src/Dialects/15/Shape.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ ready to execute.
%wt = shape.assuming_all %w0, %w2 // Passing
```
"""
function assuming_all(inputs::Vector{Value}; result::IR.Type, location=Location())
_results = IR.Type[result,]
function assuming_all(
inputs::Vector{Value}; result=nothing::Union{Nothing,IR.Type}, location=Location()
)
_results = IR.Type[]
_operands = Value[inputs...,]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"shape.assuming_all",
Expand All @@ -105,8 +108,8 @@ function assuming_all(inputs::Vector{Value}; result::IR.Type, location=Location(
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down Expand Up @@ -357,12 +360,15 @@ shape.broadcast documents.
%w1 = shape.cstr_broadcastable [2,2], [3,2] // Failure
```
"""
function cstr_broadcastable(shapes::Vector{Value}; result::IR.Type, location=Location())
_results = IR.Type[result,]
function cstr_broadcastable(
shapes::Vector{Value}; result=nothing::Union{Nothing,IR.Type}, location=Location()
)
_results = IR.Type[]
_operands = Value[shapes...,]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"shape.cstr_broadcastable",
Expand All @@ -371,8 +377,8 @@ function cstr_broadcastable(shapes::Vector{Value}; result::IR.Type, location=Loc
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand All @@ -389,12 +395,15 @@ Given 1 or more input shapes, determine if all shapes are the exact same.
%w1 = shape.cstr_eq [2,2], [1,2] // Failure
```
"""
function cstr_eq(shapes::Vector{Value}; result::IR.Type, location=Location())
_results = IR.Type[result,]
function cstr_eq(
shapes::Vector{Value}; result=nothing::Union{Nothing,IR.Type}, location=Location()
)
_results = IR.Type[]
_operands = Value[shapes...,]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"shape.cstr_eq",
Expand All @@ -403,8 +412,8 @@ function cstr_eq(shapes::Vector{Value}; result::IR.Type, location=Location())
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down Expand Up @@ -556,12 +565,15 @@ the shape.
%s1 = shape.from_extents
```
"""
function from_extents(extents::Vector{Value}; shape::IR.Type, location=Location())
_results = IR.Type[shape,]
function from_extents(
extents::Vector{Value}; shape=nothing::Union{Nothing,IR.Type}, location=Location()
)
_results = IR.Type[]
_operands = Value[extents...,]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[]
!isnothing(shape) && push!(_results, shape)

return IR.create_operation(
"shape.from_extents",
Expand All @@ -570,8 +582,8 @@ function from_extents(extents::Vector{Value}; shape::IR.Type, location=Location(
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down Expand Up @@ -722,12 +734,15 @@ assertion failure.
%false = shape.is_broadcastable [2,2], [3,2]
```
"""
function is_broadcastable(shapes::Vector{Value}; result::IR.Type, location=Location())
_results = IR.Type[result,]
function is_broadcastable(
shapes::Vector{Value}; result=nothing::Union{Nothing,IR.Type}, location=Location()
)
_results = IR.Type[]
_operands = Value[shapes...,]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"shape.is_broadcastable",
Expand All @@ -736,8 +751,8 @@ function is_broadcastable(shapes::Vector{Value}; result::IR.Type, location=Locat
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down Expand Up @@ -1035,12 +1050,15 @@ as their equivalent non-error shapes. Error shapes can be tested for
equality like any other shape value, meaning that the error value is equal
to itself.
"""
function shape_eq(shapes::Vector{Value}; result::IR.Type, location=Location())
_results = IR.Type[result,]
function shape_eq(
shapes::Vector{Value}; result=nothing::Union{Nothing,IR.Type}, location=Location()
)
_results = IR.Type[]
_operands = Value[shapes...,]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"shape.shape_eq",
Expand All @@ -1049,8 +1067,8 @@ function shape_eq(shapes::Vector{Value}; result::IR.Type, location=Location())
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down
13 changes: 9 additions & 4 deletions src/Dialects/15/Vector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -933,13 +933,18 @@ For instance:
```
"""
function insert_map(
vector::Value, dest::Value, ids::Vector{Value}; result::IR.Type, location=Location()
vector::Value,
dest::Value,
ids::Vector{Value};
result=nothing::Union{Nothing,IR.Type},
location=Location(),
)
_results = IR.Type[result,]
_results = IR.Type[]
_operands = Value[vector, dest, ids...]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"vector.insert_map",
Expand All @@ -948,8 +953,8 @@ function insert_map(
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down
9 changes: 5 additions & 4 deletions src/Dialects/16/Arith.jl
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,13 @@ forms simple integer and floating point constants.
%1 = \"arith.constant\"() {value = 42 : i32} : () -> i32
```
"""
function constant(; result::IR.Type, value, location=Location())
_results = IR.Type[result,]
function constant(; result=nothing::Union{Nothing,IR.Type}, value, location=Location())
_results = IR.Type[]
_operands = Value[]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[namedattribute("value", value),]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"arith.constant",
Expand All @@ -457,8 +458,8 @@ function constant(; result::IR.Type, value, location=Location())
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down
9 changes: 5 additions & 4 deletions src/Dialects/16/MemRef.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ function atomic_rmw(
value::Value,
memref::Value,
indices::Vector{Value};
result::IR.Type,
result=nothing::Union{Nothing,IR.Type},
kind,
location=Location(),
)
_results = IR.Type[result,]
_results = IR.Type[]
_operands = Value[value, memref, indices...]
_owned_regions = Region[]
_successors = Block[]
_attributes = NamedAttribute[namedattribute("kind", kind),]
!isnothing(result) && push!(_results, result)

return IR.create_operation(
"memref.atomic_rmw",
Expand All @@ -71,8 +72,8 @@ function atomic_rmw(
owned_regions=_owned_regions,
successors=_successors,
attributes=_attributes,
results=_results,
result_inference=false,
results=(length(_results) == 0 ? nothing : _results),
result_inference=(length(_results) == 0 ? true : false),
)
end

Expand Down
Loading

0 comments on commit 98275af

Please sign in to comment.