-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Backports for Julia 1.9.0-beta4 #48311
Conversation
@nanosoldier |
Your package evaluation job has completed - possible new issues were detected. |
#44421 changed the union-splitting to skip generating unnecessary fallback dynamic dispatch call when there is any fully covered call. But it turned out that this is only valid when there is any fully covered call in matches for all signatures that inference split, and it is invalid if there is any union split signature against which any uncovered call is found. Consider the following example: # case 1 # def nosplit(::Any) = [...] nosplit(::Int) = [...] # call nosplit(a::Any) split1: a::Any ┬ nosplit(a::Int) └ nosplit(a::Any) # fully covers split1 # case 2 # def convert(::Type{T}, ::T) = T # call convert(::Type{Union{Bool,Tuple{Int,String}}}, a::Union{Bool,Tuple{Int,Any}}) split1: a::Bool ─ convert(::Type{Bool}, ::Bool) # fully covers split1 split2: a::Tuple{Int,Any} ─ convert(::Type{Tuple{Int,String}}, ::Tuple{Int,String}) # NOT fully covers split2 #44421 allows us to optimize the the first case, but handles the second case wrongly. This commit fixes it up while still optimizing the first case. fix #48397.
(cherry picked from commit 87f8958)
- Fix typos - Clarify that ! means mutation, not "in-place-ness". This should be backported because sort! is even less in place in 1.9 than it already was in 1.8. - Rewrite the section on default policy to reflect the new default policy - Move examples and extended description of previously default sorting algorithms out of sort.md and into their respective docstrings (still rendered in sort.md) Co-authored-by: Jeremie Knuesel <knuesel@gmail.com> (cherry picked from commit a1c4d85)
Co-authored-by: Ian <i.r.butterworth@gmail.com> (cherry picked from commit 94c4fb5)
Use versioned libblastrampoline and GMP (cherry picked from commit 335cd5e)
The type parameters to `Union` may be `Type`s or `TypeVar`s, but `apply_type_tfunc` failed to recognize the latter as valid in the single-argument case. (cherry picked from commit fd79b58)
After adding `libstdc++` probing into the Julia loader [0], we originally made the assumption that the `libstdc++` that is shipped with `julia` would always be co-located with `libjulia.so` [1]. This is not the case when building with `USE_SYSTEM_CSL=1`, however, where we sequester system libraries in `usr/lib/julia`, even at build-time. The path to `libstdc++.so` has already been getting altered when moving from build-time to install time via `stringreplace` [2], but after further thought, I decided that it would be better to just use the pre-existing `LOADER_*_DEP_LIBS` mechanism to communicate to the loader what the correct relative path to `libstdc++.so` is. This also allows the single `stringreplace` to update all of our "special" library paths. [0] #46976 [1] https://github.com/JuliaLang/julia/pull/46976/files#diff-8c5c98f26f3f7aac8905a1074c5bec11a57e9b9c7c556791deac5a3b27cc096fR379 [2] https://github.com/JuliaLang/julia/blob/master/Makefile#L430 (cherry picked from commit fb97c82)
The `DEPS_LIBS` RPATH-substitute mechanism contains a list of paths to load, and some of these paths are "special", in that they require more involved loading than simply `load_library()`. These libraries are thereby denoted by a `@` prefixing them. Previously, we made note of these libraries, then loaded them at the end of the loading loop, but with the addition of `libstdc++` it is now important to have the order of the libraries (including special libraries) to be obeyed by the loading loop, so I have inlined special library handling into the loading loop. In the future, we may wish to denote special libraries more explicitly than simply relying on there being exactly three libraries, with the ordering being mapped to `libstdc++`, `libjulia-internal`, and `libjulia-codegen`. (cherry picked from commit 4e99860)
The main idea here is that the TBAA domain is ill-equipped for reasoning about regions (and, in particular, suffers total precision less when merging disparate types in a `memcpy`). Instead, `!noalias` should be used for region-based memory information and `!tbaa` should be used exclusively for layout. We use (5) regions corresponding to the top level of the TBAA tree: - gcframe - stack - data - constant - type_metadata For now, this leaves the TBAA hierarchy in tact and only adds additional `!noalias` metadata. `!tbaa` annotations should be the same as before.
This is an interim solution that derives the correct `!noalias` region from the existing TBAA information. Later we will want to: - Revise the TBAA hierarchy to remove region information - Delete `jl_aliasinfo_t::fromTBAA()` - Update `jl_cgval_t` to store a `jl_aliasinfo_t`
Backport: Add `!noalias` and `!alias.scope` metadata
@nanosoldier |
If the target module does not have a Docs.META dict (e.g. if `--strip-metadata` is used), `Docs.meta()` has the side effect of creating a new IdDict and initializing the Docs.META field of the target module. We need to avoid eval'ing into modules after they've been closed, so for methods that do not mutate the new IdDict we should avoid the init. Resolves #48390. Co-authored-by: Steve Kelly <kd2cca@gmail.com> (cherry picked from commit 798b589)
On Windows they need to include the major soversion of libblastrampoline. (cherry picked from commit d5911c0)
(cherry picked from commit f2d7055)
(cherry picked from commit a93ac54)
Use `Int` as type for integer arguments, instead of `Cint`. (cherry picked from commit cdc6eaf)
@nanosoldier |
(cherry picked from commit 2eeefbe)
These places in the code can either be more efficient O(1) or more correct using something more similar to the published SCC algorithm by Tarjan for strongly connected components. (cherry picked from commit b03439c)
ensure extension triggers are only run by the package that satified them
* Change uses of int to size_t in MurmurHash (cherry picked from commit 3fe69f4)
This `abstract_call_known` recursion inserted `EFFECTS_TOTAL` which is incorrect because `<:` and `>:` can throw if the arguments are not types. (cherry picked from commit 0ab6e2f)
Co-authored-by: robsmith11 <robsmith11@github.com> (cherry picked from commit 7827b08)
Backported PRs:
p7zip
url #48176keys(::RegexMatch)
#48252read
on aCmd
#48334dlopen
inglibssp
non fatal #48333getglobal
andsetglobal!
#48409apply_type_tfunc
forUnion{T::TypeVar}
#48384libstdc++
path intoLOADER_*_DEP_LIBS
#48342!noalias
and!alias.scope
metadata #48256Base.libblas_name
/Base.liblapack_name
#48435Non-merged PRs with backport label:
--heap-size-hint
arg handling #48050