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 1.6-rc1 #39160

Merged
merged 79 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
7be9731
Fix #23646: relpath recognizes Windows drive letters (#38259)
belamenso Dec 23, 2020
f3eabcd
added automatic keyword assignment support to test macro (#38270)
DebadityaPal Jan 7, 2021
cae992f
mark integer parameters as sext/zext
vchuravy Dec 30, 2020
db13dcc
silence unused variable warning
vchuravy Dec 30, 2020
7657c36
[REPL]: Don't write to the user's home directory
staticfloat Jan 5, 2021
684156d
[REPL] Do not require test to run within `/tmp`
staticfloat Jan 5, 2021
07a3c9e
gf: avoid adding cache entries wider than the original method (#39140)
vtjnash Jan 9, 2021
56ff37a
fix count(::BitArray; dims) (#39149)
simeonschaub Jan 8, 2021
452fd94
Ensure underscore is applied to trampoline symbols on OSX [#38925] (#…
fingolfin Jan 13, 2021
4d96149
Bump `Pkg` to latest tip of `release-1.6` (#39258)
staticfloat Jan 15, 2021
8c7e607
add patches for PPC
vchuravy Jan 4, 2021
3a8fc63
Backport LLVM patch to fix LLVM build on GCC 11
imciner2 Jan 5, 2021
fbb68c3
move LLVM assert subversion to llvm.mk
vchuravy Jan 12, 2021
582b1e8
update LLVM binaries
vchuravy Jan 12, 2021
ddcffde
use BINARYBUILDER_LLVM_ASSERTS for downloading assert builds
vchuravy Jan 12, 2021
5264d86
don't dereference Expected
vchuravy Jan 5, 2021
b20a60f
[JITLayers] Consume errors on address lookup
vchuravy Jan 5, 2021
c7b5b47
[LLVM] Adjust patch list for LLVM 11.0.1
vchuravy Jan 14, 2021
1b266d6
[LLVM] Upgrade LLVM to 11.0.1
vchuravy Jan 17, 2021
7e2e822
[Make] remove BINARYBUILDER_LLVM_ASSERTS and use LLVM_ASSERTIONS instead
vchuravy Dec 8, 2020
fa6e44b
[CCall] Don't ZExt half
vchuravy Jan 16, 2021
55cd5ef
fix erroneous code path within `show_sym` (#38830)
aviatesk Dec 14, 2020
476209e
Fix `p7zip_jll` environment setup (#39155)
staticfloat Jan 11, 2021
15008b1
[WIP] Speed up dense-sparse matmul (#38876)
dkarrasch Jan 12, 2021
8714f1b
fix return type for `jl_uncompress_argnames` (#39215)
JeffBezanson Jan 13, 2021
b004ef3
[Artifacts]: Support `using Pkg.Artifacts` with LazyArtifacts (#39210)
staticfloat Jan 14, 2021
969cb57
Fix binaryplatforms `union` invalidation (#39251)
timholy Jan 14, 2021
908eea7
staticdata: fix unreferenced data assertion (#39246)
vtjnash Jan 14, 2021
51653b4
codegen: mostly fix uses of undefined PhiNodes (#39236)
vtjnash Jan 14, 2021
987c521
fix #39259, leave `Main.ARGS` unresolved on startup (#39262)
JeffBezanson Jan 15, 2021
9ed54c9
Fix macos codesign workflow (#39152)
staticfloat Jan 15, 2021
7b848f8
Use arch-independent magic number as start seed for Preferences hash …
staticfloat Jan 15, 2021
9b79f5e
aotcompile: avoid cache lookup when disallowed (#39265)
vtjnash Jan 18, 2021
f873e56
Prevent TOML invalidation by pirates of `T[elements...]` (#39252)
timholy Jan 15, 2021
99069e7
fix #39218, bug in subtyping fast path for tuples with repeated eleme…
JeffBezanson Jan 14, 2021
4ccfd6d
Merge pull request #39297 from JuliaLang/vc/bp_llvm
vchuravy Jan 19, 2021
a7a9fe5
improve performance of disabling finalizers in locks (#39153)
JeffBezanson Jan 19, 2021
fdf9ea2
Rebase: Performance regression of scalar randn() between Julia 1.4 an…
KristofferC Jan 19, 2021
4904312
Force-specialize on `T` in `cat_similar` (#39292)
timholy Jan 19, 2021
e8d527e
Improve inferability of shape::Dims for cat (#39294)
timholy Jan 19, 2021
4c08189
Use lispy tuples in cat (fixes #21673) (#39314)
timholy Jan 20, 2021
9719e6e
Preserve input type for unaliascopy(::ReinterpretArray) (#39316)
timholy Jan 19, 2021
14ba71b
make `extrema` with dims inferrable (#39321)
JeffBezanson Jan 20, 2021
3c3e2e3
Only construct legal int types during alloc opt.
maleadt Jan 19, 2021
a1c8ec8
Adapt the alloc-opt tests.
maleadt Jan 19, 2021
ba1f4cf
MbedTLS source build fixes (#39131)
omus Jan 13, 2021
f28385c
Fix performance regression in broadcasting with CartesianIndices (#39…
kimikage Jan 21, 2021
8bcc60f
fix failing `enable_finalizers` test
JeffBezanson Jan 20, 2021
d9306d4
inference: remove dead check for NOT_FOUND
vtjnash Dec 28, 2020
83d77fc
inference: minor code quality improvements
aviatesk Jan 7, 2021
2a2f497
inference: correction to ifelse Conditional lattice
vtjnash Jan 12, 2021
bc49839
inference: yet more fix for `ifelse` lattice (#39247)
aviatesk Jan 14, 2021
2845d87
inference: stop re-converging worlds after optimization (#38820)
vtjnash Dec 14, 2020
38b3048
rm unnecessary `widenconst_bestguess` call (#38871)
aviatesk Dec 16, 2020
7d1533d
inference: make Limited tracking part of the type lattice (#39116)
vtjnash Jan 20, 2021
336ebb7
inference: improve code qualities (#39250)
aviatesk Jan 14, 2021
3f30e42
Prepend build_bindir to LLVM_CONFIG_PATH_FIX rather than append (#39275)
mkitti Jan 17, 2021
2e524c9
bump to latest Pkg release-1.6
KristofferC Jan 22, 2021
0d75f03
LibGit2: patch to pass hostkey & port to host verify callback (#39324)
StefanKarpinski Jan 21, 2021
f5be2e5
Add libldl to SuiteSparse libs (#39211)
omus Jan 13, 2021
ba575ca
Copy libgomp as part of CSL build (#39212)
omus Jan 13, 2021
d5d50f3
Correct mbedtls-cmake-findpy.patch whitespace.
Sacha0 Jan 16, 2021
5ba2d9c
libgit2: fix for broken SSH host callback (#39364)
StefanKarpinski Jan 25, 2021
e8e1765
inference: SCC handling missing for return_type_tfunc (#39375)
vtjnash Jan 25, 2021
a5d3675
gf: invalidate when adding new methods (#39343)
vtjnash Jan 25, 2021
bfae07c
Add basic docs for (Lazy)Artifacts stdlibs (#39073)
fingolfin Jan 26, 2021
d0b97ea
Don't touch gvars when compiling for an external back-end.
maleadt Jan 25, 2021
fa66cb3
Update src/aotcompile.cpp
maleadt Jan 25, 2021
aeca6f1
show: fix duplicate typealias printing bug
vtjnash Jan 22, 2021
52fbe7f
show: fix some bugs in typealias printing
vtjnash Jan 22, 2021
5d0a7dc
show: consolidate wheres with {} in printing
vtjnash Jan 22, 2021
0fa7ab9
Fix `tmeet` for vararg `PartialStruct`s
martinholters Jan 27, 2021
8a2dc27
replace PPC half patch
vchuravy Jan 20, 2021
84ee166
fix #39405, saving modules with renamed imports (#39408)
JeffBezanson Jan 27, 2021
afa7544
bump Pkg version
KristofferC Jan 29, 2021
0348505
implement with fewer afoldl methods (#39414)
vtjnash Jan 27, 2021
8b7c133
fix #39379, use first∘LinearIndices instead of 1 (#39393)
mbauman Jan 28, 2021
4aaeaf7
[automated] Bump the Downloads stdlib from 9d841d9 to 4e55241 (#39445)
DilumAluthgeBot Jan 29, 2021
0e90f6c
remove bad method specialization from cache (#39429)
vtjnash Jan 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,6 @@ CXX_DISABLE_ASSERTION := -DJL_NDEBUG
DISABLE_ASSERTIONS := -DNDEBUG -DJL_NDEBUG
endif

ifeq ($(LLVM_ASSERTIONS),0)
CXX_DISABLE_ASSERTION += -DNDEBUG
endif

# Compiler specific stuff

ifeq ($(USEMSVC), 1)
Expand Down Expand Up @@ -1043,7 +1039,7 @@ endif # SYSTEM_LLVM
# Windows builds need a little help finding the LLVM libraries for llvm-config
LLVM_CONFIG_PATH_FIX :=
ifeq ($(OS),WINNT)
LLVM_CONFIG_PATH_FIX := PATH="$(PATH):$(build_bindir)"
LLVM_CONFIG_PATH_FIX := PATH="$(build_bindir):$(PATH)"
endif

ifeq ($(BUILD_OS),$(OS))
Expand Down Expand Up @@ -1200,12 +1196,6 @@ endef
$(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj))))



# Use the Assertions build
BINARYBUILDER_LLVM_ASSERTS ?= 0



# OS specific stuff

# install_name_tool
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Multi-threading changes

* Locks now automatically inhibit finalizers from running, to avoid deadlock ([#38487]).
* New function `Base.Threads.foreach(f, channel::Channel)` for multithreaded `Channel` consumption ([#34543]).
* There is no longer a restriction on the number of threads ([#36778]).

Build system changes
--------------------
Expand Down
61 changes: 30 additions & 31 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,37 +394,36 @@ in_sysimage(pkgid::PkgId) = pkgid in _sysimage_modules
# Precompiles for Revise
# TODO: move these to contrib/generate_precompile.jl
# The problem is they don't work there
let m = which(+, (Int, Int))
while true # defeat interpreter heuristic to force compilation
delete!(push!(Set{Method}(), m), m)
copy(Core.Compiler.retrieve_code_info(Core.Compiler.specialize_method(m, [Int, Int], Core.svec())))

empty!(Set())
push!(push!(Set{Union{GlobalRef,Symbol}}(), :two), GlobalRef(Base, :two))
(setindex!(Dict{String,Base.PkgId}(), Base.PkgId(Base), "file.jl"))["file.jl"]
(setindex!(Dict{Symbol,Vector{Int}}(), [1], :two))[:two]
(setindex!(Dict{Base.PkgId,String}(), "file.jl", Base.PkgId(Base)))[Base.PkgId(Base)]
(setindex!(Dict{Union{GlobalRef,Symbol}, Vector{Int}}(), [1], :two))[:two]
(setindex!(IdDict{Type, Union{Missing, Vector{Tuple{LineNumberNode, Expr}}}}(), missing, Int))[Int]
Dict{Symbol, Union{Nothing, Bool, Symbol}}(:one => false)[:one]
Dict(Base => [:(1+1)])[Base]
Dict(:one => [1])[:one]
Dict("abc" => Set())["abc"]
pushfirst!([], sum)
get(Base.pkgorigins, Base.PkgId(Base), nothing)
sort!([1,2,3])
unique!([1,2,3])
cumsum([1,2,3])
append!(Int[], BitSet())
isempty(BitSet())
delete!(BitSet([1,2]), 3)
deleteat!(Int32[1,2,3], [1,3])
deleteat!(Any[1,2,3], [1,3])
Core.svec(1, 2) == Core.svec(3, 4)
any(t->t[1].line > 1, [(LineNumberNode(2,:none), :(1+1))])

break # end defeat interpreter heuristic
end
for match = _methods(+, (Int, Int), -1, get_world_counter())
m = match.method
delete!(push!(Set{Method}(), m), m)
copy(Core.Compiler.retrieve_code_info(Core.Compiler.specialize_method(match)))

empty!(Set())
push!(push!(Set{Union{GlobalRef,Symbol}}(), :two), GlobalRef(Base, :two))
(setindex!(Dict{String,Base.PkgId}(), Base.PkgId(Base), "file.jl"))["file.jl"]
(setindex!(Dict{Symbol,Vector{Int}}(), [1], :two))[:two]
(setindex!(Dict{Base.PkgId,String}(), "file.jl", Base.PkgId(Base)))[Base.PkgId(Base)]
(setindex!(Dict{Union{GlobalRef,Symbol}, Vector{Int}}(), [1], :two))[:two]
(setindex!(IdDict{Type, Union{Missing, Vector{Tuple{LineNumberNode, Expr}}}}(), missing, Int))[Int]
Dict{Symbol, Union{Nothing, Bool, Symbol}}(:one => false)[:one]
Dict(Base => [:(1+1)])[Base]
Dict(:one => [1])[:one]
Dict("abc" => Set())["abc"]
pushfirst!([], sum)
get(Base.pkgorigins, Base.PkgId(Base), nothing)
sort!([1,2,3])
unique!([1,2,3])
cumsum([1,2,3])
append!(Int[], BitSet())
isempty(BitSet())
delete!(BitSet([1,2]), 3)
deleteat!(Int32[1,2,3], [1,3])
deleteat!(Any[1,2,3], [1,3])
Core.svec(1, 2) == Core.svec(3, 4)
any(t->t[1].line > 1, [(LineNumberNode(2,:none), :(1+1))])

break # only actually need to do this once
end

if is_primary_base_module
Expand Down
59 changes: 33 additions & 26 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ function _getindex(::IndexLinear, A::AbstractArray, I::Vararg{Int,M}) where M
end
_to_linear_index(A::AbstractArray, i::Integer) = i
_to_linear_index(A::AbstractVector, i::Integer, I::Integer...) = i
_to_linear_index(A::AbstractArray) = 1
_to_linear_index(A::AbstractArray) = first(LinearIndices(A))
_to_linear_index(A::AbstractArray, I::Integer...) = (@_inline_meta; _sub2ind(A, I...))

## IndexCartesian Scalar indexing: Canonical method is full dimensionality of Ints
Expand Down Expand Up @@ -1481,7 +1481,7 @@ vcat(V::AbstractVector{T}...) where {T} = typed_vcat(T, V...)
# but that solution currently fails (see #27188 and #27224)
AbstractVecOrTuple{T} = Union{AbstractVector{<:T}, Tuple{Vararg{T}}}

_typed_vcat_similar(V, T, n) = similar(V[1], T, n)
_typed_vcat_similar(V, ::Type{T}, n) where T = similar(V[1], T, n)
_typed_vcat(::Type{T}, V::AbstractVecOrTuple{AbstractVector}) where T =
_typed_vcat!(_typed_vcat_similar(V, T, mapreduce(length, +, V)), V)

Expand Down Expand Up @@ -1577,9 +1577,10 @@ cat_size(A::AbstractArray, d) = size(A, d)
cat_indices(A, d) = OneTo(1)
cat_indices(A::AbstractArray, d) = axes(A, d)

cat_similar(A, T, shape) = Array{T}(undef, shape)
cat_similar(A::AbstractArray, T, shape) = similar(A, T, shape)
cat_similar(A, ::Type{T}, shape) where T = Array{T}(undef, shape)
cat_similar(A::AbstractArray, ::Type{T}, shape) where T = similar(A, T, shape)

# These are for backwards compatibility (even though internal)
cat_shape(dims, shape::Tuple{Vararg{Int}}) = shape
function cat_shape(dims, shapes::Tuple)
out_shape = ()
Expand All @@ -1588,6 +1589,11 @@ function cat_shape(dims, shapes::Tuple)
end
return out_shape
end
# The new way to compute the shape (more inferrable than combining cat_size & cat_shape, due to Varargs + issue#36454)
cat_size_shape(dims) = ntuple(zero, Val(length(dims)))
@inline cat_size_shape(dims, X, tail...) = _cat_size_shape(dims, _cshp(1, dims, (), cat_size(X)), tail...)
_cat_size_shape(dims, shape) = shape
@inline _cat_size_shape(dims, shape, X, tail...) = _cat_size_shape(dims, _cshp(1, dims, shape, cat_size(X)), tail...)

_cshp(ndim::Int, ::Tuple{}, ::Tuple{}, ::Tuple{}) = ()
_cshp(ndim::Int, ::Tuple{}, ::Tuple{}, nshape) = nshape
Expand Down Expand Up @@ -1631,36 +1637,37 @@ _cat(dims, X...) = cat_t(promote_eltypeof(X...), X...; dims=dims)
@inline cat_t(::Type{T}, X...; dims) where {T} = _cat_t(dims, T, X...)
@inline function _cat_t(dims, ::Type{T}, X...) where {T}
catdims = dims2cat(dims)
shape = cat_shape(catdims, map(cat_size, X))
shape = cat_size_shape(catdims, X...)
A = cat_similar(X[1], T, shape)
if count(!iszero, catdims)::Int > 1
fill!(A, zero(T))
end
return __cat(A, shape, catdims, X...)
end

function __cat(A, shape::NTuple{M}, catdims, X...) where M
N = M::Int
offsets = zeros(Int, N)
inds = Vector{UnitRange{Int}}(undef, N)
concat = copyto!(zeros(Bool, N), catdims)
for x in X
for i = 1:N
if concat[i]
inds[i] = offsets[i] .+ cat_indices(x, i)
offsets[i] += cat_size(x, i)
else
inds[i] = 1:shape[i]
end
end
I::NTuple{N, UnitRange{Int}} = (inds...,)
if x isa AbstractArray
A[I...] = x
else
fill!(view(A, I...), x)
end
# Why isn't this called `__cat!`?
__cat(A, shape, catdims, X...) = __cat_offset!(A, shape, catdims, ntuple(zero, length(shape)), X...)

function __cat_offset!(A, shape, catdims, offsets, x, X...)
# splitting the "work" on x from X... may reduce latency (fewer costly specializations)
newoffsets = __cat_offset1!(A, shape, catdims, offsets, x)
return __cat_offset!(A, shape, catdims, newoffsets, X...)
end
__cat_offset!(A, shape, catdims, offsets) = A

function __cat_offset1!(A, shape, catdims, offsets, x)
inds = ntuple(length(offsets)) do i
(i <= length(catdims) && catdims[i]) ? offsets[i] .+ cat_indices(x, i) : 1:shape[i]
end
if x isa AbstractArray
A[inds...] = x
else
fill!(view(A, inds...), x)
end
newoffsets = ntuple(length(offsets)) do i
(i <= length(catdims) && catdims[i]) ? offsets[i] + cat_size(x, i) : offsets[i]
end
return A
return newoffsets
end

"""
Expand Down
2 changes: 1 addition & 1 deletion base/binaryplatforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ only available in macOS `v"10.11"` and later, or an artifact can state that it r
a libstdc++ that is at least `v"3.4.22"`, etc...
"""
function platforms_match(a::AbstractPlatform, b::AbstractPlatform)
for k in union(keys(tags(a)), keys(tags(b)))
for k in union(keys(tags(a)::Dict{String,String}), keys(tags(b)::Dict{String,String}))
ak = get(tags(a), k, nothing)
bk = get(tags(b), k, nothing)

Expand Down
2 changes: 1 addition & 1 deletion base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ function bitcount(Bc::Vector{UInt64}; init::T=0) where {T}
return n
end

count(B::BitArray; init=0) = bitcount(B.chunks; init)
_count(::typeof(identity), B::BitArray, ::Colon, init) = bitcount(B.chunks; init)

function unsafe_bitfindnext(Bc::Vector{UInt64}, start::Int)
chunk_start = _div64(start-1)+1
Expand Down
6 changes: 4 additions & 2 deletions base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,10 @@ preprocess_args(dest, args::Tuple{}) = ()
end
end
bc′ = preprocess(dest, bc)
@simd for I in eachindex(bc′)
@inbounds dest[I] = bc′[I]
# Performance may vary depending on whether `@inbounds` is placed outside the
# for loop or not. (cf. https://github.com/JuliaLang/julia/issues/38086)
@inbounds @simd for I in eachindex(bc′)
dest[I] = bc′[I]
end
return dest
end
Expand Down
Loading