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

Backports for Julia 1.9.0-beta4 #48311

Merged
merged 46 commits into from
Feb 7, 2023
Merged

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Jan 17, 2023

Backported PRs:

Non-merged PRs with backport label:

simsurace and others added 3 commits January 17, 2023 08:48
This method was added in 1.7.0 and is not available in any 1.6 release

(cherry picked from commit 12c3b1c)
@KristofferC KristofferC added the release Release management and versioning. label Jan 17, 2023
@DilumAluthge DilumAluthge changed the title Backports for Juila 1.9.0-beta4 Backports for Julia 1.9.0-beta4 Jan 18, 2023
t-bltg and others added 7 commits January 23, 2023 13:45
(cherry picked from commit f6b5157)
(cherry picked from commit c4cf1e6)
(cherry picked from commit 1bff32b)
(cherry picked from commit 2949879)
* set max_methods = 1 for REPL methods

(cherry picked from commit f8493c7)
@KristofferC
Copy link
Member Author

@nanosoldier runtests(ALL, vs = ":release-1.8", configuration = (buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],), vs_configuration=(buildflags=["LLVM_ASSERTIONS=1", "FORCE_ASSERTIONS=1"],))

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected.
A full report can be found here.

aviatesk and others added 11 commits January 31, 2023 00:31
#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.
closes #45480

Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
(cherry picked from commit 0231c22)
ref #46928

Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
(cherry picked from commit d775750)
When not in threaded region, only thread 0 will manage IO events, but it
may have gone to sleep if there were no IO objects active for it to
watch earlier.

Fix #48430

(cherry picked from commit 45b7e7a)
- 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)
KristofferC and others added 4 commits February 1, 2023 11:27
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
@LilithHafner
Copy link
Member

@nanosoldier runbenchmarks("sort", vs=":release-1.8")

KristofferC and others added 6 commits February 5, 2023 11:52
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)
Use `Int` as type for integer arguments, instead of `Cint`.

(cherry picked from commit cdc6eaf)
@LilithHafner
Copy link
Member

@nanosoldier runbenchmarks("sort", vs=":release-1.8")

vtjnash and others added 11 commits February 6, 2023 15:09
Make sure things are properly ordered here, so that when serializing,
nothing is mutating the system at the same time.

Fix #48047

(cherry picked from commit 87b8896)
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)
Backedges are only applicable to cache objects with max_world==Inf

Fix #48391

(cherry picked from commit b9398a3)
ensure extension triggers are only run by the package that satified them
This gets used by `Base.require`, arguably the most painful of
all invalidations. CSV is one package that invalidates it.

(cherry picked from commit 5721ae7)
* 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)
@KristofferC KristofferC merged commit 26c5abf into release-1.9 Feb 7, 2023
@KristofferC KristofferC deleted the backports-release-1.9 branch February 7, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Release management and versioning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.