Skip to content

Commit

Permalink
Delete convert(::Type{Any}, ::UpperBoundedInteger) (#316)
Browse files Browse the repository at this point in the history
* Delete `convert(::Type{Any}, ::UpperBoundedInteger)` (fix ~600 invalidations)

This method isn't necessary (it just replicates the fallback),
and it triggers a lot of invalidations.

* Version 0.12.64
  • Loading branch information
timholy authored Aug 13, 2021
1 parent 6f715a9 commit 38cf5a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LoopVectorization"
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
authors = ["Chris Elrod <[email protected]>"]
version = "0.12.63"
version = "0.12.64"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
3 changes: 1 addition & 2 deletions src/reconstruct_loopset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Base.promote_rule(::Type{T}, ::Type{UpperBoundedInteger{N,S}}) where {N,T<:Base.
Base.promote_rule(::Type{UpperBoundedInteger{N,S}}, ::Type{T}) where {N,T<:Base.BitInteger,S} = promote_rule(S,T)
Base.convert(::Type{T}, i::UpperBoundedInteger) where {T<:Number} = convert(T, i.i)
Base.convert(::Type{UpperBoundedInteger{N,T}}, i::UpperBoundedInteger{N,T}) where {N,T<:Base.BitInteger} = i
Base.convert(::Type{Any}, i::UpperBoundedInteger) = i
upper_bound(_) = typemax(Int)
upper_bound(::Type{CloseOpen{T,UpperBoundedInteger{N,S}}}) where {T,N,S} = N - 1

Expand Down Expand Up @@ -560,7 +559,7 @@ function add_array_symbols!(ls::LoopSet, arraysymbolinds::Vector{Symbol}, offset
for as arraysymbolinds
pushpreamble!(ls, Expr(:(=), as, extract_varg((offset+=1))))
end
return offset
return offset
end
function extract_external_functions!(ls::LoopSet, offset::Int, vargs)
for op operations(ls)
Expand Down

2 comments on commit 38cf5a1

@chriselrod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/42854

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.64 -m "<description of version>" 38cf5a10dbd014b23af8066ee3266808372e0eff
git push origin v0.12.64

Please sign in to comment.