Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix invalidations from loading Static.jl #46761

Merged
merged 2 commits into from
Sep 15, 2022

Conversation

ranocha
Copy link
Member

@ranocha ranocha commented Sep 14, 2022

I improved type stability of two methods to fix some invalidations. This is based on the following code:

julia> using Pkg; Pkg.activate(temp=true); Pkg.add("ArrayInterface")

julia> using SnoopCompileCore; invalidations = @snoopr(using ArrayInterface); using SnoopCompile

julia> trees = invalidation_trees(invalidations)
...
inserting (::Colon)(L::Integer, ::Static.StaticInt{U}) where U in ArrayInterface at ~/.julia/packages/ArrayInterface/eITVf/src/ranges.jl:157 invalidated:
...
inserting (::Colon)(::Static.StaticInt{L}, U::Integer) where L in ArrayInterface at ~/.julia/packages/ArrayInterface/eITVf/src/ranges.jl:158 invalidated:
...

…Integer, ::InsertionSortAlg, o::Ordering)`

This fixes some invalidations when loading Static.jl.
… <: Strings}`

This fixes some invalidations when loading Static.jl.
@ranocha ranocha added compiler:latency Compiler latency backport 1.8 Change should be backported to release-1.8 labels Sep 14, 2022
@ViralBShah ViralBShah merged commit 9b1780d into JuliaLang:master Sep 15, 2022
@ranocha ranocha deleted the hr/invalidations_static_colon branch September 15, 2022 03:37
KristofferC pushed a commit that referenced this pull request Sep 16, 2022
* improve type stability of `sort!(v::AbstractVector, lo::Integer, hi::Integer, ::InsertionSortAlg, o::Ordering)`
* improve type stability of `fmt(buf, pos, arg, spec::Spec{T}) where {T <: Strings}`

This fixes some invalidations when loading Static.jl.

(cherry picked from commit 9b1780d)
@KristofferC KristofferC mentioned this pull request Sep 16, 2022
28 tasks
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:latency Compiler latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants