From c8b198f0f219616552f948d1e0766da2e6b0e88a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krystian=20Guli=C5=84ski?= Date: Mon, 16 Aug 2021 20:04:47 +0200 Subject: [PATCH 01/88] [Distributed] Fix finalizer_ref usage of lock/wait resulting in failed task switches (#41846) (cherry picked from commit 3306a8bf1a78c64f84e40094c0f831314429f1ae) --- stdlib/Distributed/src/remotecall.jl | 66 ++++++++++++++++++---------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/stdlib/Distributed/src/remotecall.jl b/stdlib/Distributed/src/remotecall.jl index 91e5de36736bd..56b2a03fdc3ca 100644 --- a/stdlib/Distributed/src/remotecall.jl +++ b/stdlib/Distributed/src/remotecall.jl @@ -84,20 +84,24 @@ end function finalize_ref(r::AbstractRemoteRef) if r.where > 0 # Handle the case of the finalizer having been called manually - if islocked(client_refs) - # delay finalizer for later, when it's not already locked + if trylock(client_refs.lock) # trylock doesn't call wait which causes yields + try + delete!(client_refs.ht, r) # direct removal avoiding locks + if isa(r, RemoteChannel) + send_del_client_no_lock(r) + else + # send_del_client only if the reference has not been set + r.v === nothing && send_del_client_no_lock(r) + r.v = nothing + end + r.where = 0 + finally + unlock(client_refs.lock) + end + else finalizer(finalize_ref, r) return nothing end - delete!(client_refs, r) - if isa(r, RemoteChannel) - send_del_client(r) - else - # send_del_client only if the reference has not been set - r.v === nothing && send_del_client(r) - r.v = nothing - end - r.where = 0 end nothing end @@ -229,13 +233,18 @@ del_client(rr::AbstractRemoteRef) = del_client(remoteref_id(rr), myid()) del_client(id, client) = del_client(PGRP, id, client) function del_client(pg, id, client) lock(client_refs) do - rv = get(pg.refs, id, false) - if rv !== false - delete!(rv.clientset, client) - if isempty(rv.clientset) - delete!(pg.refs, id) - #print("$(myid()) collected $id\n") - end + _del_client(pg, id, client) + end + nothing +end + +function _del_client(pg, id, client) + rv = get(pg.refs, id, false) + if rv !== false + delete!(rv.clientset, client) + if isempty(rv.clientset) + delete!(pg.refs, id) + #print("$(myid()) collected $id\n") end end nothing @@ -259,13 +268,26 @@ function send_del_client(rr) if rr.where == myid() del_client(rr) elseif id_in_procs(rr.where) # process only if a valid worker - w = worker_from_id(rr.where)::Worker - push!(w.del_msgs, (remoteref_id(rr), myid())) - w.gcflag = true - notify(any_gc_flag) + process_worker(rr) end end +function send_del_client_no_lock(rr) + # for gc context to avoid yields + if rr.where == myid() + _del_client(PGRP, remoteref_id(rr), myid()) + elseif id_in_procs(rr.where) # process only if a valid worker + process_worker(rr) + end +end + +function process_worker(rr) + w = worker_from_id(rr.where)::Worker + push!(w.del_msgs, (remoteref_id(rr), myid())) + w.gcflag = true + notify(any_gc_flag) +end + function add_client(id, client) lock(client_refs) do rv = lookup_ref(id) From 849811c0fd3b3bd5780ffd24f309f56e123199e6 Mon Sep 17 00:00:00 2001 From: krynju Date: Wed, 8 Sep 2021 19:04:28 +0200 Subject: [PATCH 02/88] fix (cherry picked from commit df137dd73db9386b38bbb2a5d1e3a76c01a63587) --- stdlib/Distributed/src/Distributed.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/Distributed/src/Distributed.jl b/stdlib/Distributed/src/Distributed.jl index 50108f05eed26..53572c441f09e 100644 --- a/stdlib/Distributed/src/Distributed.jl +++ b/stdlib/Distributed/src/Distributed.jl @@ -83,15 +83,15 @@ function _require_callback(mod::Base.PkgId) end end -const REF_ID = Ref(1) -next_ref_id() = (id = REF_ID[]; REF_ID[] = id+1; id) +const REF_ID = Threads.Atomic{Int}(1) +next_ref_id() = Threads.atomic_add!(REF_ID, 1) struct RRID whence::Int id::Int - RRID() = RRID(myid(),next_ref_id()) - RRID(whence, id) = new(whence,id) + RRID() = RRID(myid(), next_ref_id()) + RRID(whence, id) = new(whence, id) end hash(r::RRID, h::UInt) = hash(r.whence, hash(r.id, h)) From f2b96c7daf8869e0ddcbf67540033d839eb7286d Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 13 Sep 2021 17:16:54 -0400 Subject: [PATCH 03/88] CI (Buildkite): in the experimental `asan` job, remove the "Test that ASAN is enabled" step (but keep the "Build julia-debug with ASAN" step) (#42229) Co-authored-by: Takafumi Arakaki Co-authored-by: Takafumi Arakaki (cherry picked from commit 60fd3348ca199c6d4b4d09c097f3e100c83a73d0) --- .buildkite/pipelines/experimental/misc/sanitizers.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.buildkite/pipelines/experimental/misc/sanitizers.yml b/.buildkite/pipelines/experimental/misc/sanitizers.yml index 67c0b547d4b20..72d252fc34578 100644 --- a/.buildkite/pipelines/experimental/misc/sanitizers.yml +++ b/.buildkite/pipelines/experimental/misc/sanitizers.yml @@ -20,12 +20,10 @@ steps: # `contrib/check-asan.jl` needs a `julia` binary: - JuliaCI/julia#v1: version: 1.6 + timeout_in_minutes: 120 + # notify: + # - github_commit_status: + # context: "asan" commands: | echo "--- Build julia-debug with ASAN" contrib/asan/build.sh ./tmp/test-asan -j$${JULIA_NUM_CORES} debug - echo "--- Test that ASAN is enabled" - contrib/asan/check.jl ./tmp/test-asan/asan/usr/bin/julia-debug - timeout_in_minutes: 120 - # notify: # TODO: uncomment this line - # - github_commit_status: # TODO: uncomment this line - # context: "asan" # TODO: uncomment this line From 5db280242152bf1162540526bd62aca177d77d25 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 13 Sep 2021 13:52:49 -0400 Subject: [PATCH 04/88] [Distributed] make nextproc use atomic operations (cherry picked from commit 4627729651a08cd15b556995f0672007884cf873) --- stdlib/Distributed/src/macros.jl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/stdlib/Distributed/src/macros.jl b/stdlib/Distributed/src/macros.jl index 6603d627c3409..24a24f4c08ed4 100644 --- a/stdlib/Distributed/src/macros.jl +++ b/stdlib/Distributed/src/macros.jl @@ -1,14 +1,10 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -let nextidx = 0 +let nextidx = Threads.Atomic{Int}(0) global nextproc function nextproc() - p = -1 - if p == -1 - p = workers()[(nextidx % nworkers()) + 1] - nextidx += 1 - end - p + idx = Threads.atomic_add!(nextidx, 1) + return workers()[(idx % nworkers()) + 1] end end From 3fa2d26e43fc305313d5d80a2a699ccb6192e168 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Mon, 13 Sep 2021 17:24:58 +0200 Subject: [PATCH 05/88] Add/improve some compat admonitions (#42179) (cherry picked from commit 70cc57cb36d839afe6ce56ea48ff6ed01bc262c4) --- base/error.jl | 2 +- base/int.jl | 6 ++++++ base/lock.jl | 3 +++ base/operators.jl | 2 +- base/special/trig.jl | 15 +++++++++++++-- base/strings/util.jl | 12 ++++++------ base/util.jl | 8 ++++++-- 7 files changed, 36 insertions(+), 12 deletions(-) diff --git a/base/error.jl b/base/error.jl index 9116d00618900..0657865bb8831 100644 --- a/base/error.jl +++ b/base/error.jl @@ -142,7 +142,7 @@ arbitrary task. This is useful for inspecting tasks which have failed due to uncaught exceptions. !!! compat "Julia 1.7" - This function went by the experiemental name `catch_stack()` in Julia + This function went by the experimental name `catch_stack()` in Julia 1.1–1.6, and had a plain Vector-of-tuples as a return type. """ function current_exceptions(task=current_task(); backtrace=true) diff --git a/base/int.jl b/base/int.jl index 17410e9eb3f99..651d13ee41a11 100644 --- a/base/int.jl +++ b/base/int.jl @@ -97,6 +97,9 @@ inv(x::Integer) = float(one(x)) / float(x) Return `true` if `x` is an odd integer (that is, an integer not divisible by 2), and `false` otherwise. +!!! compat "Julia 1.7" + Non-`Integer` arguments require Julia 1.7 or later. + # Examples ```jldoctest julia> isodd(9) @@ -114,6 +117,9 @@ isodd(n::Real) = isinteger(n) && !iszero(rem(Integer(n), 2)) Return `true` if `x` is an even integer (that is, an integer divisible by 2), and `false` otherwise. +!!! compat "Julia 1.7" + Non-`Integer` arguments require Julia 1.7 or later. + # Examples ```jldoctest julia> iseven(9) diff --git a/base/lock.jl b/base/lock.jl index 07253211984fc..c667ed3cf8506 100644 --- a/base/lock.jl +++ b/base/lock.jl @@ -180,6 +180,9 @@ available. When this function returns, the `lock` has been released, so the caller should not attempt to `unlock` it. + +!!! compat "Julia 1.7" + Using a [`Channel`](@ref) as the second argument requires Julia 1.7 or later. """ function lock(f, l::AbstractLock) lock(l) diff --git a/base/operators.jl b/base/operators.jl index 3292ab8f7abe6..d3963c2bae6d1 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -986,7 +986,7 @@ julia> f.value ``` !!! compat "Julia 1.7" - Returns requires at least Julia 1.7. + `Returns` requires at least Julia 1.7. """ struct Returns{V} <: Function value::V diff --git a/base/special/trig.jl b/base/special/trig.jl index f735ea43f2425..e3033aab6c272 100644 --- a/base/special/trig.jl +++ b/base/special/trig.jl @@ -1268,7 +1268,11 @@ for (fd, f, fn) in ((:sind, :sin, "sine"), (:cosd, :cos, "cosine"), (:tand, :tan $($name)(x) Compute $($fn) of `x`, where `x` is in $($un). - If `x` is a matrix, `x` needs to be a square matrix. """ ($fd)(x) = ($f)(($fu).(x)) + If `x` is a matrix, `x` needs to be a square matrix. + + !!! compat "Julia 1.7" + Matrix arguments require Julia 1.7 or later. + """ ($fd)(x) = ($f)(($fu).(x)) end end end @@ -1283,7 +1287,11 @@ for (fd, f, fn) in ((:asind, :asin, "sine"), (:acosd, :acos, "cosine"), $($name)(x) Compute the inverse $($fn) of `x`, where the output is in $($un). - If `x` is a matrix, `x` needs to be a square matrix. """ ($fd)(x) = ($fu).(($f)(x)) + If `x` is a matrix, `x` needs to be a square matrix. + + !!! compat "Julia 1.7" + Matrix arguments require Julia 1.7 or later. + """ ($fd)(x) = ($fu).(($f)(x)) end end end @@ -1293,6 +1301,9 @@ end atand(y,x) Compute the inverse tangent of `y` or `y/x`, respectively, where the output is in degrees. + +!!! compat "Julia 1.7" + The one-argument method supports square matrix arguments as of Julia 1.7. """ atand(y) = rad2deg.(atan(y)) atand(y, x) = rad2deg.(atan(y,x)) diff --git a/base/strings/util.jl b/base/strings/util.jl index c6dad5f34bafb..d630815fc7919 100644 --- a/base/strings/util.jl +++ b/base/strings/util.jl @@ -649,9 +649,9 @@ The length of `itr` must be even, and the returned array has half of the length See also [`hex2bytes!`](@ref) for an in-place version, and [`bytes2hex`](@ref) for the inverse. !!! compat "Julia 1.7" - Calling hex2bytes with iterables producing UInt8 requires - version 1.7. In earlier versions, you can collect the iterable - before calling instead. + Calling `hex2bytes` with iterators producing `UInt8` values requires + Julia 1.7 or later. In earlier versions, you can `collect` the iterator + before calling `hex2bytes`. # Examples ```jldoctest @@ -736,9 +736,9 @@ returning a `String` via `bytes2hex(itr)` or writing the string to an `io` strea via `bytes2hex(io, itr)`. The hexadecimal characters are all lowercase. !!! compat "Julia 1.7" - Calling bytes2hex with iterators producing UInt8 requires - version 1.7. In earlier versions, you can collect the iterable - before calling instead. + Calling `bytes2hex` with arbitrary iterators producing `UInt8` values requires + Julia 1.7 or later. In earlier versions, you can `collect` the iterator + before calling `bytes2hex`. # Examples ```jldoctest diff --git a/base/util.jl b/base/util.jl index 82ce7d585f883..cf7644ad82ccf 100644 --- a/base/util.jl +++ b/base/util.jl @@ -541,11 +541,13 @@ end """ @invoke f(arg::T, ...; kwargs...) - Provides a convenient way to call [`invoke`](@ref); `@invoke f(arg1::T1, arg2::T2; kwargs...)` will be expanded into `invoke(f, Tuple{T1,T2}, arg1, arg2; kwargs...)`. When an argument's type annotation is omitted, it's specified as `Any` argument, e.g. `@invoke f(arg1::T, arg2)` will be expanded into `invoke(f, Tuple{T,Any}, arg1, arg2)`. + +!!! compat "Julia 1.7" + This macro requires Julia 1.7 or later. """ macro invoke(ex) f, args, kwargs = destructure_callex(ex) @@ -558,10 +560,12 @@ end """ @invokelatest f(args...; kwargs...) - Provides a convenient way to call [`Base.invokelatest`](@ref). `@invokelatest f(args...; kwargs...)` will simply be expanded into `Base.invokelatest(f, args...; kwargs...)`. + +!!! compat "Julia 1.7" + This macro requires Julia 1.7 or later. """ macro invokelatest(ex) f, args, kwargs = destructure_callex(ex) From 1a912b2f982b8e40e1c7377d7ede776edc3e3fdb Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 13 Sep 2021 15:35:15 -0400 Subject: [PATCH 06/88] coverage: ensure topline is recorded during inlining (#42170) Fixes https://github.com/JuliaCI/CoverageTools.jl/issues/48 (cherry picked from commit 664c06e74b8b51c38057e3038068c1b33277b753) --- base/compiler/ssair/inlining.jl | 33 +++++++++++++++++++------ test/testhelpers/coverage_file.info | 6 ++--- test/testhelpers/coverage_file.info.bad | 2 +- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 077a1f105d3d8..f62ee303d5b78 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -304,30 +304,47 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector boundscheck::Symbol, todo_bbs::Vector{Tuple{Int, Int}}) # Ok, do the inlining here spec = item.spec::ResolvedInliningSpec + sparam_vals = item.mi.sparam_vals + def = item.mi.def::Method inline_cfg = spec.ir.cfg stmt = compact.result[idx][:inst] linetable_offset::Int32 = length(linetable) # Append the linetable of the inlined function to our line table inlined_at = Int(compact.result[idx][:line]) - for entry in spec.ir.linetable - push!(linetable, LineInfoNode(entry.module, entry.method, entry.file, entry.line, - (entry.inlined_at > 0 ? entry.inlined_at + linetable_offset : inlined_at))) + topline::Int32 = linetable_offset + Int32(1) + coverage = coverage_enabled(def.module) + push!(linetable, LineInfoNode(def.module, def.name, def.file, Int(def.line), inlined_at)) + oldlinetable = spec.ir.linetable + for oldline in 1:length(oldlinetable) + entry = oldlinetable[oldline] + newentry = LineInfoNode(entry.module, entry.method, entry.file, entry.line, + (entry.inlined_at > 0 ? entry.inlined_at + linetable_offset + (oldline == 1) : inlined_at)) + if oldline == 1 + # check for a duplicate on the first iteration (likely true) + if newentry === linetable[topline] + continue + else + linetable_offset += 1 + end + end + push!(linetable, newentry) + end + if coverage && spec.ir.stmts[1][:line] + linetable_offset != topline + insert_node_here!(compact, NewInstruction(Expr(:code_coverage_effect), Nothing, topline)) end - (; def, sparam_vals) = item.mi nargs_def = def.nargs::Int32 isva = nargs_def > 0 && def.isva sig = def.sig if isva - vararg = mk_tuplecall!(compact, argexprs[nargs_def:end], compact.result[idx][:line]) + vararg = mk_tuplecall!(compact, argexprs[nargs_def:end], topline) argexprs = Any[argexprs[1:(nargs_def - 1)]..., vararg] end - mi = item.mi - is_opaque = isa(mi.def, Method) && mi.def.is_for_opaque_closure + is_opaque = def.is_for_opaque_closure if is_opaque # Replace the first argument by a load of the capture environment argexprs[1] = insert_node_here!(compact, NewInstruction(Expr(:call, GlobalRef(Core, :getfield), argexprs[1], QuoteNode(:captures)), - spec.ir.argtypes[1], compact.result[idx][:line])) + spec.ir.argtypes[1], topline)) end flag = compact.result[idx][:flag] boundscheck_idx = boundscheck diff --git a/test/testhelpers/coverage_file.info b/test/testhelpers/coverage_file.info index 9b4b1c1f2f96e..8319dfc34ad1d 100644 --- a/test/testhelpers/coverage_file.info +++ b/test/testhelpers/coverage_file.info @@ -9,9 +9,9 @@ DA:11,1 DA:12,1 DA:14,0 DA:17,1 -DA:19,1 +DA:19,2 DA:20,1 DA:22,1 -LH:10 -LF:13 +LH:12 +LF:14 end_of_record diff --git a/test/testhelpers/coverage_file.info.bad b/test/testhelpers/coverage_file.info.bad index 44e33a9df68c7..1855eea0270fd 100644 --- a/test/testhelpers/coverage_file.info.bad +++ b/test/testhelpers/coverage_file.info.bad @@ -10,7 +10,7 @@ DA:12,1 DA:14,0 DA:17,1 DA:18,0 -DA:19,1 +DA:19,2 DA:20,1 DA:22,1 DA:1234,0 From 28ce0a49192f8b58607aa879a84770ec6c573539 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Tue, 14 Sep 2021 14:19:58 -0400 Subject: [PATCH 07/88] fix #42220: macro hygiene with unary `::` (#42221) (cherry picked from commit 8db1d8909fc768a22a7fb6f3ba12dd75273a0604) --- src/macroexpand.scm | 23 +++++++++++++++-------- test/syntax.jl | 11 +++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/macroexpand.scm b/src/macroexpand.scm index 5e55c7bbb29c1..f1302e57cc4c8 100644 --- a/src/macroexpand.scm +++ b/src/macroexpand.scm @@ -271,7 +271,9 @@ (define (other x) (resolve-expansion-vars-with-new-env x env m parent-scope inarg)) (case (car e) ((where) `(where ,(recur (cadr e)) ,@(map other (cddr e)))) - ((|::|) `(|::| ,(recur (cadr e)) ,(other (caddr e)))) + ((|::|) (if (length= e 2) + `(|::| ,(other (cadr e))) + `(|::| ,(recur (cadr e)) ,(other (caddr e))))) ((call) `(call ,(other (cadr e)) ,@(map (lambda (x) (resolve-expansion-vars-with-new-env x env m parent-scope #t)) @@ -397,13 +399,18 @@ ((not (length> e 2)) e) ((and (pair? (cadr e)) (eq? (caadr e) '|::|)) - `(kw (|::| - ,(if inarg - (resolve-expansion-vars- (cadr (cadr e)) env m parent-scope inarg) - ;; in keyword arg A=B, don't transform "A" - (unescape (cadr (cadr e)))) - ,(resolve-expansion-vars- (caddr (cadr e)) env m parent-scope inarg)) - ,(resolve-expansion-vars-with-new-env (caddr e) env m parent-scope inarg))) + (let* ((type-decl (cadr e)) ;; [argname]::type + (argname (and (length> type-decl 2) (cadr type-decl))) + (type (if argname (caddr type-decl) (cadr type-decl)))) + `(kw (|::| + ,@(if argname + (list (if inarg + (resolve-expansion-vars- argname env m parent-scope inarg) + ;; in keyword arg A=B, don't transform "A" + (unescape argname))) + '()) + ,(resolve-expansion-vars- type env m parent-scope inarg)) + ,(resolve-expansion-vars-with-new-env (caddr e) env m parent-scope inarg)))) (else `(kw ,(if inarg (resolve-expansion-vars- (cadr e) env m parent-scope inarg) diff --git a/test/syntax.jl b/test/syntax.jl index 19f692baec95c..9c5a41e8fb9cd 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2949,3 +2949,14 @@ end @test x == 1 @test f() == (2, 3) end + +# issue 42220 +macro m42220() + return quote + function foo(::Type{T}=Float64) where {T} + return Vector{T}(undef, 10) + end + end +end +@test @m42220()() isa Vector{Float64} +@test @m42220()(Bool) isa Vector{Bool} From 4dd47a7c3e171edc810cafa145544a8c258c8d77 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 8 Sep 2021 18:55:41 -0400 Subject: [PATCH 08/88] inference: remove code that relies upon inferring the output type Recursing into inference may be unreliable during inference. (cherry picked from commit cb5a5bcef970d70799cd0dff127fc09bf67ebf11) --- base/compiler/ssair/inlining.jl | 2 +- base/compiler/ssair/passes.jl | 29 ++--------------------------- base/compiler/ssair/show.jl | 7 ++++--- base/compiler/ssair/slot2ssa.jl | 22 ++++++---------------- src/gf.c | 5 +++-- 5 files changed, 16 insertions(+), 49 deletions(-) diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index f62ee303d5b78..fd984a845764b 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -109,7 +109,7 @@ function inline_into_block!(state::CFGInliningState, block::Int) new_range = state.first_bb+1:block l = length(state.new_cfg_blocks) state.bb_rename[new_range] = (l+1:l+length(new_range)) - append!(state.new_cfg_blocks, map(copy, state.cfg.blocks[new_range])) + append!(state.new_cfg_blocks, (copy(block) for block in state.cfg.blocks[new_range])) push!(state.merged_orig_blocks, last(new_range)) end state.first_bb = block diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl index 7c8964d371122..bd5737a99ffec 100644 --- a/base/compiler/ssair/passes.jl +++ b/base/compiler/ssair/passes.jl @@ -26,31 +26,6 @@ function try_compute_fieldidx_expr(@nospecialize(typ), @nospecialize(use_expr)) return try_compute_fieldidx(typ, field) end -function lift_defuse(cfg::CFG, ssa::SSADefUse) - # We remove from `uses` any block where all uses are dominated - # by a def. This prevents insertion of dead phi nodes at the top - # of such a block if that block happens to be in a loop - ordered = Tuple{Int, Int, Bool}[(x, block_for_inst(cfg, x), true) for x in ssa.uses] - for x in ssa.defs - push!(ordered, (x, block_for_inst(cfg, x), false)) - end - ordered = sort(ordered, by=x->x[1]) - bb_defs = Int[] - bb_uses = Int[] - last_bb = last_def_bb = 0 - for (_, bb, is_use) in ordered - if bb != last_bb && is_use - push!(bb_uses, bb) - end - last_bb = bb - if last_def_bb != bb && !is_use - push!(bb_defs, bb) - last_def_bb = bb - end - end - SSADefUse(bb_uses, bb_defs, Int[]) -end - function find_curblock(domtree::DomTree, allblocks::Vector{Int}, curblock::Int) # TODO: This can be much faster by looking at current level and only # searching for those blocks in a sorted order @@ -1205,12 +1180,12 @@ function cfg_simplify!(ir::IRCode) # Compute (renamed) successors and predecessors given (renamed) block function compute_succs(i) orig_bb = follow_merged_succ(result_bbs[i]) - return map(i -> bb_rename_succ[i], bbs[orig_bb].succs) + return Int[bb_rename_succ[i] for i in bbs[orig_bb].succs] end function compute_preds(i) orig_bb = result_bbs[i] preds = bbs[orig_bb].preds - return map(pred -> bb_rename_pred[pred], preds) + return Int[bb_rename_pred[pred] for pred in preds] end BasicBlock[ diff --git a/base/compiler/ssair/show.jl b/base/compiler/ssair/show.jl index a327de623bb09..0e0cc592c06b6 100644 --- a/base/compiler/ssair/show.jl +++ b/base/compiler/ssair/show.jl @@ -79,14 +79,15 @@ show_unquoted(io::IO, val::Argument, indent::Int, prec::Int) = show_unquoted(io, show_unquoted(io::IO, stmt::PhiNode, indent::Int, ::Int) = show_unquoted_phinode(io, stmt, indent, "%") function show_unquoted_phinode(io::IO, stmt::PhiNode, indent::Int, prefix::String) - args = map(1:length(stmt.edges)) do i + args = String[let e = stmt.edges[i] v = !isassigned(stmt.values, i) ? "#undef" : sprint() do io′ show_unquoted(io′, stmt.values[i], indent) end - return "$prefix$e => $v" - end + "$prefix$e => $v" + end for i in 1:length(stmt.edges) + ] print(io, "φ ", '(') join(io, args, ", ") print(io, ')') diff --git a/base/compiler/ssair/slot2ssa.jl b/base/compiler/ssair/slot2ssa.jl index 91543835c8c06..bb9518663e534 100644 --- a/base/compiler/ssair/slot2ssa.jl +++ b/base/compiler/ssair/slot2ssa.jl @@ -33,16 +33,6 @@ function scan_entry!(result::Vector{SlotInfo}, idx::Int, @nospecialize(stmt)) end -function lift_defuse(cfg::CFG, defuse) - map(defuse) do slot - SlotInfo( - Int[block_for_inst(cfg, x) for x in slot.defs], - Int[block_for_inst(cfg, x) for x in slot.uses], - slot.any_newvar - ) - end -end - function scan_slot_def_use(nargs::Int, ci::CodeInfo, code::Vector{Any}) nslots = length(ci.slotflags) result = SlotInfo[SlotInfo() for i = 1:nslots] @@ -523,7 +513,7 @@ function domsort_ssa!(ir::IRCode, domtree::DomTree) return new_ir end -function compute_live_ins(cfg::CFG, defuse) +function compute_live_ins(cfg::CFG, defuse #=::Union{SlotInfo,SSADefUse}=#) # We remove from `uses` any block where all uses are dominated # by a def. This prevents insertion of dead phi nodes at the top # of such a block if that block happens to be in a loop @@ -585,8 +575,8 @@ function recompute_type(node::Union{PhiNode, PhiCNode}, ci::CodeInfo, ir::IRCode return new_typ end -function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, nargs::Int, - slottypes::Vector{Any}) +function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, + defuses::Vector{SlotInfo}, nargs::Int, slottypes::Vector{Any}) code = ir.stmts.inst cfg = ir.cfg left = Int[] @@ -615,7 +605,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg for (_, exc) in catch_entry_blocks phicnodes[exc] = Vector{Tuple{SlotNumber, NewSSAValue, PhiCNode}}() end - @timeit "idf" for (idx, slot) in Iterators.enumerate(defuse) + @timeit "idf" for (idx, slot) in Iterators.enumerate(defuses) # No uses => no need for phi nodes isempty(slot.uses) && continue # TODO: Restore this optimization @@ -670,9 +660,9 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg end # Perform SSA renaming initial_incoming_vals = Any[ - if 0 in defuse[x].defs + if 0 in defuses[x].defs Argument(x) - elseif !defuse[x].any_newvar + elseif !defuses[x].any_newvar undef_token else SSAValue(-2) diff --git a/src/gf.c b/src/gf.c index 118a0a605c7fc..5282d31cf48d7 100644 --- a/src/gf.c +++ b/src/gf.c @@ -493,14 +493,15 @@ static void reset_mt_caches(jl_methtable_t *mt, void *env) jl_function_t *jl_typeinf_func = NULL; -size_t jl_typeinf_world = 0; +size_t jl_typeinf_world = 1; JL_DLLEXPORT void jl_set_typeinf_func(jl_value_t *f) { + size_t newfunc = jl_typeinf_world == 1 && jl_typeinf_func == NULL; jl_typeinf_func = (jl_function_t*)f; jl_typeinf_world = jl_get_tls_world_age(); ++jl_world_counter; // make type-inference the only thing in this world - if (jl_typeinf_world == 0) { + if (0 && newfunc) { // give type inference a chance to see all of these // TODO: also reinfer if max_world != ~(size_t)0 jl_array_t *unspec = jl_alloc_vec_any(0); From eca6c310946fb1364d19d6b338ae77f86e0a4793 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 8 Sep 2021 19:12:54 -0400 Subject: [PATCH 09/88] bootstrapping: optimize compiler during warmup phase (cherry picked from commit 4a048d31c1da5dfada560d1189a2d4623a2bf022) --- src/gf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gf.c b/src/gf.c index 5282d31cf48d7..3f742af4ca1f6 100644 --- a/src/gf.c +++ b/src/gf.c @@ -477,6 +477,7 @@ void jl_foreach_reachable_mtable(void (*visit)(jl_methtable_t *mt, void *env), v } else { foreach_mtable_in_module(jl_main_module, visit, env, &visited); + foreach_mtable_in_module(jl_core_module, visit, env, &visited); } JL_GC_POP(); } @@ -501,7 +502,7 @@ JL_DLLEXPORT void jl_set_typeinf_func(jl_value_t *f) jl_typeinf_func = (jl_function_t*)f; jl_typeinf_world = jl_get_tls_world_age(); ++jl_world_counter; // make type-inference the only thing in this world - if (0 && newfunc) { + if (newfunc) { // give type inference a chance to see all of these // TODO: also reinfer if max_world != ~(size_t)0 jl_array_t *unspec = jl_alloc_vec_any(0); From 85b2b416ba8ca36702d8f537676b9742b53110f3 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Wed, 1 Sep 2021 10:20:44 +0200 Subject: [PATCH 10/88] Make return type of map inferrable with heterogeneous arrays (#42046) Inference is not able to detect the element type automatically, but we can do it manually since we know promote_typejoin is used for widening. This is similar to the approach used for `broadcast` at #30485. (cherry picked from commit 49e3aecd5966a2af0b064c0314cd61c1338abc00) --- base/array.jl | 15 ++++++++----- base/broadcast.jl | 46 +-------------------------------------- base/promotion.jl | 44 +++++++++++++++++++++++++++++++++++++ test/broadcast.jl | 4 ---- test/generic_map_tests.jl | 22 +++++++++++++++++++ test/sets.jl | 1 + 6 files changed, 78 insertions(+), 54 deletions(-) diff --git a/base/array.jl b/base/array.jl index d629064777ce0..7e30927a71b9c 100644 --- a/base/array.jl +++ b/base/array.jl @@ -679,10 +679,11 @@ if isdefined(Core, :Compiler) I = esc(itr) return quote if $I isa Generator && ($I).f isa Type - ($I).f + T = ($I).f else - Core.Compiler.return_type(_iterator_upper_bound, Tuple{typeof($I)}) + T = Core.Compiler.return_type(_iterator_upper_bound, Tuple{typeof($I)}) end + promote_typejoin_union(T) end end else @@ -690,7 +691,7 @@ else I = esc(itr) return quote if $I isa Generator && ($I).f isa Type - ($I).f + promote_typejoin_union($I.f) else Any end @@ -715,8 +716,12 @@ function collect(itr::Generator) return _array_for(et, itr.iter, isz) end v1, st = y - arr = _array_for(typeof(v1), itr.iter, isz, shape) - return collect_to_with_first!(arr, v1, itr, st) + dest = _array_for(typeof(v1), itr.iter, isz, shape) + # The typeassert gives inference a helping hand on the element type and dimensionality + # (work-around for #28382) + et′ = et <: Type ? Type : et + RT = dest isa AbstractArray ? AbstractArray{<:et′, ndims(dest)} : Any + collect_to_with_first!(dest, v1, itr, st)::RT end end diff --git a/base/broadcast.jl b/base/broadcast.jl index b34a73041708b..90479189ffee4 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -8,7 +8,7 @@ Module containing the broadcasting implementation. module Broadcast using .Base.Cartesian -using .Base: Indices, OneTo, tail, to_shape, isoperator, promote_typejoin, @pure, +using .Base: Indices, OneTo, tail, to_shape, isoperator, promote_typejoin, promote_typejoin_union, @pure, _msk_end, unsafe_bitgetindex, bitcache_chunks, bitcache_size, dumpbitcache, unalias import .Base: copy, copyto!, axes export broadcast, broadcast!, BroadcastStyle, broadcast_axes, broadcastable, dotview, @__dot__, BroadcastFunction @@ -713,50 +713,6 @@ eltypes(t::Tuple{Any}) = Tuple{_broadcast_getindex_eltype(t[1])} eltypes(t::Tuple{Any,Any}) = Tuple{_broadcast_getindex_eltype(t[1]), _broadcast_getindex_eltype(t[2])} eltypes(t::Tuple) = Tuple{_broadcast_getindex_eltype(t[1]), eltypes(tail(t)).types...} -function promote_typejoin_union(::Type{T}) where T - if T === Union{} - return Union{} - elseif T isa UnionAll - return Any # TODO: compute more precise bounds - elseif T isa Union - return promote_typejoin(promote_typejoin_union(T.a), promote_typejoin_union(T.b)) - elseif T <: Tuple - return typejoin_union_tuple(T) - else - return T - end -end - -@pure function typejoin_union_tuple(T::Type) - u = Base.unwrap_unionall(T) - u isa Union && return typejoin( - typejoin_union_tuple(Base.rewrap_unionall(u.a, T)), - typejoin_union_tuple(Base.rewrap_unionall(u.b, T))) - p = (u::DataType).parameters - lr = length(p)::Int - if lr == 0 - return Tuple{} - end - c = Vector{Any}(undef, lr) - for i = 1:lr - pi = p[i] - U = Core.Compiler.unwrapva(pi) - if U === Union{} - ci = Union{} - elseif U isa Union - ci = typejoin(U.a, U.b) - else - ci = U - end - if i == lr && Core.Compiler.isvarargtype(pi) - c[i] = isdefined(pi, :N) ? Vararg{ci, pi.N} : Vararg{ci} - else - c[i] = ci - end - end - return Base.rewrap_unionall(Tuple{c...}, T) -end - # Inferred eltype of result of broadcast(f, args...) combine_eltypes(f, args::Tuple) = promote_typejoin_union(Base._return_type(f, eltypes(args))) diff --git a/base/promotion.jl b/base/promotion.jl index 43add6cbf5f62..ef29b273f6000 100644 --- a/base/promotion.jl +++ b/base/promotion.jl @@ -161,6 +161,50 @@ function promote_typejoin(@nospecialize(a), @nospecialize(b)) end _promote_typesubtract(@nospecialize(a)) = typesplit(a, Union{Nothing, Missing}) +function promote_typejoin_union(::Type{T}) where T + if T === Union{} + return Union{} + elseif T isa UnionAll + return Any # TODO: compute more precise bounds + elseif T isa Union + return promote_typejoin(promote_typejoin_union(T.a), promote_typejoin_union(T.b)) + elseif T <: Tuple + return typejoin_union_tuple(T) + else + return T + end +end + +function typejoin_union_tuple(T::Type) + @_pure_meta + u = Base.unwrap_unionall(T) + u isa Union && return typejoin( + typejoin_union_tuple(Base.rewrap_unionall(u.a, T)), + typejoin_union_tuple(Base.rewrap_unionall(u.b, T))) + p = (u::DataType).parameters + lr = length(p)::Int + if lr == 0 + return Tuple{} + end + c = Vector{Any}(undef, lr) + for i = 1:lr + pi = p[i] + U = Core.Compiler.unwrapva(pi) + if U === Union{} + ci = Union{} + elseif U isa Union + ci = typejoin(U.a, U.b) + else + ci = U + end + if i == lr && Core.Compiler.isvarargtype(pi) + c[i] = isdefined(pi, :N) ? Vararg{ci, pi.N} : Vararg{ci} + else + c[i] = ci + end + end + return Base.rewrap_unionall(Tuple{c...}, T) +end # Returns length, isfixed function full_va_len(p) diff --git a/test/broadcast.jl b/test/broadcast.jl index 66c215aee9293..329bcc602206b 100644 --- a/test/broadcast.jl +++ b/test/broadcast.jl @@ -991,10 +991,6 @@ end @test Core.Compiler.return_type(broadcast, Tuple{typeof(+), Vector{Int}, Vector{Union{Float64, Missing}}}) == Union{Vector{Missing}, Vector{Union{Missing, Float64}}, Vector{Float64}} - @test isequal([1, 2] + [3.0, missing], [4.0, missing]) - @test Core.Compiler.return_type(+, Tuple{Vector{Int}, - Vector{Union{Float64, Missing}}}) == - Union{Vector{Missing}, Vector{Union{Missing, Float64}}, Vector{Float64}} @test Core.Compiler.return_type(+, Tuple{Vector{Int}, Vector{Union{Float64, Missing}}}) == Union{Vector{Missing}, Vector{Union{Missing, Float64}}, Vector{Float64}} diff --git a/test/generic_map_tests.jl b/test/generic_map_tests.jl index 8e77533362fe3..abd9a31946a9a 100644 --- a/test/generic_map_tests.jl +++ b/test/generic_map_tests.jl @@ -53,6 +53,28 @@ function generic_map_tests(mapf, inplace_mapf=nothing) @test A == map(x->x*x*x, Float64[1:10...]) @test A === B end + + # Issue #28382: inferrability of map with Union eltype + @test isequal(map(+, [1, 2], [3.0, missing]), [4.0, missing]) + @test Core.Compiler.return_type(map, Tuple{typeof(+), Vector{Int}, + Vector{Union{Float64, Missing}}}) == + Union{Vector{Missing}, Vector{Union{Missing, Float64}}, Vector{Float64}} + @test isequal(map(tuple, [1, 2], [3.0, missing]), [(1, 3.0), (2, missing)]) + @test Core.Compiler.return_type(map, Tuple{typeof(tuple), Vector{Int}, + Vector{Union{Float64, Missing}}}) == + Vector{<:Tuple{Int, Any}} + # Check that corner cases do not throw an error + @test isequal(map(x -> x === 1 ? nothing : x, [1, 2, missing]), + [nothing, 2, missing]) + @test isequal(map(x -> x === 1 ? nothing : x, Any[1, 2, 3.0, missing]), + [nothing, 2, 3, missing]) + @test map((x,y)->(x==1 ? 1.0 : x, y), [1, 2, 3], ["a", "b", "c"]) == + [(1.0, "a"), (2, "b"), (3, "c")] + @test map(typeof, [iszero, isdigit]) == [typeof(iszero), typeof(isdigit)] + @test map(typeof, [iszero, iszero]) == [typeof(iszero), typeof(iszero)] + @test isequal(map(identity, Vector{<:Union{Int, Missing}}[[1, 2],[missing, 1]]), + [[1, 2],[missing, 1]]) + @test map(x -> x < 0 ? false : x, Int[]) isa Vector{Integer} end function testmap_equivalence(mapf, f, c...) diff --git a/test/sets.jl b/test/sets.jl index 46854dae957c6..5de38e96b9e31 100644 --- a/test/sets.jl +++ b/test/sets.jl @@ -22,6 +22,7 @@ using Dates @test isa(Set(sin(x) for x = 1:3), Set{Float64}) @test isa(Set(f17741(x) for x = 1:3), Set{Int}) @test isa(Set(f17741(x) for x = -1:1), Set{Integer}) + @test isa(Set(f17741(x) for x = 1:0), Set{Integer}) end let s1 = Set(["foo", "bar"]), s2 = Set(s1) @test s1 == s2 From 9741f5c8b2338903608edcd84373430f9e4f3b1c Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 8 Sep 2021 18:54:31 -0400 Subject: [PATCH 11/88] fix collect on stateful iterators Generalization of #41919 Fixes #42168 (cherry picked from commit 68e08136550c928de028d036413775e74ca90c3e) --- base/array.jl | 61 ++++++++++++++++++++++++++++---------------- base/dict.jl | 4 +-- base/set.jl | 2 +- src/julia-syntax.scm | 8 +++--- test/iterators.jl | 11 +++++--- 5 files changed, 52 insertions(+), 34 deletions(-) diff --git a/base/array.jl b/base/array.jl index 7e30927a71b9c..c028d054382b4 100644 --- a/base/array.jl +++ b/base/array.jl @@ -583,23 +583,38 @@ julia> collect(Float64, 1:2:5) """ collect(::Type{T}, itr) where {T} = _collect(T, itr, IteratorSize(itr)) -_collect(::Type{T}, itr, isz::HasLength) where {T} = copyto!(Vector{T}(undef, Int(length(itr)::Integer)), itr) -_collect(::Type{T}, itr, isz::HasShape) where {T} = copyto!(similar(Array{T}, axes(itr)), itr) +_collect(::Type{T}, itr, isz::Union{HasLength,HasShape}) where {T} = + copyto!(_array_for(T, isz, _similar_shape(itr, isz)), itr) function _collect(::Type{T}, itr, isz::SizeUnknown) where T a = Vector{T}() for x in itr - push!(a,x) + push!(a, x) end return a end # make a collection similar to `c` and appropriate for collecting `itr` -_similar_for(c::AbstractArray, ::Type{T}, itr, ::SizeUnknown) where {T} = similar(c, T, 0) -_similar_for(c::AbstractArray, ::Type{T}, itr, ::HasLength) where {T} = - similar(c, T, Int(length(itr)::Integer)) -_similar_for(c::AbstractArray, ::Type{T}, itr, ::HasShape) where {T} = - similar(c, T, axes(itr)) -_similar_for(c, ::Type{T}, itr, isz) where {T} = similar(c, T) +_similar_for(c, ::Type{T}, itr, isz, shp) where {T} = similar(c, T) + +_similar_shape(itr, ::SizeUnknown) = nothing +_similar_shape(itr, ::HasLength) = length(itr)::Integer +_similar_shape(itr, ::HasShape) = axes(itr) + +_similar_for(c::AbstractArray, ::Type{T}, itr, ::SizeUnknown, ::Nothing) where {T} = + similar(c, T, 0) +_similar_for(c::AbstractArray, ::Type{T}, itr, ::HasLength, len::Integer) where {T} = + similar(c, T, len) +_similar_for(c::AbstractArray, ::Type{T}, itr, ::HasShape, axs) where {T} = + similar(c, T, axs) + +# make a collection appropriate for collecting `itr::Generator` +_array_for(::Type{T}, ::SizeUnknown, ::Nothing) where {T} = Vector{T}(undef, 0) +_array_for(::Type{T}, ::HasLength, len::Integer) where {T} = Vector{T}(undef, Int(len)) +_array_for(::Type{T}, ::HasShape{N}, axs) where {T,N} = similar(Array{T,N}, axs) + +# used by syntax lowering for simple typed comprehensions +_array_for(::Type{T}, itr, isz) where {T} = _array_for(T, isz, _similar_shape(itr, isz)) + """ collect(collection) @@ -638,10 +653,10 @@ collect(A::AbstractArray) = _collect_indices(axes(A), A) collect_similar(cont, itr) = _collect(cont, itr, IteratorEltype(itr), IteratorSize(itr)) _collect(cont, itr, ::HasEltype, isz::Union{HasLength,HasShape}) = - copyto!(_similar_for(cont, eltype(itr), itr, isz), itr) + copyto!(_similar_for(cont, eltype(itr), itr, isz, _similar_shape(itr, isz)), itr) function _collect(cont, itr, ::HasEltype, isz::SizeUnknown) - a = _similar_for(cont, eltype(itr), itr, isz) + a = _similar_for(cont, eltype(itr), itr, isz, nothing) for x in itr push!(a,x) end @@ -699,24 +714,19 @@ else end end -_array_for(::Type{T}, itr, isz::HasLength) where {T} = _array_for(T, itr, isz, length(itr)) -_array_for(::Type{T}, itr, isz::HasShape{N}) where {T,N} = _array_for(T, itr, isz, axes(itr)) -_array_for(::Type{T}, itr, ::HasLength, len) where {T} = Vector{T}(undef, len) -_array_for(::Type{T}, itr, ::HasShape{N}, axs) where {T,N} = similar(Array{T,N}, axs) - function collect(itr::Generator) isz = IteratorSize(itr.iter) et = @default_eltype(itr) if isa(isz, SizeUnknown) return grow_to!(Vector{et}(), itr) else - shape = isz isa HasLength ? length(itr) : axes(itr) + shp = _similar_shape(itr, isz) y = iterate(itr) if y === nothing - return _array_for(et, itr.iter, isz) + return _array_for(et, isz, shp) end v1, st = y - dest = _array_for(typeof(v1), itr.iter, isz, shape) + dest = _array_for(typeof(v1), isz, shp) # The typeassert gives inference a helping hand on the element type and dimensionality # (work-around for #28382) et′ = et <: Type ? Type : et @@ -726,15 +736,22 @@ function collect(itr::Generator) end _collect(c, itr, ::EltypeUnknown, isz::SizeUnknown) = - grow_to!(_similar_for(c, @default_eltype(itr), itr, isz), itr) + grow_to!(_similar_for(c, @default_eltype(itr), itr, isz, nothing), itr) function _collect(c, itr, ::EltypeUnknown, isz::Union{HasLength,HasShape}) + et = @default_eltype(itr) + shp = _similar_shape(itr, isz) y = iterate(itr) if y === nothing - return _similar_for(c, @default_eltype(itr), itr, isz) + return _similar_for(c, et, itr, isz, shp) end v1, st = y - collect_to_with_first!(_similar_for(c, typeof(v1), itr, isz), v1, itr, st) + dest = _similar_for(c, typeof(v1), itr, isz, shp) + # The typeassert gives inference a helping hand on the element type and dimensionality + # (work-around for #28382) + et′ = et <: Type ? Type : et + RT = dest isa AbstractArray ? AbstractArray{<:et′, ndims(dest)} : Any + collect_to_with_first!(dest, v1, itr, st)::RT end function collect_to_with_first!(dest::AbstractArray, v1, itr, st) diff --git a/base/dict.jl b/base/dict.jl index 6918677c4f0bb..1978323e88503 100644 --- a/base/dict.jl +++ b/base/dict.jl @@ -826,6 +826,6 @@ length(t::ImmutableDict) = count(Returns(true), t) isempty(t::ImmutableDict) = !isdefined(t, :parent) empty(::ImmutableDict, ::Type{K}, ::Type{V}) where {K, V} = ImmutableDict{K,V}() -_similar_for(c::Dict, ::Type{Pair{K,V}}, itr, isz) where {K, V} = empty(c, K, V) -_similar_for(c::AbstractDict, ::Type{T}, itr, isz) where {T} = +_similar_for(c::AbstractDict, ::Type{Pair{K,V}}, itr, isz, len) where {K, V} = empty(c, K, V) +_similar_for(c::AbstractDict, ::Type{T}, itr, isz, len) where {T} = throw(ArgumentError("for AbstractDicts, similar requires an element type of Pair;\n if calling map, consider a comprehension instead")) diff --git a/base/set.jl b/base/set.jl index e2e6a83b0a4c5..2e06970a75150 100644 --- a/base/set.jl +++ b/base/set.jl @@ -36,7 +36,7 @@ empty(s::AbstractSet{T}, ::Type{U}=T) where {T,U} = Set{U}() # by default, a Set is returned emptymutable(s::AbstractSet{T}, ::Type{U}=T) where {T,U} = Set{U}() -_similar_for(c::AbstractSet, ::Type{T}, itr, isz) where {T} = empty(c, T) +_similar_for(c::AbstractSet, ::Type{T}, itr, isz, len) where {T} = empty(c, T) function show(io::IO, s::Set) if isempty(s) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index f00ea0c9ba6d9..acd1887cbb4fc 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -2734,7 +2734,7 @@ (check-no-return expr) (if (has-break-or-continue? expr) (error "break or continue outside loop")) - (let ((result (gensy)) + (let ((result (make-ssavalue)) (idx (gensy)) (oneresult (make-ssavalue)) (prod (make-ssavalue)) @@ -2758,16 +2758,14 @@ (let ((overall-itr (if (length= itrs 1) (car iv) prod))) `(scope-block (block - (local ,result) (local ,idx) + (local ,idx) ,.(map (lambda (v r) `(= ,v ,(caddr r))) iv itrs) ,.(if (length= itrs 1) '() `((= ,prod (call (top product) ,@iv)))) (= ,isz (call (top IteratorSize) ,overall-itr)) (= ,szunk (call (core isa) ,isz (top SizeUnknown))) - (if ,szunk - (= ,result (call (curly (core Array) ,ty 1) (core undef) 0)) - (= ,result (call (top _array_for) ,ty ,overall-itr ,isz))) + (= ,result (call (top _array_for) ,ty ,overall-itr ,isz)) (= ,idx (call (top first) (call (top LinearIndices) ,result))) ,(construct-loops (reverse itrs) (reverse iv)) ,result))))) diff --git a/test/iterators.jl b/test/iterators.jl index c7d00c4e7e2e8..86c325a85b617 100644 --- a/test/iterators.jl +++ b/test/iterators.jl @@ -293,11 +293,14 @@ let (a, b) = (1:3, [4 6; end # collect stateful iterator -let - itr = (i+1 for i in Base.Stateful([1,2,3])) +let itr + itr = Iterators.Stateful(Iterators.map(identity, 1:5)) + @test collect(itr) == 1:5 + @test collect(itr) == Int[] # Stateful do not preserve shape + itr = (i+1 for i in Base.Stateful([1, 2, 3])) @test collect(itr) == [2, 3, 4] - A = zeros(Int, 0, 0) - itr = (i-1 for i in Base.Stateful(A)) + @test collect(itr) == Int[] # Stateful do not preserve shape + itr = (i-1 for i in Base.Stateful(zeros(Int, 0, 0))) @test collect(itr) == Int[] # Stateful do not preserve shape end From 23d14c64693fd9c47d77dfa1ca436ef2eb12ac2b Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 15 Sep 2021 12:46:28 -0400 Subject: [PATCH 12/88] avoid `Any32` type in `filter` for tuples. fixes #42236 (cherry picked from commit 71349b72c9303fb864a349818f8b126c5aec21df) --- base/tuple.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/tuple.jl b/base/tuple.jl index 421ada47c0c36..1abcccef3dab5 100644 --- a/base/tuple.jl +++ b/base/tuple.jl @@ -357,10 +357,10 @@ end ## filter ## -filter(f, xs::Tuple) = afoldl((ys, x) -> f(x) ? (ys..., x) : ys, (), xs...) +filter_rec(f, xs::Tuple) = afoldl((ys, x) -> f(x) ? (ys..., x) : ys, (), xs...) # use Array for long tuples -filter(f, t::Any32) = Tuple(filter(f, collect(t))) +filter(f, t::Tuple) = length(t) < 32 ? filter_rec(f, t) : Tuple(filter(f, collect(t))) ## comparison ## From c9f4de01bc6041cd1271ae1fcb73dc8fc1092683 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Thu, 16 Sep 2021 22:09:01 +0200 Subject: [PATCH 13/88] update Pkg to newest 1.7 version --- .../Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 | 1 + .../Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 | 1 + .../Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/md5 | 1 - .../Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/sha512 | 1 - stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 create mode 100644 deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 delete mode 100644 deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/sha512 diff --git a/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 b/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 new file mode 100644 index 0000000000000..a9bc18a4e54fc --- /dev/null +++ b/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 @@ -0,0 +1 @@ +a643f3a794556f4393ae4814bbf5c259 diff --git a/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 b/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 new file mode 100644 index 0000000000000..59acdff11bfd1 --- /dev/null +++ b/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 @@ -0,0 +1 @@ +96b78d4afa3ffa3bf64d77437258223186a3d61976e9f474573fd958547d0a5466d9f1eb471be81571d0a7462d6bf85b4def04f5aa51577601a522182ca63e6c diff --git a/deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/md5 b/deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/md5 deleted file mode 100644 index eee45b02bc589..0000000000000 --- a/deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -4f5b2832ade28f50ecb0a97bbe313749 diff --git a/deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/sha512 b/deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/sha512 deleted file mode 100644 index e832a841c1f77..0000000000000 --- a/deps/checksums/Pkg-9f30b81e367d7fed6ae13577cd8a434fc30e625e.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -df42d57a4f438e193283e35ff307725ce548bb5742613135d63658dc070ce41d43c1d71545f64e8f0c0feaffa6b7cf9e12d5ff188c6bad83bb2ad1fb4118e177 diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 6b2533e141938..c98fcb8c49c35 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = release-1.7 -PKG_SHA1 = 9f30b81e367d7fed6ae13577cd8a434fc30e625e +PKG_SHA1 = 3da1ce68723e0a4585036856e0fa3c5054bbc6e1 From f6e3388f179f1af88e6c5961a7bf4687d20545f1 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 16 Sep 2021 11:09:11 -0400 Subject: [PATCH 14/88] export `jl_setjmp` on windows (#42267) fix #42245 (cherry picked from commit c5f348726cebbe55e169d4d62225c2b1e587f497) --- cli/jl_exports.h | 12 ++++++++++++ cli/list_strip_symbols.h | 3 +++ cli/trampolines/common.h | 2 ++ cli/trampolines/trampolines_aarch64.S | 3 +++ cli/trampolines/trampolines_arm.S | 3 +++ cli/trampolines/trampolines_i686.S | 3 +++ cli/trampolines/trampolines_x86_64.S | 3 +++ src/jl_exported_funcs.inc | 2 ++ src/julia.h | 4 ++-- test/embedding/embedding-test.jl | 4 ++-- test/embedding/embedding.c | 7 +++++++ 11 files changed, 42 insertions(+), 4 deletions(-) diff --git a/cli/jl_exports.h b/cli/jl_exports.h index 35d2767726865..709cab4cde42e 100644 --- a/cli/jl_exports.h +++ b/cli/jl_exports.h @@ -19,17 +19,26 @@ JL_EXPORTED_DATA_SYMBOLS(XX) #define XX(name) JL_DLLEXPORT void name(void); typedef void (anonfunc)(void); JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ +JL_EXPORTED_FUNCS_WIN(XX) +#endif #undef XX // Define holder locations for function addresses as `const void * $(name)_addr = & $(name);` #define XX(name) JL_HIDDEN anonfunc * name##_addr = (anonfunc*)&name; JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ +JL_EXPORTED_FUNCS_WIN(XX) +#endif #undef XX // Generate lists of function names and addresses #define XX(name) #name, static const char *const jl_exported_func_names[] = { JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ + JL_EXPORTED_FUNCS_WIN(XX) +#endif NULL }; #undef XX @@ -37,6 +46,9 @@ static const char *const jl_exported_func_names[] = { #define XX(name) &name##_addr, static anonfunc **const jl_exported_func_addrs[] = { JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ + JL_EXPORTED_FUNCS_WIN(XX) +#endif NULL }; #undef XX diff --git a/cli/list_strip_symbols.h b/cli/list_strip_symbols.h index e1a96261fe05a..0ea0f7ac9f6ac 100644 --- a/cli/list_strip_symbols.h +++ b/cli/list_strip_symbols.h @@ -4,4 +4,7 @@ #include "trampolines/common.h" #define XX(x) --strip-symbol=CNAME(x) JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ +JL_EXPORTED_FUNCS_WIN(XX) +#endif #undef XX diff --git a/cli/trampolines/common.h b/cli/trampolines/common.h index 06d7b9e236971..51f51a1bf7ab8 100644 --- a/cli/trampolines/common.h +++ b/cli/trampolines/common.h @@ -1,3 +1,5 @@ +#include "../../src/support/platform.h" + // Preprocessor annoyances #define CONCAT_(x,y) x##y #define CONCAT(x,y) CONCAT_(x, y) diff --git a/cli/trampolines/trampolines_aarch64.S b/cli/trampolines/trampolines_aarch64.S index bffeab76c1763..0baac5a367aa5 100644 --- a/cli/trampolines/trampolines_aarch64.S +++ b/cli/trampolines/trampolines_aarch64.S @@ -12,4 +12,7 @@ CNAME(name)##: SEP \ .cfi_endproc SEP \ JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ +JL_EXPORTED_FUNCS_WIN(XX) +#endif #undef XX diff --git a/cli/trampolines/trampolines_arm.S b/cli/trampolines/trampolines_arm.S index f99b7820360b2..c35ca16660fb1 100644 --- a/cli/trampolines/trampolines_arm.S +++ b/cli/trampolines/trampolines_arm.S @@ -15,4 +15,7 @@ CONCAT(.L,CNAMEADDR(name))##: ; \ .cfi_endproc; \ JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ +JL_EXPORTED_FUNCS_WIN(XX) +#endif #undef XX diff --git a/cli/trampolines/trampolines_i686.S b/cli/trampolines/trampolines_i686.S index f27949afa47b8..6bb52ec81cf24 100644 --- a/cli/trampolines/trampolines_i686.S +++ b/cli/trampolines/trampolines_i686.S @@ -13,4 +13,7 @@ CNAME(name)##:; \ EXPORT(name); \ JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ +JL_EXPORTED_FUNCS_WIN(XX) +#endif #undef XX diff --git a/cli/trampolines/trampolines_x86_64.S b/cli/trampolines/trampolines_x86_64.S index e06434cf540e5..f0c80e3cffb45 100644 --- a/cli/trampolines/trampolines_x86_64.S +++ b/cli/trampolines/trampolines_x86_64.S @@ -17,4 +17,7 @@ SEH_END(); \ EXPORT(name); \ JL_EXPORTED_FUNCS(XX) +#ifdef _OS_WINDOWS_ +JL_EXPORTED_FUNCS_WIN(XX) +#endif #undef XX diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index 1d2a8a6bed5ac..0bb96043f6e16 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -545,3 +545,5 @@ XX(jl_print_backtrace) \ XX(jl_get_pgcstack) \ +#define JL_EXPORTED_FUNCS_WIN(XX) \ + XX(jl_setjmp) diff --git a/src/julia.h b/src/julia.h index b2a8bd15bcb22..52f56c782a6f9 100644 --- a/src/julia.h +++ b/src/julia.h @@ -1897,10 +1897,10 @@ JL_DLLEXPORT void jl_restore_excstack(size_t state) JL_NOTSAFEPOINT; #if defined(_OS_WINDOWS_) #if defined(_COMPILER_GCC_) -int __attribute__ ((__nothrow__,__returns_twice__)) (jl_setjmp)(jmp_buf _Buf); +JL_DLLEXPORT int __attribute__ ((__nothrow__,__returns_twice__)) (jl_setjmp)(jmp_buf _Buf); __declspec(noreturn) __attribute__ ((__nothrow__)) void (jl_longjmp)(jmp_buf _Buf, int _Value); #else -int (jl_setjmp)(jmp_buf _Buf); +JL_DLLEXPORT int (jl_setjmp)(jmp_buf _Buf); void (jl_longjmp)(jmp_buf _Buf, int _Value); #endif #define jl_setjmp_f jl_setjmp diff --git a/test/embedding/embedding-test.jl b/test/embedding/embedding-test.jl index f358ff2a74cdf..797f6dabd9a89 100644 --- a/test/embedding/embedding-test.jl +++ b/test/embedding/embedding-test.jl @@ -20,8 +20,7 @@ end close(out.in) close(err.in) out_task = @async readlines(out) - err = read(err, String) - @test err == "MethodError: no method matching this_function_has_no_methods()\n" + @test readline(err) == "MethodError: no method matching this_function_has_no_methods()" @test success(p) lines = fetch(out_task) @test length(lines) == 10 @@ -29,4 +28,5 @@ end @test lines[8] == "called bar" @test lines[9] == "calling new bar" @test lines[10] == " From worker 2:\tTaking over the world..." + @test readline(err) == "exception caught from C" end diff --git a/test/embedding/embedding.c b/test/embedding/embedding.c index d1816947f3856..659ddde3f72df 100644 --- a/test/embedding/embedding.c +++ b/test/embedding/embedding.c @@ -175,6 +175,13 @@ int main() checked_eval_string("f28825()"); } + JL_TRY { + jl_error("exception thrown"); + } + JL_CATCH { + jl_printf(jl_stderr_stream(), "exception caught from C\n"); + } + int ret = 0; jl_atexit_hook(ret); return ret; From f09df4509b2aa82e65e4508331d11582340a4cd9 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Sat, 18 Sep 2021 17:53:40 +0200 Subject: [PATCH 15/88] specialize `hastypemax` on `Bool` (#42300) Since `Bool` is not included in `Base.BitIntegerType`, `hastypemax(Bool)` falls back to the slow generic version. This reduces the performance of `digits!` with Boolean target vector (for `base=2`) significantly. Specializing `hastypemax` on `Bool` fixes this performance bug. (cherry picked from commit e50603fd1dac48bb6ed7a6ec97c0e9cef2226d93) --- base/intfuncs.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/base/intfuncs.jl b/base/intfuncs.jl index e312000ac39f1..daf2d86bcc06e 100644 --- a/base/intfuncs.jl +++ b/base/intfuncs.jl @@ -864,6 +864,7 @@ end Return true if and only if the extrema `typemax(T)` and `typemin(T)` are defined. """ hastypemax(::Base.BitIntegerType) = true +hastypemax(::Type{Bool}) = true hastypemax(::Type{T}) where {T} = applicable(typemax, T) && applicable(typemin, T) """ From 33ebbaca8c1f7576f81bf64a5ece814d828ef93b Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Mon, 20 Sep 2021 15:34:58 -0400 Subject: [PATCH 16/88] Slightly loosen a test so that linalg tests pass when using MKL (#42315) (cherry picked from commit 4f3a89e3abecb96bbe221d027278c55dccf23da7) --- stdlib/LinearAlgebra/test/matmul.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/LinearAlgebra/test/matmul.jl b/stdlib/LinearAlgebra/test/matmul.jl index 1febdfe49fb3b..1017134f2f6d4 100644 --- a/stdlib/LinearAlgebra/test/matmul.jl +++ b/stdlib/LinearAlgebra/test/matmul.jl @@ -152,7 +152,7 @@ end for vf in (copy(vvf), view(vvf, 1:3)), C in (copy(CC), view(CC, 1:3, 1:3)) @test mul!(C, vf, transpose(vf)) == vf*vf' C .= C0 = rand(eltype(C), size(C)) - @test mul!(C, vf, transpose(vf), 2, 3) == 2vf*vf' .+ 3C0 + @test mul!(C, vf, transpose(vf), 2, 3) ≈ 2vf*vf' .+ 3C0 end end From 2845793efe26f5e290cfe40167931066af1c2cf0 Mon Sep 17 00:00:00 2001 From: getzze Date: Tue, 21 Sep 2021 13:16:04 +0100 Subject: [PATCH 17/88] Circshift no longer throws error for empty array (#42288) * Test circshift with 0-dim array * circshift returns dest array for a 0-dim array * use isempty instead of checking size (cherry picked from commit 144ed8783f3cd0c2f878889576d04d62a1a49a72) --- base/multidimensional.jl | 1 + test/arrayops.jl | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/base/multidimensional.jl b/base/multidimensional.jl index db6f47b940b3c..e07789f0f6a4d 100644 --- a/base/multidimensional.jl +++ b/base/multidimensional.jl @@ -1123,6 +1123,7 @@ See also [`circshift`](@ref). dest === src && throw(ArgumentError("dest and src must be separate arrays")) inds = axes(src) axes(dest) == inds || throw(ArgumentError("indices of src and dest must match (got $inds and $(axes(dest)))")) + isempty(src) && return dest _circshift!(dest, (), src, (), inds, fill_to_length(shiftamt, 0, Val(N))) end diff --git a/test/arrayops.jl b/test/arrayops.jl index 7823fce7a6175..3659f8817416a 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -748,6 +748,12 @@ end @test res === dst == [5 6 4; 2 3 1] res = circshift!(dst, src, (3.0, 2.0)) @test res === dst == [5 6 4; 2 3 1] + + # https://github.com/JuliaLang/julia/issues/41402 + src = Float64[] + @test circshift(src, 1) == src + src = zeros(Bool, (4,0)) + @test circshift(src, 1) == src end @testset "circcopy" begin From 0904a1266a7d810387c0b912e451049b1e6cbc12 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 22 Sep 2021 11:24:53 -0400 Subject: [PATCH 18/88] atomics: fix some minor issues (#42335) (cherry picked from commit 1e6c2690f0949fe17d27f5c2b230e70df6e7f5c0) --- Make.inc | 2 +- src/cgutils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Make.inc b/Make.inc index 668507dadad2c..658e42391f39b 100644 --- a/Make.inc +++ b/Make.inc @@ -1302,7 +1302,7 @@ ifeq ($(OS), WINNT) ifneq ($(USEMSVC), 1) HAVE_SSP := 1 OSLIBS += -Wl,--export-all-symbols -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \ - $(NO_WHOLE_ARCHIVE) -lpsapi -lkernel32 -lws2_32 -liphlpapi -lwinmm -ldbghelp -luserenv -lsecur32 + $(NO_WHOLE_ARCHIVE) -lpsapi -lkernel32 -lws2_32 -liphlpapi -lwinmm -ldbghelp -luserenv -lsecur32 -latomic JLDFLAGS := -Wl,--stack,8388608 ifeq ($(ARCH),i686) JLDFLAGS += -Wl,--large-address-aware diff --git a/src/cgutils.cpp b/src/cgutils.cpp index aec9b59c98bda..43f35c2a51813 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1560,7 +1560,7 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, ret = mark_julia_type(ctx, callval, true, jl_any_type); } if (!jl_subtype(ret.typ, jltype)) { - emit_typecheck(ctx, ret, jltype, fname + "typed_store"); + emit_typecheck(ctx, ret, jltype, fname); ret = update_julia_type(ctx, ret, jltype); } return ret; From 3b2c143100ccfbf25030382b6519e246c5f99fc4 Mon Sep 17 00:00:00 2001 From: Rafael Fourquet Date: Thu, 23 Sep 2021 03:14:48 +0200 Subject: [PATCH 19/88] Xoshiro: allow any non-negative integer as a seed, via SHA2_256 (#41558) (cherry picked from commit 2174ee11c9636586b9e8f431e173682c6125fecd) --- doc/src/devdocs/subarrays.md | 10 ++--- doc/src/manual/performance-tips.md | 20 ++++----- stdlib/LinearAlgebra/test/dense.jl | 8 ++-- stdlib/LinearAlgebra/test/eigen.jl | 2 +- stdlib/Random/Project.toml | 1 + stdlib/Random/docs/src/index.md | 18 ++++---- stdlib/Random/src/RNGs.jl | 2 +- stdlib/Random/src/Random.jl | 1 + stdlib/Random/src/Xoshiro.jl | 60 ++++--------------------- stdlib/Random/src/misc.jl | 4 +- stdlib/Random/test/runtests.jl | 4 +- stdlib/SparseArrays/src/sparsematrix.jl | 15 ++++--- stdlib/SparseArrays/test/sparse.jl | 2 +- 13 files changed, 53 insertions(+), 94 deletions(-) diff --git a/doc/src/devdocs/subarrays.md b/doc/src/devdocs/subarrays.md index 02e75fa00ec48..cec7a64a65245 100644 --- a/doc/src/devdocs/subarrays.md +++ b/doc/src/devdocs/subarrays.md @@ -19,14 +19,14 @@ julia> A = rand(2,3,4); julia> S1 = view(A, :, 1, 2:3) 2×2 view(::Array{Float64, 3}, :, 1, 2:3) with eltype Float64: - 0.342284 0.831961 - 0.237287 0.435938 + 0.839622 0.711389 + 0.967143 0.103929 julia> S2 = view(A, 1, :, 2:3) 3×2 view(::Array{Float64, 3}, 1, :, 2:3) with eltype Float64: - 0.342284 0.831961 - 0.988944 0.927795 - 0.178426 0.404876 + 0.839622 0.711389 + 0.789764 0.806704 + 0.566704 0.962715 ``` ```@meta DocTestSetup = nothing diff --git a/doc/src/manual/performance-tips.md b/doc/src/manual/performance-tips.md index b2dc74ea5bf2c..66ac33497e986 100644 --- a/doc/src/manual/performance-tips.md +++ b/doc/src/manual/performance-tips.md @@ -77,12 +77,12 @@ julia> function sum_global() end; julia> @time sum_global() - 0.010414 seconds (9.07 k allocations: 373.448 KiB, 98.40% compilation time) -493.6199223951192 + 0.011539 seconds (9.08 k allocations: 373.386 KiB, 98.69% compilation time) +523.0007221951678 julia> @time sum_global() - 0.000108 seconds (3.49 k allocations: 70.156 KiB) -493.6199223951192 + 0.000091 seconds (3.49 k allocations: 70.156 KiB) +523.0007221951678 ``` On the first call (`@time sum_global()`) the function gets compiled. (If you've not yet used [`@time`](@ref) @@ -113,12 +113,12 @@ julia> function sum_arg(x) end; julia> @time sum_arg(x) - 0.007971 seconds (3.96 k allocations: 200.171 KiB, 99.83% compilation time) -493.6199223951192 + 0.007551 seconds (3.98 k allocations: 200.548 KiB, 99.77% compilation time) +523.0007221951678 julia> @time sum_arg(x) - 0.000003 seconds (1 allocation: 16 bytes) -493.6199223951192 + 0.000006 seconds (1 allocation: 16 bytes) +523.0007221951678 ``` The 1 allocation seen is from running the `@time` macro itself in global scope. If we instead run @@ -128,8 +128,8 @@ the timing in a function, we can see that indeed no allocations are performed: julia> time_sum(x) = @time sum_arg(x); julia> time_sum(x) - 0.000001 seconds -493.6199223951192 + 0.000002 seconds +523.0007221951678 ``` In some situations, your function may need to allocate memory as part of its operation, and this diff --git a/stdlib/LinearAlgebra/test/dense.jl b/stdlib/LinearAlgebra/test/dense.jl index d6d882fabc65b..2f61c8af403e3 100644 --- a/stdlib/LinearAlgebra/test/dense.jl +++ b/stdlib/LinearAlgebra/test/dense.jl @@ -22,10 +22,10 @@ Random.seed!(1234323) @testset "for $elty" for elty in (Float32, Float64, ComplexF32, ComplexF64) ainit = convert(Matrix{elty}, ainit) for a in (copy(ainit), view(ainit, 1:n, 1:n)) - @test cond(a,1) ≈ 122.15725126320953 atol=0.5 - @test cond(a,2) ≈ 78.44837047684149 atol=0.5 - @test cond(a,Inf) ≈ 174.10761543202744 atol=0.4 - @test cond(a[:,1:5]) ≈ 6.7492840150789135 atol=0.01 + @test cond(a,1) ≈ 198.3324294531168 atol=0.5 + @test cond(a,2) ≈ 85.93920079319506 atol=0.5 + @test cond(a,Inf) ≈ 149.7523084803039 atol=0.4 + @test cond(a[:,1:5]) ≈ 8.319279144493297 atol=0.01 @test_throws ArgumentError cond(a,3) end end diff --git a/stdlib/LinearAlgebra/test/eigen.jl b/stdlib/LinearAlgebra/test/eigen.jl index 9894da3827250..fe42df785958a 100644 --- a/stdlib/LinearAlgebra/test/eigen.jl +++ b/stdlib/LinearAlgebra/test/eigen.jl @@ -163,7 +163,7 @@ end end @testset "eigen of an Adjoint" begin - Random.seed!(1) + Random.seed!(4) A = randn(3,3) @test eigvals(A') == eigvals(copy(A')) @test eigen(A') == eigen(copy(A')) diff --git a/stdlib/Random/Project.toml b/stdlib/Random/Project.toml index 6958e618d3ea8..199dcab940c86 100644 --- a/stdlib/Random/Project.toml +++ b/stdlib/Random/Project.toml @@ -3,6 +3,7 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [deps] Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/stdlib/Random/docs/src/index.md b/stdlib/Random/docs/src/index.md index a78b08ea89295..6750dd35b40f7 100644 --- a/stdlib/Random/docs/src/index.md +++ b/stdlib/Random/docs/src/index.md @@ -151,22 +151,22 @@ Scalar and array methods for `Die` now work as expected: ```jldoctest Die; setup = :(Random.seed!(1)) julia> rand(Die) -Die(7) +Die(5) julia> rand(MersenneTwister(0), Die) Die(11) julia> rand(Die, 3) 3-element Vector{Die}: - Die(13) - Die(8) - Die(20) + Die(9) + Die(15) + Die(14) julia> a = Vector{Die}(undef, 3); rand!(a) 3-element Vector{Die}: - Die(4) - Die(14) - Die(10) + Die(19) + Die(7) + Die(17) ``` #### A simple sampler without pre-computed data @@ -183,9 +183,9 @@ julia> rand(Die(4)) julia> rand(Die(4), 3) 3-element Vector{Any}: - 3 2 - 4 + 3 + 3 ``` Given a collection type `S`, it's currently assumed that if `rand(::S)` is defined, an object of type `eltype(S)` will be produced. In the last example, a `Vector{Any}` is produced; the reason is that `eltype(Die) == Any`. The remedy is to define `Base.eltype(::Type{Die}) = Int`. diff --git a/stdlib/Random/src/RNGs.jl b/stdlib/Random/src/RNGs.jl index c483296fe3af1..141ec14f4ed31 100644 --- a/stdlib/Random/src/RNGs.jl +++ b/stdlib/Random/src/RNGs.jl @@ -384,7 +384,7 @@ end seed!(rng::_GLOBAL_RNG, ::Nothing) = seed!(rng) # to resolve ambiguity -seed!(seed::Union{Nothing,Integer,Vector{UInt32},Vector{UInt64},NTuple{4,UInt64}}=nothing) = +seed!(seed::Union{Nothing,Integer,Vector{UInt32},Vector{UInt64}}=nothing) = seed!(GLOBAL_RNG, seed) rng_native_52(::_GLOBAL_RNG) = rng_native_52(default_rng()) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 45aa6442eed7e..05fe872eb6ebc 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -13,6 +13,7 @@ include("DSFMT.jl") using .DSFMT using Base.GMP.MPZ using Base.GMP: Limb +import SHA using Base: BitInteger, BitInteger_types, BitUnsigned, require_one_based_indexing diff --git a/stdlib/Random/src/Xoshiro.jl b/stdlib/Random/src/Xoshiro.jl index f695221ddd190..48d090d04a647 100644 --- a/stdlib/Random/src/Xoshiro.jl +++ b/stdlib/Random/src/Xoshiro.jl @@ -115,65 +115,21 @@ end # Shared implementation between Xoshiro and TaskLocalRNG -- seeding -function seed!(x::Union{TaskLocalRNG,Xoshiro}) +function seed!(rng::Union{TaskLocalRNG,Xoshiro}) # as we get good randomness from RandomDevice, we can skip hashing - parent = RandomDevice() - # Constants have nothing up their sleeve, see task.c - # 0x02011ce34bce797f == hash(UInt(1))|0x01 - # 0x5a94851fb48a6e05 == hash(UInt(2))|0x01 - # 0x3688cf5d48899fa7 == hash(UInt(3))|0x01 - # 0x867b4bb4c42e5661 == hash(UInt(4))|0x01 - setstate!(x, - 0x02011ce34bce797f * rand(parent, UInt64), - 0x5a94851fb48a6e05 * rand(parent, UInt64), - 0x3688cf5d48899fa7 * rand(parent, UInt64), - 0x867b4bb4c42e5661 * rand(parent, UInt64)) + rd = RandomDevice() + setstate!(rng, rand(rd, UInt64), rand(rd, UInt64), rand(rd, UInt64), rand(rd, UInt64)) end -function seed!(rng::Union{TaskLocalRNG,Xoshiro}, seed::NTuple{4,UInt64}) - # TODO: Consider a less ad-hoc construction - # We can afford burning a handful of cycles here, and we don't want any - # surprises with respect to bad seeds / bad interactions. - - s0 = s = Base.hash_64_64(seed[1]) - s1 = s += Base.hash_64_64(seed[2]) - s2 = s += Base.hash_64_64(seed[3]) - s3 = s += Base.hash_64_64(seed[4]) - +function seed!(rng::Union{TaskLocalRNG,Xoshiro}, seed::Union{Vector{UInt32}, Vector{UInt64}}) + c = SHA.SHA2_256_CTX() + SHA.update!(c, reinterpret(UInt8, seed)) + s0, s1, s2, s3 = reinterpret(UInt64, SHA.digest!(c)) setstate!(rng, s0, s1, s2, s3) - - rand(rng, UInt64) - rand(rng, UInt64) - rand(rng, UInt64) - rand(rng, UInt64) - rng end -function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::UInt128) - seed0 = seed % UInt64 - seed1 = (seed>>>64) % UInt64 - seed!(rng, (seed0, seed1, zero(UInt64), zero(UInt64))) -end -seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::Integer) = seed!(rng, UInt128(seed)) - -function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::AbstractVector{UInt64}) - if length(seed) > 4 - throw(ArgumentError("seed should have no more than 256 bits")) - end - seed0 = length(seed)>0 ? seed[1] : UInt64(0) - seed1 = length(seed)>1 ? seed[2] : UInt64(0) - seed2 = length(seed)>2 ? seed[3] : UInt64(0) - seed3 = length(seed)>3 ? seed[4] : UInt64(0) - seed!(rng, (seed0, seed1, seed2, seed3)) -end +seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::Integer) = seed!(rng, make_seed(seed)) -function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::AbstractVector{UInt32}) - if iseven(length(seed)) - seed!(rng, reinterpret(UInt64, seed)) - else - seed!(rng, UInt64[reinterpret(UInt64, @view(seed[begin:end-1])); seed[end] % UInt64]) - end -end @inline function rand(rng::Union{TaskLocalRNG, Xoshiro}, ::SamplerType{UInt128}) first = rand(rng, UInt64) diff --git a/stdlib/Random/src/misc.jl b/stdlib/Random/src/misc.jl index 2dff5a51eff9a..0d6e06c444a09 100644 --- a/stdlib/Random/src/misc.jl +++ b/stdlib/Random/src/misc.jl @@ -53,13 +53,13 @@ number generator, see [Random Numbers](@ref). # Examples ```jldoctest julia> Random.seed!(3); randstring() -"h8BzxSoS" +"Lxz5hUwn" julia> randstring(MersenneTwister(3), 'a':'z', 6) "ocucay" julia> randstring("ACGT") -"CTTACTGC" +"TGCTCCTC" ``` !!! note diff --git a/stdlib/Random/test/runtests.jl b/stdlib/Random/test/runtests.jl index 1a0628ef4f0c5..95aac29a61365 100644 --- a/stdlib/Random/test/runtests.jl +++ b/stdlib/Random/test/runtests.jl @@ -688,7 +688,7 @@ end @testset "$RNG(seed) & Random.seed!(m::$RNG, seed) produce the same stream" for RNG=(MersenneTwister,Xoshiro) seeds = Any[0, 1, 2, 10000, 10001, rand(UInt32, 8), rand(UInt128, 3)...] if RNG == Xoshiro - push!(seeds, rand(UInt64, rand(1:4)), Tuple(rand(UInt64, 4))) + push!(seeds, rand(UInt64, rand(1:4))) end for seed=seeds m = RNG(seed) @@ -699,7 +699,7 @@ end end @testset "Random.seed!(seed) sets Random.GLOBAL_SEED" begin - seeds = Any[0, rand(UInt128), rand(UInt64, 4), Tuple(rand(UInt64, 4))] + seeds = Any[0, rand(UInt128), rand(UInt64, 4)] for seed=seeds Random.seed!(seed) diff --git a/stdlib/SparseArrays/src/sparsematrix.jl b/stdlib/SparseArrays/src/sparsematrix.jl index ad005e70156f4..62243264baa99 100644 --- a/stdlib/SparseArrays/src/sparsematrix.jl +++ b/stdlib/SparseArrays/src/sparsematrix.jl @@ -1613,12 +1613,13 @@ argument specifies a random number generator, see [Random Numbers](@ref). ```jldoctest; setup = :(using Random; Random.seed!(1234)) julia> sprand(Bool, 2, 2, 0.5) 2×2 SparseMatrixCSC{Bool, Int64} with 2 stored entries: - 1 ⋅ - ⋅ 1 + 1 1 + ⋅ ⋅ julia> sprand(Float64, 3, 0.75) -3-element SparseVector{Float64, Int64} with 1 stored entry: - [3] = 0.787459 +3-element SparseVector{Float64, Int64} with 2 stored entries: + [1] = 0.795547 + [2] = 0.49425 ``` """ function sprand(r::AbstractRNG, m::Integer, n::Integer, density::AbstractFloat, rfn::Function, ::Type{T}=eltype(rfn(r, 1))) where T @@ -1659,9 +1660,9 @@ argument specifies a random number generator, see [Random Numbers](@ref). # Examples ```jldoctest; setup = :(using Random; Random.seed!(0)) julia> sprandn(2, 2, 0.75) -2×2 SparseMatrixCSC{Float64, Int64} with 1 stored entry: - ⋅ ⋅ - ⋅ 1.32078 +2×2 SparseMatrixCSC{Float64, Int64} with 3 stored entries: + -1.20577 ⋅ + 0.311817 -0.234641 ``` """ sprandn(r::AbstractRNG, m::Integer, n::Integer, density::AbstractFloat) = diff --git a/stdlib/SparseArrays/test/sparse.jl b/stdlib/SparseArrays/test/sparse.jl index 5842cae42cbd1..7b55119dc5cfc 100644 --- a/stdlib/SparseArrays/test/sparse.jl +++ b/stdlib/SparseArrays/test/sparse.jl @@ -1742,7 +1742,7 @@ end A = guardseed(1234321) do triu(sprand(10, 10, 0.2)) end - @test getcolptr(SparseArrays.droptol!(A, 0.01)) == [1, 1, 3, 4, 5, 6, 7, 11, 13, 15, 18] + @test getcolptr(SparseArrays.droptol!(A, 0.01)) == [1, 1, 1, 1, 2, 2, 2, 4, 4, 5, 5] @test isequal(SparseArrays.droptol!(sparse([1], [1], [1]), 1), SparseMatrixCSC(1, 1, Int[1, 1], Int[], Int[])) end From a545ab0530ee04385d59952e27738ce2c51cf74f Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Thu, 23 Sep 2021 07:36:43 -0400 Subject: [PATCH 20/88] add `@constprop` for compatibility to 1.7 (#42298) * add `@constprop` for compatibility to 1.7 This also adds a depwarn for `@aggressive_constprop`, which seemed sensible to me, given that it will be removed in 1.8. --- base/char.jl | 24 ++++++++++++------------ base/deprecated.jl | 14 ++++++++++++++ base/expr.jl | 25 +++++++++++++++++-------- test/compiler/inference.jl | 5 ++++- test/deprecation_exec.jl | 12 ++++++++++++ 5 files changed, 59 insertions(+), 21 deletions(-) diff --git a/base/char.jl b/base/char.jl index 0584471cb6a33..c8b1c28166bbf 100644 --- a/base/char.jl +++ b/base/char.jl @@ -45,10 +45,10 @@ represents a valid Unicode character. """ Char -@aggressive_constprop (::Type{T})(x::Number) where {T<:AbstractChar} = T(UInt32(x)) -@aggressive_constprop AbstractChar(x::Number) = Char(x) -@aggressive_constprop (::Type{T})(x::AbstractChar) where {T<:Union{Number,AbstractChar}} = T(codepoint(x)) -@aggressive_constprop (::Type{T})(x::AbstractChar) where {T<:Union{Int32,Int64}} = codepoint(x) % T +@constprop :aggressive (::Type{T})(x::Number) where {T<:AbstractChar} = T(UInt32(x)) +@constprop :aggressive AbstractChar(x::Number) = Char(x) +@constprop :aggressive (::Type{T})(x::AbstractChar) where {T<:Union{Number,AbstractChar}} = T(codepoint(x)) +@constprop :aggressive (::Type{T})(x::AbstractChar) where {T<:Union{Int32,Int64}} = codepoint(x) % T (::Type{T})(x::T) where {T<:AbstractChar} = x """ @@ -75,7 +75,7 @@ return a different-sized integer (e.g. `UInt8`). """ function codepoint end -@aggressive_constprop codepoint(c::Char) = UInt32(c) +@constprop :aggressive codepoint(c::Char) = UInt32(c) struct InvalidCharError{T<:AbstractChar} <: Exception char::T @@ -124,7 +124,7 @@ See also [`decode_overlong`](@ref) and [`show_invalid`](@ref). """ isoverlong(c::AbstractChar) = false -@aggressive_constprop function UInt32(c::Char) +@constprop :aggressive function UInt32(c::Char) # TODO: use optimized inline LLVM u = bitcast(UInt32, c) u < 0x80000000 && return u >> 24 @@ -148,7 +148,7 @@ that support overlong encodings should implement `Base.decode_overlong`. """ function decode_overlong end -@aggressive_constprop function decode_overlong(c::Char) +@constprop :aggressive function decode_overlong(c::Char) u = bitcast(UInt32, c) l1 = leading_ones(u) t0 = trailing_zeros(u) & 56 @@ -158,7 +158,7 @@ function decode_overlong end ((u & 0x007f0000) >> 4) | ((u & 0x7f000000) >> 6) end -@aggressive_constprop function Char(u::UInt32) +@constprop :aggressive function Char(u::UInt32) u < 0x80 && return bitcast(Char, u << 24) u < 0x00200000 || throw_code_point_err(u) c = ((u << 0) & 0x0000003f) | ((u << 2) & 0x00003f00) | @@ -169,14 +169,14 @@ end bitcast(Char, c) end -@aggressive_constprop @noinline UInt32_cold(c::Char) = UInt32(c) -@aggressive_constprop function (T::Union{Type{Int8},Type{UInt8}})(c::Char) +@constprop :aggressive @noinline UInt32_cold(c::Char) = UInt32(c) +@constprop :aggressive function (T::Union{Type{Int8},Type{UInt8}})(c::Char) i = bitcast(Int32, c) i ≥ 0 ? ((i >>> 24) % T) : T(UInt32_cold(c)) end -@aggressive_constprop @noinline Char_cold(b::UInt32) = Char(b) -@aggressive_constprop function Char(b::Union{Int8,UInt8}) +@constprop :aggressive @noinline Char_cold(b::UInt32) = Char(b) +@constprop :aggressive function Char(b::Union{Int8,UInt8}) 0 ≤ b ≤ 0x7f ? bitcast(Char, (b % UInt32) << 24) : Char_cold(UInt32(b)) end diff --git a/base/deprecated.jl b/base/deprecated.jl index 92d07fadbaa77..b0a92c36df415 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -262,4 +262,18 @@ end # This function was marked as experimental and not exported. @deprecate catch_stack(task=current_task(); include_bt=true) current_exceptions(task; backtrace=include_bt) false +""" + @aggressive_constprop ex + @aggressive_constprop(ex) + +`@aggressive_constprop` requests more aggressive interprocedural constant +propagation for the annotated function. For a method where the return type +depends on the value of the arguments, this can yield improved inference results +at the cost of additional compile time. +""" +macro aggressive_constprop(ex) + depwarn("use `@constprop :aggressive ex` instead of `@aggressive_constprop ex`", :var"@aggressive_constprop") + esc(isa(ex, Expr) ? pushmeta!(ex, :aggressive_constprop) : ex) +end + # END 1.7 deprecations diff --git a/base/expr.jl b/base/expr.jl index 2bc59717fea47..69097b5d33be4 100644 --- a/base/expr.jl +++ b/base/expr.jl @@ -240,16 +240,25 @@ macro pure(ex) end """ - @aggressive_constprop ex - @aggressive_constprop(ex) + @constprop setting ex + @constprop(setting, ex) -`@aggressive_constprop` requests more aggressive interprocedural constant -propagation for the annotated function. For a method where the return type -depends on the value of the arguments, this can yield improved inference results -at the cost of additional compile time. +`@constprop` controls the mode of interprocedural constant propagation for the +annotated function. Only `:aggressive` is supported in 1.7: + +- `@constprop :aggressive ex`: apply constant propagation aggressively. + For a method where the return type depends on the value of the arguments, + this can yield improved inference results at the cost of additional compile time. + +`@constprop :none ex` is a no-op, but is allowed for compatibility with Julia 1.8. """ -macro aggressive_constprop(ex) - esc(isa(ex, Expr) ? pushmeta!(ex, :aggressive_constprop) : ex) +macro constprop(setting, ex) + if isa(setting, QuoteNode) + setting = setting.value + end + setting === :aggressive && return esc(isa(ex, Expr) ? pushmeta!(ex, :aggressive_constprop) : ex) + setting === :none && return esc(ex) + throw(ArgumentError("@constprop $setting not supported")) end """ diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index d4d0f6700c179..fe7a79b5aadef 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3171,15 +3171,18 @@ f_inf_error_bottom(x::Vector) = isempty(x) ? error(x[1]) : x # @aggressive_constprop @noinline g_nonaggressive(y, x) = Val{x}() -@noinline @Base.aggressive_constprop g_aggressive(y, x) = Val{x}() +@noinline @Base.constprop :aggressive g_aggressive(y, x) = Val{x}() +@noinline @Base.constprop :none g_nonaggressive2(y, x) = Val{x}() f_nonaggressive(x) = g_nonaggressive(x, 1) f_aggressive(x) = g_aggressive(x, 1) +f_nonaggressive2(x) = g_nonaggressive2(x, 1) # The first test just makes sure that improvements to the compiler don't # render the annotation effectless. @test Base.return_types(f_nonaggressive, Tuple{Int})[1] == Val @test Base.return_types(f_aggressive, Tuple{Int})[1] == Val{1} +@test Base.return_types(f_nonaggressive2, Tuple{Int})[1] == Val function splat_lotta_unions() a = Union{Tuple{Int},Tuple{String,Vararg{Int}},Tuple{Int,Vararg{Int}}}[(2,)][1] diff --git a/test/deprecation_exec.jl b/test/deprecation_exec.jl index 8d86626ead0dd..2cbf27470fd72 100644 --- a/test/deprecation_exec.jl +++ b/test/deprecation_exec.jl @@ -120,3 +120,15 @@ global_logger(prev_logger) end # END 0.7 deprecations + +# @aggressive_constprop +@noinline g_nonaggressive(y, x) = Val{x}() +@noinline @Base.aggressive_constprop g_aggressive(y, x) = Val{x}() + +f_nonaggressive(x) = g_nonaggressive(x, 1) +f_aggressive(x) = g_aggressive(x, 1) + +# The first test just makes sure that improvements to the compiler don't +# render the annotation effectless. +@test Base.return_types(f_nonaggressive, Tuple{Int})[1] == Val +@test Base.return_types(f_aggressive, Tuple{Int})[1] == Val{1} From fc712a37860bdb3e71bed1b42c5607efe7970e87 Mon Sep 17 00:00:00 2001 From: Ian Atol Date: Thu, 23 Sep 2021 03:45:12 -0700 Subject: [PATCH 21/88] Fix problem with union spliting during inlining, add regression test (#42347) The crash in #42264 showed up when attempting to record the new value for an SSA rename during unionsplit inlining. Such a crash would only happen when `compact.idx == 1`, which is an unusual condition, because it implies that no statement of the original function had yet been processed (which is odd, because the call being inlined must have been processed by this point). As it turns out, there is currently exactly one case where this happens. If the inliner sees an `_apply_iterate` (e.g. from splatting) of something that is not a Tuple or SimpleVector (thus requiring calls to `iterate` to expand the value during `apply`), and if inference was able to determine the total length of the resulting iteration, a special case early inliner, will expand out the splat into explicit iterate calls. E.g. a call like: %r = tuple((x::Pair)...) will be expanded out to %a = iterate(x::Pair) %b = getfield(%a, 1) %c = getfield(%a, 2) %d = iterate(x, %c) %e = getfield(%d, 1) %f = getfield(%d, 2) iterate(x, %f) %r = tuple(%b, %e) where the inserted `iterate` calls may themselves be inlined. These newly inserted calls are "pending nodes" during the actual inlining. Thus, if the original apply call was the first statement of the function, these nodes would be processed before processing the statements in the function themselves. In particular, this investigation also shows that `compact.idx`, which is the current location in the function being inlined into is the wrong value to use for SSA renaming. Rather, we need to use the SSA value of the just-inserted statement. In the absence of pending nodes, these are equivalent concepts, but not for pending nodes. Fortunately the IncrementalCompact iterator provides the old SSA value for just this reason and in fact, non-UnionSplit inlining was already correct here. Thus, to fix the issue, simply adjust union splitting to work the same way as a non-UnionSplit inline. In coming up with the test case, an additional complication is that we currently do not perform this optimization for any calls where the apply call itself was unionsplit. It is somewhat unusual (which explains why we haven't seen this much) for the apply to not be union-split, but for the subsequent `iterate` to require union-splitting. In the problem case, what happened is that for two out of the three union cases, the `iterate` calls themselves would error, causing the resulting info object to look like a non-unionsplit apply call, triggering this issue. Co-authored-by: Keno Fischer (cherry picked from commit b5f3a99630a24dfa88906a133069f91c5d39b894) --- base/compiler/ssair/inlining.jl | 6 ++---- test/compiler/inline.jl | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index fd984a845764b..a2e5a46787734 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -527,9 +527,7 @@ function ir_inline_unionsplit!(compact::IncrementalCompact, idx::Int, end # We're now in the join block. - compact.ssa_rename[compact.idx-1] = insert_node_here!(compact, - NewInstruction(pn, typ, line)) - nothing + return insert_node_here!(compact, NewInstruction(pn, typ, line)) end function batch_inline!(todo::Vector{Pair{Int, Any}}, ir::IRCode, linetable::Vector{LineInfoNode}, propagate_inbounds::Bool) @@ -589,7 +587,7 @@ function batch_inline!(todo::Vector{Pair{Int, Any}}, ir::IRCode, linetable::Vect if isa(item, InliningTodo) compact.ssa_rename[old_idx] = ir_inline_item!(compact, idx, argexprs, linetable, item, boundscheck, state.todo_bbs) elseif isa(item, UnionSplit) - ir_inline_unionsplit!(compact, idx, argexprs, linetable, item, boundscheck, state.todo_bbs) + compact.ssa_rename[old_idx] = ir_inline_unionsplit!(compact, idx, argexprs, linetable, item, boundscheck, state.todo_bbs) end compact[idx] = nothing refinish && finish_current_bb!(compact, 0) diff --git a/test/compiler/inline.jl b/test/compiler/inline.jl index eb1c3ddd2a963..475dc8b571442 100644 --- a/test/compiler/inline.jl +++ b/test/compiler/inline.jl @@ -384,3 +384,11 @@ f_oc_getfield(x) = (@opaque ()->x)() # Issue #41299 - inlining deletes error check in :> g41299(f::Tf, args::Vararg{Any,N}) where {Tf,N} = f(args...) @test_throws TypeError g41299(>:, 1, 2) + +# Issue #42264 - crash on certain union splits +let f(x) = (x...,) + # Test splatting with a Union of non-{Tuple, SimpleVector} types that require creating new `iterate` calls + # in inlining. For this particular case, we're relying on `iterate(::CaretesianIndex)` throwing an error, such + # the the original apply call is not union-split, but the inserted `iterate` call is. + @test code_typed(f, Tuple{Union{Int64, CartesianIndex{1}, CartesianIndex{3}}})[1][2] == Tuple{Int64} +end From cd462dc57f190da93ab1a0fb53a1f3942f71d60f Mon Sep 17 00:00:00 2001 From: Jeremiah <4462211+jeremiahpslewis@users.noreply.github.com> Date: Thu, 23 Sep 2021 13:32:07 +0200 Subject: [PATCH 22/88] [GMP] Patch for Apple Silicon (#42293) * [GMP] Patch for Apple Silicon (cherry picked from commit 764159c539cbfe04463bf09fd6d761187032e5f8) --- deps/checksums/gmp | 62 +++- deps/gmp.mk | 23 +- deps/patches/gmp-HG-changeset.patch | 520 ++++++++++++++++++++++++++++ stdlib/GMP_jll/Project.toml | 4 +- 4 files changed, 602 insertions(+), 7 deletions(-) create mode 100644 deps/patches/gmp-HG-changeset.patch diff --git a/deps/checksums/gmp b/deps/checksums/gmp index da510e3dc2388..6b95ca883ddf8 100644 --- a/deps/checksums/gmp +++ b/deps/checksums/gmp @@ -1,5 +1,3 @@ -gmp-6.2.1.tar.bz2/md5/28971fc21cf028042d4897f02fd355ea -gmp-6.2.1.tar.bz2/sha512/8904334a3bcc5c896ececabc75cda9dec642e401fb5397c4992c4fabea5e962c9ce8bd44e8e4233c34e55c8010cc28db0545f5f750cbdbb5f00af538dc763be9 GMP.v6.2.1+0.aarch64-apple-darwin.tar.gz/md5/e805c580078e4d6bcaeb6781cb6d56fa GMP.v6.2.1+0.aarch64-apple-darwin.tar.gz/sha512/62435e80f5fa0b67e2788c8bfc3681426add7a9b2853131bbebe890d1a2d9b54cebaea0860f6ddd0e93e1ae302baba39851d5f58a65acf0b2a9ea1226bb4eea4 GMP.v6.2.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/5384d6ba6fd408bc71c2781b643cd59a @@ -58,3 +56,63 @@ GMP.v6.2.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/1499a265b438cf5169286c1830eb573 GMP.v6.2.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/d2e6fe76abe0a0cb1a7445ea93cd5bd0bf9f729aec8df9c76d06a1f6f5e67cce442be69b66950eb33aa22cfda2e5a308f2bade64018a27bebfcb4b7a97e1d047 GMP.v6.2.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/fdb4187f617511d8eb19f67f8499a8d0 GMP.v6.2.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/bb6d8ead1c20cffebc2271461d3787cfad794fee2b32e23583af6521c0667ed9107805268a996d23d6edcab9fe653e542a210cab07252f7713af0c23feb76fb3 +GMP.v6.2.1+1.aarch64-apple-darwin.tar.gz/md5/03cb14ac16daabb4a77fe1c78e8e48a9 +GMP.v6.2.1+1.aarch64-apple-darwin.tar.gz/sha512/5b8f974a07f579272981f5ebe44191385a4ce95f58d434a3565ffa827a6d65824cbe4173736b7328630bbccfe6af4242195aec24de3f0aa687e2e32a18a97a5c +GMP.v6.2.1+1.aarch64-linux-gnu-cxx03.tar.gz/md5/0ce7d419a49f2f90033618bdda2588e7 +GMP.v6.2.1+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/16363dedaae116fa0d493182aeadb2ffa7f990f1813e4b47cae3cd61ca71f23b65267ea4e2c698d52bd78d61e12feaa73179d7b86ab6d6df01eeb7b6a9b27958 +GMP.v6.2.1+1.aarch64-linux-gnu-cxx11.tar.gz/md5/011f1cdc39b9e529b4b6ea80f4c33108 +GMP.v6.2.1+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/1ed2139580c5c78578f350ee83dbf9cd0120d9d36e1951438d757f5734cda7931600b3f83bfe0d0d806926636d6aea8048c6b64aa42a22e59310282c2428f417 +GMP.v6.2.1+1.aarch64-linux-musl-cxx03.tar.gz/md5/34f17083a1f142c284b707cc82407b00 +GMP.v6.2.1+1.aarch64-linux-musl-cxx03.tar.gz/sha512/dd32912c31a8422734c2e5d5a37001ac18f0e9de151982583d9dc185e5cc3e45076d737729345cca8e8eaf42993d4102353261a2de245e26a8a9cd86960a2fbf +GMP.v6.2.1+1.aarch64-linux-musl-cxx11.tar.gz/md5/9ba1b822f20f88a1e4c6e81dc8c4fdc1 +GMP.v6.2.1+1.aarch64-linux-musl-cxx11.tar.gz/sha512/d8a4ecd5c35022b9c912c3b4fabe3a4c31258d6a1bd38e4fea13a3da53206a29bfd90f4d602f6e3ee3ee271d84289d1ecdf45534adfabf7e657daef5b5cb0b21 +GMP.v6.2.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/23e28efa2579d636cb4c80036da5d4ea +GMP.v6.2.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/02c8023958fa616c1f944898e686510d449b743d053cfd42f526e9c4fe3ff3dd9de7309694b8537b4bb6dc978085339eb787983ec4ba32dc041448c912a8b982 +GMP.v6.2.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/bf2a2c4f81f6d04746cc528438f62639 +GMP.v6.2.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/1c152abeed24761c775e78a64835f8e61b28b16cbc29a6fde88fa4fdbf2a5782cd62697bd03a552d873995bda58b7bdc081c11ecd5e4badde2dea426e5218116 +GMP.v6.2.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/25cbceed2cf1bb12601fe285c342d6b0 +GMP.v6.2.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/37d8b21bf59c0c555f2b59d6dca4f486bf1725ae18a7fea9a2f31533c54ebb818b5ddb88ec8aa2b618e0ecad78973659abd1a9f095f64ef65067ab8ed08d7801 +GMP.v6.2.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/8ec72c769625a218c6951abed32b3684 +GMP.v6.2.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/4cb9ccb97859b0918002b649e1b5e74e1fc89a2daeec6f32d5a06ce0d84217f54d1ee788f472cebeefc73ef52284a3d5607efbed47058b438d2dcbcf9f384ed0 +GMP.v6.2.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/6f799d6516cc46af28eacf8409634825 +GMP.v6.2.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/541c1e03726584ddb672a83becdc9a99c68f5da9a7415750d582753b47774910bf25cee7fe21f5b5c2a80ff8ce87fc327abd45bf54d6cfe821cb202c81b67e43 +GMP.v6.2.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/17dba9ebcc1bf4637095a98a876375a8 +GMP.v6.2.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/648220e632618d23e8611e10fa4bb2e581ed4432e3fff77d0d7349a7585bffa65ae57bf1ce64c550bf6d2acc016f499c0bbbfed8088281445b9d4ecbbf9a64bc +GMP.v6.2.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/79c77b81cc16fd22ad4cef75af7aa220 +GMP.v6.2.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/0059ba54806ef0ca6621ddcd309a18922c4c7d9d9e214bc6870b6338a9449a472934cc27569402741d41a18dd53a896aae2f68b788f853fd4ea3db63035c8153 +GMP.v6.2.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/87b79bfc5c780e214863d0f0c1944da9 +GMP.v6.2.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/88dcabcf96d8f2dcc7968333a94adcb8e8a91615b67ca23edf75c3368a89ef60a8deff8e8532d0cd4d5dd5356343b753b0ae0bf88ce7e190639468bf8170939a +GMP.v6.2.1+1.i686-linux-gnu-cxx03.tar.gz/md5/61d39e42ab6fd5844e938605e357b336 +GMP.v6.2.1+1.i686-linux-gnu-cxx03.tar.gz/sha512/8e0d382adf6b45cbf613092cee524551a04096b0bc6fb8893701edae9c1928bda67b5522cae3ef954a882ff73b735190881ade37495d9d1a6db88ed6fbcdc6b1 +GMP.v6.2.1+1.i686-linux-gnu-cxx11.tar.gz/md5/b66b49054426adf3e1d3454a80010d97 +GMP.v6.2.1+1.i686-linux-gnu-cxx11.tar.gz/sha512/b28f22bbfbf796c4e959b1fa3433d46b4cf0dbd402c0497a6d4893c8030aa12fd038da4846d8bce02199f1da9b0158d78f2b4ff2636799ba139602775725ff6d +GMP.v6.2.1+1.i686-linux-musl-cxx03.tar.gz/md5/69ea3b3348813777a1682e41a117d7c3 +GMP.v6.2.1+1.i686-linux-musl-cxx03.tar.gz/sha512/048dd08b5891864e69504baf6328ef5423e0f8e31c5c6cfac552eb51b3ef943af83b7ac654c33e1a0cf061c5832e08eebb9c03dbda6532fbc24e160e99c2aae6 +GMP.v6.2.1+1.i686-linux-musl-cxx11.tar.gz/md5/e7c82091d29a3e5958442c9ec631ad78 +GMP.v6.2.1+1.i686-linux-musl-cxx11.tar.gz/sha512/8574f2e42e181a7bd1cf8aa8056a14d13efe555ee74b14e14aef1bdce7f26ce2afe41b4f85ee20de6823045d5ff38e4dbcebcc7042fff4288af1b7d296202d43 +GMP.v6.2.1+1.i686-w64-mingw32-cxx03.tar.gz/md5/dcef59aa056dcd56e6e36ad49174389f +GMP.v6.2.1+1.i686-w64-mingw32-cxx03.tar.gz/sha512/3cf3096c325ae2baea8b3c3aed4a26d649dc2bb3cf0d979809d9962521422ada3fdcdddbcfc52b27d43b473a1d3ed4a40368cdeb16cac4d32718c604dbc9f388 +GMP.v6.2.1+1.i686-w64-mingw32-cxx11.tar.gz/md5/b772a602b016e73dfc9a93908f51622b +GMP.v6.2.1+1.i686-w64-mingw32-cxx11.tar.gz/sha512/00e06591e2cc44100dca1a8897c72933bf4bd8c3c732daea99a9efa4d0a67f6a8820bf3e5d27583dfddc50d4cda656fa7462a2c453035d03657948f0051dc2fe +GMP.v6.2.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/b31c423855c4c5633b41301e3b424312 +GMP.v6.2.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/2565176e2bbcb9deab25a91736e8b6de01e7dca619ed1fcc98cebcaaa144eb03f89f4f6d5989aa8454b0d1c7266d1ace690e6deef67c0cf5c3fc1c2ab4d41b43 +GMP.v6.2.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/1ed2494342b5713308f6ffed5fe3863d +GMP.v6.2.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/c600802c81c77247a24a50ec0695f742177c8c9f090b4c345f9b0cd065b35183f49592a764cdb7b1b6d5ee3722e7dd26672d85db963d1e490731545a36d1e581 +GMP.v6.2.1+1.x86_64-apple-darwin.tar.gz/md5/51e00a2b55e9f81eb62abe23bb5f6fd9 +GMP.v6.2.1+1.x86_64-apple-darwin.tar.gz/sha512/91731427afd8df54b54d87b93006190a8b959438dc591eb5fa44724056911b8bd5588b2b1e70e9da3d8d6e9ce5aaa6fea66b0706f636cb56b3c860e8f3c0550a +GMP.v6.2.1+1.x86_64-linux-gnu-cxx03.tar.gz/md5/3f3a6f15e4e8499470bbe69a9ea885c1 +GMP.v6.2.1+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/2659344ab097cd9542a5946c127a43af6fad05aa1445d69a4978d1a6d9a9f0e0502a5a60c6ca88acccb86d038dd10f2a72a7c2d4dd7ad5383c7d687e9720cc88 +GMP.v6.2.1+1.x86_64-linux-gnu-cxx11.tar.gz/md5/15ee858d8e1f07f18df8a893634d859e +GMP.v6.2.1+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/9d8ffa570eb22a5a908679e06af4dd0ce8c06cf97ff9fd766baeca352a99bcc54b4b71b9c52829ba80043a688f2ed6a33b0302072518f2b16416235d5295ea00 +GMP.v6.2.1+1.x86_64-linux-musl-cxx03.tar.gz/md5/79078a236575994696e7328e34326243 +GMP.v6.2.1+1.x86_64-linux-musl-cxx03.tar.gz/sha512/d4b77a4056a2b0dcb6f789381fff720ab7481cc7edb4672756cb2057ed6475abeb6ea414e6cec3e2450ef7302b647d7d2fc2d9f7de52feddd7767548392e84bb +GMP.v6.2.1+1.x86_64-linux-musl-cxx11.tar.gz/md5/94f822c7521f83652d87fd5f1ad8bb19 +GMP.v6.2.1+1.x86_64-linux-musl-cxx11.tar.gz/sha512/fa4f70f81524d47b65d5cf3ff5abe38a691f09e3297c62f0db2512483702b9af33bc4a3c15f6f1465d6dce4eeb19f665f29872e6dd7caea0806f4c7fd32c2c5a +GMP.v6.2.1+1.x86_64-unknown-freebsd.tar.gz/md5/cdb93a733763e8a4fc29652fda8c8b13 +GMP.v6.2.1+1.x86_64-unknown-freebsd.tar.gz/sha512/ec529f57eb167bfcb367310b375a3cded007cbc386cab9b09faa9fe8f37a443302c674814ada6c82125ad0ce4aebecb75bb61633a21e7a3a00fc928fbe05cb4f +GMP.v6.2.1+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/8b5be9da6a0a293e14ab1d589a622b98 +GMP.v6.2.1+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/73287b8390cac2ce8afc4565c5218ac739ed8a23c56754f4667570039f022b777284aee25d7857a94ff46fd502ac0fabe46f509a5f870b1aa074f6ed1278dcf1 +GMP.v6.2.1+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/11bcbfc3b65b19d73c3abf92ec46cb6a +GMP.v6.2.1+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/1dd9a6fe5c4991483a2d46420cd892271d37d9d23c409ed782b7736ab1942cd6c42360efbc308b5684bd5f991c7a96e8d375f3e855dc537bb3089e3402eed110 +gmp-6.2.1.tar.bz2/md5/28971fc21cf028042d4897f02fd355ea +gmp-6.2.1.tar.bz2/sha512/8904334a3bcc5c896ececabc75cda9dec642e401fb5397c4992c4fabea5e962c9ce8bd44e8e4233c34e55c8010cc28db0545f5f750cbdbb5f00af538dc763be9 diff --git a/deps/gmp.mk b/deps/gmp.mk index 9093817b86829..1d7d85556a2af 100644 --- a/deps/gmp.mk +++ b/deps/gmp.mk @@ -22,11 +22,28 @@ $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted: $(SRCCACHE)/gmp-$(GMP_VER).tar.bz2 checksum-gmp: $(SRCCACHE)/gmp-$(GMP_VER).tar.bz2 $(JLCHECKSUM) $< -$(SRCCACHE)/gmp-$(GMP_VER)/build-patched: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted - cd $(dir $@) && patch -p1 < $(SRCDIR)/patches/gmp-exception.patch - cd $(dir $@) && patch -p1 < $(SRCDIR)/patches/gmp_alloc_overflow_func.patch +# Apply fix to avoid using Apple ARM reserved register X18 +# Necessary for version 6.2.1, remove after next gmp release +$(SRCCACHE)/gmp-$(GMP_VER)/gmp-HG-changeset.patch-applied: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted + cd $(dir $@) && \ + patch -p1 < $(SRCDIR)/patches/gmp-HG-changeset.patch + echo 1 > $@ + +$(SRCCACHE)/gmp-$(GMP_VER)/gmp-exception.patch-applied: $(SRCCACHE)/gmp-$(GMP_VER)/gmp-HG-changeset.patch-applied + cd $(dir $@) && \ + patch -p1 < $(SRCDIR)/patches/gmp-exception.patch echo 1 > $@ +$(SRCCACHE)/gmp-$(GMP_VER)/gmp_alloc_overflow_func.patch-applied: $(SRCCACHE)/gmp-$(GMP_VER)/gmp-exception.patch-applied + cd $(dir $@) && \ + patch -p1 < $(SRCDIR)/patches/gmp_alloc_overflow_func.patch + echo 1 > $@ + +$(SRCCACHE)/gmp-$(GMP_VER)/build-patched: + $(SRCCACHE)/gmp-$(GMP_VER)/gmp-HG-changeset.patch-applied + $(SRCCACHE)/gmp-$(GMP_VER)/gmp-exception.patch-applied + $(SRCCACHE)/gmp-$(GMP_VER)/gmp_alloc_overflow_func.patch-applied + $(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted $(SRCCACHE)/gmp-$(GMP_VER)/build-patched mkdir -p $(dir $@) cd $(dir $@) && \ diff --git a/deps/patches/gmp-HG-changeset.patch b/deps/patches/gmp-HG-changeset.patch new file mode 100644 index 0000000000000..7437fb6f2f748 --- /dev/null +++ b/deps/patches/gmp-HG-changeset.patch @@ -0,0 +1,520 @@ + +# HG changeset patch +# User Torbjorn Granlund +# Date 1606685500 -3600 +# Node ID 5f32dbc41afc1f8cd77af1614f0caeb24deb7d7b +# Parent 94c84d919f83ba963ed1809f8e80c7bef32db55c +Avoid the x18 register since it is reserved on Darwin. + +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/aors_n.asm +--- a/mpn/arm64/aors_n.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/aors_n.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -68,7 +68,7 @@ + EPILOGUE() + PROLOGUE(func_n) + CLRCY +-L(ent): lsr x18, n, #2 ++L(ent): lsr x17, n, #2 + tbz n, #0, L(bx0) + + L(bx1): ldr x7, [up] +@@ -77,7 +77,7 @@ + str x13, [rp],#8 + tbnz n, #1, L(b11) + +-L(b01): cbz x18, L(ret) ++L(b01): cbz x17, L(ret) + ldp x4, x5, [up,#8] + ldp x8, x9, [vp,#8] + sub up, up, #8 +@@ -88,7 +88,7 @@ + ldp x10, x11, [vp,#8] + add up, up, #8 + add vp, vp, #8 +- cbz x18, L(end) ++ cbz x17, L(end) + b L(top) + + L(bx0): tbnz n, #1, L(b10) +@@ -101,7 +101,7 @@ + + L(b10): ldp x6, x7, [up] + ldp x10, x11, [vp] +- cbz x18, L(end) ++ cbz x17, L(end) + + ALIGN(16) + L(top): ldp x4, x5, [up,#16] +@@ -114,8 +114,8 @@ + ADDSUBC x12, x4, x8 + ADDSUBC x13, x5, x9 + stp x12, x13, [rp],#16 +- sub x18, x18, #1 +- cbnz x18, L(top) ++ sub x17, x17, #1 ++ cbnz x17, L(top) + + L(end): ADDSUBC x12, x6, x10 + ADDSUBC x13, x7, x11 +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/aorsmul_1.asm +--- a/mpn/arm64/aorsmul_1.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/aorsmul_1.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -32,10 +32,15 @@ + + include(`../config.m4') + +-C cycles/limb +-C Cortex-A53 9.3-9.8 +-C Cortex-A57 7.0 +-C X-Gene 5.0 ++C addmul_1 submul_1 ++C cycles/limb cycles/limb ++C Cortex-A53 9.3-9.8 9.3-9.8 ++C Cortex-A55 9.0-9.5 9.3-9.8 ++C Cortex-A57 7 7 ++C Cortex-A72 ++C Cortex-A73 6 6 ++C X-Gene 5 5 ++C Apple M1 1.75 1.75 + + C NOTES + C * It is possible to keep the carry chain alive between the addition blocks +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/aorsorrlshC_n.asm +--- a/mpn/arm64/aorsorrlshC_n.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/aorsorrlshC_n.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -65,14 +65,14 @@ + + ASM_START() + PROLOGUE(func_n) +- lsr x18, n, #2 ++ lsr x6, n, #2 + tbz n, #0, L(bx0) + + L(bx1): ldr x5, [up] + tbnz n, #1, L(b11) + + L(b01): ldr x11, [vp] +- cbz x18, L(1) ++ cbz x6, L(1) + ldp x8, x9, [vp,#8] + lsl x13, x11, #LSH + ADDSUB( x15, x13, x5) +@@ -94,7 +94,7 @@ + ADDSUB( x17, x13, x5) + str x17, [rp],#8 + sub up, up, #8 +- cbz x18, L(end) ++ cbz x6, L(end) + b L(top) + + L(bx0): tbnz n, #1, L(b10) +@@ -107,7 +107,7 @@ + L(b10): CLRRCY( x9) + ldp x10, x11, [vp] + sub up, up, #16 +- cbz x18, L(end) ++ cbz x6, L(end) + + ALIGN(16) + L(top): ldp x4, x5, [up,#16] +@@ -124,8 +124,8 @@ + ADDSUBC(x16, x12, x4) + ADDSUBC(x17, x13, x5) + stp x16, x17, [rp],#16 +- sub x18, x18, #1 +- cbnz x18, L(top) ++ sub x6, x6, #1 ++ cbnz x6, L(top) + + L(end): ldp x4, x5, [up,#16] + extr x12, x10, x9, #RSH +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/cnd_aors_n.asm +--- a/mpn/arm64/cnd_aors_n.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/cnd_aors_n.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -65,7 +65,7 @@ + + CLRCY + +- lsr x18, n, #2 ++ lsr x17, n, #2 + tbz n, #0, L(bx0) + + L(bx1): ldr x13, [vp] +@@ -75,7 +75,7 @@ + str x9, [rp] + tbnz n, #1, L(b11) + +-L(b01): cbz x18, L(rt) ++L(b01): cbz x17, L(rt) + ldp x12, x13, [vp,#8] + ldp x10, x11, [up,#8] + sub up, up, #8 +@@ -86,7 +86,7 @@ + L(b11): ldp x12, x13, [vp,#8]! + ldp x10, x11, [up,#8]! + sub rp, rp, #8 +- cbz x18, L(end) ++ cbz x17, L(end) + b L(top) + + L(bx0): ldp x12, x13, [vp] +@@ -99,7 +99,7 @@ + b L(mid) + + L(b10): sub rp, rp, #16 +- cbz x18, L(end) ++ cbz x17, L(end) + + ALIGN(16) + L(top): bic x6, x12, cnd +@@ -116,8 +116,8 @@ + ADDSUBC x9, x11, x7 + ldp x10, x11, [up,#32]! + stp x8, x9, [rp,#32]! +- sub x18, x18, #1 +- cbnz x18, L(top) ++ sub x17, x17, #1 ++ cbnz x17, L(top) + + L(end): bic x6, x12, cnd + bic x7, x13, cnd +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/logops_n.asm +--- a/mpn/arm64/logops_n.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/logops_n.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -78,7 +78,7 @@ + + ASM_START() + PROLOGUE(func) +- lsr x18, n, #2 ++ lsr x17, n, #2 + tbz n, #0, L(bx0) + + L(bx1): ldr x7, [up] +@@ -88,7 +88,7 @@ + str x15, [rp],#8 + tbnz n, #1, L(b11) + +-L(b01): cbz x18, L(ret) ++L(b01): cbz x17, L(ret) + ldp x4, x5, [up,#8] + ldp x8, x9, [vp,#8] + sub up, up, #8 +@@ -99,7 +99,7 @@ + ldp x10, x11, [vp,#8] + add up, up, #8 + add vp, vp, #8 +- cbz x18, L(end) ++ cbz x17, L(end) + b L(top) + + L(bx0): tbnz n, #1, L(b10) +@@ -110,7 +110,7 @@ + + L(b10): ldp x6, x7, [up] + ldp x10, x11, [vp] +- cbz x18, L(end) ++ cbz x17, L(end) + + ALIGN(16) + L(top): ldp x4, x5, [up,#16] +@@ -127,8 +127,8 @@ + POSTOP( x12) + POSTOP( x13) + stp x12, x13, [rp],#16 +- sub x18, x18, #1 +- cbnz x18, L(top) ++ sub x17, x17, #1 ++ cbnz x17, L(top) + + L(end): LOGOP( x12, x6, x10) + LOGOP( x13, x7, x11) +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/lshift.asm +--- a/mpn/arm64/lshift.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/lshift.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -61,7 +61,7 @@ + add rp, rp_arg, n, lsl #3 + add up, up, n, lsl #3 + sub tnc, xzr, cnt +- lsr x18, n, #2 ++ lsr x17, n, #2 + tbz n, #0, L(bx0) + + L(bx1): ldr x4, [up,#-8] +@@ -69,7 +69,7 @@ + + L(b01): NSHIFT x0, x4, tnc + PSHIFT x2, x4, cnt +- cbnz x18, L(gt1) ++ cbnz x17, L(gt1) + str x2, [rp,#-8] + ret + L(gt1): ldp x4, x5, [up,#-24] +@@ -89,7 +89,7 @@ + PSHIFT x13, x5, cnt + NSHIFT x10, x4, tnc + PSHIFT x2, x4, cnt +- cbnz x18, L(gt2) ++ cbnz x17, L(gt2) + orr x10, x10, x13 + stp x2, x10, [rp,#-16] + ret +@@ -123,11 +123,11 @@ + orr x11, x12, x2 + stp x10, x11, [rp,#-32]! + PSHIFT x2, x4, cnt +-L(lo0): sub x18, x18, #1 ++L(lo0): sub x17, x17, #1 + L(lo3): NSHIFT x10, x6, tnc + PSHIFT x13, x7, cnt + NSHIFT x12, x7, tnc +- cbnz x18, L(top) ++ cbnz x17, L(top) + + L(end): orr x10, x10, x13 + orr x11, x12, x2 +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/lshiftc.asm +--- a/mpn/arm64/lshiftc.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/lshiftc.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -61,7 +61,7 @@ + add rp, rp_arg, n, lsl #3 + add up, up, n, lsl #3 + sub tnc, xzr, cnt +- lsr x18, n, #2 ++ lsr x17, n, #2 + tbz n, #0, L(bx0) + + L(bx1): ldr x4, [up,#-8] +@@ -69,7 +69,7 @@ + + L(b01): NSHIFT x0, x4, tnc + PSHIFT x2, x4, cnt +- cbnz x18, L(gt1) ++ cbnz x17, L(gt1) + mvn x2, x2 + str x2, [rp,#-8] + ret +@@ -90,7 +90,7 @@ + PSHIFT x13, x5, cnt + NSHIFT x10, x4, tnc + PSHIFT x2, x4, cnt +- cbnz x18, L(gt2) ++ cbnz x17, L(gt2) + eon x10, x10, x13 + mvn x2, x2 + stp x2, x10, [rp,#-16] +@@ -125,11 +125,11 @@ + eon x11, x12, x2 + stp x10, x11, [rp,#-32]! + PSHIFT x2, x4, cnt +-L(lo0): sub x18, x18, #1 ++L(lo0): sub x17, x17, #1 + L(lo3): NSHIFT x10, x6, tnc + PSHIFT x13, x7, cnt + NSHIFT x12, x7, tnc +- cbnz x18, L(top) ++ cbnz x17, L(top) + + L(end): eon x10, x10, x13 + eon x11, x12, x2 +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/mul_1.asm +--- a/mpn/arm64/mul_1.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/mul_1.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -56,7 +56,7 @@ + + PROLOGUE(mpn_mul_1) + adds x4, xzr, xzr C clear register and cy flag +-L(com): lsr x18, n, #2 ++L(com): lsr x17, n, #2 + tbnz n, #0, L(bx1) + + L(bx0): mov x11, x4 +@@ -65,7 +65,7 @@ + L(b10): ldp x4, x5, [up] + mul x8, x4, v0 + umulh x10, x4, v0 +- cbz x18, L(2) ++ cbz x17, L(2) + ldp x6, x7, [up,#16]! + mul x9, x5, v0 + b L(mid)-8 +@@ -80,7 +80,7 @@ + str x9, [rp],#8 + tbnz n, #1, L(b10) + +-L(b01): cbz x18, L(1) ++L(b01): cbz x17, L(1) + + L(b00): ldp x6, x7, [up] + mul x8, x6, v0 +@@ -90,8 +90,8 @@ + adcs x12, x8, x11 + umulh x11, x7, v0 + add rp, rp, #16 +- sub x18, x18, #1 +- cbz x18, L(end) ++ sub x17, x17, #1 ++ cbz x17, L(end) + + ALIGN(16) + L(top): mul x8, x4, v0 +@@ -110,8 +110,8 @@ + stp x12, x13, [rp],#32 + adcs x12, x8, x11 + umulh x11, x7, v0 +- sub x18, x18, #1 +- cbnz x18, L(top) ++ sub x17, x17, #1 ++ cbnz x17, L(top) + + L(end): mul x8, x4, v0 + adcs x13, x9, x10 +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/rsh1aors_n.asm +--- a/mpn/arm64/rsh1aors_n.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/rsh1aors_n.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -59,7 +59,7 @@ + + ASM_START() + PROLOGUE(func_n) +- lsr x18, n, #2 ++ lsr x6, n, #2 + + tbz n, #0, L(bx0) + +@@ -69,7 +69,7 @@ + + L(b01): ADDSUB x13, x5, x9 + and x10, x13, #1 +- cbz x18, L(1) ++ cbz x6, L(1) + ldp x4, x5, [up],#48 + ldp x8, x9, [vp],#48 + ADDSUBC x14, x4, x8 +@@ -80,8 +80,8 @@ + ADDSUBC x12, x4, x8 + ADDSUBC x13, x5, x9 + str x17, [rp], #24 +- sub x18, x18, #1 +- cbz x18, L(end) ++ sub x6, x6, #1 ++ cbz x6, L(end) + b L(top) + + L(1): cset x14, COND +@@ -97,7 +97,7 @@ + ldp x8, x9, [vp],#32 + ADDSUBC x12, x4, x8 + ADDSUBC x13, x5, x9 +- cbz x18, L(3) ++ cbz x6, L(3) + ldp x4, x5, [up,#-16] + ldp x8, x9, [vp,#-16] + extr x17, x12, x15, #1 +@@ -117,7 +117,7 @@ + ADDSUB x12, x4, x8 + ADDSUBC x13, x5, x9 + and x10, x12, #1 +- cbz x18, L(2) ++ cbz x6, L(2) + ldp x4, x5, [up,#-16] + ldp x8, x9, [vp,#-16] + ADDSUBC x14, x4, x8 +@@ -134,8 +134,8 @@ + ADDSUBC x12, x4, x8 + ADDSUBC x13, x5, x9 + add rp, rp, #16 +- sub x18, x18, #1 +- cbz x18, L(end) ++ sub x6, x6, #1 ++ cbz x6, L(end) + + ALIGN(16) + L(top): ldp x4, x5, [up,#-16] +@@ -152,8 +152,8 @@ + ADDSUBC x12, x4, x8 + ADDSUBC x13, x5, x9 + stp x16, x17, [rp],#32 +- sub x18, x18, #1 +- cbnz x18, L(top) ++ sub x6, x6, #1 ++ cbnz x6, L(top) + + L(end): extr x16, x15, x14, #1 + extr x17, x12, x15, #1 +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/rshift.asm +--- a/mpn/arm64/rshift.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/rshift.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -60,7 +60,7 @@ + PROLOGUE(mpn_rshift) + mov rp, rp_arg + sub tnc, xzr, cnt +- lsr x18, n, #2 ++ lsr x17, n, #2 + tbz n, #0, L(bx0) + + L(bx1): ldr x5, [up] +@@ -68,7 +68,7 @@ + + L(b01): NSHIFT x0, x5, tnc + PSHIFT x2, x5, cnt +- cbnz x18, L(gt1) ++ cbnz x17, L(gt1) + str x2, [rp] + ret + L(gt1): ldp x4, x5, [up,#8] +@@ -89,7 +89,7 @@ + PSHIFT x13, x4, cnt + NSHIFT x10, x5, tnc + PSHIFT x2, x5, cnt +- cbnz x18, L(gt2) ++ cbnz x17, L(gt2) + orr x10, x10, x13 + stp x10, x2, [rp] + ret +@@ -121,11 +121,11 @@ + orr x11, x12, x2 + stp x11, x10, [rp,#32]! + PSHIFT x2, x5, cnt +-L(lo0): sub x18, x18, #1 ++L(lo0): sub x17, x17, #1 + L(lo3): NSHIFT x10, x7, tnc + NSHIFT x12, x6, tnc + PSHIFT x13, x6, cnt +- cbnz x18, L(top) ++ cbnz x17, L(top) + + L(end): orr x10, x10, x13 + orr x11, x12, x2 +diff -r 94c84d919f83 -r 5f32dbc41afc mpn/arm64/sqr_diag_addlsh1.asm +--- a/mpn/arm64/sqr_diag_addlsh1.asm Sat Nov 28 23:38:32 2020 +0100 ++++ b/mpn/arm64/sqr_diag_addlsh1.asm Sun Nov 29 22:31:40 2020 +0100 +@@ -47,7 +47,7 @@ + ASM_START() + PROLOGUE(mpn_sqr_diag_addlsh1) + ldr x15, [up],#8 +- lsr x18, n, #1 ++ lsr x14, n, #1 + tbz n, #0, L(bx0) + + L(bx1): adds x7, xzr, xzr +@@ -62,8 +62,8 @@ + ldr x17, [up],#16 + ldp x6, x7, [tp],#32 + umulh x11, x15, x15 +- sub x18, x18, #1 +- cbz x18, L(end) ++ sub x14, x14, #1 ++ cbz x14, L(end) + + ALIGN(16) + L(top): extr x9, x6, x5, #63 +@@ -84,8 +84,8 @@ + extr x8, x5, x4, #63 + stp x12, x13, [rp],#16 + adcs x12, x8, x10 +- sub x18, x18, #1 +- cbnz x18, L(top) ++ sub x14, x14, #1 ++ cbnz x14, L(top) + + L(end): extr x9, x6, x5, #63 + mul x10, x17, x17 diff --git a/stdlib/GMP_jll/Project.toml b/stdlib/GMP_jll/Project.toml index 2f66e4eb5aaba..39f933aeb9c32 100644 --- a/stdlib/GMP_jll/Project.toml +++ b/stdlib/GMP_jll/Project.toml @@ -1,10 +1,10 @@ name = "GMP_jll" uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+0" +version = "6.2.1+1" [deps] -Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [compat] julia = "1.6" From 8ebf8fde136b16eef7697d2aa82c4d2c524870c7 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Thu, 23 Sep 2021 07:29:19 -0400 Subject: [PATCH 23/88] Fix bug in `@time` compilation time measurement, using tryfinally macro. (#41923) Use a tryfinally macro to ensure compile timer is closed, while maintaining scope. This fixes a bug where an exception thrown _anywhere_, on any Task on any thread, completely disables the compilation time measurement for any concurrently executing `@time` blocks, without warning the user about it. Here are some examples of the current, broken behavior: - Throwing (and catching) an exception disables compilation time measurement, even though the exception didn't escape, without warning the user - note 0 compilation time reported: ```julia julia> @time begin # The following exception disables compilation time measurement try throw("ha HAH!") catch end @eval module M ; f(x) = 2*x ; end @eval M.f(2) end 0.003950 seconds (2.17 k allocations: 170.093 KiB) 4 ``` - Throwing an exception while the first task is sleeping disables compilation time measurement, so this ends up incorrectly reporting 0 compilation time: ```julia julia> f(n) = begin # while we're sleeping, someone throws an exception somewhere else :'( sleep(n) @eval module M ; f(x) = 2*x ; end @eval M.f(2) end f (generic function with 1 method) julia> f(0) # warmup WARNING: replacing module M. 4 julia> @async @time f(5) Task (runnable) @0x000000010f2c0780 julia> throw("oh no sad") ERROR: "oh no sad" Stacktrace: [1] top-level scope @ REPL[9]:1 WARNING: replacing module M. 5.008401 seconds (1.92 k allocations: 120.515 KiB) ``` After this commit, both of those examples correctly report their compilation time. (cherry picked from commit 08e100b6081aedf773a7d54296eb603df6e2df33) --- base/timing.jl | 24 ++++++++++++++++++------ src/task.c | 6 ------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/base/timing.jl b/base/timing.jl index 45a27e3378977..41ccc683c60fe 100644 --- a/base/timing.jl +++ b/base/timing.jl @@ -164,6 +164,16 @@ function timev_print(elapsedtime, diff::GC_Diff, compile_time) padded_nonzero_print(diff.full_sweep, "full collections") end +# Like a try-finally block, except without introducing the try scope +# NOTE: This is deprecated and should not be used from user logic. A proper solution to +# this problem will be introduced in https://github.com/JuliaLang/julia/pull/39217 +macro __tryfinally(ex, fin) + Expr(:tryfinally, + :($(esc(ex))), + :($(esc(fin))) + ) +end + """ @time @@ -207,9 +217,10 @@ macro time(ex) local stats = gc_num() local elapsedtime = time_ns() local compile_elapsedtime = cumulative_compile_time_ns_before() - local val = $(esc(ex)) - compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime - elapsedtime = time_ns() - elapsedtime + local val = @__tryfinally($(esc(ex)), + (elapsedtime = time_ns() - elapsedtime; + compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime) + ) local diff = GC_Diff(gc_num(), stats) time_print(elapsedtime, diff.allocd, diff.total_time, gc_alloc_count(diff), compile_elapsedtime, true) val @@ -253,9 +264,10 @@ macro timev(ex) local stats = gc_num() local elapsedtime = time_ns() local compile_elapsedtime = cumulative_compile_time_ns_before() - local val = $(esc(ex)) - compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime - elapsedtime = time_ns() - elapsedtime + local val = @__tryfinally($(esc(ex)), + (elapsedtime = time_ns() - elapsedtime; + compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime) + ) local diff = GC_Diff(gc_num(), stats) timev_print(elapsedtime, diff, compile_elapsedtime) val diff --git a/src/task.c b/src/task.c index 789e269114f90..677287577f0b5 100644 --- a/src/task.c +++ b/src/task.c @@ -559,12 +559,6 @@ static void JL_NORETURN throw_internal(jl_task_t *ct, jl_value_t *exception JL_M assert(!jl_get_safe_restore()); jl_ptls_t ptls = ct->ptls; ptls->io_wait = 0; - // @time needs its compile timer disabled on error, - // and cannot use a try-finally as it would break scope for assignments - // We blindly disable compilation time tracking here, for all running Tasks, even though - // it may cause some incorrect measurements. This is a known bug, and is being tracked - // here: https://github.com/JuliaLang/julia/pull/39138 - jl_atomic_store_relaxed(&jl_measure_compile_time_enabled, 0); JL_GC_PUSH1(&exception); jl_gc_unsafe_enter(ptls); if (exception) { From b97fde6fc8f3be93a032754326048b58953fdc89 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 23 Sep 2021 12:09:11 -0400 Subject: [PATCH 24/88] add keepat! for in-place logical filtering (#42351) Co-authored-by: Jameson Nash Co-authored-by: MasonProtter (cherry picked from commit b9fba13bfdf0ad1080c69780dc8d27c1ee1e79b0) --- base/abstractarray.jl | 39 +++++++++++++++-------------------- base/array.jl | 48 +++++++++++++++++++++++++++++++++++++++++++ base/bitarray.jl | 3 +++ test/arrayops.jl | 20 ++++++++++++++++++ 4 files changed, 88 insertions(+), 22 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index f622b07d56e44..2a19b60c73e23 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -3040,29 +3040,9 @@ end ## keepat! ## -""" - keepat!(a::AbstractVector, inds) - -Remove the items at all the indices which are not given by `inds`, -and return the modified `a`. -Items which are kept are shifted to fill the resulting gaps. - -`inds` must be an iterator of sorted and unique integer indices. -See also [`deleteat!`](@ref). +# NOTE: since these use `@inbounds`, they are actually only intended for Vector and BitVector -!!! compat "Julia 1.7" - This function is available as of Julia 1.7. - -# Examples -```jldoctest -julia> keepat!([6, 5, 4, 3, 2, 1], 1:2:5) -3-element Vector{Int64}: - 6 - 4 - 2 -``` -""" -function keepat!(a::AbstractVector, inds) +function _keepat!(a::AbstractVector, inds) local prev i = firstindex(a) for k in inds @@ -3079,3 +3059,18 @@ function keepat!(a::AbstractVector, inds) deleteat!(a, i:lastindex(a)) return a end + +function _keepat!(a::AbstractVector, m::AbstractVector{Bool}) + length(m) == length(a) || throw(BoundsError(a, m)) + j = firstindex(a) + for i in eachindex(a, m) + @inbounds begin + if m[i] + i == j || (a[j] = a[i]) + j = nextind(a, j) + end + end + end + deleteat!(a, j:lastindex(a)) + return a +end diff --git a/base/array.jl b/base/array.jl index c028d054382b4..fdcef34586da5 100644 --- a/base/array.jl +++ b/base/array.jl @@ -2528,6 +2528,54 @@ function filter!(f, a::AbstractVector) return a end +""" + keepat!(a::Vector, inds) + +Remove the items at all the indices which are not given by `inds`, +and return the modified `a`. +Items which are kept are shifted to fill the resulting gaps. + +`inds` must be an iterator of sorted and unique integer indices. +See also [`deleteat!`](@ref). + +!!! compat "Julia 1.7" + This function is available as of Julia 1.7. + +# Examples +```jldoctest +julia> keepat!([6, 5, 4, 3, 2, 1], 1:2:5) +3-element Vector{Int64}: + 6 + 4 + 2 +``` +""" +keepat!(a::Vector, inds) = _keepat!(a, inds) + +""" + keepat!(a::Vector, m::AbstractVector{Bool}) + +The in-place version of logical indexing `a = a[m]`. That is, `keepat!(a, m)` on +vectors of equal length `a` and `m` will remove all elements from `a` for which +`m` at the corresponding index is `false`. + +# Examples +```jldoctest +julia> a = [:a, :b, :c]; + +julia> keepat!(a, [true, false, true]) +2-element Vector{Symbol}: + :a + :c + +julia> a +2-element Vector{Symbol}: + :a + :c +``` +""" +keepat!(a::Vector, m::AbstractVector{Bool}) = _keepat!(a, m) + # set-like operators for vectors # These are moderately efficient, preserve order, and remove dupes. diff --git a/base/bitarray.jl b/base/bitarray.jl index 1db84cad37a1c..f451ca93e4373 100644 --- a/base/bitarray.jl +++ b/base/bitarray.jl @@ -1019,6 +1019,9 @@ function deleteat!(B::BitVector, inds) return B end +keepat!(B::BitVector, inds) = _keepat!(B, inds) +keepat!(B::BitVector, inds::AbstractVector{Bool}) = _keepat!(B, inds) + function splice!(B::BitVector, i::Integer) i = Int(i) n = length(B) diff --git a/test/arrayops.jl b/test/arrayops.jl index 3659f8817416a..d32ba840dabc1 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -1452,6 +1452,26 @@ end @test isempty(eoa) end +@testset "logical keepat!" begin + # Vector + a = Vector(1:10) + keepat!(a, [falses(5); trues(5)]) + @test a == 6:10 + @test_throws BoundsError keepat!(a, trues(1)) + @test_throws BoundsError keepat!(a, trues(11)) + + # BitVector + ba = rand(10) .> 0.5 + @test isa(ba, BitArray) + keepat!(ba, ba) + @test all(ba) + + # empty array + ea = [] + keepat!(ea, Bool[]) + @test isempty(ea) +end + @testset "deleteat!" begin for idx in Any[1, 2, 5, 9, 10, 1:0, 2:1, 1:1, 2:2, 1:2, 2:4, 9:8, 10:9, 9:9, 10:10, 8:9, 9:10, 6:9, 7:10] From 00fbab5ad8ec3d6ae0b6d56d7ba3881bdb928dc1 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 23 Sep 2021 16:22:29 -0400 Subject: [PATCH 25/88] [Distributed] make finalizer messages threadsafe (#42240) (cherry picked from commit eb1d6b3c7f8c7546148011e45716c5186229247b) --- stdlib/Distributed/src/cluster.jl | 11 ++++-- stdlib/Distributed/src/messages.jl | 39 ++++++++++++-------- stdlib/Distributed/src/remotecall.jl | 55 ++++++++++++++++++++++------ 3 files changed, 75 insertions(+), 30 deletions(-) diff --git a/stdlib/Distributed/src/cluster.jl b/stdlib/Distributed/src/cluster.jl index ebe4cac0f3bbe..cea8258f36939 100644 --- a/stdlib/Distributed/src/cluster.jl +++ b/stdlib/Distributed/src/cluster.jl @@ -95,9 +95,10 @@ end @enum WorkerState W_CREATED W_CONNECTED W_TERMINATING W_TERMINATED mutable struct Worker id::Int - del_msgs::Array{Any,1} + msg_lock::Threads.ReentrantLock # Lock for del_msgs, add_msgs, and gcflag + del_msgs::Array{Any,1} # XXX: Could del_msgs and add_msgs be Channels? add_msgs::Array{Any,1} - gcflag::Bool + @atomic gcflag::Bool state::WorkerState c_state::Condition # wait for state changes ct_time::Float64 # creation time @@ -133,7 +134,7 @@ mutable struct Worker if haskey(map_pid_wrkr, id) return map_pid_wrkr[id] end - w=new(id, [], [], false, W_CREATED, Condition(), time(), conn_func) + w=new(id, Threads.ReentrantLock(), [], [], false, W_CREATED, Condition(), time(), conn_func) w.initialized = Event() register_worker(w) w @@ -471,6 +472,10 @@ function addprocs_locked(manager::ClusterManager; kwargs...) # The `launch` method should add an object of type WorkerConfig for every # worker launched. It provides information required on how to connect # to it. + + # FIXME: launched should be a Channel, launch_ntfy should be a Threads.Condition + # but both are part of the public interface. This means we currently can't use + # `Threads.@spawn` in the code below. launched = WorkerConfig[] launch_ntfy = Condition() diff --git a/stdlib/Distributed/src/messages.jl b/stdlib/Distributed/src/messages.jl index 47f70e044a2c0..fe3e5ab90b028 100644 --- a/stdlib/Distributed/src/messages.jl +++ b/stdlib/Distributed/src/messages.jl @@ -126,23 +126,30 @@ function flush_gc_msgs(w::Worker) if !isdefined(w, :w_stream) return end - w.gcflag = false - new_array = Any[] - msgs = w.add_msgs - w.add_msgs = new_array - if !isempty(msgs) - remote_do(add_clients, w, msgs) - end + add_msgs = nothing + del_msgs = nothing + @lock w.msg_lock begin + if !w.gcflag # No work needed for this worker + return + end + @atomic w.gcflag = false + if !isempty(w.add_msgs) + add_msgs = w.add_msgs + w.add_msgs = Any[] + end - # del_msgs gets populated by finalizers, so be very careful here about ordering of allocations - # XXX: threading requires this to be atomic - new_array = Any[] - msgs = w.del_msgs - w.del_msgs = new_array - if !isempty(msgs) - #print("sending delete of $msgs\n") - remote_do(del_clients, w, msgs) + if !isempty(w.del_msgs) + del_msgs = w.del_msgs + w.del_msgs = Any[] + end + end + if add_msgs !== nothing + remote_do(add_clients, w, add_msgs) + end + if del_msgs !== nothing + remote_do(del_clients, w, del_msgs) end + return end # Boundary inserted between messages on the wire, used for recovering @@ -187,7 +194,7 @@ end function flush_gc_msgs() try for w in (PGRP::ProcessGroup).workers - if isa(w,Worker) && w.gcflag && (w.state == W_CONNECTED) + if isa(w,Worker) && (w.state == W_CONNECTED) && w.gcflag flush_gc_msgs(w) end end diff --git a/stdlib/Distributed/src/remotecall.jl b/stdlib/Distributed/src/remotecall.jl index 56b2a03fdc3ca..8f1406e631f7f 100644 --- a/stdlib/Distributed/src/remotecall.jl +++ b/stdlib/Distributed/src/remotecall.jl @@ -256,14 +256,27 @@ function del_clients(pairs::Vector) end end -const any_gc_flag = Condition() +# The task below is coalescing the `flush_gc_msgs` call +# across multiple producers, see `send_del_client`, +# and `send_add_client`. +# XXX: Is this worth the additional complexity? +# `flush_gc_msgs` has to iterate over all connected workers. +const any_gc_flag = Threads.Condition() function start_gc_msgs_task() - errormonitor(@async while true - wait(any_gc_flag) - flush_gc_msgs() - end) + errormonitor( + Threads.@spawn begin + while true + lock(any_gc_flag) do + # this might miss events + wait(any_gc_flag) + end + flush_gc_msgs() # handles throws internally + end + end + ) end +# Function can be called within a finalizer function send_del_client(rr) if rr.where == myid() del_client(rr) @@ -281,11 +294,27 @@ function send_del_client_no_lock(rr) end end +function publish_del_msg!(w::Worker, msg) + lock(w.msg_lock) do + push!(w.del_msgs, msg) + @atomic w.gcflag = true + end + lock(any_gc_flag) do + notify(any_gc_flag) + end +end + function process_worker(rr) w = worker_from_id(rr.where)::Worker - push!(w.del_msgs, (remoteref_id(rr), myid())) - w.gcflag = true - notify(any_gc_flag) + msg = (remoteref_id(rr), myid()) + + # Needs to aquire a lock on the del_msg queue + T = Threads.@spawn begin + publish_del_msg!($w, $msg) + end + Base.errormonitor(T) + + return end function add_client(id, client) @@ -310,9 +339,13 @@ function send_add_client(rr::AbstractRemoteRef, i) # to the processor that owns the remote ref. it will add_client # itself inside deserialize(). w = worker_from_id(rr.where) - push!(w.add_msgs, (remoteref_id(rr), i)) - w.gcflag = true - notify(any_gc_flag) + lock(w.msg_lock) do + push!(w.add_msgs, (remoteref_id(rr), i)) + @atomic w.gcflag = true + end + lock(any_gc_flag) do + notify(any_gc_flag) + end end end From 5bad4c70920792c796ad6cf9e2c6cbb5a48e48fa Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 26 Sep 2021 13:48:48 -0400 Subject: [PATCH 26/88] CI (GHA): Only run the `Statuses` workflow when a pull request is opened or synchronized (#42389) (cherry picked from commit 557300137b6470467b310bf7df08d9f3901e379c) --- .github/workflows/statuses.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/statuses.yml b/.github/workflows/statuses.yml index ccfda06b1a542..97e7b246d7e65 100644 --- a/.github/workflows/statuses.yml +++ b/.github/workflows/statuses.yml @@ -20,6 +20,7 @@ on: # write permissions, even if the PR is from a fork. # Therefore, for security reasons, we do not checkout any code in this workflow. pull_request_target: + types: [opened, synchronize] branches: - 'master' - 'release-*' From 3cc8418eba02fb2249407978e8d2c7c70cda0418 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 26 Sep 2021 13:49:14 -0400 Subject: [PATCH 27/88] CI (GHA): update to the latest commit of the `retry-buildkite` action (#42386) (cherry picked from commit b867b971db75c26ced38f2ef2cf5b865e6794b46) --- .github/workflows/retry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/retry.yml b/.github/workflows/retry.yml index 2c7f33e886cb2..90160c8ee15e7 100644 --- a/.github/workflows/retry.yml +++ b/.github/workflows/retry.yml @@ -51,7 +51,7 @@ jobs: steps: # For security reasons, we do not checkout any code in this workflow. - - uses: JuliaLang/retry-buildkite@24e8341f74e0d6760717235eac936db639d7e9eb + - uses: JuliaLang/retry-buildkite@057f6f2d37aa29a57b7679fd2af0df1d9f9188b4 with: buildkite_api_token: ${{ secrets.BUILDKITE_API_TOKEN_RETRY }} buildkite_organization_slug: 'julialang' From 5d767f37e3e4518981e11cda33b9770a508a94f1 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sun, 26 Sep 2021 15:55:30 -0700 Subject: [PATCH 28/88] Fix atomicfields serialization for system image (#42390) (cherry picked from commit 8987bc270cb0c0e0265ff265ba9cf6b3f697c14c) --- src/staticdata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/staticdata.c b/src/staticdata.c index f5892d4218e71..0a473684ff5dc 100644 --- a/src/staticdata.c +++ b/src/staticdata.c @@ -1041,14 +1041,14 @@ static void jl_write_values(jl_serializer_state *s) jl_typename_t *tn = (jl_typename_t*)v; jl_typename_t *newtn = (jl_typename_t*)&s->s->buf[reloc_offset]; if (tn->atomicfields != NULL) { - size_t nf = jl_svec_len(tn->names); + size_t nb = (jl_svec_len(tn->names) + 31) / 32 * sizeof(uint32_t); uintptr_t layout = LLT_ALIGN(ios_pos(s->const_data), sizeof(void*)); write_padding(s->const_data, layout - ios_pos(s->const_data)); // realign stream newtn->atomicfields = NULL; // relocation offset layout /= sizeof(void*); arraylist_push(&s->relocs_list, (void*)(reloc_offset + offsetof(jl_typename_t, atomicfields))); // relocation location arraylist_push(&s->relocs_list, (void*)(((uintptr_t)ConstDataRef << RELOC_TAG_OFFSET) + layout)); // relocation target - ios_write(s->const_data, (char*)tn->atomicfields, nf); + ios_write(s->const_data, (char*)tn->atomicfields, nb); } } else if (((jl_datatype_t*)(jl_typeof(v)))->name == jl_idtable_typename) { From 7660b4cf4b27cc7abb1bc1f183945e2943a6c8a9 Mon Sep 17 00:00:00 2001 From: Petr Vana Date: Mon, 27 Sep 2021 20:53:15 +0200 Subject: [PATCH 29/88] Fix Printf for typemin(<:Base.BitSigned) (#42341) (cherry picked from commit 82d8a3649132e0bb1731fd2e2b759775af08dbfb) --- stdlib/Printf/src/Printf.jl | 3 ++- stdlib/Printf/test/runtests.jl | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/stdlib/Printf/src/Printf.jl b/stdlib/Printf/src/Printf.jl index b38298d35aceb..a6bf234fcbda0 100644 --- a/stdlib/Printf/src/Printf.jl +++ b/stdlib/Printf/src/Printf.jl @@ -290,7 +290,8 @@ fmt(buf, pos, arg::AbstractFloat, spec::Spec{T}) where {T <: Ints} = bs = base(T) arg2 = toint(arg) n = i = ndigits(arg2, base=bs, pad=1) - x, neg = arg2 < 0 ? (-arg2, true) : (arg2, false) + neg = arg2 < 0 + x = arg2 isa Base.BitSigned ? unsigned(abs(arg2)) : abs(arg2) arglen = n + (neg || (plus | space)) + (T == Val{'o'} && hash ? 1 : 0) + (T == Val{'x'} && hash ? 2 : 0) + (T == Val{'X'} && hash ? 2 : 0) diff --git a/stdlib/Printf/test/runtests.jl b/stdlib/Printf/test/runtests.jl index 5490bbf70e930..77f3722083c11 100644 --- a/stdlib/Printf/test/runtests.jl +++ b/stdlib/Printf/test/runtests.jl @@ -756,6 +756,17 @@ end @test Printf.@sprintf("%20.0X", UInt(3989525555)) == " EDCB5433" @test Printf.@sprintf("%20.X", UInt(0)) == " 0" + # issue #41971 + @test Printf.@sprintf("%4d", typemin(Int8)) == "-128" + @test Printf.@sprintf("%4d", typemax(Int8)) == " 127" + @test Printf.@sprintf("%6d", typemin(Int16)) == "-32768" + @test Printf.@sprintf("%6d", typemax(Int16)) == " 32767" + @test Printf.@sprintf("%11d", typemin(Int32)) == "-2147483648" + @test Printf.@sprintf("%11d", typemax(Int32)) == " 2147483647" + @test Printf.@sprintf("%20d", typemin(Int64)) == "-9223372036854775808" + @test Printf.@sprintf("%20d", typemax(Int64)) == " 9223372036854775807" + @test Printf.@sprintf("%40d", typemin(Int128)) == "-170141183460469231731687303715884105728" + @test Printf.@sprintf("%40d", typemax(Int128)) == " 170141183460469231731687303715884105727" end @testset "%n" begin From 91a25246e64f2119ced8aed8dcd541d4f67460ff Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 27 Sep 2021 20:53:34 -0400 Subject: [PATCH 30/88] init: avoid an undesirable compiler optimization (#42377) jl_current_task is not constant after this point in the function, so we split the function so that the compiler won't try to optimize it incorrectly (hoisting the JL_GC_PUSH to the top of the function for example). Fixes #42346 (cherry picked from commit 4dea1c44bd428cd5309abd910a82f63d262833a6) --- src/init.c | 11 +++++++++-- src/julia_internal.h | 2 +- src/partr.c | 6 ++++-- src/task.c | 5 +++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/init.c b/src/init.c index c5ebd4684205c..299aeb91b51ff 100644 --- a/src/init.c +++ b/src/init.c @@ -628,6 +628,8 @@ static void restore_fp_env(void) } } +static NOINLINE void _finish_julia_init(JL_IMAGE_SEARCH rel, jl_ptls_t ptls, jl_task_t *ct); + JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel) { jl_init_timing(); @@ -722,9 +724,14 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel) jl_init_threading(); jl_ptls_t ptls = jl_init_threadtls(0); - jl_init_root_task(ptls, stack_lo, stack_hi); - jl_task_t *ct = jl_current_task; + // warning: this changes `jl_current_task`, so be careful not to call that from this function + jl_task_t *ct = jl_init_root_task(ptls, stack_lo, stack_hi); + JL_GC_PROMISE_ROOTED(ct); + _finish_julia_init(rel, ptls, ct); +} +static NOINLINE void _finish_julia_init(JL_IMAGE_SEARCH rel, jl_ptls_t ptls, jl_task_t *ct) +{ jl_init_threadinginfra(); jl_resolve_sysimg_location(rel); diff --git a/src/julia_internal.h b/src/julia_internal.h index 673d4459bef03..2605da0cad312 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -695,7 +695,7 @@ void jl_init_intrinsic_functions(void); void jl_init_intrinsic_properties(void); void jl_init_tasks(void) JL_GC_DISABLED; void jl_init_stack_limits(int ismaster, void **stack_hi, void **stack_lo); -void jl_init_root_task(jl_ptls_t ptls, void *stack_lo, void *stack_hi); +jl_task_t *jl_init_root_task(jl_ptls_t ptls, void *stack_lo, void *stack_hi); void jl_init_serializer(void); void jl_gc_init(void); void jl_init_uv(void); diff --git a/src/partr.c b/src/partr.c index c3de56b80cc92..da43ea53a4e87 100644 --- a/src/partr.c +++ b/src/partr.c @@ -247,7 +247,9 @@ void jl_threadfun(void *arg) jl_ptls_t ptls = jl_init_threadtls(targ->tid); void *stack_lo, *stack_hi; jl_init_stack_limits(0, &stack_lo, &stack_hi); - jl_init_root_task(ptls, stack_lo, stack_hi); + // warning: this changes `jl_current_task`, so be careful not to call that from this function + jl_task_t *ct = jl_init_root_task(ptls, stack_lo, stack_hi); + JL_GC_PROMISE_ROOTED(ct); jl_install_thread_signal_handler(ptls); // set up sleep mechanism for this thread @@ -262,7 +264,7 @@ void jl_threadfun(void *arg) free(targ); (void)jl_gc_unsafe_enter(ptls); - jl_finish_task(jl_current_task); // noreturn + jl_finish_task(ct); // noreturn } diff --git a/src/task.c b/src/task.c index 677287577f0b5..82b988a588132 100644 --- a/src/task.c +++ b/src/task.c @@ -1249,7 +1249,7 @@ static char *jl_alloc_fiber(jl_ucontext_t *t, size_t *ssize, jl_task_t *owner) J #endif // Initialize a root task using the given stack. -void jl_init_root_task(jl_ptls_t ptls, void *stack_lo, void *stack_hi) +jl_task_t *jl_init_root_task(jl_ptls_t ptls, void *stack_lo, void *stack_hi) { assert(ptls->root_task == NULL); // We need `gcstack` in `Task` to allocate Julia objects; *including* the `Task` type. @@ -1325,13 +1325,14 @@ void jl_init_root_task(jl_ptls_t ptls, void *stack_lo, void *stack_hi) #endif if (jl_setjmp(ptls->copy_stack_ctx.uc_mcontext, 0)) start_task(); // sanitizer_finish_switch_fiber is part of start_task - return; + return ct; } ssize = JL_STACK_SIZE; char *stkbuf = jl_alloc_fiber(&ptls->base_ctx, &ssize, NULL); ptls->stackbase = stkbuf + ssize; ptls->stacksize = ssize; #endif + return ct; } JL_DLLEXPORT int jl_is_task_started(jl_task_t *t) JL_NOTSAFEPOINT From c2558080ce1cffb3ca4e851dfa7cc430d6b672c1 Mon Sep 17 00:00:00 2001 From: Moelf Date: Sun, 26 Sep 2021 19:49:50 -0400 Subject: [PATCH 31/88] make `read()` respect `lock=false` (cherry picked from commit ef462aec534a2ccf8ee29017a5304ee39109a077) --- base/iostream.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/base/iostream.jl b/base/iostream.jl index 98f15fd8a7db7..0af0e244cf357 100644 --- a/base/iostream.jl +++ b/base/iostream.jl @@ -404,13 +404,15 @@ end if ENDIAN_BOM == 0x04030201 function read(s::IOStream, T::Union{Type{Int16},Type{UInt16},Type{Int32},Type{UInt32},Type{Int64},Type{UInt64}}) n = sizeof(T) - lock(s.lock) + l = s._dolock + _lock = s.lock + l && lock(_lock) if ccall(:jl_ios_buffer_n, Cint, (Ptr{Cvoid}, Csize_t), s.ios, n) != 0 - unlock(s.lock) + l && unlock(_lock) throw(EOFError()) end x = ccall(:jl_ios_get_nbyte_int, UInt64, (Ptr{Cvoid}, Csize_t), s.ios, n) % T - unlock(s.lock) + l && unlock(_lock) return x end From 1e81fbc5a72a5451449c0cd9c3abfc919db4b86e Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 19 Aug 2021 11:23:02 -0700 Subject: [PATCH 32/88] Work around registry corruption issues (#41934) Because our jobs get interrupted, it seems that incomplete registry trees are created pretty often. Let's just not persist them for now. (cherry picked from commit 0224c42bce6daec1b5580b8a8a6b43f9437d2cee) --- .buildkite/pipelines/main/platforms/linux64.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.buildkite/pipelines/main/platforms/linux64.yml b/.buildkite/pipelines/main/platforms/linux64.yml index 44b0ebe29f557..ad5d32a20b3a0 100644 --- a/.buildkite/pipelines/main/platforms/linux64.yml +++ b/.buildkite/pipelines/main/platforms/linux64.yml @@ -9,6 +9,8 @@ steps: key: package_linux64 plugins: - JuliaCI/julia#v1: + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled version: 1.6 - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz From 0dd7b370c69b4befc0d90700a2682506226f81be Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 26 Sep 2021 11:21:30 -0400 Subject: [PATCH 33/88] CI (Buildkite): Add `package_linux` and `tester_linux` for more Linux architectures (#41707) (cherry picked from commit 37b7a3348dea97867b6dfeeb3cbc1c979377cda0) --- .buildkite/pipelines/experimental/0_webui.yml | 4 +- .../experimental/misc/sanitizers.yml | 10 +- .buildkite/pipelines/main/0_webui.yml | 1 - .../main/launch_unsigned_builders.yml | 9 +- .buildkite/pipelines/main/misc/doctest.yml | 4 - .buildkite/pipelines/main/misc/embedding.yml | 15 +- .buildkite/pipelines/main/misc/llvmpasses.yml | 20 +-- .buildkite/pipelines/main/misc/whitespace.yml | 5 +- .../pipelines/main/platforms/linux64.yml | 95 ---------- .../main/platforms/package_linux.arches | 6 + .../main/platforms/package_linux.yml | 49 ++++++ .../pipelines/main/platforms/platforms.sh | 24 +++ .../main/platforms/tester_linux.arches | 8 + .../pipelines/main/platforms/tester_linux.yml | 72 ++++++++ .buildkite/pipelines/scheduled/0_webui.yml | 1 - .../scheduled/coverage/coverage_linux64.yml | 1 - .buildkite/utilities/rr/rr_capture.jl | 163 ++++++++++++------ 17 files changed, 295 insertions(+), 192 deletions(-) delete mode 100644 .buildkite/pipelines/main/platforms/linux64.yml create mode 100644 .buildkite/pipelines/main/platforms/package_linux.arches create mode 100644 .buildkite/pipelines/main/platforms/package_linux.yml create mode 100755 .buildkite/pipelines/main/platforms/platforms.sh create mode 100644 .buildkite/pipelines/main/platforms/tester_linux.arches create mode 100644 .buildkite/pipelines/main/platforms/tester_linux.yml diff --git a/.buildkite/pipelines/experimental/0_webui.yml b/.buildkite/pipelines/experimental/0_webui.yml index 54dbbc59d4256..eee9743d39f6a 100644 --- a/.buildkite/pipelines/experimental/0_webui.yml +++ b/.buildkite/pipelines/experimental/0_webui.yml @@ -4,7 +4,6 @@ agents: queue: "julia" sandbox.jl: "true" - steps: - label: ":unlock: Unlock secrets, launch pipelines" plugins: @@ -16,9 +15,8 @@ steps: # pipelines. unsigned_pipelines: - .buildkite/pipelines/experimental/launch_unsigned_builders.yml - # Our signed pipelines must have a `signature` or `signature_file` parameter that # verifies the treehash of the pipeline itself and the inputs listed in `inputs` # signed_pipelines: # - pipeline: .buildkite/pipelines/experimental/misc/foo_bar_baz.yml - # signature: "my_signature" + # signature_file: .buildkite/pipelines/experimental/misc/foo_bar_baz.yml.signature diff --git a/.buildkite/pipelines/experimental/misc/sanitizers.yml b/.buildkite/pipelines/experimental/misc/sanitizers.yml index 72d252fc34578..79af4905416fc 100644 --- a/.buildkite/pipelines/experimental/misc/sanitizers.yml +++ b/.buildkite/pipelines/experimental/misc/sanitizers.yml @@ -3,10 +3,9 @@ agents: # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing sandbox.jl: "true" os: "linux" - steps: - label: "asan" - key: asan + key: "asan" plugins: - JuliaCI/julia#v1: version: 1.6 @@ -17,13 +16,10 @@ steps: gid: 1000 workspaces: - "/cache/repos:/cache/repos" - # `contrib/check-asan.jl` needs a `julia` binary: + # `contrib/check-asan.jl` needs a `julia` binary inside the inner sandbox: - JuliaCI/julia#v1: version: 1.6 timeout_in_minutes: 120 - # notify: - # - github_commit_status: - # context: "asan" commands: | echo "--- Build julia-debug with ASAN" - contrib/asan/build.sh ./tmp/test-asan -j$${JULIA_NUM_CORES} debug + contrib/asan/build.sh ./tmp/test-asan -j$${JULIA_CPU_THREADS:?} debug diff --git a/.buildkite/pipelines/main/0_webui.yml b/.buildkite/pipelines/main/0_webui.yml index 8e7b9c58ea423..af68158f9a51f 100644 --- a/.buildkite/pipelines/main/0_webui.yml +++ b/.buildkite/pipelines/main/0_webui.yml @@ -4,7 +4,6 @@ agents: queue: "julia" sandbox.jl: "true" - steps: - label: ":unlock: Unlock secrets, launch pipelines" plugins: diff --git a/.buildkite/pipelines/main/launch_unsigned_builders.yml b/.buildkite/pipelines/main/launch_unsigned_builders.yml index 6e9f0f0d8fa23..f978b0c48ed77 100644 --- a/.buildkite/pipelines/main/launch_unsigned_builders.yml +++ b/.buildkite/pipelines/main/launch_unsigned_builders.yml @@ -15,15 +15,16 @@ steps: - label: ":buildkite: Launch unsigned builders" commands: | - # First, we launch the `whitespace` builder, because we want that builder to finish as quickly as possible. + # Launch the `whitespace` builder first, because we want that builder to finish as quickly as possible. buildkite-agent pipeline upload .buildkite/pipelines/main/misc/whitespace.yml - # Next, we launch the miscellaneous builders in alphabetical order. + # Launch the miscellaneous builders in alphabetical order. buildkite-agent pipeline upload .buildkite/pipelines/main/misc/doctest.yml buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml buildkite-agent pipeline upload .buildkite/pipelines/main/misc/llvmpasses.yml - # Finally, we launch the platform builders (`package_*`) and (`tester_*`) in alphabetical order. - buildkite-agent pipeline upload .buildkite/pipelines/main/platforms/linux64.yml + # Launch all of the platform builders. + bash .buildkite/pipelines/main/platforms/platforms.sh package_linux + bash .buildkite/pipelines/main/platforms/platforms.sh tester_linux agents: queue: julia diff --git a/.buildkite/pipelines/main/misc/doctest.yml b/.buildkite/pipelines/main/misc/doctest.yml index 0a5dc29bcb1c7..e1af8d7cd839f 100644 --- a/.buildkite/pipelines/main/misc/doctest.yml +++ b/.buildkite/pipelines/main/misc/doctest.yml @@ -3,7 +3,6 @@ agents: # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing sandbox.jl: "true" os: "linux" - steps: - label: "doctest" key: doctest @@ -31,6 +30,3 @@ steps: echo "--- Run Julia doctests" JULIA_NUM_THREADS=1 make -C doc doctest=true timeout_in_minutes: 45 - notify: - - github_commit_status: - context: "doctest" diff --git a/.buildkite/pipelines/main/misc/embedding.yml b/.buildkite/pipelines/main/misc/embedding.yml index 087ca0f68eb3d..dc5e80e85d065 100644 --- a/.buildkite/pipelines/main/misc/embedding.yml +++ b/.buildkite/pipelines/main/misc/embedding.yml @@ -3,7 +3,6 @@ agents: # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing sandbox.jl: "true" os: "linux" - steps: - label: "embedding" key: "embedding" @@ -20,15 +19,11 @@ steps: - "/cache/repos:/cache/repos" commands: | prefix="/tmp/prefix" - echo "+++ Build julia, deploy to $${prefix}" - make -j$${JULIA_NUM_CORES} JULIA_PRECOMPILE=0 prefix=$${prefix} install + echo "+++ Build julia, deploy to $${prefix:?}" + make -j$${JULIA_CPU_THREADS:?} JULIA_PRECOMPILE=0 prefix=$${prefix:?} install embedding_output="/tmp/embedding-test" - echo "+++ Run embedding tests, deploy to $${embedding_output}" - mkdir -p "$${embedding_output}" - make -j$${JULIA_NUM_CORES} -C test/embedding JULIA="$${prefix}/bin/julia" BIN="$${embedding_output}" - + echo "+++ Run embedding tests, deploy to $${embedding_output:?}" + mkdir -p "$${embedding_output:?}" + make -j$${JULIA_CPU_THREADS:?} -C test/embedding JULIA="$${prefix:?}/bin/julia" BIN="$${embedding_output:?}" timeout_in_minutes: 60 - notify: - - github_commit_status: - context: "embedding" diff --git a/.buildkite/pipelines/main/misc/llvmpasses.yml b/.buildkite/pipelines/main/misc/llvmpasses.yml index a012ace41acff..921f39c5fb360 100644 --- a/.buildkite/pipelines/main/misc/llvmpasses.yml +++ b/.buildkite/pipelines/main/misc/llvmpasses.yml @@ -3,7 +3,6 @@ agents: # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing sandbox.jl: "true" os: "linux" - steps: - label: "analyzegc" key: "analyzegc" @@ -18,15 +17,11 @@ steps: - "/cache/repos:/cache/repos" commands: | echo "--- Install in-tree LLVM dependencies" - make -j$${JULIA_NUM_CORES} -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind + make -j$${JULIA_CPU_THREADS:?} -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind echo "+++ run clangsa/analyzegc" - make -j$${JULIA_NUM_CORES} -C test/clangsa - make -j$${JULIA_NUM_CORES} -C src analyzegc + make -j$${JULIA_CPU_THREADS:?} -C test/clangsa + make -j$${JULIA_CPU_THREADS:?} -C src analyzegc timeout_in_minutes: 60 - notify: - - github_commit_status: - context: "analyzegc" - - label: "llvmpasses" key: "llvmpasses" plugins: @@ -41,12 +36,9 @@ steps: - "/cache/repos:/cache/repos" commands: | echo "--- make release" - make -j$${JULIA_NUM_CORES} release JULIA_PRECOMPILE=0 + make -j$${JULIA_CPU_THREADS:?} release JULIA_PRECOMPILE=0 echo "--- make src/install-analysis-deps" - make -j$${JULIA_NUM_CORES} -C src install-analysis-deps + make -j$${JULIA_CPU_THREADS:?} -C src install-analysis-deps echo "+++ make test/llvmpasses" - make -j$${JULIA_NUM_CORES} -C test/llvmpasses + make -j$${JULIA_CPU_THREADS:?} -C test/llvmpasses timeout_in_minutes: 60 - notify: - - github_commit_status: - context: "llvmpasses" diff --git a/.buildkite/pipelines/main/misc/whitespace.yml b/.buildkite/pipelines/main/misc/whitespace.yml index 3f9bf13421d8e..89231b80cc48d 100644 --- a/.buildkite/pipelines/main/misc/whitespace.yml +++ b/.buildkite/pipelines/main/misc/whitespace.yml @@ -3,7 +3,6 @@ agents: # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing sandbox.jl: "true" os: "linux" - steps: - label: "whitespace" key: "whitespace" @@ -15,9 +14,9 @@ steps: rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" workspaces: - "/cache/repos:/cache/repos" - commands: | - make -j$${JULIA_NUM_CORES} check-whitespace timeout_in_minutes: 10 notify: - github_commit_status: context: "whitespace" + commands: | + make -j$${JULIA_CPU_THREADS:?} check-whitespace diff --git a/.buildkite/pipelines/main/platforms/linux64.yml b/.buildkite/pipelines/main/platforms/linux64.yml deleted file mode 100644 index ad5d32a20b3a0..0000000000000 --- a/.buildkite/pipelines/main/platforms/linux64.yml +++ /dev/null @@ -1,95 +0,0 @@ -agents: - queue: "julia" - # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing - sandbox.jl: "true" - os: "linux" - -steps: - - label: "package_linux64" - key: package_linux64 - plugins: - - JuliaCI/julia#v1: - # Drop default "registries" directory, so it is not persisted from execution to execution - persist_depot_dirs: packages,artifacts,compiled - version: 1.6 - - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz - rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" - uid: 1000 - gid: 1000 - workspaces: - # Include `/cache/repos` so that our `git` version introspection works. - - "/cache/repos:/cache/repos" - commands: | - echo "--- Print the short and long commit hashes" - SHORT_COMMIT_LENGTH=10 - SHORT_COMMIT=`echo $$BUILDKITE_COMMIT | cut -c1-$$SHORT_COMMIT_LENGTH` - JULIA_DIRECTORY_NAME="julia-$$SHORT_COMMIT" - JULIA_BINARYDIST_FILENAME=`make print-JULIA_BINARYDIST_FILENAME | cut -c27-` - ARTIFACT_FILE_EXTENSION="tar.gz" - ARTIFACT_FILENAME="$$JULIA_BINARYDIST_FILENAME.$$ARTIFACT_FILE_EXTENSION" - echo "The full commit is $$BUILDKITE_COMMIT" - echo "The Julia directory name will be $$JULIA_DIRECTORY_NAME" - echo "The artifact filename will be $$ARTIFACT_FILENAME" - - echo "--- Build Julia from source" - make -j 6 - make release - make install - - echo "--- Make sure that the working directory is clean" - if [ -z "$(git status --short)" ]; then echo "INFO: The working directory is clean."; else echo "ERROR: The working directory is dirty."; echo "Output of git status:"; git status; exit 1; fi - - echo "--- Print Julia version info" - ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' - - echo "--- Compress build artifacts" - ls -ld $$JULIA_DIRECTORY_NAME/ - rm -rf $$ARTIFACT_FILENAME - tar czf $$ARTIFACT_FILENAME $$JULIA_DIRECTORY_NAME/ - ls -l $$ARTIFACT_FILENAME - - echo "--- Upload build artifacts" - buildkite-agent artifact upload $$ARTIFACT_FILENAME - timeout_in_minutes: 60 - notify: - - github_commit_status: - context: "package_linux64" - - # TODO: uncomment the following lines in order to enable the `tester_linux64` builder - # - label: "tester_linux64" - # key: tester_linux64 - # depends_on: package_linux64 - # plugins: - # - JuliaCI/julia#v1: - # version: 1.6 - # - staticfloat/sandbox#v1: - # # TODO: use a separate `tester_linux` image, instead of using the `package_linux` image. - # rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz - # rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" - # uid: 1000 - # gid: 1000 - # workspaces: - # # Include `/cache/repos` so that our `git` version introspection works. - # - "/cache/repos:/cache/repos" - # env: - # JULIA_SHELL: "/bin/bash" - # commands: | - # echo "--- Download build artifacts" - # rm -rf julia-linux64.tar.gz - # buildkite-agent artifact download julia-linux64.tar.gz . - # - # echo "--- Extract build artifacts" - # rm -rf julia-artifact/ - # tar xzf julia-linux64.tar.gz julia-artifact/ - # - # echo "--- Print Julia version info" - # julia-artifact/bin/julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' - # - # echo "--- Run the Julia test suite" - # unset JULIA_DEPOT_PATH - # julia-artifact/bin/julia .buildkite/utilities/rr/rr_capture.jl julia-artifact/bin/julia -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)' - # timeout_in_minutes: 120 - # notify: - # - github_commit_status: - # context: "tester_linux64" diff --git a/.buildkite/pipelines/main/platforms/package_linux.arches b/.buildkite/pipelines/main/platforms/package_linux.arches new file mode 100644 index 0000000000000..d83bd798242ac --- /dev/null +++ b/.buildkite/pipelines/main/platforms/package_linux.arches @@ -0,0 +1,6 @@ +# ARCH ARCH_LABEL ROOTFS_ARCH TIMEOUT ROOTFS_TAG ROOTFS_TREE +# aarch64 aarch64 aarch64 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff +# armv7l armv7l armv7l 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 +32 32 i686 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 +# ppc64le ppc64le powerpc64le 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 +64 64 x86_64 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 diff --git a/.buildkite/pipelines/main/platforms/package_linux.yml b/.buildkite/pipelines/main/platforms/package_linux.yml new file mode 100644 index 0000000000000..a054390bb2c0c --- /dev/null +++ b/.buildkite/pipelines/main/platforms/package_linux.yml @@ -0,0 +1,49 @@ +agents: + queue: "julia" + # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing + sandbox.jl: "true" + os: "linux" +steps: + - label: "package_linux${ARCH_LABEL?}" + key: package_linux${ARCH_LABEL?} + plugins: + - JuliaCI/julia#v1: + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_linux.${ROOTFS_ARCH?}.tar.gz + rootfs_treehash: "${ROOTFS_TREE?}" + uid: 1000 + gid: 1000 + workspaces: + # Include `/cache/repos` so that our `git` version introspection works. + - "/cache/repos:/cache/repos" + timeout_in_minutes: ${TIMEOUT?} + commands: | + echo "--- Print the full and short commit hashes" + SHORT_COMMIT_LENGTH=10 + SHORT_COMMIT=`echo $${BUILDKITE_COMMIT:?} | cut -c1-$${SHORT_COMMIT_LENGTH:?}` + JULIA_BINARYDIST_FILENAME=`make print-JULIA_BINARYDIST_FILENAME | cut -c27-` + ARTIFACT_FILE_EXTENSION="tar.gz" + ARTIFACT_FILENAME="$${JULIA_BINARYDIST_FILENAME:?}.$${ARTIFACT_FILE_EXTENSION:?}" + echo "The full commit is: $${BUILDKITE_COMMIT:?}" + echo "The short commit is: $${SHORT_COMMIT:?}" + echo "The artifact filename will be: $${ARTIFACT_FILENAME:?}" + + echo "--- Build Julia from source" + rm -rf $${ARTIFACT_FILENAME:?} + make -j 8 + + echo "--- Make sure that the working directory is clean" + if [ -z "$(git status --short)" ]; then echo "INFO: The working directory is clean."; else echo "ERROR: The working directory is dirty."; echo "Output of git status:"; git status; exit 1; fi + + echo "--- Print Julia version info" + ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' + + echo "--- Create build artifacts" + make -j 8 binary-dist + ls -l $${ARTIFACT_FILENAME:?} + + echo "--- Upload build artifacts" + buildkite-agent artifact upload $${ARTIFACT_FILENAME:?} diff --git a/.buildkite/pipelines/main/platforms/platforms.sh b/.buildkite/pipelines/main/platforms/platforms.sh new file mode 100755 index 0000000000000..d58daeb2a9929 --- /dev/null +++ b/.buildkite/pipelines/main/platforms/platforms.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +PLATFORM="$1" + +cat "$SCRIPT_DIR/$PLATFORM.arches" | tr -s ' ' | while read _line; do + # Remove whitespace from the beginning and end of each line + line=`echo $_line | tr -s ' '` + + # Skip all lines that begin with `#` + if [[ $line == \#* ]]; then + continue + fi + + export ARCH=`echo $line | cut -d ' ' -f 1` + export ARCH_LABEL=`echo $line | cut -d ' ' -f 2` + export ROOTFS_ARCH=`echo $line | cut -d ' ' -f 3` + export TIMEOUT=`echo $line | cut -d ' ' -f 4` + export ROOTFS_TAG=`echo $line | cut -d ' ' -f 5` + export ROOTFS_TREE=`echo $line | cut -d ' ' -f 6` + echo "Launching: $PLATFORM $ARCH $ARCH_LABEL $ROOTFS_ARCH $TIMEOUT" + buildkite-agent pipeline upload "$SCRIPT_DIR/$PLATFORM.yml" +done diff --git a/.buildkite/pipelines/main/platforms/tester_linux.arches b/.buildkite/pipelines/main/platforms/tester_linux.arches new file mode 100644 index 0000000000000..7d8e8ba607533 --- /dev/null +++ b/.buildkite/pipelines/main/platforms/tester_linux.arches @@ -0,0 +1,8 @@ +# ARCH ARCH_LABEL ROOTFS_ARCH TIMEOUT ROOTFS_TAG ROOTFS_TREE +# aarch64 aarch64 aarch64 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff +# armv7l armv7l armv7l 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 +32 32 i686 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 +# ppc64le ppc64le powerpc64le 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 +64 64_rr x86_64 180 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +64 64_st x86_64 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +64 64_mt x86_64 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 diff --git a/.buildkite/pipelines/main/platforms/tester_linux.yml b/.buildkite/pipelines/main/platforms/tester_linux.yml new file mode 100644 index 0000000000000..3a71599ad6f0a --- /dev/null +++ b/.buildkite/pipelines/main/platforms/tester_linux.yml @@ -0,0 +1,72 @@ +agents: + queue: "julia" + # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing + sandbox.jl: "true" + os: "linux" +steps: + - label: "tester_linux${ARCH_LABEL?}" + key: tester_linux${ARCH_LABEL?} + depends_on: package_linux${ARCH?} + plugins: + - JuliaCI/julia#v1: + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_linux.${ROOTFS_ARCH?}.tar.gz + rootfs_treehash: "${ROOTFS_TREE?}" + uid: 1000 + gid: 1000 + workspaces: + # Include `/cache/repos` so that our `git` version introspection works. + - "/cache/repos:/cache/repos" + env: + JULIA_SHELL: "/bin/bash" + timeout_in_minutes: ${TIMEOUT?} + commands: | + echo "--- Print the full and short commit hashes" + SHORT_COMMIT_LENGTH=10 + SHORT_COMMIT=`echo $${BUILDKITE_COMMIT:?} | cut -c1-$${SHORT_COMMIT_LENGTH:?}` + JULIA_DIR="julia-$${SHORT_COMMIT:?}" + JULIA_BINARY="$${JULIA_DIR:?}/bin/julia" + ARTIFACT_FILE_EXTENSION="tar.gz" + ARTIFACT_FILENAME="julia-$${SHORT_COMMIT:?}-linux${ARCH?}.$${ARTIFACT_FILE_EXTENSION:?}" + echo "The full commit is: $${BUILDKITE_COMMIT:?}" + echo "The short commit is: $${SHORT_COMMIT:?}" + echo "The artifact filename will be: $${ARTIFACT_FILENAME:?}" + echo "The Julia directory name will be: $${JULIA_DIR:?}" + echo "The Julia binary will be: $${JULIA_BINARY:?}" + + echo "--- Download build artifacts" + rm -rf $${ARTIFACT_FILENAME:?} + buildkite-agent artifact download $${ARTIFACT_FILENAME:?} . + + echo "--- Extract build artifacts" + rm -rf $${JULIA_DIR:?}/ + tar xzf $${ARTIFACT_FILENAME:?} $${JULIA_DIR:?}/ + + echo "--- Print Julia version info" + $${JULIA_BINARY:?} -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' + echo "JULIA_CPU_THREADS is: $${JULIA_CPU_THREADS:?}" + $${JULIA_BINARY:?} -e '@info "" Sys.CPU_THREADS' + + echo "--- Run the Julia test suite" + unset JULIA_DEPOT_PATH + export JULIA_UNDER_RR="$${JULIA_BINARY:?} .buildkite/utilities/rr/rr_capture.jl $${JULIA_BINARY:?}" + + if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_rr" ]]; then + # For the `rr` job, we disable multi-threading. + export JULIA_NUM_THREADS=1 + $${JULIA_UNDER_RR:?} -e 'Base.runtests(["all"]; ncores = parse(Int, ENV["JULIA_RRCAPTURE_NUM_CORES"]))' + elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_st" ]]; then + # "_st" = single-threaded + export JULIA_NUM_THREADS=1 + $${JULIA_BINARY:?} -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)' + elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_mt" ]]; then + # "_mt" = multi-threaded + export JULIA_NUM_THREADS=16 + # TODO: don't skip any tests + $${JULIA_BINARY:?} -e 'Base.runtests(["all", "--skip", "Distributed"]; ncores = Sys.CPU_THREADS)' + else + $${JULIA_BINARY:?} -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)' + fi diff --git a/.buildkite/pipelines/scheduled/0_webui.yml b/.buildkite/pipelines/scheduled/0_webui.yml index 3aa1b575316d8..61324d13d0ca1 100644 --- a/.buildkite/pipelines/scheduled/0_webui.yml +++ b/.buildkite/pipelines/scheduled/0_webui.yml @@ -4,7 +4,6 @@ agents: queue: "julia" sandbox.jl: "true" - steps: - label: ":unlock: Unlock secrets, launch pipelines" plugins: diff --git a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml index b1e2eaff61497..f5d93264f7aac 100644 --- a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml +++ b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml @@ -3,7 +3,6 @@ agents: # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing sandbox.jl: "true" os: "linux" - steps: - label: ":unlock: :coverage: Run coverage test" plugins: diff --git a/.buildkite/utilities/rr/rr_capture.jl b/.buildkite/utilities/rr/rr_capture.jl index 07d57f31ff29c..5d60377a72bb6 100644 --- a/.buildkite/utilities/rr/rr_capture.jl +++ b/.buildkite/utilities/rr/rr_capture.jl @@ -1,44 +1,94 @@ -using Dates -using Pkg -using Tar - -if Base.VERSION < v"1.6" - throw(ErrorException("The `rr_capture.jl` script requires Julia 1.6 or greater")) -end - -if length(ARGS) < 1 - throw(ErrorException("Usage: rr_capture.jl [command...]")) +import Dates +import Pkg +import Tar + +function get_bool_from_env(name::AbstractString, default_value::Bool) + value = get(ENV, name, "$(default_value)") |> strip |> lowercase + result = parse(Bool, value)::Bool + return result end -const TIMEOUT = 2 * 60 * 60 # timeout in seconds +const is_buildkite = get_bool_from_env("BUILDKITE", false) +const always_save_rr_trace = get_bool_from_env("JULIA_ALWAYS_SAVE_RR_TRACE", false) -# We only use `rr` on the `tester_linux64` builder -const use_rr_if_builder_is = "tester_linux64" - -const run_id = get(ENV, "BUILDKITE_JOB_ID", "unknown") -const shortcommit = get(ENV, "BUILDKITE_COMMIT", "unknown") -const builder = get(ENV, "BUILDKITE_STEP_KEY", use_rr_if_builder_is) -const use_rr = builder == use_rr_if_builder_is +function get_from_env(name::AbstractString) + if is_buildkite + value = ENV[name] + else + value = get(ENV, name, "") + end + result = convert(String, strip(value))::String + return result +end -@info "" run_id shortcommit builder use_rr -@info "" ARGS +function my_exit(process::Base.Process) + wait(process) + + @info( + "", + process.exitcode, + process.termsignal, + ) + + # Pass the exit code back up + if process.termsignal != 0 + ccall(:raise, Cvoid, (Cint,), process.termsignal) + + # If for some reason the signal did not cause an exit, we'll exit manually. + # We need to make sure that we exit with a non-zero exit code. + if process.exitcode != 0 + exit(process.exitcode) + else + exit(1) + end + end + exit(process.exitcode) +end -# if !use_rr # TODO: uncomment this line -if true # TODO: delete this line - @info "We will not run the tests under rr" - p = run(`$ARGS`) - exit(p.exitcode) +if Base.VERSION < v"1.6" + throw(ErrorException("The `$(basename(@__FILE__))` script requires Julia 1.6 or greater")) end -@info "We will run the tests under rr" +if length(ARGS) < 1 + throw(ErrorException("Usage: julia $(basename(@__FILE__)) [command...]")) +end -const num_cores = min(Sys.CPU_THREADS, 8, parse(Int, get(ENV, "JULIA_TEST_NUM_CORES", "8")) + 1) -@info "" num_cores +@info "We will run the command under rr" + +const build_number = get_from_env("BUILDKITE_BUILD_NUMBER") +const job_name = get_from_env("BUILDKITE_STEP_KEY") +const commit_full = get_from_env("BUILDKITE_COMMIT") +const commit_short = first(commit_full, 10) +const timeout_minutes = 120 +const JULIA_TEST_NUM_CORES = get(ENV, "JULIA_TEST_NUM_CORES", "8") +const julia_test_num_cores_int = parse(Int, JULIA_TEST_NUM_CORES) +const num_cores = min( + 8, + Sys.CPU_THREADS, + julia_test_num_cores_int + 1, +) + +ENV["JULIA_RRCAPTURE_NUM_CORES"] = "$(num_cores)" + +@info( + "", + build_number, + job_name, + commit_full, + commit_short, + timeout_minutes, + num_cores, +) + +const dumps_dir = joinpath(pwd(), "dumps") +const temp_parent_dir = joinpath(pwd(), "temp_for_rr") + +mkpath(dumps_dir) +mkpath(temp_parent_dir) proc = nothing -new_env = copy(ENV) -mktempdir() do dir +mktempdir(temp_parent_dir) do dir Pkg.activate(dir) Pkg.add("rr_jll") Pkg.add("Zstd_jll") @@ -68,18 +118,22 @@ mktempdir() do dir # Start asynchronous timer that will kill `rr` @async begin - sleep(TIMEOUT) + sleep(timeout_minutes * 60) # If we've exceeded the timeout and `rr` is still running, kill it. if isopen(proc) - println(stderr, "\n\nProcess timed out. Signalling `rr` for force-cleanup!") + println(stderr, "\n\nProcess timed out (with a timeout of $(timeout_minutes) minutes). Signalling `rr` for force-cleanup!") kill(proc, Base.SIGTERM) - # Give `rr` a chance to cleanup - sleep(60) + # Give `rr` a chance to cleanup and upload. + # Note: this time period includes the time to upload the `rr` trace files + # as Buildkite artifacts, so make sure it is long enough to allow the + # uploads to finish. + cleanup_minutes = 30 + sleep(cleanup_minutes * 60) if isopen(proc) - println(stderr, "\n\n`rr` failed to cleanup within one minute, killing and exiting immediately!") + println(stderr, "\n\n`rr` failed to cleanup and upload within $(cleanup_minutes) minutes, killing and exiting immediately!") kill(proc, Base.SIGKILL) exit(1) end @@ -87,11 +141,10 @@ mktempdir() do dir end # Wait for `rr` to finish, either through naturally finishing its run, or `SIGTERM`. - # If we have to `SIGKILL` wait(proc) + process_failed = !success(proc) - # On a non-zero exit code, upload the `rr` trace - if !success(proc) + if process_failed || always_save_rr_trace || is_buildkite println(stderr, "`rr` returned $(proc.exitcode), packing and uploading traces...") if !isdir(joinpath(dir, "rr_traces")) @@ -113,22 +166,34 @@ mktempdir() do dir run(ignorestatus(`$(rr_path) pack --pack-dir=$pack_dir $(trace_dirs)`)) # Tar it up - mkpath("dumps") - datestr = Dates.format(now(), dateformat"yyyy-mm-dd_HH_MM_SS") - dst_path = "dumps/rr-run_$(run_id)-gitsha_$(shortcommit)-$(datestr).tar.zst" + mkpath(dumps_dir) + date_str = Dates.format(Dates.now(), Dates.dateformat"yyyy_mm_dd_HH_MM_SS") + dst_file_name = string( + "rr", + "--build_$(build_number)", + "--$(job_name)", + "--commit_$(commit_short)", + "--$(date_str)", + ".tar.zst", + ) + dst_full_path = joinpath(dumps_dir, dst_file_name) zstd_jll.zstdmt() do zstdp - tarproc = open(`$zstdp -o $dst_path`, "w") + tarproc = open(`$(zstdp) -o $(dst_full_path)`, "w") Tar.create(dir, tarproc) close(tarproc.in) end + + @info "The `rr` trace file has been saved to: $(dst_full_path)" + if is_buildkite + @info "Since this is a Buildkite run, we will upload the `rr` trace file." + cd(dumps_dir) do + run(`buildkite-agent artifact upload $(dst_file_name)`) + end + end end + end end -# Pass the exit code back up to Buildkite -if proc.termsignal != 0 - ccall(:raise, Cvoid, (Cint,), proc.termsignal) - exit(1) # Just in case the signal did not cause an exit -else - exit(proc.exitcode) -end +@info "Finished running the command under rr" +my_exit(proc) From fef46d58e590fe3c4e0bf2158ee4342485787a86 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 29 Sep 2021 11:04:17 -0400 Subject: [PATCH 34/88] fix verifier to allow GlobalRef as assignment RHS (#42417) (cherry picked from commit 3bcdd87399a86bfdd421c8dc850e332e62bfd380) --- base/compiler/ssair/verify.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/compiler/ssair/verify.jl b/base/compiler/ssair/verify.jl index 653923ace6e8e..c7c34edd84308 100644 --- a/base/compiler/ssair/verify.jl +++ b/base/compiler/ssair/verify.jl @@ -202,6 +202,10 @@ function verify_ir(ir::IRCode, print::Bool=true) @verify_error "SSAValue as assignment LHS" error("") end + if stmt.args[2] isa GlobalRef + # undefined GlobalRef as assignment RHS is OK + continue + end elseif stmt.head === :gc_preserve_end # We allow gc_preserve_end tokens to span across try/catch # blocks, which isn't allowed for regular SSA values, so From addf43b77270b86b050d715f8d1c3238796a0031 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 29 Sep 2021 16:09:21 -0400 Subject: [PATCH 35/88] ranges: broadcast preserves length (#42410) Fixes #42291 (cherry picked from commit 72e55a0b382f9b478ad2a033ebc75411b2b36c1b) --- base/broadcast.jl | 17 ++++++++++------- test/ranges.jl | 13 +++++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/base/broadcast.jl b/base/broadcast.jl index 90479189ffee4..1cb04fb6329bc 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -1087,10 +1087,12 @@ broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::LinRange) = LinRange(-r.star # For #18336 we need to prevent promotion of the step type: broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::AbstractRange, x::Number) = range(first(r) + x, step=step(r), length=length(r)) broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Number, r::AbstractRange) = range(x + first(r), step=step(r), length=length(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::OrdinalRange, x::Real) = range(first(r) + x, last(r) + x, step=step(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Real, r::Real) = range(x + first(r), x + last(r), step=step(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::AbstractUnitRange, x::Real) = range(first(r) + x, last(r) + x) -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Real, r::AbstractUnitRange) = range(x + first(r), x + last(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::OrdinalRange, x::Integer) = range(first(r) + x, last(r) + x, step=step(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Integer, r::OrdinalRange) = range(x + first(r), x + last(r), step=step(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::AbstractUnitRange, x::Integer) = range(first(r) + x, last(r) + x) +broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Integer, r::AbstractUnitRange) = range(x + first(r), x + last(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::AbstractUnitRange, x::Real) = range(first(r) + x, length=length(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Real, r::AbstractUnitRange) = range(x + first(r), length=length(r)) broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::StepRangeLen{T}, x::Number) where T = StepRangeLen{typeof(T(r.ref)+x)}(r.ref + x, r.step, length(r), r.offset) broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Number, r::StepRangeLen{T}) where T = @@ -1101,9 +1103,10 @@ broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r1::AbstractRange, r2::Abstract broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::AbstractRange, x::Number) = range(first(r) - x, step=step(r), length=length(r)) broadcasted(::DefaultArrayStyle{1}, ::typeof(-), x::Number, r::AbstractRange) = range(x - first(r), step=-step(r), length=length(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::OrdinalRange, x::Real) = range(first(r) - x, last(r) - x, step=step(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(-), x::Real, r::OrdinalRange) = range(x - first(r), x - last(r), step=-step(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::AbstractUnitRange, x::Real) = range(first(r) - x, last(r) - x) +broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::OrdinalRange, x::Integer) = range(first(r) - x, last(r) - x, step=step(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(-), x::Integer, r::OrdinalRange) = range(x - first(r), x - last(r), step=-step(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::AbstractUnitRange, x::Integer) = range(first(r) - x, last(r) - x) +broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::AbstractUnitRange, x::Real) = range(first(r) - x, length=length(r)) broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::StepRangeLen{T}, x::Number) where T = StepRangeLen{typeof(T(r.ref)-x)}(r.ref - x, r.step, length(r), r.offset) broadcasted(::DefaultArrayStyle{1}, ::typeof(-), x::Number, r::StepRangeLen{T}) where T = diff --git a/test/ranges.jl b/test/ranges.jl index d95bc6911e818..e0558ff75b0b7 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -655,14 +655,14 @@ end end @testset "broadcasted operations with scalars" for T in (Int, UInt, Int128) @test broadcast(-, T(1):3, 2) === T(1)-2:1 - @test broadcast(-, T(1):3, 0.25) === T(1)-0.25:3-0.25 + @test broadcast(-, T(1):3, 0.25) === range(T(1)-0.25, length=T(3)) == T(1)-0.25:3-0.25 @test broadcast(+, T(1):3) === T(1):3 @test broadcast(+, T(1):3, 2) === T(3):5 - @test broadcast(+, T(1):3, 0.25) === T(1)+0.25:3+0.25 + @test broadcast(+, T(1):3, 0.25) === range(T(1)+0.25, length=T(3)) == T(1)+0.25:3+0.25 @test broadcast(+, T(1):2:6, 1) === T(2):2:6 - @test broadcast(+, T(1):2:6, 0.3) === T(1)+0.3:2:5+0.3 + @test broadcast(+, T(1):2:6, 0.3) === range(T(1)+0.3, step=2, length=T(3)) == T(1)+0.3:2:5+0.3 @test broadcast(-, T(1):2:6, 1) === T(0):2:4 - @test broadcast(-, T(1):2:6, 0.3) === T(1)-0.3:2:5-0.3 + @test broadcast(-, T(1):2:6, 0.3) === range(T(1)-0.3, step=2, length=T(3)) == T(1)-0.3:2:5-0.3 is_unsigned = T <: Unsigned is_unsigned && @test length(broadcast(-, T(1):3, 2)) === length(T(1)-2:T(3)-2) @test broadcast(-, T(1):3) == -T(1):-T(1):-T(3) @@ -1502,6 +1502,11 @@ end @test @inferred(x .\ r) === 0.5:0.5:2.5 @test @inferred(2 .* (r .+ 1) .+ 2) == 6:2:14 + + # issue #42291 + @test length((1:5) .- 1/7) == 5 + @test length((1:5) .+ -1/7) == 5 + @test length(-1/7 .+ (1:5)) == 5 end @testset "Bad range calls" begin From e5744434027cca2726869a080f5a763e550c9229 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 30 Sep 2021 12:08:16 +0200 Subject: [PATCH 36/88] Strip address information from typed function parameters attributes. (#42395) (cherry picked from commit dc627e7bec000fdae5c32d34340c167303b193c3) --- src/llvm-remove-addrspaces.cpp | 18 +++++++++++++++++- test/llvmpasses/remove-addrspaces.ll | 7 +++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/llvm-remove-addrspaces.cpp b/src/llvm-remove-addrspaces.cpp index ada10c8d5f1f9..c3fbe84d0bf60 100644 --- a/src/llvm-remove-addrspaces.cpp +++ b/src/llvm-remove-addrspaces.cpp @@ -325,7 +325,7 @@ bool RemoveAddrspacesPass::runOnModule(Module &M) Function *NF = Function::Create( NFTy, F->getLinkage(), F->getAddressSpace(), Name, &M); - NF->copyAttributesFrom(F); + // no need to copy attributes here, that's done by CloneFunctionInto VMap[F] = NF; } @@ -379,6 +379,22 @@ bool RemoveAddrspacesPass::runOnModule(Module &M) &TypeRemapper, &Materializer); + // CloneFunctionInto unconditionally copies the attributes from F to NF, + // without considering e.g. the byval attribute type. + AttributeList Attrs = F->getAttributes(); + LLVMContext &C = F->getContext(); + for (unsigned i = 0; i < Attrs.getNumAttrSets(); ++i) { + for (Attribute::AttrKind TypedAttr : + {Attribute::ByVal, Attribute::StructRet, Attribute::ByRef}) { + if (Type *Ty = Attrs.getAttribute(i, TypedAttr).getValueAsType()) { + Attrs = Attrs.replaceAttributeType(C, i, TypedAttr, + TypeRemapper.remapType(Ty)); + break; + } + } + } + NF->setAttributes(Attrs); + if (F->hasPersonalityFn()) NF->setPersonalityFn(MapValue(F->getPersonalityFn(), VMap)); diff --git a/test/llvmpasses/remove-addrspaces.ll b/test/llvmpasses/remove-addrspaces.ll index 2f34cf55ffc08..f8b6de024bfdd 100644 --- a/test/llvmpasses/remove-addrspaces.ll +++ b/test/llvmpasses/remove-addrspaces.ll @@ -101,3 +101,10 @@ loop: exit: ret i64 %sum } + + +; COM: check that address spaces in byval types are processed correctly +define void @byval_type([1 x {} addrspace(10)*] addrspace(11)* byval([1 x {} addrspace(10)*]) %0) { +; CHECK: define void @byval_type([1 x {}*]* byval([1 x {}*]) %0) + ret void +} From 47787a90b42729165da938421f03ad71fdccbcae Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 2 Oct 2021 07:45:38 -0400 Subject: [PATCH 37/88] CI (Buildkite): explicitly set the `OPENBLAS_NUM_THREADS` environment variable (#42470) (cherry picked from commit 5b20380141320b1b9705300e3d5e48d862908259) --- .buildkite/pipelines/main/platforms/tester_linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/pipelines/main/platforms/tester_linux.yml b/.buildkite/pipelines/main/platforms/tester_linux.yml index 3a71599ad6f0a..d73346dff05a5 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.yml +++ b/.buildkite/pipelines/main/platforms/tester_linux.yml @@ -53,6 +53,7 @@ steps: echo "--- Run the Julia test suite" unset JULIA_DEPOT_PATH export JULIA_UNDER_RR="$${JULIA_BINARY:?} .buildkite/utilities/rr/rr_capture.jl $${JULIA_BINARY:?}" + export OPENBLAS_NUM_THREADS=8 if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_rr" ]]; then # For the `rr` job, we disable multi-threading. From bd7ec68e5cdd0917b12447bff6b49546d715273b Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 2 Oct 2021 22:15:25 -0400 Subject: [PATCH 38/88] CI (Buildkite): in the Buildkite cache, don't cache the "registries" directory in the default depot (#42475) (cherry picked from commit be28eb301323c8ca5192774112ab48023da77d49) --- .buildkite/pipelines/experimental/misc/sanitizers.yml | 8 ++++++-- .buildkite/pipelines/main/misc/doctest.yml | 4 +++- .buildkite/pipelines/main/misc/embedding.yml | 4 +++- .buildkite/pipelines/main/misc/llvmpasses.yml | 8 ++++++-- .buildkite/pipelines/main/misc/whitespace.yml | 4 +++- .buildkite/pipelines/main/platforms/package_linux.yml | 2 +- .buildkite/pipelines/main/platforms/tester_linux.yml | 2 +- .../pipelines/scheduled/coverage/coverage_linux64.yml | 4 +++- 8 files changed, 26 insertions(+), 10 deletions(-) diff --git a/.buildkite/pipelines/experimental/misc/sanitizers.yml b/.buildkite/pipelines/experimental/misc/sanitizers.yml index 79af4905416fc..2652ef8c2f32f 100644 --- a/.buildkite/pipelines/experimental/misc/sanitizers.yml +++ b/.buildkite/pipelines/experimental/misc/sanitizers.yml @@ -8,7 +8,9 @@ steps: key: "asan" plugins: - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/llvm_passes.x86_64.tar.gz rootfs_treehash: "9dd715500b117a16fcfa419ea0bca0c0ca902cee" @@ -18,7 +20,9 @@ steps: - "/cache/repos:/cache/repos" # `contrib/check-asan.jl` needs a `julia` binary inside the inner sandbox: - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' timeout_in_minutes: 120 commands: | echo "--- Build julia-debug with ASAN" diff --git a/.buildkite/pipelines/main/misc/doctest.yml b/.buildkite/pipelines/main/misc/doctest.yml index e1af8d7cd839f..6e68bd4f43f10 100644 --- a/.buildkite/pipelines/main/misc/doctest.yml +++ b/.buildkite/pipelines/main/misc/doctest.yml @@ -8,7 +8,9 @@ steps: key: doctest plugins: - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" diff --git a/.buildkite/pipelines/main/misc/embedding.yml b/.buildkite/pipelines/main/misc/embedding.yml index dc5e80e85d065..f870c69eb0093 100644 --- a/.buildkite/pipelines/main/misc/embedding.yml +++ b/.buildkite/pipelines/main/misc/embedding.yml @@ -8,7 +8,9 @@ steps: key: "embedding" plugins: - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" diff --git a/.buildkite/pipelines/main/misc/llvmpasses.yml b/.buildkite/pipelines/main/misc/llvmpasses.yml index 921f39c5fb360..8557e25133ea3 100644 --- a/.buildkite/pipelines/main/misc/llvmpasses.yml +++ b/.buildkite/pipelines/main/misc/llvmpasses.yml @@ -8,7 +8,9 @@ steps: key: "analyzegc" plugins: - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/llvm_passes.x86_64.tar.gz rootfs_treehash: "9dd715500b117a16fcfa419ea0bca0c0ca902cee" @@ -26,7 +28,9 @@ steps: key: "llvmpasses" plugins: - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.8/package_linux.x86_64.tar.gz rootfs_treehash: "84a323ae8fcc724f8ea5aca5901bbbf4bda3e519" diff --git a/.buildkite/pipelines/main/misc/whitespace.yml b/.buildkite/pipelines/main/misc/whitespace.yml index 89231b80cc48d..a6f5c22d77675 100644 --- a/.buildkite/pipelines/main/misc/whitespace.yml +++ b/.buildkite/pipelines/main/misc/whitespace.yml @@ -8,7 +8,9 @@ steps: key: "whitespace" plugins: - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" diff --git a/.buildkite/pipelines/main/platforms/package_linux.yml b/.buildkite/pipelines/main/platforms/package_linux.yml index a054390bb2c0c..f6f937738e431 100644 --- a/.buildkite/pipelines/main/platforms/package_linux.yml +++ b/.buildkite/pipelines/main/platforms/package_linux.yml @@ -10,7 +10,7 @@ steps: - JuliaCI/julia#v1: # Drop default "registries" directory, so it is not persisted from execution to execution persist_depot_dirs: packages,artifacts,compiled - version: 1.6 + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_linux.${ROOTFS_ARCH?}.tar.gz rootfs_treehash: "${ROOTFS_TREE?}" diff --git a/.buildkite/pipelines/main/platforms/tester_linux.yml b/.buildkite/pipelines/main/platforms/tester_linux.yml index d73346dff05a5..295de3b881054 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.yml +++ b/.buildkite/pipelines/main/platforms/tester_linux.yml @@ -11,7 +11,7 @@ steps: - JuliaCI/julia#v1: # Drop default "registries" directory, so it is not persisted from execution to execution persist_depot_dirs: packages,artifacts,compiled - version: 1.6 + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_linux.${ROOTFS_ARCH?}.tar.gz rootfs_treehash: "${ROOTFS_TREE?}" diff --git a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml index f5d93264f7aac..04fe536aa3efb 100644 --- a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml +++ b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml @@ -11,7 +11,9 @@ steps: - CODECOV_TOKEN="U2FsdGVkX19l0fhdBabbuiEdysyEabkJLRHfxm7CNRkuGbnwPV365sxxC7Czs/CVcws0N1oB4pVwALRRMe36oA==" - COVERALLS_TOKEN="U2FsdGVkX19zopI0hMNzzi2UUOvNVFD8Y0iisFnO/ryVxU7Tit8ZEaeN+gxodRx4CosUUh192F1+q3dTMWRIvw==" - JuliaCI/julia#v1: - version: 1.6 + # Drop default "registries" directory, so it is not persisted from execution to execution + persist_depot_dirs: packages,artifacts,compiled + version: '1.6' - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" From 0b9193e5bc79b006a6c47bdc1417e641101b7085 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 3 Oct 2021 16:49:03 -0400 Subject: [PATCH 39/88] CI (Buildkite): move the `asan` job from "experimental" to "main" (#42478) (cherry picked from commit ddd83015996465ec17ecc5da20230f2cfdd29631) --- .../pipelines/experimental/launch_unsigned_builders.yml | 2 +- .buildkite/pipelines/main/launch_unsigned_builders.yml | 1 + .../pipelines/{experimental => main}/misc/sanitizers.yml | 7 ++----- 3 files changed, 4 insertions(+), 6 deletions(-) rename .buildkite/pipelines/{experimental => main}/misc/sanitizers.yml (75%) diff --git a/.buildkite/pipelines/experimental/launch_unsigned_builders.yml b/.buildkite/pipelines/experimental/launch_unsigned_builders.yml index f023e19a5c940..04d82a6e39a5e 100644 --- a/.buildkite/pipelines/experimental/launch_unsigned_builders.yml +++ b/.buildkite/pipelines/experimental/launch_unsigned_builders.yml @@ -1,6 +1,6 @@ steps: - label: ":buildkite: Launch unsigned pipelines" commands: | - buildkite-agent pipeline upload .buildkite/pipelines/experimental/misc/sanitizers.yml + true agents: queue: julia diff --git a/.buildkite/pipelines/main/launch_unsigned_builders.yml b/.buildkite/pipelines/main/launch_unsigned_builders.yml index f978b0c48ed77..d430ad1503ff9 100644 --- a/.buildkite/pipelines/main/launch_unsigned_builders.yml +++ b/.buildkite/pipelines/main/launch_unsigned_builders.yml @@ -22,6 +22,7 @@ steps: buildkite-agent pipeline upload .buildkite/pipelines/main/misc/doctest.yml buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml buildkite-agent pipeline upload .buildkite/pipelines/main/misc/llvmpasses.yml + buildkite-agent pipeline upload .buildkite/pipelines/main/misc/sanitizers.yml # Launch all of the platform builders. bash .buildkite/pipelines/main/platforms/platforms.sh package_linux diff --git a/.buildkite/pipelines/experimental/misc/sanitizers.yml b/.buildkite/pipelines/main/misc/sanitizers.yml similarity index 75% rename from .buildkite/pipelines/experimental/misc/sanitizers.yml rename to .buildkite/pipelines/main/misc/sanitizers.yml index 2652ef8c2f32f..6dfd13dde1718 100644 --- a/.buildkite/pipelines/experimental/misc/sanitizers.yml +++ b/.buildkite/pipelines/main/misc/sanitizers.yml @@ -18,12 +18,9 @@ steps: gid: 1000 workspaces: - "/cache/repos:/cache/repos" - # `contrib/check-asan.jl` needs a `julia` binary inside the inner sandbox: - - JuliaCI/julia#v1: - # Drop default "registries" directory, so it is not persisted from execution to execution - persist_depot_dirs: packages,artifacts,compiled - version: '1.6' timeout_in_minutes: 120 + if: | # We only run the `asan` job on Julia 1.8 and later. + (pipeline.slug != "julia-release-1-dot-6") && (pipeline.slug != "julia-release-1-dot-7") commands: | echo "--- Build julia-debug with ASAN" contrib/asan/build.sh ./tmp/test-asan -j$${JULIA_CPU_THREADS:?} debug From 71a2c7af05f110268bdc813ae44bc1960e474263 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 4 Oct 2021 08:24:57 -0400 Subject: [PATCH 40/88] CI (Buildkite): fix the signature for the scheduled coverage pipeline (#42488) (cherry picked from commit 8857e8a6a99aff38e4af37beb84de9015409b128) --- .buildkite/pipelines/scheduled/0_webui.yml | 6 +++++- .../coverage/coverage_linux64.yml.signature | Bin 0 -> 96 bytes 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .buildkite/pipelines/scheduled/coverage/coverage_linux64.yml.signature diff --git a/.buildkite/pipelines/scheduled/0_webui.yml b/.buildkite/pipelines/scheduled/0_webui.yml index 61324d13d0ca1..03024bd51c680 100644 --- a/.buildkite/pipelines/scheduled/0_webui.yml +++ b/.buildkite/pipelines/scheduled/0_webui.yml @@ -20,4 +20,8 @@ steps: # verifies the treehash of the pipeline itself and the inputs listed in `inputs` signed_pipelines: - pipeline: .buildkite/pipelines/scheduled/coverage/coverage_linux64.yml - signature: U2FsdGVkX1+FtqbbxyzoI/j0InDefRQ3OR06BAM2EWRhDG3SiwiPcOREudCTJ+1Z+AEVwVz5KTgw9lBVO1yjcWts3XePIy/W+arN4V+t97Dfuf4wsAr9ubpQ10GaoFnK + signature_file: .buildkite/pipelines/scheduled/coverage/coverage_linux64.yml.signature + inputs: + - .buildkite/pipelines/scheduled/coverage/coverage_linux64.yml + - .buildkite/pipelines/scheduled/coverage/run_tests_parallel.jl + - .buildkite/pipelines/scheduled/coverage/upload_coverage.jl diff --git a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml.signature b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml.signature new file mode 100644 index 0000000000000000000000000000000000000000..e8f964bc9214a610e6cca4cc7459de25ffb63e7a GIT binary patch literal 96 zcmV-m0H6O;VQh3|WM5yT|8cr-Q8?N%JJlb&*wh@$cn1NLB-QTcn(Rqe)BkhSC>}63 zgDBff_N%>8mGMYIn6!hCNz0x2xboEw-G10oh9>da*s`wxX-!>31_-^_@kCS|VvkQ+ CZ!vfP literal 0 HcmV?d00001 From c27a00ca952b91a7c7d4583ce71fe43de7fa4575 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 4 Oct 2021 08:25:50 -0400 Subject: [PATCH 41/88] CI (Buildkite): add `package_musl64` and `tester_musl64` (Linux, musl libc, 64-bit, x86_64 architecture) (#42476) (cherry picked from commit 1195f5adf05d78a4001b981bedd4b68a865cf8c3) --- .../main/launch_unsigned_builders.yml | 14 +++++++----- .../main/platforms/package_linux.arches | 13 ++++++----- .../main/platforms/package_linux.yml | 17 +++++++++----- .../pipelines/main/platforms/platforms.sh | 22 ++++++++++--------- .../main/platforms/tester_linux.arches | 17 +++++++------- .../pipelines/main/platforms/tester_linux.yml | 12 +++++----- 6 files changed, 54 insertions(+), 41 deletions(-) diff --git a/.buildkite/pipelines/main/launch_unsigned_builders.yml b/.buildkite/pipelines/main/launch_unsigned_builders.yml index d430ad1503ff9..4ff6e310e3c12 100644 --- a/.buildkite/pipelines/main/launch_unsigned_builders.yml +++ b/.buildkite/pipelines/main/launch_unsigned_builders.yml @@ -13,19 +13,21 @@ # something about the privileged steps. steps: - - label: ":buildkite: Launch unsigned builders" + - label: ":buildkite: Launch unsigned jobs" commands: | - # Launch the `whitespace` builder first, because we want that builder to finish as quickly as possible. - buildkite-agent pipeline upload .buildkite/pipelines/main/misc/whitespace.yml - - # Launch the miscellaneous builders in alphabetical order. + # Launch the miscellaneous jobs in alphabetical order. buildkite-agent pipeline upload .buildkite/pipelines/main/misc/doctest.yml buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml buildkite-agent pipeline upload .buildkite/pipelines/main/misc/llvmpasses.yml buildkite-agent pipeline upload .buildkite/pipelines/main/misc/sanitizers.yml - # Launch all of the platform builders. + # Launch all of the platform jobs. bash .buildkite/pipelines/main/platforms/platforms.sh package_linux bash .buildkite/pipelines/main/platforms/platforms.sh tester_linux + + # Launch the `whitespace` job last. Uploading it last actually causes it to start + # first. We want this job to start first because we want it to finish as quickly + # as possible. + buildkite-agent pipeline upload .buildkite/pipelines/main/misc/whitespace.yml agents: queue: julia diff --git a/.buildkite/pipelines/main/platforms/package_linux.arches b/.buildkite/pipelines/main/platforms/package_linux.arches index d83bd798242ac..58d5b87f4c3a3 100644 --- a/.buildkite/pipelines/main/platforms/package_linux.arches +++ b/.buildkite/pipelines/main/platforms/package_linux.arches @@ -1,6 +1,7 @@ -# ARCH ARCH_LABEL ROOTFS_ARCH TIMEOUT ROOTFS_TAG ROOTFS_TREE -# aarch64 aarch64 aarch64 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff -# armv7l armv7l armv7l 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 -32 32 i686 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 -# ppc64le ppc64le powerpc64le 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 -64 64 x86_64 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +# PLATFORM ARCH ARCH_LABEL ROOTFS_ARCH ALLOW_FAIL TIMEOUT ROOTFS_TAG ROOTFS_TREE +# linux aarch64 aarch64 aarch64 false 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff +# linux armv7l armv7l armv7l false 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 +linux 32 32 i686 false 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 +# linux ppc64le ppc64le powerpc64le false 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 +linux 64 64 x86_64 false 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +musl 64 64 x86_64 false 60 v3.19 e6a2730e37c386c46915b2650d6aaaa398195152 diff --git a/.buildkite/pipelines/main/platforms/package_linux.yml b/.buildkite/pipelines/main/platforms/package_linux.yml index f6f937738e431..9108c5a41a212 100644 --- a/.buildkite/pipelines/main/platforms/package_linux.yml +++ b/.buildkite/pipelines/main/platforms/package_linux.yml @@ -4,15 +4,15 @@ agents: sandbox.jl: "true" os: "linux" steps: - - label: "package_linux${ARCH_LABEL?}" - key: package_linux${ARCH_LABEL?} + - label: "package_${PLATFORM?}${ARCH_LABEL?}" + key: package_${PLATFORM?}${ARCH_LABEL?} plugins: - JuliaCI/julia#v1: # Drop default "registries" directory, so it is not persisted from execution to execution persist_depot_dirs: packages,artifacts,compiled version: '1.6' - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_linux.${ROOTFS_ARCH?}.tar.gz + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_${PLATFORM?}.${ROOTFS_ARCH?}.tar.gz rootfs_treehash: "${ROOTFS_TREE?}" uid: 1000 gid: 1000 @@ -24,9 +24,11 @@ steps: echo "--- Print the full and short commit hashes" SHORT_COMMIT_LENGTH=10 SHORT_COMMIT=`echo $${BUILDKITE_COMMIT:?} | cut -c1-$${SHORT_COMMIT_LENGTH:?}` - JULIA_BINARYDIST_FILENAME=`make print-JULIA_BINARYDIST_FILENAME | cut -c27-` ARTIFACT_FILE_EXTENSION="tar.gz" - ARTIFACT_FILENAME="$${JULIA_BINARYDIST_FILENAME:?}.$${ARTIFACT_FILE_EXTENSION:?}" + ARTIFACT_FILENAME="julia-$${SHORT_COMMIT:?}-${PLATFORM?}${ARCH?}.$${ARTIFACT_FILE_EXTENSION:?}" + JULIA_BINARYDIST_FILENAME=`make print-JULIA_BINARYDIST_FILENAME | cut -c27-` + JULIA_BINARYDIST="$${JULIA_BINARYDIST_FILENAME:?}.$${ARTIFACT_FILE_EXTENSION:?}" + echo "The full commit is: $${BUILDKITE_COMMIT:?}" echo "The short commit is: $${SHORT_COMMIT:?}" echo "The artifact filename will be: $${ARTIFACT_FILENAME:?}" @@ -43,7 +45,10 @@ steps: echo "--- Create build artifacts" make -j 8 binary-dist + ls -l $${JULIA_BINARYDIST:?} + if [[ "$${JULIA_BINARYDIST:?}" != "$${ARTIFACT_FILENAME:?}" ]]; then + mv $${JULIA_BINARYDIST:?} $${ARTIFACT_FILENAME:?} + fi ls -l $${ARTIFACT_FILENAME:?} - echo "--- Upload build artifacts" buildkite-agent artifact upload $${ARTIFACT_FILENAME:?} diff --git a/.buildkite/pipelines/main/platforms/platforms.sh b/.buildkite/pipelines/main/platforms/platforms.sh index d58daeb2a9929..760d65c4e842f 100755 --- a/.buildkite/pipelines/main/platforms/platforms.sh +++ b/.buildkite/pipelines/main/platforms/platforms.sh @@ -2,9 +2,9 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -PLATFORM="$1" +OS="$1" -cat "$SCRIPT_DIR/$PLATFORM.arches" | tr -s ' ' | while read _line; do +cat "$SCRIPT_DIR/$OS.arches" | tr -s ' ' | while read _line; do # Remove whitespace from the beginning and end of each line line=`echo $_line | tr -s ' '` @@ -13,12 +13,14 @@ cat "$SCRIPT_DIR/$PLATFORM.arches" | tr -s ' ' | while read _line; do continue fi - export ARCH=`echo $line | cut -d ' ' -f 1` - export ARCH_LABEL=`echo $line | cut -d ' ' -f 2` - export ROOTFS_ARCH=`echo $line | cut -d ' ' -f 3` - export TIMEOUT=`echo $line | cut -d ' ' -f 4` - export ROOTFS_TAG=`echo $line | cut -d ' ' -f 5` - export ROOTFS_TREE=`echo $line | cut -d ' ' -f 6` - echo "Launching: $PLATFORM $ARCH $ARCH_LABEL $ROOTFS_ARCH $TIMEOUT" - buildkite-agent pipeline upload "$SCRIPT_DIR/$PLATFORM.yml" + export PLATFORM=`echo $line | cut -d ' ' -f 1` + export ARCH=`echo $line | cut -d ' ' -f 2` + export ARCH_LABEL=`echo $line | cut -d ' ' -f 3` + export ROOTFS_ARCH=`echo $line | cut -d ' ' -f 4` + export ALLOW_FAIL=`echo $line | cut -d ' ' -f 5` + export TIMEOUT=`echo $line | cut -d ' ' -f 6` + export ROOTFS_TAG=`echo $line | cut -d ' ' -f 7` + export ROOTFS_TREE=`echo $line | cut -d ' ' -f 8` + echo "Launching: $OS $PLATFORM $ARCH $ARCH_LABEL $ROOTFS_ARCH $ALLOW_FAIL $TIMEOUT" + buildkite-agent pipeline upload "$SCRIPT_DIR/$OS.yml" done diff --git a/.buildkite/pipelines/main/platforms/tester_linux.arches b/.buildkite/pipelines/main/platforms/tester_linux.arches index 7d8e8ba607533..33216f39a5eb8 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.arches +++ b/.buildkite/pipelines/main/platforms/tester_linux.arches @@ -1,8 +1,9 @@ -# ARCH ARCH_LABEL ROOTFS_ARCH TIMEOUT ROOTFS_TAG ROOTFS_TREE -# aarch64 aarch64 aarch64 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff -# armv7l armv7l armv7l 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 -32 32 i686 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 -# ppc64le ppc64le powerpc64le 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 -64 64_rr x86_64 180 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 -64 64_st x86_64 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 -64 64_mt x86_64 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +# PLATFORM ARCH ARCH_LABEL ROOTFS_ARCH ALLOW_FAIL TIMEOUT ROOTFS_TAG ROOTFS_TREE +# linux aarch64 aarch64 aarch64 false 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff +# linux armv7l armv7l armv7l false 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 +linux 32 32 i686 false 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 +# linux ppc64le ppc64le powerpc64le false 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 +linux 64 64_rr x86_64 false 180 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +linux 64 64_st x86_64 false 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +linux 64 64_mt x86_64 false 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +musl 64 64 x86_64 true 60 v3.19 e6a2730e37c386c46915b2650d6aaaa398195152 diff --git a/.buildkite/pipelines/main/platforms/tester_linux.yml b/.buildkite/pipelines/main/platforms/tester_linux.yml index 295de3b881054..c6e6c072904c1 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.yml +++ b/.buildkite/pipelines/main/platforms/tester_linux.yml @@ -4,16 +4,17 @@ agents: sandbox.jl: "true" os: "linux" steps: - - label: "tester_linux${ARCH_LABEL?}" - key: tester_linux${ARCH_LABEL?} - depends_on: package_linux${ARCH?} + - label: "tester_${PLATFORM?}${ARCH_LABEL?}" + key: tester_${PLATFORM?}${ARCH_LABEL?} + depends_on: package_${PLATFORM?}${ARCH?} plugins: - JuliaCI/julia#v1: # Drop default "registries" directory, so it is not persisted from execution to execution persist_depot_dirs: packages,artifacts,compiled version: '1.6' - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_linux.${ROOTFS_ARCH?}.tar.gz + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_${PLATFORM?}.${ROOTFS_ARCH?}.tar.gz + # rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/tester${PLATFORM?}.${ROOTFS_ARCH?}.tar.gz rootfs_treehash: "${ROOTFS_TREE?}" uid: 1000 gid: 1000 @@ -23,6 +24,7 @@ steps: env: JULIA_SHELL: "/bin/bash" timeout_in_minutes: ${TIMEOUT?} + soft_fail: ${ALLOW_FAIL?} commands: | echo "--- Print the full and short commit hashes" SHORT_COMMIT_LENGTH=10 @@ -30,7 +32,7 @@ steps: JULIA_DIR="julia-$${SHORT_COMMIT:?}" JULIA_BINARY="$${JULIA_DIR:?}/bin/julia" ARTIFACT_FILE_EXTENSION="tar.gz" - ARTIFACT_FILENAME="julia-$${SHORT_COMMIT:?}-linux${ARCH?}.$${ARTIFACT_FILE_EXTENSION:?}" + ARTIFACT_FILENAME="julia-$${SHORT_COMMIT:?}-${PLATFORM?}${ARCH?}.$${ARTIFACT_FILE_EXTENSION:?}" echo "The full commit is: $${BUILDKITE_COMMIT:?}" echo "The short commit is: $${SHORT_COMMIT:?}" echo "The artifact filename will be: $${ARTIFACT_FILENAME:?}" From b2a8e6a06a6dc54204a3463aef74919cf5f7e1fb Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 5 Oct 2021 06:55:08 -0400 Subject: [PATCH 42/88] Reduce compilation time for `permutedims` with high dimensional arrays (#42486) (cherry picked from commit 5b7bb084d478050b5265f66a571969c7df280f6b) --- base/multidimensional.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/base/multidimensional.jl b/base/multidimensional.jl index e07789f0f6a4d..25688edbe8f82 100644 --- a/base/multidimensional.jl +++ b/base/multidimensional.jl @@ -1534,13 +1534,12 @@ for (V, PT, BT) in Any[((:N,), BitArray, BitArray), ((:T,:N), Array, StridedArra #Creates offset, because indexing starts at 1 offset = 1 - sum(@ntuple $N d->strides_{d+1}) + sumc = 0 ind = 1 - @nexprs 1 d->(counts_{$N+1} = strides_{$N+1}) # a trick to set counts_($N+1) @nloops($N, i, P, - d->(counts_d = strides_d), # PRE - d->(counts_{d+1} += strides_{d+1}), # POST + d->(sumc += i_d*strides_{d+1}), # PRE + d->(sumc -= i_d*strides_{d+1}), # POST begin # BODY - sumc = sum(@ntuple $N d->counts_{d+1}) @inbounds P[ind] = B[sumc+offset] ind += 1 end) From 41d6dc463fe2e2ff938a99d916ada28703a63886 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 5 Oct 2021 11:40:24 -0400 Subject: [PATCH 43/88] fix #42409, stack overflow in type intersection (#42464) (cherry picked from commit 2388a5b4001dcd7b78becd7402420a23c3c81e91) --- src/subtype.c | 11 ++++++++--- test/subtype.jl | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/subtype.c b/src/subtype.c index c3512eeb17dac..2e1bfb4b05a66 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -639,6 +639,8 @@ static int var_lt(jl_tvar_t *b, jl_value_t *a, jl_stenv_t *e, int param) return 1; } +static int subtype_by_bounds(jl_value_t *x, jl_value_t *y, jl_stenv_t *e) JL_NOTSAFEPOINT; + // check that type var `b` is >: `a`, and update b's lower bound. static int var_gt(jl_tvar_t *b, jl_value_t *a, jl_stenv_t *e, int param) { @@ -656,7 +658,10 @@ static int var_gt(jl_tvar_t *b, jl_value_t *a, jl_stenv_t *e, int param) } if (!((bb->ub == (jl_value_t*)jl_any_type && !jl_is_type(a) && !jl_is_typevar(a)) || subtype_ccheck(a, bb->ub, e))) return 0; - bb->lb = simple_join(bb->lb, a); + jl_value_t *lb = simple_join(bb->lb, a); + if (!e->intersection || !subtype_by_bounds(lb, b, e)) + bb->lb = lb; + // this bound should not be directly circular assert(bb->lb != (jl_value_t*)b); if (jl_is_typevar(a)) { jl_varbinding_t *aa = lookup(e, (jl_tvar_t*)a); @@ -2918,7 +2923,7 @@ static jl_value_t *intersect_type_type(jl_value_t *x, jl_value_t *y, jl_stenv_t // cmp <= 0: is x already <= y in this environment // cmp >= 0: is x already >= y in this environment -static int compareto_var(jl_value_t *x, jl_tvar_t *y, jl_stenv_t *e, int cmp) +static int compareto_var(jl_value_t *x, jl_tvar_t *y, jl_stenv_t *e, int cmp) JL_NOTSAFEPOINT { if (x == (jl_value_t*)y) return 1; @@ -2938,7 +2943,7 @@ static int compareto_var(jl_value_t *x, jl_tvar_t *y, jl_stenv_t *e, int cmp) // Check whether the environment already asserts x <: y via recorded bounds. // This is used to avoid adding redundant constraints that lead to cycles. // Note this is a semi-predicate: 1 => is a subtype, 0 => unknown -static int subtype_by_bounds(jl_value_t *x, jl_value_t *y, jl_stenv_t *e) +static int subtype_by_bounds(jl_value_t *x, jl_value_t *y, jl_stenv_t *e) JL_NOTSAFEPOINT { if (!jl_is_typevar(x) || !jl_is_typevar(y)) return 0; diff --git a/test/subtype.jl b/test/subtype.jl index d403716646de0..3eca685aee84c 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -1971,3 +1971,8 @@ end @testintersect(Tuple{Type{T}, T} where T<:(Tuple{Vararg{_A, _B}} where _B where _A), Tuple{Type{Tuple{Vararg{_A, N}} where _A<:F}, Pair{N, F}} where F where N, Bottom) + +# issue #42409 +@testintersect(Tuple{Type{Pair{_A, S} where S<:AbstractArray{<:_A, 2}}, Dict} where _A, + Tuple{Type{Pair{_A, S} where S<:AbstractArray{<:_A, 2}} where _A, Union{Array, Pair}}, + Bottom) From 2329c7f048ba398c8a68260bdff98c4cb833c714 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 5 Oct 2021 12:17:16 -0400 Subject: [PATCH 44/88] Distributed: improve some of the tests in the Distributed test suite when multithreading is enabled (#42499) Co-authored-by: Takafumi Arakaki Co-authored-by: Takafumi Arakaki (cherry picked from commit 153db7a7a8a50bdbbea6dfa8ce7985b50088a95e) --- stdlib/Distributed/test/distributed_exec.jl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/stdlib/Distributed/test/distributed_exec.jl b/stdlib/Distributed/test/distributed_exec.jl index 606b7fa81c3e7..3335807fe17e2 100644 --- a/stdlib/Distributed/test/distributed_exec.jl +++ b/stdlib/Distributed/test/distributed_exec.jl @@ -132,6 +132,18 @@ end testf(id_me) testf(id_other) +function poll_while(f::Function; timeout_seconds::Integer = 60) + start_time = time_ns() + while f() + sleep(1) + if ( ( time_ns() - start_time )/1e9 ) > timeout_seconds + @error "Timed out" timeout_seconds + return false + end + end + return true +end + # Distributed GC tests for Futures function test_futures_dgc(id) f = remotecall(myid, id) @@ -143,8 +155,7 @@ function test_futures_dgc(id) @test fetch(f) == id @test f.v !== nothing yield(); # flush gc msgs - @test remotecall_fetch(k->(yield();haskey(Distributed.PGRP.refs, k)), id, fid) == false - + @test poll_while(() -> remotecall_fetch(k->(yield();haskey(Distributed.PGRP.refs, k)), id, fid)) # if unfetched, it should be deleted after a finalize f = remotecall(myid, id) @@ -153,7 +164,7 @@ function test_futures_dgc(id) @test f.v === nothing finalize(f) yield(); # flush gc msgs - @test remotecall_fetch(k->(yield();haskey(Distributed.PGRP.refs, k)), id, fid) == false + @test poll_while(() -> remotecall_fetch(k->(yield();haskey(Distributed.PGRP.refs, k)), id, fid)) end test_futures_dgc(id_me) @@ -243,7 +254,7 @@ function test_remoteref_dgc(id) @test remotecall_fetch(k->(yield();haskey(Distributed.PGRP.refs, k)), id, rrid) == true finalize(rr) yield(); # flush gc msgs - @test remotecall_fetch(k->(yield();haskey(Distributed.PGRP.refs, k)), id, rrid) == false + @test poll_while(() -> remotecall_fetch(k->(yield();haskey(Distributed.PGRP.refs, k)), id, rrid)) end test_remoteref_dgc(id_me) test_remoteref_dgc(id_other) From 388f5df0453e61e2b04a7972c0aec1536cceb477 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Tue, 5 Oct 2021 21:02:19 +0200 Subject: [PATCH 45/88] bump to latest Pkg release-1.7 --- .../Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 | 1 - .../Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 | 1 - .../Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 | 1 + .../Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 | 1 + stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 create mode 100644 deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 diff --git a/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 b/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 deleted file mode 100644 index a9bc18a4e54fc..0000000000000 --- a/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -a643f3a794556f4393ae4814bbf5c259 diff --git a/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 b/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 deleted file mode 100644 index 59acdff11bfd1..0000000000000 --- a/deps/checksums/Pkg-3da1ce68723e0a4585036856e0fa3c5054bbc6e1.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -96b78d4afa3ffa3bf64d77437258223186a3d61976e9f474573fd958547d0a5466d9f1eb471be81571d0a7462d6bf85b4def04f5aa51577601a522182ca63e6c diff --git a/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 b/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 new file mode 100644 index 0000000000000..f0adb222ccb0d --- /dev/null +++ b/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 @@ -0,0 +1 @@ +26646eea94e930b2217e9cd6e7043735 diff --git a/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 b/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 new file mode 100644 index 0000000000000..6769fd1373c32 --- /dev/null +++ b/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 @@ -0,0 +1 @@ +5cae2fee81577007070ed89197a9b1241c46185bbe069a13e522248f0a295acab9875dfeb7718c6c7dc5bb13da41a57c070feb2c0bc708d0032fe875bab9c80d diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index c98fcb8c49c35..ac1045de20fc5 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = release-1.7 -PKG_SHA1 = 3da1ce68723e0a4585036856e0fa3c5054bbc6e1 +PKG_SHA1 = 56228c448bb3695be32eecf0aa0d301dbb5e7f9f From d42ae5aab87b3a5529f11db4d5e543d3e44cd11c Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 30 Sep 2021 16:12:03 -0400 Subject: [PATCH 46/88] fix #42411, restore export of `jl_options` (#42416) Co-authored-by: Jameson Nash (cherry picked from commit c5cb02960c2939dae303d7548ba9e5abb2b51ea8) --- cli/loader.h | 4 ++ cli/loader_lib.c | 4 ++ src/Makefile | 2 +- src/jl_exported_data.inc | 3 +- src/jl_exported_funcs.inc | 1 + src/jloptions.c | 103 ++++++++++++++++++++----------------- src/jloptions.h | 56 ++++++++++++++++++++ src/julia.h | 55 ++------------------ test/embedding/embedding.c | 9 ++++ 9 files changed, 138 insertions(+), 99 deletions(-) create mode 100644 src/jloptions.h diff --git a/cli/loader.h b/cli/loader.h index 6df1557ec2c26..c656bf5ead3f1 100644 --- a/cli/loader.h +++ b/cli/loader.h @@ -22,6 +22,8 @@ #define realloc loader_realloc #endif +#include + #ifdef _OS_WINDOWS_ #define WIN32_LEAN_AND_MEAN #include @@ -91,3 +93,5 @@ int wchar_to_utf8(const wchar_t * wstr, char *str, size_t maxlen); int utf8_to_wchar(const char * str, wchar_t *wstr, size_t maxlen); void setup_stdio(void); #endif + +#include "../src/jloptions.h" diff --git a/cli/loader_lib.c b/cli/loader_lib.c index d921055f08221..1a6ef5ab19087 100644 --- a/cli/loader_lib.c +++ b/cli/loader_lib.c @@ -182,6 +182,10 @@ __attribute__((constructor)) void jl_load_libjulia_internal(void) { } (*jl_exported_func_addrs[symbol_idx]) = addr; } + + // jl_options must be initialized very early, in case an embedder sets some + // values there before calling jl_init + ((void (*)(void))jl_init_options_addr)(); } // Load libjulia and run the REPL with the given arguments (in UTF-8 format) diff --git a/src/Makefile b/src/Makefile index f5cc50e6129e9..37cfe91df9869 100644 --- a/src/Makefile +++ b/src/Makefile @@ -88,7 +88,7 @@ SRCS += $(RUNTIME_SRCS) # headers are used for dependency tracking, while public headers will be part of the dist UV_HEADERS := HEADERS := $(BUILDDIR)/julia_version.h $(wildcard $(SRCDIR)/support/*.h) $(addprefix $(SRCDIR)/,julia.h julia_assert.h julia_threads.h julia_fasttls.h locks.h atomics.h julia_internal.h options.h timing.h) -PUBLIC_HEADERS := $(BUILDDIR)/julia_version.h $(wildcard $(SRCDIR)/support/*.h) $(addprefix $(SRCDIR)/,julia.h julia_assert.h julia_threads.h julia_fasttls.h locks.h atomics.h julia_gcext.h) +PUBLIC_HEADERS := $(BUILDDIR)/julia_version.h $(wildcard $(SRCDIR)/support/*.h) $(addprefix $(SRCDIR)/,julia.h julia_assert.h julia_threads.h julia_fasttls.h locks.h atomics.h julia_gcext.h jloptions.h) ifeq ($(USE_SYSTEM_LIBUV),0) UV_HEADERS += uv.h UV_HEADERS += uv/*.h diff --git a/src/jl_exported_data.inc b/src/jl_exported_data.inc index 0870464c7d6b5..c8e6031fc93bb 100644 --- a/src/jl_exported_data.inc +++ b/src/jl_exported_data.inc @@ -125,4 +125,5 @@ // Data symbols that are defined inside the public libjulia #define JL_EXPORTED_DATA_SYMBOLS(XX) \ - XX(jl_n_threads, int) + XX(jl_n_threads, int) \ + XX(jl_options, jl_options_t) diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index 0bb96043f6e16..f056cbc504ac7 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -279,6 +279,7 @@ XX(jl_init_with_image) \ XX(jl_init__threading) \ XX(jl_init_with_image__threading) \ + XX(jl_init_options) \ XX(jl_install_sigint_handler) \ XX(jl_instantiate_type_in_env) \ XX(jl_instantiate_unionall) \ diff --git a/src/jloptions.c b/src/jloptions.c index ab1af72a04c79..5226da2884750 100644 --- a/src/jloptions.c +++ b/src/jloptions.c @@ -28,56 +28,65 @@ JL_DLLEXPORT const char *jl_get_default_sysimg_path(void) } -jl_options_t jl_options = { 0, // quiet - -1, // banner - NULL, // julia_bindir - NULL, // julia_bin - NULL, // cmds - NULL, // image_file (will be filled in below) - NULL, // cpu_target ("native", "core2", etc...) - 0, // nthreads - 0, // nprocs - NULL, // machine_file - NULL, // project - 0, // isinteractive - 0, // color - JL_OPTIONS_HISTORYFILE_ON, // history file - 0, // startup file - JL_OPTIONS_COMPILE_DEFAULT, // compile_enabled - 0, // code_coverage - 0, // malloc_log - 2, // opt_level - 0, // opt_level_min +static int jl_options_initialized = 0; + +JL_DLLEXPORT void jl_init_options(void) +{ + if (jl_options_initialized) + return; + jl_options = + (jl_options_t){ 0, // quiet + -1, // banner + NULL, // julia_bindir + NULL, // julia_bin + NULL, // cmds + NULL, // image_file (will be filled in below) + NULL, // cpu_target ("native", "core2", etc...) + 0, // nthreads + 0, // nprocs + NULL, // machine_file + NULL, // project + 0, // isinteractive + 0, // color + JL_OPTIONS_HISTORYFILE_ON, // history file + 0, // startup file + JL_OPTIONS_COMPILE_DEFAULT, // compile_enabled + 0, // code_coverage + 0, // malloc_log + 2, // opt_level + 0, // opt_level_min #ifdef JL_DEBUG_BUILD - 2, // debug_level [debug build] + 2, // debug_level [debug build] #else - 1, // debug_level [release build] + 1, // debug_level [release build] #endif - JL_OPTIONS_CHECK_BOUNDS_DEFAULT, // check_bounds - JL_OPTIONS_DEPWARN_OFF, // deprecation warning - 0, // method overwrite warning - 1, // can_inline - JL_OPTIONS_POLLY_ON, // polly - NULL, // trace_compile - JL_OPTIONS_FAST_MATH_DEFAULT, - 0, // worker - NULL, // cookie - JL_OPTIONS_HANDLE_SIGNALS_ON, - JL_OPTIONS_USE_SYSIMAGE_NATIVE_CODE_YES, - JL_OPTIONS_USE_COMPILED_MODULES_YES, - NULL, // bind-to - NULL, // output-bc - NULL, // output-unopt-bc - NULL, // output-o - NULL, // output-asm - NULL, // output-ji - NULL, // output-code_coverage - 0, // incremental - 0, // image_file_specified - JL_OPTIONS_WARN_SCOPE_ON, // ambiguous scope warning - 0, // image-codegen - 0, // rr-detach -}; + JL_OPTIONS_CHECK_BOUNDS_DEFAULT, // check_bounds + JL_OPTIONS_DEPWARN_OFF, // deprecation warning + 0, // method overwrite warning + 1, // can_inline + JL_OPTIONS_POLLY_ON, // polly + NULL, // trace_compile + JL_OPTIONS_FAST_MATH_DEFAULT, + 0, // worker + NULL, // cookie + JL_OPTIONS_HANDLE_SIGNALS_ON, + JL_OPTIONS_USE_SYSIMAGE_NATIVE_CODE_YES, + JL_OPTIONS_USE_COMPILED_MODULES_YES, + NULL, // bind-to + NULL, // output-bc + NULL, // output-unopt-bc + NULL, // output-o + NULL, // output-asm + NULL, // output-ji + NULL, // output-code_coverage + 0, // incremental + 0, // image_file_specified + JL_OPTIONS_WARN_SCOPE_ON, // ambiguous scope warning + 0, // image-codegen + 0, // rr-detach + }; + jl_options_initialized = 1; +} static const char usage[] = "julia [switches] -- [programfile] [args...]\n"; static const char opts[] = diff --git a/src/jloptions.h b/src/jloptions.h new file mode 100644 index 0000000000000..4b2b0504a75b5 --- /dev/null +++ b/src/jloptions.h @@ -0,0 +1,56 @@ +// This file is a part of Julia. License is MIT: https://julialang.org/license + +#ifndef JL_JLOPTIONS_H +#define JL_JLOPTIONS_H + +// NOTE: This struct needs to be kept in sync with JLOptions type in base/options.jl + +typedef struct { + int8_t quiet; + int8_t banner; + const char *julia_bindir; + const char *julia_bin; + const char **cmds; + const char *image_file; + const char *cpu_target; + int32_t nthreads; + int32_t nprocs; + const char *machine_file; + const char *project; + int8_t isinteractive; + int8_t color; + int8_t historyfile; + int8_t startupfile; + int8_t compile_enabled; + int8_t code_coverage; + int8_t malloc_log; + int8_t opt_level; + int8_t opt_level_min; + int8_t debug_level; + int8_t check_bounds; + int8_t depwarn; + int8_t warn_overwrite; + int8_t can_inline; + int8_t polly; + const char *trace_compile; + int8_t fast_math; + int8_t worker; + const char *cookie; + int8_t handle_signals; + int8_t use_sysimage_native_code; + int8_t use_compiled_modules; + const char *bindto; + const char *outputbc; + const char *outputunoptbc; + const char *outputo; + const char *outputasm; + const char *outputji; + const char *output_code_coverage; + int8_t incremental; + int8_t image_file_specified; + int8_t warn_scope; + int8_t image_codegen; + int8_t rr_detach; +} jl_options_t; + +#endif diff --git a/src/julia.h b/src/julia.h index 52f56c782a6f9..d05dda984da8f 100644 --- a/src/julia.h +++ b/src/julia.h @@ -2006,56 +2006,11 @@ JL_DLLEXPORT void jlbacktrace(void) JL_NOTSAFEPOINT; // deprecated JL_DLLEXPORT void jl_(void *jl_value) JL_NOTSAFEPOINT; // julia options ----------------------------------------------------------- -// NOTE: This struct needs to be kept in sync with JLOptions type in base/options.jl -typedef struct { - int8_t quiet; - int8_t banner; - const char *julia_bindir; - const char *julia_bin; - const char **cmds; - const char *image_file; - const char *cpu_target; - int32_t nthreads; - int32_t nprocs; - const char *machine_file; - const char *project; - int8_t isinteractive; - int8_t color; - int8_t historyfile; - int8_t startupfile; - int8_t compile_enabled; - int8_t code_coverage; - int8_t malloc_log; - int8_t opt_level; - int8_t opt_level_min; - int8_t debug_level; - int8_t check_bounds; - int8_t depwarn; - int8_t warn_overwrite; - int8_t can_inline; - int8_t polly; - const char *trace_compile; - int8_t fast_math; - int8_t worker; - const char *cookie; - int8_t handle_signals; - int8_t use_sysimage_native_code; - int8_t use_compiled_modules; - const char *bindto; - const char *outputbc; - const char *outputunoptbc; - const char *outputo; - const char *outputasm; - const char *outputji; - const char *output_code_coverage; - int8_t incremental; - int8_t image_file_specified; - int8_t warn_scope; - int8_t image_codegen; - int8_t rr_detach; -} jl_options_t; - -extern JL_DLLEXPORT jl_options_t jl_options; + +#include "jloptions.h" + +extern JL_DLLIMPORT jl_options_t jl_options; + JL_DLLEXPORT ssize_t jl_sizeof_jl_options(void); // Parse an argc/argv pair to extract general julia options, passing back out diff --git a/test/embedding/embedding.c b/test/embedding/embedding.c index 659ddde3f72df..d082366c908de 100644 --- a/test/embedding/embedding.c +++ b/test/embedding/embedding.c @@ -32,6 +32,9 @@ jl_value_t *checked_eval_string(const char* code) int main() { + // check that setting options works + jl_options.opt_level = 1; + jl_init(); { @@ -40,6 +43,12 @@ int main() checked_eval_string("println(sqrt(2.0))"); } + if (jl_options.opt_level != 1) { + jl_printf(jl_stderr_stream(), "setting jl_options didn't work\n"); + jl_atexit_hook(1); + exit(1); + } + { // Accessing the return value From 76b30f0facfd506180003406238cedbc78dc3a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82=20Kami=C5=84ski?= Date: Wed, 22 Sep 2021 19:14:04 +0200 Subject: [PATCH 47/88] Improve corner cases of deleteat! (#42144) Co-authored-by: Daniel Karrasch (cherry picked from commit deb3fac91684bed1e1e9bda63cd1412cdb62f68b) --- base/array.jl | 18 ++++++++++++---- base/bitarray.jl | 54 ++++++++++++++++++++++++++++++++++++++++++++++-- test/bitarray.jl | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 6 deletions(-) diff --git a/base/array.jl b/base/array.jl index fdcef34586da5..d9518700151f0 100644 --- a/base/array.jl +++ b/base/array.jl @@ -1418,12 +1418,22 @@ julia> deleteat!([6, 5, 4, 3, 2, 1], 2) 1 ``` """ -deleteat!(a::Vector, i::Integer) = (_deleteat!(a, i, 1); a) +function deleteat!(a::Vector, i::Integer) + i isa Bool && depwarn("passing Bool as an index is deprecated", :deleteat!) + _deleteat!(a, i, 1) + return a +end function deleteat!(a::Vector, r::UnitRange{<:Integer}) - n = length(a) - isempty(r) || _deleteat!(a, first(r), length(r)) - return a + if eltype(r) === Bool + return invoke(deleteat!, Tuple{Vector, AbstractVector{Bool}}, a, r) + else + n = length(a) + f = first(r) + f isa Bool && depwarn("passing Bool as an index is deprecated", :deleteat!) + isempty(r) || _deleteat!(a, f, length(r)) + return a + end end """ diff --git a/base/bitarray.jl b/base/bitarray.jl index f451ca93e4373..574a9484020e4 100644 --- a/base/bitarray.jl +++ b/base/bitarray.jl @@ -947,6 +947,7 @@ function _deleteat!(B::BitVector, i::Int) end function deleteat!(B::BitVector, i::Integer) + i isa Bool && depwarn("passing Bool as an index is deprecated", :deleteat!) i = Int(i) n = length(B) 1 <= i <= n || throw(BoundsError(B, i)) @@ -987,25 +988,68 @@ function deleteat!(B::BitVector, inds) (p, s) = y checkbounds(B, p) + p isa Bool && throw(ArgumentError("invalid index $p of type Bool")) q = p+1 new_l -= 1 y = iterate(inds, s) while y !== nothing (i, s) = y if !(q <= i <= n) + i isa Bool && throw(ArgumentError("invalid index $i of type Bool")) i < q && throw(ArgumentError("indices must be unique and sorted")) throw(BoundsError(B, i)) end new_l -= 1 if i > q - copy_chunks!(Bc, p, Bc, Int(q), Int(i-q)) + copy_chunks!(Bc, Int(p), Bc, Int(q), Int(i-q)) p += i-q end q = i+1 y = iterate(inds, s) end - q <= n && copy_chunks!(Bc, p, Bc, Int(q), Int(n-q+1)) + q <= n && copy_chunks!(Bc, Int(p), Bc, Int(q), Int(n-q+1)) + + delta_k = num_bit_chunks(new_l) - length(Bc) + delta_k < 0 && _deleteend!(Bc, -delta_k) + + B.len = new_l + + if new_l > 0 + Bc[end] &= _msk_end(new_l) + end + + return B +end + +function deleteat!(B::BitVector, inds::AbstractVector{Bool}) + length(inds) == length(B) || throw(BoundsError(B, inds)) + + n = new_l = length(B) + y = findfirst(inds) + y === nothing && return B + + Bc = B.chunks + + p = y + s = y + 1 + checkbounds(B, p) + q = p + 1 + new_l -= 1 + y = findnext(inds, s) + while y !== nothing + i = y + s = y + 1 + new_l -= 1 + if i > q + copy_chunks!(Bc, Int(p), Bc, Int(q), Int(i-q)) + p += i - q + end + q = i + 1 + y = findnext(inds, s) + end + + q <= n && copy_chunks!(Bc, Int(p), Bc, Int(q), Int(n - q + 1)) delta_k = num_bit_chunks(new_l) - length(Bc) delta_k < 0 && _deleteend!(Bc, -delta_k) @@ -1023,6 +1067,10 @@ keepat!(B::BitVector, inds) = _keepat!(B, inds) keepat!(B::BitVector, inds::AbstractVector{Bool}) = _keepat!(B, inds) function splice!(B::BitVector, i::Integer) + # TODO: after deprecation remove the four lines below + # as v = B[i] is enough to do both bounds checking + # and Bool check then just pass Int(i) to _deleteat! + i isa Bool && depwarn("passing Bool as an index is deprecated", :splice!) i = Int(i) n = length(B) 1 <= i <= n || throw(BoundsError(B, i)) @@ -1035,8 +1083,10 @@ end const _default_bit_splice = BitVector() function splice!(B::BitVector, r::Union{UnitRange{Int}, Integer}, ins::AbstractArray = _default_bit_splice) + r isa Bool && depwarn("passing Bool as an index is deprecated", :splice!) _splice_int!(B, isa(r, UnitRange{Int}) ? r : Int(r), ins) end + function _splice_int!(B::BitVector, r, ins) n = length(B) i_f, i_l = first(r), last(r) diff --git a/test/bitarray.jl b/test/bitarray.jl index b565252664876..291317a1444d3 100644 --- a/test/bitarray.jl +++ b/test/bitarray.jl @@ -1711,3 +1711,40 @@ end @test typeof([a a ;;; a a]) <: BitArray @test typeof([a a ;;; [a a]]) <: BitArray end + +@testset "deleteat! additional tests" begin + for v in ([1, 2, 3], [true, true, true], trues(3)) + @test_throws BoundsError deleteat!(v, true:true) + end + + for v in ([1], [true], trues(1)) + @test length(deleteat!(v, false:false)) == 1 + @test isempty(deleteat!(v, true:true)) + end + + x = trues(3) + x[3] = false + @test deleteat!(x, [UInt8(2)]) == [true, false] + @test_throws ArgumentError deleteat!(x, Any[true]) + @test_throws ArgumentError deleteat!(x, Any[1, true]) + @test_throws ArgumentError deleteat!(x, Any[2, 1]) + @test_throws BoundsError deleteat!(x, Any[4]) + @test_throws BoundsError deleteat!(x, Any[2, 4]) + + function test_equivalence(n::Int) + x1 = rand(Bool, n) + x2 = BitVector(x1) + inds1 = rand(Bool, n) + inds2 = BitVector(inds1) + return deleteat!(copy(x1), findall(inds1)) == + deleteat!(copy(x1), inds1) == + deleteat!(copy(x2), inds1) == + deleteat!(copy(x1), inds2) == + deleteat!(copy(x2), inds2) + end + + Random.seed!(1234) + for n in 1:20, _ in 1:100 + @test test_equivalence(n) + end +end \ No newline at end of file From 22d203f424387b61f4f9b12da394b91f5319e50c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 5 Oct 2021 16:29:28 -0400 Subject: [PATCH 48/88] add support for JuliaLang/llvm-project (#42505) (cherry picked from commit ab3c6e5a251bfaf89d1faab6962d085b850239b6) --- Make.inc | 2 + contrib/refresh_checksums.mk | 2 +- deps/checksums/llvm | 4 +- deps/llvm-options.mk | 14 - deps/llvm.mk | 346 ++------------ deps/llvm.version | 2 + deps/patchelf.mk | 2 +- .../llvm-12-D109203-stackprobe-x86.patch | 135 ------ .../llvm-12-D75072-SCEV-add-type.patch | 425 ------------------ .../llvm-12-D97435-AArch64-movaddrreg.patch | 164 ------- .../patches/llvm-12-fde-symbols-aarch64.patch | 158 ------- .../llvm-12-force-eh_frame-aarch64.patch | 31 -- deps/patches/llvm-D75072-SCEV-add-type.patch | 415 ----------------- deps/patches/llvm-libunwind-force-dwarf.patch | 181 -------- .../llvm-libunwind-prologue-epilogue.patch | 183 -------- 15 files changed, 48 insertions(+), 2016 deletions(-) create mode 100644 deps/llvm.version delete mode 100644 deps/patches/llvm-12-D109203-stackprobe-x86.patch delete mode 100644 deps/patches/llvm-12-D75072-SCEV-add-type.patch delete mode 100644 deps/patches/llvm-12-D97435-AArch64-movaddrreg.patch delete mode 100644 deps/patches/llvm-12-fde-symbols-aarch64.patch delete mode 100644 deps/patches/llvm-12-force-eh_frame-aarch64.patch delete mode 100644 deps/patches/llvm-D75072-SCEV-add-type.patch delete mode 100644 deps/patches/llvm-libunwind-force-dwarf.patch delete mode 100644 deps/patches/llvm-libunwind-prologue-epilogue.patch diff --git a/Make.inc b/Make.inc index 658e42391f39b..23eb6c0a77466 100644 --- a/Make.inc +++ b/Make.inc @@ -332,6 +332,7 @@ BUILD_LLVM_CLANG := 0 # set to 1 to get lldb (often does not work, no chance with llvm3.2 and earlier) # see http://lldb.llvm.org/build.html for dependencies BUILD_LLDB := 0 +BUILD_LIBCXX := 0 # Options to enable Polly and its code-generation options USE_POLLY := 0 @@ -1360,6 +1361,7 @@ endif # Custom libcxx ifeq ($(BUILD_CUSTOM_LIBCXX),1) +$(error BUILD_CUSTOM_LIBCXX is currently not supported, BUILD_LIBCXX will provide LIBCXX but not link it) LDFLAGS += -L$(build_libdir) CXXLDFLAGS += -L$(build_libdir) -lc++abi -lc++ ifeq ($(USECLANG),1) diff --git a/contrib/refresh_checksums.mk b/contrib/refresh_checksums.mk index 5b8a25ab79b91..871a4b0f40ec6 100644 --- a/contrib/refresh_checksums.mk +++ b/contrib/refresh_checksums.mk @@ -98,7 +98,7 @@ all: checksum-doc-unicodedata # Special LLVM source hashes for optional targets checksum-llvm-special-src: - -+$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/deps" USE_BINARYBUILDER_LLVM=0 DEPS_GIT=0 BUILD_LLDB=1 BUILD_LLVM_CLANG=1 BUILD_CUSTOM_LIBCXX=1 USECLANG=1 checksum-llvm + -+$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/deps" USE_BINARYBUILDER_LLVM=0 DEPS_GIT=0 checksum-llvm all: checksum-llvm-special-src .PHONY: checksum-llvm-special-src diff --git a/deps/checksums/llvm b/deps/checksums/llvm index 3b5a0aeee89b9..9934452a0032e 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -230,5 +230,5 @@ libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/21f09693ee068d6882c libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/cff5601bf70bfdce22cc416ea8ceb469a7e14c02d759ce505b52cd9f9f9579397a9fbb446749bd1e2c3dd7556d221949c0ff13892764d5e71efcb890cf5da40e libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/eae391563d980dd469071072c1ddcf47 libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/32cc745a2225f8fefd1d466d6ada7411c9ec2fd5454f79c393e38dec383c4e46ec183e9b8f8acabfaeaf8dd335a4a76fad28bdee0f056e0d314c572fab36fb0f -llvm-12.0.1.src.tar.xz/md5/72a257604efa1d32ef85a37cd9c66873 -llvm-12.0.1.src.tar.xz/sha512/ff674afb4c8eea699a4756f1bb463f15098a7fa354c733de83c024f8f0cf238cd5f19ae3ec446831c7109235e293e2bf31d8562567ede163c8ec53af7306ba0f +llvm-julia-12.0.1-3.tar.gz/md5/6aa35f64f20f338647b25bb5b4c7e48e +llvm-julia-12.0.1-3.tar.gz/sha512/45ae103a6992fe71cc28eec638eb4c765b5601f7a42a857ce31daaae6e126f8a72b05f417696f612051431505fd833a40d7455cbd50f6d210c8195d0cc4bc9d1 diff --git a/deps/llvm-options.mk b/deps/llvm-options.mk index 2ba3809614d47..a917d63de7205 100644 --- a/deps/llvm-options.mk +++ b/deps/llvm-options.mk @@ -19,17 +19,3 @@ else LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+ASAN endif endif - - -ifeq ($(LLVM_VER),svn) -LLVM_BARESRC_DIR:=$(SRCCACHE)/llvm-project-bare -LLVM_MONOSRC_DIR:=$(SRCCACHE)/llvm-project-$(LLVM_VER)-${LLVM_GIT_VER} -LLVM_SRC_DIR:=$(LLVM_MONOSRC_DIR)/llvm -LIBCXX_ROOT_DIR:=$(LLVM_MONOSRC_DIR) -else -LLVM_MONOSRC_DIR:= -LLVM_SRC_DIR:=$(SRCCACHE)/llvm-$(LLVM_VER) -LIBCXX_ROOT_DIR:=$(LLVM_SRC_DIR)/projects -endif -LLVM_BUILD_DIR:=$(BUILDDIR)/llvm-$(LLVM_VER) -LLVM_BUILDDIR_withtype := $(LLVM_BUILD_DIR)/build_$(LLVM_BUILDTYPE) diff --git a/deps/llvm.mk b/deps/llvm.mk index 60a97fc459acd..c04cd96e7eb67 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -1,47 +1,44 @@ ## LLVM ## include $(SRCDIR)/llvm-ver.make +include $(SRCDIR)/llvm-options.mk ifneq ($(USE_BINARYBUILDER_LLVM), 1) -LLVM_GIT_URL ?= https://github.com/llvm/llvm-project.git +LLVM_GIT_URL:=git://github.com/JuliaLang/llvm-project.git +LLVM_TAR_URL=https://api.github.com/repos/JuliaLang/llvm-project/tarball/$1 +$(eval $(call git-external,llvm,LLVM,CMakeLists.txt,,$(SRCCACHE))) + +LLVM_BUILDDIR := $(BUILDDIR)/$(LLVM_SRC_DIR) +LLVM_BUILDDIR_withtype := $(LLVM_BUILDDIR)/build_$(LLVM_BUILDTYPE) ifeq ($(BUILD_LLDB), 1) BUILD_LLVM_CLANG := 1 # because it's a build requirement endif -ifeq ($(USE_RV),1) +ifeq ($(BUILD_LIBCXX), 1) BUILD_LLVM_CLANG := 1 # because it's a build requirement endif - -ifeq ($(USE_SYSTEM_LLVM),0) -ifneq ($(LLVM_VER),svn) -ifeq ($(USE_POLLY),1) -$(error USE_POLLY=1 requires LLVM_VER=svn) -endif - -ifeq ($(USE_MLIR),1) -$(error USE_MLIR=1 requires LLVM_VER=svn) -endif - ifeq ($(USE_RV),1) -$(error USE_RV=1 requires LLVM_VER=svn) -endif -endif +BUILD_LLVM_CLANG := 1 +# because it's a build requirement endif -ifneq ($(USE_RV),) -LLVM_RV_GIT_URL ?= https://github.com/cdl-saarland/rv -LLVM_RV_GIT_VER ?= release_90 -endif +# TODO: Add RV support back in +# ifneq ($(USE_RV),) +# LLVM_RV_GIT_URL ?= https://github.com/cdl-saarland/rv +# LLVM_RV_GIT_VER ?= release_90 +# endif # for Monorepo LLVM_ENABLE_PROJECTS := LLVM_EXTERNAL_PROJECTS := +LLVM_ENABLE_RUNTIMES := ifeq ($(BUILD_LLVM_CLANG), 1) -LLVM_ENABLE_PROJECTS := $(LLVM_ENABLE_PROJECTS);clang;compiler-rt +LLVM_ENABLE_PROJECTS := $(LLVM_ENABLE_PROJECTS);clang +LLVM_ENABLE_RUNTIMES := $(LLVM_ENABLE_RUNTIMES);compiler-rt endif ifeq ($(USE_POLLY), 1) LLVM_ENABLE_PROJECTS := $(LLVM_ENABLE_PROJECTS);polly @@ -55,41 +52,12 @@ endif ifeq ($(USE_RV), 1) LLVM_EXTERNAL_PROJECTS := $(LLVM_EXTERNAL_PROJECTS);rv endif - -include $(SRCDIR)/llvm-options.mk -LLVM_LIB_FILE := libLLVMCodeGen.a - -ifeq (,$(findstring rc,$(LLVM_VER))) -LLVM_TAR_EXT:=$(LLVM_VER).src.tar.xz -else -LLVM_VER_SPLIT := $(subst -rc, ,$(LLVM_VER)) -LLVM_TAR_EXT:=$(word 1,$(LLVM_VER_SPLIT))rc$(word 2,$(LLVM_VER_SPLIT)).src.tar.xz +ifeq ($(BUILD_LIBCXX), 1) +LLVM_ENABLE_RUNTIMES := $(LLVM_ENABLE_RUNTIMES);libcxx;libcxxabi endif -ifneq ($(LLVM_VER),svn) -LLVM_TAR:=$(SRCCACHE)/llvm-$(LLVM_TAR_EXT) -ifeq ($(BUILD_LLDB),1) -LLVM_LLDB_TAR:=$(SRCCACHE)/lldb-$(LLVM_TAR_EXT) -endif # BUILD_LLDB - -ifeq ($(BUILD_LLVM_CLANG),1) -ifeq ($(LLVM_VER_MAJ).$(LLVM_VER_MIN),9.0) -LLVM_CLANG_TAR:=$(SRCCACHE)/cfe-$(LLVM_TAR_EXT) -else -LLVM_CLANG_TAR:=$(SRCCACHE)/clang-$(LLVM_TAR_EXT) -endif -LLVM_COMPILER_RT_TAR:=$(SRCCACHE)/compiler-rt-$(LLVM_TAR_EXT) -else -LLVM_CLANG_TAR:= -LLVM_COMPILER_RT_TAR:= -LLVM_LIBCXX_TAR:= -endif # BUILD_LLVM_CLANG - -ifeq ($(BUILD_CUSTOM_LIBCXX),1) -LLVM_LIBCXX_TAR:=$(SRCCACHE)/libcxx-$(LLVM_TAR_EXT) -endif -endif # LLVM_VER != svn +LLVM_LIB_FILE := libLLVMCodeGen.a # Figure out which targets to build LLVM_TARGETS := host;NVPTX;AMDGPU;WebAssembly;BPF @@ -100,16 +68,14 @@ LLVM_CPPFLAGS := LLVM_LDFLAGS := LLVM_CMAKE := -# MONOREPO -ifeq ($(LLVM_VER),svn) LLVM_CMAKE += -DLLVM_ENABLE_PROJECTS="$(LLVM_ENABLE_PROJECTS)" LLVM_CMAKE += -DLLVM_EXTERNAL_PROJECTS="$(LLVM_EXTERNAL_PROJECTS)" +LLVM_CMAKE += -DLLVM_ENABLE_RUNTIMES="$(LLVM_ENABLE_RUNTIMES)" ifeq ($(USE_RV),1) LLVM_CMAKE += -DLLVM_EXTERNAL_RV_SOURCE_DIR=$(LLVM_MONOSRC_DIR)/rv LLVM_CMAKE += -DLLVM_CXX_STD=c++14 endif -endif # Allow adding LLVM specific flags LLVM_CFLAGS += $(CFLAGS) @@ -205,19 +171,6 @@ endif # it is then impossible to call non-asserts LLVM libraries (like out-of-tree backends) LLVM_CMAKE += -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF -ifeq ($(BUILD_CUSTOM_LIBCXX),1) -LLVM_LDFLAGS += -Wl,-rpath,$(build_libdir) -LLVM_CPPFLAGS += -I$(build_includedir) -# We don't want to link to libc++ while trying to build it, so we define these -# flags separately so that we can still pass them to the main LLVM build -LLVM_LIBCXX_LDFLAGS := -lc++ -lc++abi -ifeq ($(USEICC),1) -LLVM_LDFLAGS += -no_cpprt -endif # USEICC -else -LLVM_LIBCXX_LDFLAGS := -endif # BUILD_CUSTOM_LIBCXX - LLVM_CMAKE += -DCMAKE_C_FLAGS="$(LLVM_CPPFLAGS) $(LLVM_CFLAGS)" \ -DCMAKE_CXX_FLAGS="$(LLVM_CPPFLAGS) $(LLVM_CXXFLAGS)" ifeq ($(OS),Darwin) @@ -235,37 +188,6 @@ ifeq ($(BUILD_LLDB),0) LLVM_CMAKE += -DLLVM_TOOL_LLDB_BUILD=OFF endif -ifneq ($(LLVM_VER),svn) -LLVM_SRC_URL := https://github.com/llvm/llvm-project/releases/download/llvmorg-$(LLVM_VER) - -ifneq ($(LLVM_CLANG_TAR),) -$(LLVM_CLANG_TAR): | $(SRCCACHE) - $(JLDOWNLOAD) $@ $(LLVM_SRC_URL)/$(notdir $@) -endif -ifneq ($(LLVM_COMPILER_RT_TAR),) -$(LLVM_COMPILER_RT_TAR): | $(SRCCACHE) - $(JLDOWNLOAD) $@ $(LLVM_SRC_URL)/$(notdir $@) -endif - -ifneq ($(LLVM_LIBCXX_TAR),) -$(LLVM_LIBCXX_TAR): | $(SRCCACHE) - $(JLDOWNLOAD) $@ $(LLVM_SRC_URL)/$(notdir $@) -endif -ifneq ($(LLVM_VER),svn) -$(LLVM_TAR): | $(SRCCACHE) - $(JLDOWNLOAD) $@ $(LLVM_SRC_URL)/$(notdir $@) -endif - -ifneq ($(LLVM_LLDB_TAR),) -$(LLVM_LLDB_TAR): | $(SRCCACHE) - $(JLDOWNLOAD) $@ $(LLVM_SRC_URL)/$(notdir $@) -endif -ifeq ($(BUILD_LLDB),1) -$(LLVM_SRC_DIR)/tools/lldb: -$(LLVM_SRC_DIR)/source-extracted: $(LLVM_SRC_DIR)/tools/lldb -endif -endif - # LLDB still relies on plenty of python 2.x infrastructure, without checking llvm_python_location=$(shell /usr/bin/env python2 -c 'import sys; print(sys.executable)') llvm_python_workaround=$(SRCCACHE)/python2_path @@ -276,185 +198,32 @@ $(llvm_python_workaround): ln -sf $(llvm_python_location) "$@/python" && \ ln -sf $(llvm_python_location)-config "$@/python-config" -ifeq ($(BUILD_CUSTOM_LIBCXX),1) - -# Take a snapshot of the CMake flags before linking to -lc++ and -lc++abi -# These are added to the LLVM CMake flags further down -LLVM_CMAKE_LIBCXX := $(LLVM_CMAKE) \ - -DCMAKE_EXE_LINKER_FLAGS="$(LLVM_LDFLAGS)" \ +LLVM_CMAKE += -DCMAKE_EXE_LINKER_FLAGS="$(LLVM_LDFLAGS)" \ -DCMAKE_SHARED_LINKER_FLAGS="$(LLVM_LDFLAGS)" -ifeq ($(USEICC),1) -LIBCXX_EXTRA_FLAGS := -Bstatic -lirc -Bdynamic -endif - -# These libraries require unwind.h from the libunwind dependency -ifeq ($(USE_SYSTEM_LIBUNWIND),0) -ifeq ($(OS),Darwin) -BUILT_UNWIND := $(build_prefix)/manifest/llvmunwind -else -BUILT_UNWIND := $(build_prefix)/manifest/unwind -endif # Darwin -else -BUILT_UNWIND := -endif # Building libunwind - -$(LIBCXX_ROOT_DIR)/libcxx: $(LLVM_LIBCXX_TAR) | $(LLVM_SRC_DIR)/source-extracted -$(LIBCXX_ROOT_DIR)/libcxxabi: $(LLVM_LIBCXXABI_TAR) | $(LLVM_SRC_DIR)/source-extracted -$(LLVM_BUILD_DIR)/libcxx-build/Makefile: | $(LIBCXX_ROOT_DIR)/libcxx $(LIBCXX_ROOT_DIR)/libcxxabi $(BUILT_UNWIND) - mkdir -p $(dir $@) - cd $(dir $@) && \ - $(CMAKE) -G "Unix Makefiles" $(CMAKE_COMMON) $(LLVM_CMAKE_LIBCXX) -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$(LIBCXX_ROOT_DIR)/libcxxabi/include" $(LIBCXX_ROOT_DIR)/libcxx -DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS) -L$(build_libdir) $(LIBCXX_EXTRA_FLAGS)" -$(LLVM_BUILD_DIR)/libcxxabi-build/Makefile: | $(LIBCXX_ROOT_DIR)/libcxxabi $(LIBCXX_ROOT_DIR)/libcxx $(BUILT_UNWIND) - mkdir -p $(dir $@) - cd $(dir $@) && \ - $(CMAKE) -G "Unix Makefiles" $(CMAKE_COMMON) $(LLVM_CMAKE_LIBCXX) -DLLVM_ABI_BREAKING_CHECKS="WITH_ASSERTS" -DLLVM_PATH="$(LLVM_SRC_DIR)" $(LIBCXX_ROOT_DIR)/libcxxabi -DLIBCXXABI_CXX_ABI_LIBRARIES="$(LIBCXX_EXTRA_FLAGS)" -DCMAKE_CXX_FLAGS="$(LLVM_CPPFLAGS) $(LLVM_CXXFLAGS) -std=c++11" -$(LLVM_BUILD_DIR)/libcxxabi-build/lib/libc++abi.so.1.0: $(LLVM_BUILD_DIR)/libcxxabi-build/Makefile $(LIBCXX_ROOT_DIR)/libcxxabi/.git/HEAD - $(MAKE) -C $(LLVM_BUILD_DIR)/libcxxabi-build - touch -c $@ -$(build_libdir)/libc++abi.so.1.0: $(LLVM_BUILD_DIR)/libcxxabi-build/lib/libc++abi.so.1.0 - $(MAKE) -C $(LLVM_BUILD_DIR)/libcxxabi-build install - touch -c $@ - # Building this library installs these headers, which breaks other dependencies - -rm -rf $(build_includedir)/c++ -$(LLVM_BUILD_DIR)/libcxx-build/lib/libc++.so.1.0: $(build_libdir)/libc++abi.so.1.0 $(LLVM_BUILD_DIR)/libcxx-build/Makefile $(LIBCXX_ROOT_DIR)/libcxx/.git/HEAD - $(MAKE) -C $(LLVM_BUILD_DIR)/libcxx-build -$(build_libdir)/libc++.so.1.0: $(LLVM_BUILD_DIR)/libcxx-build/lib/libc++.so.1.0 - $(MAKE) -C $(LLVM_BUILD_DIR)/libcxx-build install - touch -c $@ - # Building this library installs these headers, which breaks other dependencies - -rm -rf $(build_includedir)/c++ -get-libcxx: $(LIBCXX_ROOT_DIR)/libcxx -get-libcxxabi: $(LIBCXX_ROOT_DIR)/libcxxabi -install-libcxxabi: $(build_libdir)/libc++abi.so.1.0 -install-libcxx: $(build_libdir)/libc++.so.1.0 -endif # BUILD_CUSTOM_LIBCXX - -# We want to be able to clean without having to pass BUILD_CUSTOM_LIBCXX=1, so define these -# outside of the conditional above, can't use `LIBCXX_ROOT_DIR` since that might come from -# the monorepo. -clean-libcxx: - -$(MAKE) -C $(LLVM_BUILD_DIR)/libcxx-build clean -clean-libcxxabi: - -$(MAKE) -C $(LLVM_BUILD_DIR)/libcxxabi-build clean -distclean-libcxx: - -rm -rf $(LLVM_LIBCXX_TAR) $(LLVM_SRC_DIR)/projects/libcxx $(LLVM_BUILD_DIR)/libcxx-build -distclean-libcxxabi: - -rm -rf $(LLVM_LIBCXXABI_TAR) $(LLVM_SRC_DIR)/projects/libcxxabi $(LLVM_BUILD_DIR)/libcxxabi-build - - -# We want to ensure that the libcxx linking flags don't get passed to the libcxx build, since it will -# error on a fresh build -LLVM_CMAKE += -DCMAKE_EXE_LINKER_FLAGS="$(LLVM_LDFLAGS) $(LLVM_LIBCXX_LDFLAGS)" \ - -DCMAKE_SHARED_LINKER_FLAGS="$(LLVM_LDFLAGS) $(LLVM_LIBCXX_LDFLAGS)" - # change the SONAME of Julia's private LLVM # i.e. libLLVM-6.0jl.so # see #32462 LLVM_CMAKE += -DLLVM_VERSION_SUFFIX:STRING="jl" -ifeq ($(BUILD_CUSTOM_LIBCXX),1) -LIBCXX_DEPENDENCY := $(build_libdir)/libc++abi.so.1.0 $(build_libdir)/libc++.so.1.0 -get-llvm: get-libcxx get-libcxxabi -endif - -checksum-llvm: $(LLVM_TAR) $(LLVM_CLANG_TAR) $(LLVM_COMPILER_RT_TAR) $(LLVM_LIBCXX_TAR) $(LLVM_LLDB_TAR) -ifneq ($(LLVM_CLANG_TAR),) - $(JLCHECKSUM) $(LLVM_CLANG_TAR) -endif -ifneq ($(LLVM_COMPILER_RT_TAR),) - $(JLCHECKSUM) $(LLVM_COMPILER_RT_TAR) -endif -ifneq ($(LLVM_LIBCXX_TAR),) - $(JLCHECKSUM) $(LLVM_LIBCXX_TAR) -endif -ifneq ($(LLVM_VER),svn) - $(JLCHECKSUM) $(LLVM_TAR) -endif -ifneq ($(LLVM_LLDB_TAR),) - $(JLCHECKSUM) $(LLVM_LLDB_TAR) -endif - -$(LLVM_SRC_DIR)/source-extracted: | $(LLVM_TAR) $(LLVM_CLANG_TAR) $(LLVM_COMPILER_RT_TAR) $(LLVM_LIBCXX_TAR) $(LLVM_LLDB_TAR) -ifneq ($(LLVM_CLANG_TAR),) - $(JLCHECKSUM) $(LLVM_CLANG_TAR) -endif -ifneq ($(LLVM_COMPILER_RT_TAR),) - $(JLCHECKSUM) $(LLVM_COMPILER_RT_TAR) -endif -ifneq ($(LLVM_LIBCXX_TAR),) - $(JLCHECKSUM) $(LLVM_LIBCXX_TAR) -endif -ifneq ($(LLVM_VER),svn) - $(JLCHECKSUM) $(LLVM_TAR) -endif -ifneq ($(LLVM_LLDB_TAR),) - $(JLCHECKSUM) $(LLVM_LLDB_TAR) -endif - -rm -rf $(LLVM_SRC_DIR) -ifneq ($(LLVM_VER),svn) - mkdir -p $(LLVM_SRC_DIR) - $(TAR) -C $(LLVM_SRC_DIR) --strip-components 1 -xf $(LLVM_TAR) -else - ([ ! -d $(LLVM_BARESRC_DIR) ] && \ - git clone --bare $(LLVM_GIT_URL) $(LLVM_BARESRC_DIR) ) || \ - (cd $(LLVM_BARESRC_DIR) && \ - git fetch) - ([ ! -d $(LLVM_MONOSRC_DIR) ] && \ - git clone --dissociate --reference $(LLVM_BARESRC_DIR) $(LLVM_GIT_URL) $(LLVM_MONOSRC_DIR) ) || \ - (cd $(LLVM_MONOSRC_DIR) && \ - git pull --ff-only) -ifneq ($(LLVM_GIT_VER),) - (cd $(LLVM_MONOSRC_DIR) && \ - git checkout $(LLVM_GIT_VER)) -endif # LLVM_GIT_VER - # Debug output only. Disable pager and ignore error. - (cd $(LLVM_SRC_DIR) && \ - git show HEAD --stat | cat) || true -ifeq ($(USE_RV),1) - git clone -b $(LLVM_RV_GIT_VER) $(LLVM_RV_GIT_URL) $(LLVM_MONOSRC_DIR)/rv - (cd $(LLVM_MONOSRC_DIR)/rv && \ - git submodule update --init) || true -endif -endif # LLVM_VER -ifneq ($(LLVM_VER),svn) -ifneq ($(LLVM_CLANG_TAR),) - mkdir -p $(LLVM_SRC_DIR)/tools/clang - $(TAR) -C $(LLVM_SRC_DIR)/tools/clang --strip-components 1 -xf $(LLVM_CLANG_TAR) -endif # LLVM_CLANG_TAR -ifneq ($(LLVM_COMPILER_RT_TAR),) - mkdir -p $(LLVM_SRC_DIR)/projects/compiler-rt - $(TAR) -C $(LLVM_SRC_DIR)/projects/compiler-rt --strip-components 1 -xf $(LLVM_COMPILER_RT_TAR) -endif # LLVM_COMPILER_RT_TAR -ifneq ($(LLVM_LLDB_TAR),) - mkdir -p $(LLVM_SRC_DIR)/tools/lldb - $(TAR) -C $(LLVM_SRC_DIR)/tools/lldb --strip-components 1 -xf $(LLVM_LLDB_TAR) -endif # LLVM_LLDB_TAR -endif # LLVM_VER - # touch some extra files to ensure bisect works pretty well - touch -c $(LLVM_SRC_DIR).extracted - touch -c $(LLVM_SRC_DIR)/configure - touch -c $(LLVM_SRC_DIR)/CMakeLists.txt - echo 1 > $@ - # Apply version-specific LLVM patches sequentially LLVM_PATCH_PREV := define LLVM_PATCH -$$(LLVM_SRC_DIR)/$1.patch-applied: $$(LLVM_SRC_DIR)/source-extracted | $$(SRCDIR)/patches/$1.patch $$(LLVM_PATCH_PREV) - cd $$(LLVM_SRC_DIR) && patch -p1 < $$(SRCDIR)/patches/$1.patch +$$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied: $$(SRCCACHE)/$$(LLVM_SRC_DIR)/source-extracted | $$(SRCDIR)/patches/$1.patch $$(LLVM_PATCH_PREV) + cd $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm && patch -p1 < $$(SRCDIR)/patches/$1.patch echo 1 > $$@ # declare that applying any patch must re-run the compile step -$$(LLVM_BUILDDIR_withtype)/build-compiled: $$(LLVM_SRC_DIR)/$1.patch-applied -LLVM_PATCH_PREV := $$(LLVM_SRC_DIR)/$1.patch-applied +$$(LLVM_BUILDDIR_withtype)/build-compiled: $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied +LLVM_PATCH_PREV := $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied endef define LLVM_PROJ_PATCH -$$(LLVM_SRC_DIR)/$1.patch-applied: $$(LLVM_SRC_DIR)/source-extracted | $$(SRCDIR)/patches/$1.patch $$(LLVM_PATCH_PREV) - cd $$(LLVM_SRC_DIR) && patch -p2 < $$(SRCDIR)/patches/$1.patch +$$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied: $$(SRCCACHE)/$$(LLVM_SRC_DIR)/source-extracted | $$(SRCDIR)/patches/$1.patch $$(LLVM_PATCH_PREV) + cd $$(SRCCACHE)/$$(LLVM_SRC_DIR) && patch -p1 < $$(SRCDIR)/patches/$1.patch echo 1 > $$@ # declare that applying any patch must re-run the compile step -$$(LLVM_BUILDDIR_withtype)/build-compiled: $$(LLVM_SRC_DIR)/$1.patch-applied -LLVM_PATCH_PREV := $$(LLVM_SRC_DIR)/$1.patch-applied +$$(LLVM_BUILDDIR_withtype)/build-compiled: $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied +LLVM_PATCH_PREV := $$(SRCCACHE)/$$(LLVM_SRC_DIR)/$1.patch-applied endef ifeq ($(LLVM_VER_SHORT),11.0) @@ -499,24 +268,7 @@ $(eval $(call LLVM_PROJ_PATCH,llvm-11-D97571-AArch64-loh)) # remove for LLVM 13 $(eval $(call LLVM_PROJ_PATCH,llvm-11-aarch64-addrspace)) # remove for LLVM 13 endif # LLVM_VER 11.0 -ifeq ($(LLVM_VER_SHORT),12.0) -$(eval $(call LLVM_PATCH,llvm7-revert-D44485)) # Needs upstreaming -$(eval $(call LLVM_PATCH,llvm-12-D75072-SCEV-add-type)) -$(eval $(call LLVM_PATCH,llvm-julia-tsan-custom-as)) -ifeq ($(BUILD_LLVM_CLANG),1) -$(eval $(call LLVM_PATCH,llvm-D88630-clang-cmake)) -endif -$(eval $(call LLVM_PATCH,llvm-invalid-addrspacecast-sink)) # Still being upstreamed as D92210 -$(eval $(call LLVM_PATCH,llvm-11-D93154-globalisel-as)) -$(eval $(call LLVM_PATCH,llvm-11-D94813-mergeicmps)) -$(eval $(call LLVM_PROJ_PATCH,llvm-11-AArch64-FastIsel-bug)) -$(eval $(call LLVM_PATCH,llvm-12-D97435-AArch64-movaddrreg)) -$(eval $(call LLVM_PROJ_PATCH,llvm-11-D97571-AArch64-loh)) # remove for LLVM 13 -$(eval $(call LLVM_PROJ_PATCH,llvm-11-aarch64-addrspace)) # remove for LLVM 13 -$(eval $(call LLVM_PROJ_PATCH,llvm-12-fde-symbols-aarch64)) # remove for LLVM 13 -$(eval $(call LLVM_PROJ_PATCH,llvm-12-force-eh_frame-aarch64)) # remove for LLVM 13 -$(eval $(call LLVM_PROJ_PATCH,llvm-12-D109203-stackprobe-x86)) # remove for LLVM 13 -endif # LLVM_VER 12.0 +# NOTE: LLVM 12 has the patches applied to JuliaLang/llvm-project # Add a JL prefix to the version map. DO NOT REMOVE ifneq ($(LLVM_VER), svn) @@ -526,11 +278,11 @@ endif # declare that all patches must be applied before running ./configure $(LLVM_BUILDDIR_withtype)/build-configured: | $(LLVM_PATCH_PREV) -$(LLVM_BUILDDIR_withtype)/build-configured: $(LLVM_SRC_DIR)/source-extracted | $(llvm_python_workaround) $(LIBCXX_DEPENDENCY) +$(LLVM_BUILDDIR_withtype)/build-configured: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted | $(llvm_python_workaround) mkdir -p $(dir $@) cd $(dir $@) && \ export PATH=$(llvm_python_workaround):"$$PATH" && \ - $(CMAKE) $(LLVM_SRC_DIR) $(CMAKE_GENERATOR_COMMAND) $(CMAKE_COMMON) $(LLVM_CMAKE) \ + $(CMAKE) $(SRCCACHE)/$(LLVM_SRC_DIR)/llvm $(CMAKE_GENERATOR_COMMAND) $(CMAKE_COMMON) $(LLVM_CMAKE) \ || { echo '*** To install a newer version of cmake, run contrib/download_cmake.sh ***' && false; } echo 1 > $@ @@ -554,7 +306,7 @@ $(build_prefix)/manifest/llvm: | $(llvm_python_workaround) LLVM_INSTALL = \ cd $1 && mkdir -p $2$$(build_depsbindir) && \ - cp -r $$(LLVM_SRC_DIR)/utils/lit $2$$(build_depsbindir)/ && \ + cp -r $$(SRCCACHE)/$$(LLVM_SRC_DIR)/llvm/utils/lit $2$$(build_depsbindir)/ && \ $$(CMAKE) -DCMAKE_INSTALL_PREFIX="$2$$(build_prefix)" -P cmake_install.cmake ifeq ($(OS), WINNT) LLVM_INSTALL += && cp $2$$(build_shlibdir)/libLLVM.dll $2$$(build_depsbindir) @@ -564,40 +316,22 @@ ifeq ($(OS),Darwin) LLVM_INSTALL += && ln -s libLLVM.dylib $2$$(build_shlibdir)/libLLVM-$$(LLVM_VER_SHORT).dylib endif -$(eval $(call staged-install,llvm,llvm-$$(LLVM_VER)/build_$$(LLVM_BUILDTYPE), \ +$(eval $(call staged-install, \ + llvm,$$(LLVM_SRC_DIR)/build_$$(LLVM_BUILDTYPE), \ LLVM_INSTALL,,,)) -clean-llvm: clean-libcxx clean-libcxxabi +clean-llvm: -rm $(LLVM_BUILDDIR_withtype)/build-configured $(LLVM_BUILDDIR_withtype)/build-compiled -$(MAKE) -C $(LLVM_BUILDDIR_withtype) clean -distclean-llvm: distclean-libcxx distclean-libcxxabi - -rm -rf $(LLVM_TAR) $(LLVM_CLANG_TAR) \ - $(LLVM_COMPILER_RT_TAR) $(LLVM_LIBCXX_TAR) $(LLVM_LLDB_TAR) \ - $(LLVM_SRC_DIR) $(LLVM_BUILDDIR_withtype) - - -ifneq ($(LLVM_VER),svn) -get-llvm: $(LLVM_TAR) $(LLVM_CLANG_TAR) $(LLVM_COMPILER_RT_TAR) $(LLVM_LIBCXX_TAR) $(LLVM_LLDB_TAR) -else -get-llvm: $(LLVM_SRC_DIR)/source-extracted -endif -extract-llvm: $(LLVM_SRC_DIR)/source-extracted +get-llvm: $(LLVM_SRC_FILE) +extract-llvm: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted configure-llvm: $(LLVM_BUILDDIR_withtype)/build-configured compile-llvm: $(LLVM_BUILDDIR_withtype)/build-compiled fastcheck-llvm: #none check-llvm: $(LLVM_BUILDDIR_withtype)/build-checked #todo: LLVM make check target is broken on julia.mit.edu (and really slow elsewhere) - -ifeq ($(LLVM_VER),svn) -update-llvm: - (cd $(LLVM_BARESRC_DIR) && \ - git fetch) - (cd $(LLVM_MONOSRC_DIR) && \ - git fetch $(LLVM_BARESRC_DIR) +refs/remotes/*:refs/remotes/* && \ - git pull --ff-only) -endif else # USE_BINARYBUILDER_LLVM # We provide a way to subversively swap out which LLVM JLL we pull artifacts from diff --git a/deps/llvm.version b/deps/llvm.version new file mode 100644 index 0000000000000..2407d0ac1a04f --- /dev/null +++ b/deps/llvm.version @@ -0,0 +1,2 @@ +LLVM_BRANCH=julia-12.0.1-3 +LLVM_SHA1=julia-12.0.1-3 diff --git a/deps/patchelf.mk b/deps/patchelf.mk index 60e50423568ed..1dbc07a511813 100644 --- a/deps/patchelf.mk +++ b/deps/patchelf.mk @@ -12,7 +12,7 @@ $(SRCCACHE)/patchelf-$(PATCHELF_VER)/source-extracted: $(SRCCACHE)/patchelf-$(PA checksum-patchelf: $(SRCCACHE)/patchelf-$(PATCHELF_VER).tar.gz $(JLCHECKSUM) $< -$(BUILDDIR)/patchelf-$(PATCHELF_VER)/build-configured: $(SRCCACHE)/patchelf-$(PATCHELF_VER)/source-extracted | $(LIBCXX_DEPENDENCY) +$(BUILDDIR)/patchelf-$(PATCHELF_VER)/build-configured: $(SRCCACHE)/patchelf-$(PATCHELF_VER)/source-extracted mkdir -p $(dir $@) cd $(dir $@) && \ $(dir $<)/configure $(CONFIGURE_COMMON) LDFLAGS="$(CXXLDFLAGS)" CPPFLAGS="$(CPPFLAGS)" diff --git a/deps/patches/llvm-12-D109203-stackprobe-x86.patch b/deps/patches/llvm-12-D109203-stackprobe-x86.patch deleted file mode 100644 index 6eddcc7e054c2..0000000000000 --- a/deps/patches/llvm-12-D109203-stackprobe-x86.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp ---- a/llvm/lib/Target/X86/X86FrameLowering.cpp -+++ b/llvm/lib/Target/X86/X86FrameLowering.cpp -@@ -652,7 +652,9 @@ - MF.insert(MBBIter, testMBB); - MF.insert(MBBIter, tailMBB); - -- Register FinalStackProbed = Uses64BitFramePtr ? X86::R11 : X86::R11D; -+ Register FinalStackProbed = Uses64BitFramePtr ? X86::R11 -+ : Is64Bit ? X86::R11D -+ : X86::EAX; - BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::COPY), FinalStackProbed) - .addReg(StackPtr) - .setMIFlag(MachineInstr::FrameSetup); -@@ -1073,7 +1075,9 @@ - MF.insert(MBBIter, bodyMBB); - MF.insert(MBBIter, footMBB); - const unsigned MovMIOpc = Is64Bit ? X86::MOV64mi32 : X86::MOV32mi; -- Register FinalStackProbed = Uses64BitFramePtr ? X86::R11 : X86::R11D; -+ Register FinalStackProbed = Uses64BitFramePtr ? X86::R11 -+ : Is64Bit ? X86::R11D -+ : X86::EAX; - - // Setup entry block - { -diff --git a/llvm/test/CodeGen/X86/stack-clash-large.ll b/llvm/test/CodeGen/X86/stack-clash-large.ll ---- a/llvm/test/CodeGen/X86/stack-clash-large.ll -+++ b/llvm/test/CodeGen/X86/stack-clash-large.ll -@@ -1,5 +1,6 @@ --; RUN: llc -mtriple=x86_64-linux-android < %s | FileCheck -check-prefix=CHECK-X86-64 %s --; RUN: llc -mtriple=i686-linux-android < %s | FileCheck -check-prefix=CHECK-X86-32 %s -+; RUN: llc -mtriple=x86_64-linux-android < %s | FileCheck -check-prefix=CHECK-X64 %s -+; RUN: llc -mtriple=i686-linux-android < %s | FileCheck -check-prefix=CHECK-X86 %s -+; RUN: llc -mtriple=x86_64-linux-gnux32 < %s | FileCheck -check-prefix=CHECK-X32 %s - - define i32 @foo() local_unnamed_addr #0 { - -@@ -14,40 +15,60 @@ - - attributes #0 = {"probe-stack"="inline-asm"} - --; CHECK-X86-64-LABEL: foo: --; CHECK-X86-64: # %bb.0: --; CHECK-X86-64-NEXT: movq %rsp, %r11 --; CHECK-X86-64-NEXT: subq $69632, %r11 # imm = 0x11000 --; CHECK-X86-64-NEXT: .LBB0_1: --; CHECK-X86-64-NEXT: subq $4096, %rsp # imm = 0x1000 --; CHECK-X86-64-NEXT: movq $0, (%rsp) --; CHECK-X86-64-NEXT: cmpq %r11, %rsp --; CHECK-X86-64-NEXT: jne .LBB0_1 --; CHECK-X86-64-NEXT:# %bb.2: --; CHECK-X86-64-NEXT: subq $2248, %rsp --; CHECK-X86-64-NEXT: .cfi_def_cfa_offset 71888 --; CHECK-X86-64-NEXT: movl $1, 264(%rsp) --; CHECK-X86-64-NEXT: movl $1, 28664(%rsp) --; CHECK-X86-64-NEXT: movl -128(%rsp), %eax --; CHECK-X86-64-NEXT: addq $71880, %rsp # imm = 0x118C8 --; CHECK-X86-64-NEXT: .cfi_def_cfa_offset 8 --; CHECK-X86-64-NEXT: retq -+; CHECK-X64-LABEL: foo: -+; CHECK-X64: # %bb.0: -+; CHECK-X64-NEXT: movq %rsp, %r11 -+; CHECK-X64-NEXT: subq $69632, %r11 # imm = 0x11000 -+; CHECK-X64-NEXT: .LBB0_1: -+; CHECK-X64-NEXT: subq $4096, %rsp # imm = 0x1000 -+; CHECK-X64-NEXT: movq $0, (%rsp) -+; CHECK-X64-NEXT: cmpq %r11, %rsp -+; CHECK-X64-NEXT: jne .LBB0_1 -+; CHECK-X64-NEXT:# %bb.2: -+; CHECK-X64-NEXT: subq $2248, %rsp -+; CHECK-X64-NEXT: .cfi_def_cfa_offset 71888 -+; CHECK-X64-NEXT: movl $1, 264(%rsp) -+; CHECK-X64-NEXT: movl $1, 28664(%rsp) -+; CHECK-X64-NEXT: movl -128(%rsp), %eax -+; CHECK-X64-NEXT: addq $71880, %rsp # imm = 0x118C8 -+; CHECK-X64-NEXT: .cfi_def_cfa_offset 8 -+; CHECK-X64-NEXT: retq -+ -+; CHECK-X86-LABEL: foo: -+; CHECK-X86: # %bb.0: -+; CHECK-X86-NEXT: movl %esp, %eax -+; CHECK-X86-NEXT: subl $69632, %eax # imm = 0x11000 -+; CHECK-X86-NEXT: .LBB0_1: # =>This Inner Loop Header: Depth=1 -+; CHECK-X86-NEXT: subl $4096, %esp # imm = 0x1000 -+; CHECK-X86-NEXT: movl $0, (%esp) -+; CHECK-X86-NEXT: cmpl %eax, %esp -+; CHECK-X86-NEXT: jne .LBB0_1 -+; CHECK-X86-NEXT:# %bb.2: -+; CHECK-X86-NEXT: subl $2380, %esp -+; CHECK-X86-NEXT: .cfi_def_cfa_offset 72016 -+; CHECK-X86-NEXT: movl $1, 392(%esp) -+; CHECK-X86-NEXT: movl $1, 28792(%esp) -+; CHECK-X86-NEXT: movl (%esp), %eax -+; CHECK-X86-NEXT: addl $72012, %esp # imm = 0x1194C -+; CHECK-X86-NEXT: .cfi_def_cfa_offset 4 -+; CHECK-X86-NEXT: retl -+ -+; CHECK-X32-LABEL: foo: -+; CHECK-X32: # %bb.0: -+; CHECK-X32-NEXT: movl %esp, %r11d -+; CHECK-X32-NEXT: subl $69632, %r11d # imm = 0x11000 -+; CHECK-X32-NEXT: .LBB0_1: # =>This Inner Loop Header: Depth=1 -+; CHECK-X32-NEXT: subl $4096, %esp # imm = 0x1000 -+; CHECK-X32-NEXT: movq $0, (%esp) -+; CHECK-X32-NEXT: cmpl %r11d, %esp -+; CHECK-X32-NEXT: jne .LBB0_1 -+; CHECK-X32-NEXT:# %bb.2: -+; CHECK-X32-NEXT: subl $2248, %esp -+; CHECK-X32-NEXT: .cfi_def_cfa_offset 71888 -+; CHECK-X32-NEXT: movl $1, 264(%esp) -+; CHECK-X32-NEXT: movl $1, 28664(%esp) -+; CHECK-X32-NEXT: movl -128(%esp), %eax -+; CHECK-X32-NEXT: addl $71880, %esp # imm = 0x118C8 -+; CHECK-X32-NEXT: .cfi_def_cfa_offset 8 -+; CHECK-X32-NEXT: retq - --; CHECK-X86-32-LABEL: foo: --; CHECK-X86-32: # %bb.0: --; CHECK-X86-32-NEXT: movl %esp, %r11d --; CHECK-X86-32-NEXT: subl $69632, %r11d # imm = 0x11000 --; CHECK-X86-32-NEXT: .LBB0_1: # =>This Inner Loop Header: Depth=1 --; CHECK-X86-32-NEXT: subl $4096, %esp # imm = 0x1000 --; CHECK-X86-32-NEXT: movl $0, (%esp) --; CHECK-X86-32-NEXT: cmpl %r11d, %esp --; CHECK-X86-32-NEXT: jne .LBB0_1 --; CHECK-X86-32-NEXT:# %bb.2: --; CHECK-X86-32-NEXT: subl $2380, %esp --; CHECK-X86-32-NEXT: .cfi_def_cfa_offset 72016 --; CHECK-X86-32-NEXT: movl $1, 392(%esp) --; CHECK-X86-32-NEXT: movl $1, 28792(%esp) --; CHECK-X86-32-NEXT: movl (%esp), %eax --; CHECK-X86-32-NEXT: addl $72012, %esp # imm = 0x1194C --; CHECK-X86-32-NEXT: .cfi_def_cfa_offset 4 --; CHECK-X86-32-NEXT: retl - diff --git a/deps/patches/llvm-12-D75072-SCEV-add-type.patch b/deps/patches/llvm-12-D75072-SCEV-add-type.patch deleted file mode 100644 index c74cd70b20e65..0000000000000 --- a/deps/patches/llvm-12-D75072-SCEV-add-type.patch +++ /dev/null @@ -1,425 +0,0 @@ -From 4827d22b3e297b82c7689f0fb06b38e67d92b578 Mon Sep 17 00:00:00 2001 -From: Keno Fischer -Date: Wed, 21 Apr 2021 12:25:07 -0400 -Subject: [PATCH] [SCEV] Record NI types in add exprs - -This fixes a case where loop-reduce introduces ptrtoint/inttoptr for -non-integral address space pointers. Over the past several years, we -have gradually improved the SCEVExpander to actually do something -sensible for non-integral pointer types. However, that obviously -relies on the expander knowing what the type of the SCEV expression is. -That is usually the case, but there is one important case where it's -not: The type of an add expression is just the type of the last operand, -so if the non-integral pointer is not the last operand, later uses of -that SCEV may not realize that the given add expression contains -non-integral pointers and may try to expand it as integers. - -One interesting observation is that we do get away with this scheme in -shockingly many cases. The reason for this is that SCEV expressions -often have an `scUnknown` pointer base, which our sort order on the -operands of add expressions sort behind basically everything else, -so it usually ends up as the last operand. - -One situation where this fails is included as a test case. This test -case was bugpoint-reduced from the issue reported at -https://github.com/JuliaLang/julia/issues/31156. What happens here -is that the pointer base is an scAddRec from an outer loop, plus an -scUnknown integer offset. By our sort order, the scUnknown gets sorted -after the scAddRec pointer base, thus making an add expression of these -two operands have integer type. This then confuses the expander, into -attempting to expand the whole thing as integers, which will obviously -fail when reaching the non-integral pointer. - -I considered a few options to solve this, but here's what I ended up -settling on: The AddExpr class gains a new subclass that explicitly -stores the type of the expression. This subclass is used whenever one -of the operands is a non-integral pointer. To reduce the impact for the -regular case (where the SCEV expression contains no non-integral -pointers), a bit flag is kept in each flag expression to indicate -whether it is of non-integral pointer type (this should give the same -answer as asking if getType() is non-integral, but performing that -query may involve a pointer chase and requires the DataLayout). For -add expressions that flag is also used to indicate whether we're using -the subclass or not. This is slightly inefficient, because it uses -the subclass even in the (not uncommon) case where the last operand -does actually accurately reflect the non-integral pointer type. However, -it didn't seem worth the extra flag bit and complexity to do this -micro-optimization. - -I had hoped that we could additionally restrict mul exprs from -containing any non-integral pointers, and also require add exprs to -only have one operand containg such pointers (but not more), but this -turned out not to work. The reason for this is that SCEV wants to -form differences between pointers, which it represents as `A + B*-1`, -so we need to allow both multiplication by `-1` and addition with -multiple non-integral pointer arguments. I'm not super happy with -that situation, but I think it exposes a more general problem with -non-integral pointers in LLVM. We don't actually have a way to express -the difference between two non-integral pointers at the IR level. -In theory this is a problem for SCEV, because it means that we can't -materialize such SCEV expression. However, in practice, these -expressions generally have the same base pointer, so SCEV will -appropriately simplify them to just the integer components. -Nevertheless it is a bit unsatisfying. Perhaps we could have an -intrinsic that takes the byte difference between two pointers to the -same allocated object (in the same sense as is used in getelementptr), -which should be a sensible operation even for non-integral pointers. -However, given the practical considerations above, that's a project -for another time. For now, simply allowing the existing pointer-diff -pattern for non-integral pointers seems to work ok. - -Differential Revision: https://reviews.llvm.org/D75072 ---- - llvm/include/llvm/Analysis/ScalarEvolution.h | 21 ++++- - .../Analysis/ScalarEvolutionExpressions.h | 81 ++++++++++++++++--- - llvm/lib/Analysis/ScalarEvolution.cpp | 41 +++++++--- - .../LoopStrengthReduce/nonintegral.ll | 35 +++++++- - 4 files changed, 155 insertions(+), 23 deletions(-) - -diff --git llvm/include/llvm/Analysis/ScalarEvolution.h llvm/include/llvm/Analysis/ScalarEvolution.h -index b3f199de2cfa..d98fbeb5dcf7 100644 ---- llvm/include/llvm/Analysis/ScalarEvolution.h -+++ llvm/include/llvm/Analysis/ScalarEvolution.h -@@ -120,6 +120,19 @@ public: - NoWrapMask = (1 << 3) - 1 - }; - -+ /// HasNonIntegralPointerFlag are bitfield indices into SubclassData. -+ /// -+ /// When constructing SCEV expressions for LLVM expressions with non-integral -+ /// pointer types, some additional processing is required to ensure that we -+ /// don't introduce any illegal transformations. However, non-integral pointer -+ /// types are a very rarely used feature, so we want to make sure to only do -+ /// such processing if they are actually used. To ensure minimal performance -+ /// impact, we memoize that fact in using these flags. -+ enum HasNonIntegralPointerFlag { -+ FlagNoNIPointers = 0, -+ FlagHasNIPointers = (1 << 3) -+ }; -+ - explicit SCEV(const FoldingSetNodeIDRef ID, SCEVTypes SCEVTy, - unsigned short ExpressionSize) - : FastID(ID), SCEVType(SCEVTy), ExpressionSize(ExpressionSize) {} -@@ -156,6 +169,10 @@ public: - return ExpressionSize; - } - -+ bool hasNonIntegralPointers() const { -+ return SubclassData & FlagHasNIPointers; -+ } -+ - /// Print out the internal representation of this scalar to the specified - /// stream. This should really only be used for debugging purposes. - void print(raw_ostream &OS) const; -@@ -745,7 +762,7 @@ public: - const BasicBlock *ExitingBlock); - - /// The terms "backedge taken count" and "exit count" are used -- /// interchangeably to refer to the number of times the backedge of a loop -+ /// interchangeably to refer to the number of times the backedge of a loop - /// has executed before the loop is exited. - enum ExitCountKind { - /// An expression exactly describing the number of times the backedge has -@@ -758,7 +775,7 @@ public: - }; - - /// Return the number of times the backedge executes before the given exit -- /// would be taken; if not exactly computable, return SCEVCouldNotCompute. -+ /// would be taken; if not exactly computable, return SCEVCouldNotCompute. - /// For a single exit loop, this value is equivelent to the result of - /// getBackedgeTakenCount. The loop is guaranteed to exit (via *some* exit) - /// before the backedge is executed (ExitCount + 1) times. Note that there -diff --git llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h -index 37e675f08afc..6e532b22f5b3 100644 ---- llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h -+++ llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h -@@ -228,6 +228,13 @@ class Type; - return getNoWrapFlags(FlagNW) != FlagAnyWrap; - } - -+ void setHasNIPtr(bool HasNIPtr) { -+ if (HasNIPtr) -+ SubclassData |= FlagHasNIPointers; -+ else -+ SubclassData &= ~FlagHasNIPointers; -+ } -+ - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const SCEV *S) { - return S->getSCEVType() == scAddExpr || S->getSCEVType() == scMulExpr || -@@ -264,19 +271,16 @@ class Type; - - Type *Ty; - -+ protected: - SCEVAddExpr(const FoldingSetNodeIDRef ID, const SCEV *const *O, size_t N) - : SCEVCommutativeExpr(ID, scAddExpr, O, N) { -- auto *FirstPointerTypedOp = find_if(operands(), [](const SCEV *Op) { -- return Op->getType()->isPointerTy(); -- }); -- if (FirstPointerTypedOp != operands().end()) -- Ty = (*FirstPointerTypedOp)->getType(); -- else -- Ty = getOperand(0)->getType(); -+ - } - - public: -- Type *getType() const { return Ty; } -+ // Returns the type of the add expression, by looking either at the last operand -+ // or deferring to the SCEVAddNIExpr subclass. -+ Type *getType() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const SCEV *S) { -@@ -284,6 +288,46 @@ class Type; - } - }; - -+ /// This node represents an addition of some number of SCEVs, one which -+ /// is a non-integral pointer type, requiring us to know the type exactly for -+ /// correctness. -+ class SCEVAddNIExpr : public SCEVAddExpr { -+ friend class ScalarEvolution; -+ PointerType *NIType; -+ -+ SCEVAddNIExpr(const FoldingSetNodeIDRef ID, const SCEV *const *O, size_t N, -+ PointerType *NIType) -+ : SCEVAddExpr(ID, O, N), NIType(NIType) { -+ SubclassData |= FlagHasNIPointers; -+ } -+ -+ public: -+ Type *getType() const { return NIType; } -+ -+ /// Methods for support type inquiry through isa, cast, and dyn_cast: -+ static bool classof(const SCEV *S) { -+ return S->getSCEVType() == scAddExpr && S->hasNonIntegralPointers(); -+ } -+ }; -+ -+ inline Type *SCEVAddExpr::getType() const { -+ // In general, use the type of the last operand, which is likely to be a -+ // pointer type, if there is one. This doesn't usually matter, but it can -+ // help reduce casts when the expressions are expanded. In the (unusual) -+ // case that we're working with non-integral pointers, we have a subclass -+ // that stores that type explicitly. -+ if (hasNonIntegralPointers()) -+ return cast(this)->getType(); -+ -+ auto *FirstPointerTypedOp = find_if(operands(), [](const SCEV *Op) { -+ return Op->getType()->isPointerTy(); -+ }); -+ if (FirstPointerTypedOp != operands().end()) -+ return (*FirstPointerTypedOp)->getType(); -+ else -+ return getOperand(0)->getType(); -+ } -+ - /// This node represents multiplication of some number of SCEVs. - class SCEVMulExpr : public SCEVCommutativeExpr { - friend class ScalarEvolution; -@@ -293,6 +337,18 @@ class Type; - : SCEVCommutativeExpr(ID, scMulExpr, O, N) {} - - public: -+ Type *getType() const { -+ // In general, we can't form SCEVMulExprs with non-integral pointer types, -+ // but for the moment we need to allow a special case: Multiplying by -+ // -1 to be able express the difference between two pointers. In order -+ // to maintain the invariant that SCEVs with the NI flag set should have -+ // a type corresponding to the contained NI ptr, we need to return the -+ // type of the pointer here. -+ if (hasNonIntegralPointers()) -+ return getOperand(getNumOperands() - 1)->getType(); -+ return SCEVCommutativeExpr::getType(); -+ } -+ - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const SCEV *S) { - return S->getSCEVType() == scMulExpr; -@@ -531,9 +587,12 @@ class Type; - /// instances owned by a ScalarEvolution. - SCEVUnknown *Next; - -- SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V, -- ScalarEvolution *se, SCEVUnknown *next) : -- SCEV(ID, scUnknown, 1), CallbackVH(V), SE(se), Next(next) {} -+ SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V, ScalarEvolution *se, -+ SCEVUnknown *next, bool ValueIsNIPtr) -+ : SCEV(ID, scUnknown, 1), CallbackVH(V), SE(se), Next(next) { -+ if (ValueIsNIPtr) -+ SubclassData |= FlagHasNIPointers; -+ } - - // Implement CallbackVH. - void deleted() override; -diff --git llvm/lib/Analysis/ScalarEvolution.cpp llvm/lib/Analysis/ScalarEvolution.cpp -index fe9d8297d679..1fa7b8ce1451 100644 ---- llvm/lib/Analysis/ScalarEvolution.cpp -+++ llvm/lib/Analysis/ScalarEvolution.cpp -@@ -389,12 +389,13 @@ Type *SCEV::getType() const { - case scSignExtend: - return cast(this)->getType(); - case scAddRecExpr: -- case scMulExpr: - case scUMaxExpr: - case scSMaxExpr: - case scUMinExpr: - case scSMinExpr: - return cast(this)->getType(); -+ case scMulExpr: -+ return cast(this)->getType(); - case scAddExpr: - return cast(this)->getType(); - case scUDivExpr: -@@ -2679,16 +2680,27 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, - SCEV::NoWrapFlags Flags) { - FoldingSetNodeID ID; - ID.AddInteger(scAddExpr); -- for (const SCEV *Op : Ops) -- ID.AddPointer(Op); -+ bool HasNIPtr = false; -+ PointerType *NIPtrType = nullptr; -+ for (unsigned i = 0, e = Ops.size(); i != e; ++i) { -+ ID.AddPointer(Ops[i]); -+ if (Ops[i]->hasNonIntegralPointers()) { -+ HasNIPtr = true; -+ NIPtrType = cast(Ops[i]->getType()); -+ } -+ } - void *IP = nullptr; - SCEVAddExpr *S = - static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); - if (!S) { - const SCEV **O = SCEVAllocator.Allocate(Ops.size()); - std::uninitialized_copy(Ops.begin(), Ops.end(), O); -- S = new (SCEVAllocator) -- SCEVAddExpr(ID.Intern(SCEVAllocator), O, Ops.size()); -+ if (HasNIPtr) -+ S = new (SCEVAllocator) -+ SCEVAddNIExpr(ID.Intern(SCEVAllocator), O, Ops.size(), NIPtrType); -+ else -+ S = new (SCEVAllocator) -+ SCEVAddExpr(ID.Intern(SCEVAllocator), O, Ops.size()); - UniqueSCEVs.InsertNode(S, IP); - addToLoopUseLists(S); - } -@@ -2701,8 +2713,10 @@ ScalarEvolution::getOrCreateAddRecExpr(ArrayRef Ops, - const Loop *L, SCEV::NoWrapFlags Flags) { - FoldingSetNodeID ID; - ID.AddInteger(scAddRecExpr); -- for (unsigned i = 0, e = Ops.size(); i != e; ++i) -+ for (unsigned i = 0, e = Ops.size(); i != e; ++i) { -+ assert(i == 0 || !Ops[i]->hasNonIntegralPointers()); - ID.AddPointer(Ops[i]); -+ } - ID.AddPointer(L); - void *IP = nullptr; - SCEVAddRecExpr *S = -@@ -2716,6 +2730,7 @@ ScalarEvolution::getOrCreateAddRecExpr(ArrayRef Ops, - addToLoopUseLists(S); - } - setNoWrapFlags(S, Flags); -+ S->setHasNIPtr(Ops[0]->hasNonIntegralPointers()); - return S; - } - -@@ -2724,8 +2739,11 @@ ScalarEvolution::getOrCreateMulExpr(ArrayRef Ops, - SCEV::NoWrapFlags Flags) { - FoldingSetNodeID ID; - ID.AddInteger(scMulExpr); -- for (unsigned i = 0, e = Ops.size(); i != e; ++i) -+ bool HasNIPtr = false; -+ for (unsigned i = 0, e = Ops.size(); i != e; ++i) { -+ HasNIPtr |= Ops[i]->hasNonIntegralPointers(); - ID.AddPointer(Ops[i]); -+ } - void *IP = nullptr; - SCEVMulExpr *S = - static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); -@@ -2738,6 +2756,7 @@ ScalarEvolution::getOrCreateMulExpr(ArrayRef Ops, - addToLoopUseLists(S); - } - S->setNoWrapFlags(Flags); -+ S->setHasNIPtr(HasNIPtr); - return S; - } - -@@ -3615,8 +3634,11 @@ const SCEV *ScalarEvolution::getMinMaxExpr(SCEVTypes Kind, - return ExistingSCEV; - const SCEV **O = SCEVAllocator.Allocate(Ops.size()); - std::uninitialized_copy(Ops.begin(), Ops.end(), O); -- SCEV *S = new (SCEVAllocator) -+ SCEVMinMaxExpr *S = new (SCEVAllocator) - SCEVMinMaxExpr(ID.Intern(SCEVAllocator), Kind, O, Ops.size()); -+ // For MinMaxExprs it's sufficient to see if the first Op has NI data, as the -+ // operands all need to be of the same type. -+ S->setHasNIPtr(Ops[0]->hasNonIntegralPointers()); - - UniqueSCEVs.InsertNode(S, IP); - addToLoopUseLists(S); -@@ -3716,8 +3738,9 @@ const SCEV *ScalarEvolution::getUnknown(Value *V) { - "Stale SCEVUnknown in uniquing map!"); - return S; - } -+ bool ValueIsNIPtr = getDataLayout().isNonIntegralPointerType(V->getType()); - SCEV *S = new (SCEVAllocator) SCEVUnknown(ID.Intern(SCEVAllocator), V, this, -- FirstUnknown); -+ FirstUnknown, ValueIsNIPtr); - FirstUnknown = cast(S); - UniqueSCEVs.InsertNode(S, IP); - return S; -diff --git llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll -index 5648e3aa74af..6936521f3a64 100644 ---- llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll -+++ llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll -@@ -2,7 +2,7 @@ - - ; Address Space 10 is non-integral. The optimizer is not allowed to use - ; ptrtoint/inttoptr instructions. Make sure that this doesn't happen --target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12" -+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12:13" - target triple = "x86_64-unknown-linux-gnu" - - define void @japi1__unsafe_getindex_65028(i64 addrspace(10)* %arg) { -@@ -43,3 +43,36 @@ if38: ; preds = %L119 - done: ; preds = %if38 - ret void - } -+ -+; This is a bugpoint-reduced regression test - It doesn't make too much sense by itself, -+; but creates the correct SCEV expressions to reproduce the issue. See -+; https://github.com/JuliaLang/julia/issues/31156 for the original bug report. -+define void @"japi1_permutedims!_4259"(i64 %a, i64 %b, i64 %c, i64 %d, i64 %e, i64 %f, i1 %g, i8 addrspace(13)* %base) #0 { -+; CHECK-NOT: inttoptr -+; CHECK-NOT: ptrtoint -+; CHECK: getelementptr i8, i8 addrspace(13)* {{.*}}, i64 {{.*}} -+top: -+ br label %L42.L46_crit_edge.us -+ -+L42.L46_crit_edge.us: ; preds = %L82.us.us.loopexit, %top -+ %value_phi11.us = phi i64 [ %a, %top ], [ %2, %L82.us.us.loopexit ] -+ %0 = sub i64 %value_phi11.us, %b -+ %1 = add i64 %0, %c -+ %spec.select = select i1 %g, i64 %d, i64 0 -+ br label %L62.us.us -+ -+L82.us.us.loopexit: ; preds = %L62.us.us -+ %2 = add i64 %e, %value_phi11.us -+ br label %L42.L46_crit_edge.us -+ -+L62.us.us: ; preds = %L62.us.us, %L42.L46_crit_edge.us -+ %value_phi21.us.us = phi i64 [ %6, %L62.us.us ], [ %spec.select, %L42.L46_crit_edge.us ] -+ %3 = add i64 %1, %value_phi21.us.us -+ %4 = getelementptr inbounds i8, i8 addrspace(13)* %base, i64 %3 -+ %5 = load i8, i8 addrspace(13)* %4, align 1 -+ %6 = add i64 %f, %value_phi21.us.us -+ br i1 %g, label %L82.us.us.loopexit, label %L62.us.us, !llvm.loop !1 -+} -+ -+!1 = distinct !{!1, !2} -+!2 = !{!"llvm.loop.isvectorized", i32 1} --- -2.31.1 - diff --git a/deps/patches/llvm-12-D97435-AArch64-movaddrreg.patch b/deps/patches/llvm-12-D97435-AArch64-movaddrreg.patch deleted file mode 100644 index 01d49a85f1007..0000000000000 --- a/deps/patches/llvm-12-D97435-AArch64-movaddrreg.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 3adadbab531e0d7dc17499a6570b129e87f00c77 Mon Sep 17 00:00:00 2001 -From: Keno Fischer -Date: Wed, 21 Apr 2021 12:38:40 -0400 -Subject: [PATCH] [Aarch64] Correct register class for pseudo instructions - -This constrains the Mov* and similar pseudo instruction to take -GPR64common register classes rather than GPR64. GPR64 includs XZR -which is invalid here, because this pseudo instructions expands -into an adrp/add pair sharing a destination register. XZR is invalid -on add and attempting to encode it will instead increment the stack -pointer causing crashes (downstream report at [1]). The test case -there reproduces on LLVM11, but I do not have a test case that -reaches this code path on main, since it is being masked by -improved dead code elimination introduced in D91513. Nevertheless, -this seems like a good thing to fix in case there are other cases -that dead code elimination doesn't clean up (e.g. if `optnone` is -used and the optimization is skipped). - -I think it would be worth auditing uses of GPR64 in pseudo -instructions to see if there are any similar issues, but I do not -have a high enough view of the backend or knowledge of the -Aarch64 architecture to do this quickly. - -[1] https://github.com/JuliaLang/julia/issues/39818 - -Reviewed By: t.p.northover - -Differential Revision: https://reviews.llvm.org/D97435 ---- - .../AArch64/AArch64ExpandPseudoInsts.cpp | 1 + - llvm/lib/Target/AArch64/AArch64InstrInfo.td | 32 +++++++++---------- - .../GlobalISel/select-blockaddress.mir | 5 +-- - .../select-jump-table-brjt-constrain.mir | 2 +- - .../GlobalISel/select-jump-table-brjt.mir | 2 +- - 5 files changed, 22 insertions(+), 20 deletions(-) - -diff --git llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp -index e57650ae60b1..612fbeb5f531 100644 ---- llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp -+++ llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp -@@ -886,6 +886,7 @@ bool AArch64ExpandPseudo::expandMI(MachineBasicBlock &MBB, - case AArch64::MOVaddrEXT: { - // Expand into ADRP + ADD. - Register DstReg = MI.getOperand(0).getReg(); -+ assert(DstReg != AArch64::XZR); - MachineInstrBuilder MIB1 = - BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(AArch64::ADRP), DstReg) - .add(MI.getOperand(1)); -diff --git llvm/lib/Target/AArch64/AArch64InstrInfo.td llvm/lib/Target/AArch64/AArch64InstrInfo.td -index 171d3dbaa814..6fe0bd1ef168 100644 ---- llvm/lib/Target/AArch64/AArch64InstrInfo.td -+++ llvm/lib/Target/AArch64/AArch64InstrInfo.td -@@ -656,40 +656,40 @@ let isReMaterializable = 1, isCodeGenOnly = 1 in { - // removed, along with the AArch64Wrapper node. - - let AddedComplexity = 10 in --def LOADgot : Pseudo<(outs GPR64:$dst), (ins i64imm:$addr), -- [(set GPR64:$dst, (AArch64LOADgot tglobaladdr:$addr))]>, -+def LOADgot : Pseudo<(outs GPR64common:$dst), (ins i64imm:$addr), -+ [(set GPR64common:$dst, (AArch64LOADgot tglobaladdr:$addr))]>, - Sched<[WriteLDAdr]>; - - // The MOVaddr instruction should match only when the add is not folded - // into a load or store address. - def MOVaddr -- : Pseudo<(outs GPR64:$dst), (ins i64imm:$hi, i64imm:$low), -- [(set GPR64:$dst, (AArch64addlow (AArch64adrp tglobaladdr:$hi), -+ : Pseudo<(outs GPR64common:$dst), (ins i64imm:$hi, i64imm:$low), -+ [(set GPR64common:$dst, (AArch64addlow (AArch64adrp tglobaladdr:$hi), - tglobaladdr:$low))]>, - Sched<[WriteAdrAdr]>; - def MOVaddrJT -- : Pseudo<(outs GPR64:$dst), (ins i64imm:$hi, i64imm:$low), -- [(set GPR64:$dst, (AArch64addlow (AArch64adrp tjumptable:$hi), -+ : Pseudo<(outs GPR64common:$dst), (ins i64imm:$hi, i64imm:$low), -+ [(set GPR64common:$dst, (AArch64addlow (AArch64adrp tjumptable:$hi), - tjumptable:$low))]>, - Sched<[WriteAdrAdr]>; - def MOVaddrCP -- : Pseudo<(outs GPR64:$dst), (ins i64imm:$hi, i64imm:$low), -- [(set GPR64:$dst, (AArch64addlow (AArch64adrp tconstpool:$hi), -+ : Pseudo<(outs GPR64common:$dst), (ins i64imm:$hi, i64imm:$low), -+ [(set GPR64common:$dst, (AArch64addlow (AArch64adrp tconstpool:$hi), - tconstpool:$low))]>, - Sched<[WriteAdrAdr]>; - def MOVaddrBA -- : Pseudo<(outs GPR64:$dst), (ins i64imm:$hi, i64imm:$low), -- [(set GPR64:$dst, (AArch64addlow (AArch64adrp tblockaddress:$hi), -+ : Pseudo<(outs GPR64common:$dst), (ins i64imm:$hi, i64imm:$low), -+ [(set GPR64common:$dst, (AArch64addlow (AArch64adrp tblockaddress:$hi), - tblockaddress:$low))]>, - Sched<[WriteAdrAdr]>; - def MOVaddrTLS -- : Pseudo<(outs GPR64:$dst), (ins i64imm:$hi, i64imm:$low), -- [(set GPR64:$dst, (AArch64addlow (AArch64adrp tglobaltlsaddr:$hi), -+ : Pseudo<(outs GPR64common:$dst), (ins i64imm:$hi, i64imm:$low), -+ [(set GPR64common:$dst, (AArch64addlow (AArch64adrp tglobaltlsaddr:$hi), - tglobaltlsaddr:$low))]>, - Sched<[WriteAdrAdr]>; - def MOVaddrEXT -- : Pseudo<(outs GPR64:$dst), (ins i64imm:$hi, i64imm:$low), -- [(set GPR64:$dst, (AArch64addlow (AArch64adrp texternalsym:$hi), -+ : Pseudo<(outs GPR64common:$dst), (ins i64imm:$hi, i64imm:$low), -+ [(set GPR64common:$dst, (AArch64addlow (AArch64adrp texternalsym:$hi), - texternalsym:$low))]>, - Sched<[WriteAdrAdr]>; - // Normally AArch64addlow either gets folded into a following ldr/str, -@@ -697,8 +697,8 @@ def MOVaddrEXT - // might appear without either of them, so allow lowering it into a plain - // add. - def ADDlowTLS -- : Pseudo<(outs GPR64:$dst), (ins GPR64:$src, i64imm:$low), -- [(set GPR64:$dst, (AArch64addlow GPR64:$src, -+ : Pseudo<(outs GPR64sp:$dst), (ins GPR64sp:$src, i64imm:$low), -+ [(set GPR64sp:$dst, (AArch64addlow GPR64sp:$src, - tglobaltlsaddr:$low))]>, - Sched<[WriteAdr]>; - -diff --git llvm/test/CodeGen/AArch64/GlobalISel/select-blockaddress.mir llvm/test/CodeGen/AArch64/GlobalISel/select-blockaddress.mir -index 45012f23de62..70cb802ed3a3 100644 ---- llvm/test/CodeGen/AArch64/GlobalISel/select-blockaddress.mir -+++ llvm/test/CodeGen/AArch64/GlobalISel/select-blockaddress.mir -@@ -30,9 +30,10 @@ registers: - body: | - ; CHECK-LABEL: name: test_blockaddress - ; CHECK: bb.0 (%ir-block.0): -- ; CHECK: [[MOVaddrBA:%[0-9]+]]:gpr64 = MOVaddrBA target-flags(aarch64-page) blockaddress(@test_blockaddress, %ir-block.block), target-flags(aarch64-pageoff, aarch64-nc) blockaddress(@test_blockaddress, %ir-block.block) -+ ; CHECK: [[MOVaddrBA:%[0-9]+]]:gpr64common = MOVaddrBA target-flags(aarch64-page) blockaddress(@test_blockaddress, %ir-block.block), target-flags(aarch64-pageoff, aarch64-nc) blockaddress(@test_blockaddress, %ir-block.block) - ; CHECK: [[MOVaddr:%[0-9]+]]:gpr64common = MOVaddr target-flags(aarch64-page) @addr, target-flags(aarch64-pageoff, aarch64-nc) @addr -- ; CHECK: STRXui [[MOVaddrBA]], [[MOVaddr]], 0 :: (store 8 into @addr) -+ ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY [[MOVaddrBA]] -+ ; CHECK: STRXui [[COPY]], [[MOVaddr]], 0 :: (store 8 into @addr) - ; CHECK: BR [[MOVaddrBA]] - ; CHECK: bb.1.block (address-taken): - ; CHECK: RET_ReallyLR -diff --git llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir -index 440a03173c83..59b8dea2d0ce 100644 ---- llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir -+++ llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir -@@ -30,7 +30,7 @@ body: | - ; CHECK: Bcc 8, %bb.3, implicit $nzcv - ; CHECK: bb.1: - ; CHECK: successors: %bb.2(0x40000000), %bb.3(0x40000000) -- ; CHECK: [[MOVaddrJT:%[0-9]+]]:gpr64 = MOVaddrJT target-flags(aarch64-page) %jump-table.0, target-flags(aarch64-pageoff, aarch64-nc) %jump-table.0 -+ ; CHECK: [[MOVaddrJT:%[0-9]+]]:gpr64common = MOVaddrJT target-flags(aarch64-page) %jump-table.0, target-flags(aarch64-pageoff, aarch64-nc) %jump-table.0 - ; CHECK: early-clobber %6:gpr64, early-clobber %7:gpr64sp = JumpTableDest32 [[MOVaddrJT]], [[SUBREG_TO_REG]], %jump-table.0 - ; CHECK: BR %6 - ; CHECK: bb.2: -diff --git llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir -index 6b84c6d10843..b8c9a6c881da 100644 ---- llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir -+++ llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir -@@ -65,7 +65,7 @@ body: | - ; CHECK: bb.1.entry: - ; CHECK: successors: %bb.3(0x2aaaaaab), %bb.4(0x2aaaaaab), %bb.2(0x2aaaaaab) - ; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr -- ; CHECK: [[MOVaddrJT:%[0-9]+]]:gpr64 = MOVaddrJT target-flags(aarch64-page) %jump-table.0, target-flags(aarch64-pageoff, aarch64-nc) %jump-table.0 -+ ; CHECK: [[MOVaddrJT:%[0-9]+]]:gpr64common = MOVaddrJT target-flags(aarch64-page) %jump-table.0, target-flags(aarch64-pageoff, aarch64-nc) %jump-table.0 - ; CHECK: early-clobber %18:gpr64, early-clobber %19:gpr64sp = JumpTableDest32 [[MOVaddrJT]], [[SUBREG_TO_REG]], %jump-table.0 - ; CHECK: BR %18 - ; CHECK: bb.2.sw.bb: --- -2.31.1 - diff --git a/deps/patches/llvm-12-fde-symbols-aarch64.patch b/deps/patches/llvm-12-fde-symbols-aarch64.patch deleted file mode 100644 index c62e65765ae21..0000000000000 --- a/deps/patches/llvm-12-fde-symbols-aarch64.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 7133a3d3b0bd639d36d9d40f1135159442ab73c7 Mon Sep 17 00:00:00 2001 -From: Cody Tapscott -Date: Mon, 24 May 2021 15:11:39 -0700 -Subject: [PATCH] Do not patch FDE symbols in RuntimeDyld, on targets that use - non-absolute symbol relocations in `.eh_frame` - -Since processFDE adds a delta to the values in the FDE, it assumes that the relocations for the .eh_frame section have not been applied by RuntimeDyld. It expects instead that only the relocation addend has been written to the symbol locations, and that the section-to-section offset needs to be added. - -However, there are platform differences that interfere with this: -1) X86-64 has DwarfFDESymbolsUseAbsDiff enabled in its AsmInfo, causing an absolute symbol to be emitted for the FDE pcStart. Absolute symbols are skipped as a relocation by RuntimeDyld, so the processFDE function in RuntimeDyldMachO.cpp calculates the relocation correctly. -2) AArch64 has DwarfFDESymbolsUseAbsDiff disabled, so a relocation is emitted in the eh_frame section. Since this isn't absolute, the relocation is applied by RuntimeDyld. This means that processFDE ends up adding an additional section-to-section offset to the pcStart field, generating an incorrect FDE - -Differential Revision: https://reviews.llvm.org/D103052 ---- - .../RuntimeDyld/RuntimeDyldMachO.cpp | 37 +++++++++++-------- - .../RuntimeDyld/RuntimeDyldMachO.h | 8 +++- - .../Targets/RuntimeDyldMachOAArch64.h | 2 + - .../RuntimeDyld/Targets/RuntimeDyldMachOARM.h | 2 + - .../Targets/RuntimeDyldMachOI386.h | 2 + - .../Targets/RuntimeDyldMachOX86_64.h | 2 + - 6 files changed, 35 insertions(+), 18 deletions(-) - -diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp -index 9ca76602ea18..e61bfd1bd31c 100644 ---- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp -+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp -@@ -272,9 +272,9 @@ RuntimeDyldMachOCRTPBase::finalizeLoad(const ObjectFile &Obj, - } - - template --unsigned char *RuntimeDyldMachOCRTPBase::processFDE(uint8_t *P, -- int64_t DeltaForText, -- int64_t DeltaForEH) { -+unsigned char *RuntimeDyldMachOCRTPBase::patchFDERelocations(uint8_t *P, -+ int64_t DeltaForText, -+ int64_t DeltaForEH) { - typedef typename Impl::TargetPtrT TargetPtrT; - - LLVM_DEBUG(dbgs() << "Processing FDE: Delta for text: " << DeltaForText -@@ -324,19 +324,24 @@ void RuntimeDyldMachOCRTPBase::registerEHFrames() { - continue; - SectionEntry *Text = &Sections[SectionInfo.TextSID]; - SectionEntry *EHFrame = &Sections[SectionInfo.EHFrameSID]; -- SectionEntry *ExceptTab = nullptr; -- if (SectionInfo.ExceptTabSID != RTDYLD_INVALID_SECTION_ID) -- ExceptTab = &Sections[SectionInfo.ExceptTabSID]; -- -- int64_t DeltaForText = computeDelta(Text, EHFrame); -- int64_t DeltaForEH = 0; -- if (ExceptTab) -- DeltaForEH = computeDelta(ExceptTab, EHFrame); -- -- uint8_t *P = EHFrame->getAddress(); -- uint8_t *End = P + EHFrame->getSize(); -- while (P != End) { -- P = processFDE(P, DeltaForText, DeltaForEH); -+ -+ // If the FDE includes absolute symbol relocations (not supported -+ // by RuntimeDyld), we need to manually patch-up the values -+ if (doDwarfFDESymbolsUseAbsDiff()) { -+ SectionEntry *ExceptTab = nullptr; -+ if (SectionInfo.ExceptTabSID != RTDYLD_INVALID_SECTION_ID) -+ ExceptTab = &Sections[SectionInfo.ExceptTabSID]; -+ -+ int64_t DeltaForText = computeDelta(Text, EHFrame); -+ int64_t DeltaForEH = 0; -+ if (ExceptTab) -+ DeltaForEH = computeDelta(ExceptTab, EHFrame); -+ -+ uint8_t *P = EHFrame->getAddress(); -+ uint8_t *End = P + EHFrame->getSize(); -+ while (P != End) { -+ P = patchFDERelocations(P, DeltaForText, DeltaForEH); -+ } - } - - MemMgr.registerEHFrames(EHFrame->getAddress(), EHFrame->getLoadAddress(), -diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h -index 650e7b79fbb8..a7e5c9cb56e8 100644 ---- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h -+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h -@@ -43,6 +43,10 @@ protected: - SID ExceptTabSID; - }; - -+ // Returns true if the FDE section includes absolute symbol relocations -+ // on this platform. -+ virtual bool doDwarfFDESymbolsUseAbsDiff() = 0; -+ - // When a module is loaded we save the SectionID of the EH frame section - // in a table until we receive a request to register all unregistered - // EH frame sections with the memory manager. -@@ -147,8 +151,8 @@ private: - Impl &impl() { return static_cast(*this); } - const Impl &impl() const { return static_cast(*this); } - -- unsigned char *processFDE(uint8_t *P, int64_t DeltaForText, -- int64_t DeltaForEH); -+ unsigned char *patchFDERelocations(uint8_t *P, int64_t DeltaForText, -+ int64_t DeltaForEH); - - public: - RuntimeDyldMachOCRTPBase(RuntimeDyld::MemoryManager &MemMgr, -diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h -index f2ee1b06d494..90a9a4c44c84 100644 ---- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h -+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h -@@ -30,6 +30,8 @@ public: - - unsigned getStubAlignment() override { return 8; } - -+ bool doDwarfFDESymbolsUseAbsDiff() override { return false; } -+ - /// Extract the addend encoded in the instruction / memory location. - Expected decodeAddend(const RelocationEntry &RE) const { - const SectionEntry &Section = Sections[RE.SectionID]; -diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h -index a76958a9e2c2..7281249d25bf 100644 ---- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h -+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h -@@ -33,6 +33,8 @@ public: - - unsigned getStubAlignment() override { return 4; } - -+ bool doDwarfFDESymbolsUseAbsDiff() override { return false; } -+ - Expected getJITSymbolFlags(const SymbolRef &SR) override { - auto Flags = RuntimeDyldImpl::getJITSymbolFlags(SR); - if (!Flags) -diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h -index 523deb29b723..755bc13afeb4 100644 ---- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h -+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h -@@ -30,6 +30,8 @@ public: - - unsigned getStubAlignment() override { return 1; } - -+ bool doDwarfFDESymbolsUseAbsDiff() override { return true; } -+ - Expected - processRelocationRef(unsigned SectionID, relocation_iterator RelI, - const ObjectFile &BaseObjT, -diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h -index 28febbdb948c..9854da24a2ce 100644 ---- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h -+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h -@@ -30,6 +30,8 @@ public: - - unsigned getStubAlignment() override { return 8; } - -+ bool doDwarfFDESymbolsUseAbsDiff() override { return true; } -+ - Expected - processRelocationRef(unsigned SectionID, relocation_iterator RelI, - const ObjectFile &BaseObjT, --- -2.30.1 (Apple Git-130) - diff --git a/deps/patches/llvm-12-force-eh_frame-aarch64.patch b/deps/patches/llvm-12-force-eh_frame-aarch64.patch deleted file mode 100644 index aff55f35e7bd8..0000000000000 --- a/deps/patches/llvm-12-force-eh_frame-aarch64.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 026f3518c4713e388a8ed06fa032e0925d35c6f5 Mon Sep 17 00:00:00 2001 -From: Cody Tapscott -Date: Mon, 24 May 2021 16:36:06 -0700 -Subject: [PATCH] Force `.eh_frame` emission on AArch64 - -We need to force the emission of the EH Frame section (currently done via SupportsCompactUnwindWithoutEHFrame in the MCObjectFileInfo for the target), since libunwind doesn't yet support dynamically registering compact unwind information at run-time. ---- - llvm/lib/MC/MCObjectFileInfo.cpp | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp -index 1a448f040b3b..e12154deca5f 100644 ---- a/llvm/lib/MC/MCObjectFileInfo.cpp -+++ b/llvm/lib/MC/MCObjectFileInfo.cpp -@@ -57,9 +57,10 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) { - MachO::S_ATTR_STRIP_STATIC_SYMS | MachO::S_ATTR_LIVE_SUPPORT, - SectionKind::getReadOnly()); - -- if (T.isOSDarwin() && -- (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)) -- SupportsCompactUnwindWithoutEHFrame = true; -+ // Disabled for now, since we need to emit EH Frames for stack unwinding in the JIT -+ // if (T.isOSDarwin() && -+ // (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)) -+ // SupportsCompactUnwindWithoutEHFrame = true; - - if (T.isWatchABI()) - OmitDwarfIfHaveCompactUnwind = true; --- -2.30.1 (Apple Git-130) - diff --git a/deps/patches/llvm-D75072-SCEV-add-type.patch b/deps/patches/llvm-D75072-SCEV-add-type.patch deleted file mode 100644 index 9a9e801e970a4..0000000000000 --- a/deps/patches/llvm-D75072-SCEV-add-type.patch +++ /dev/null @@ -1,415 +0,0 @@ -commit a55a3ab4dc5c66c153b2988fc4fa46b39bfc92fc -Author: Keno Fischer -Date: Mon Feb 24 14:18:22 2020 -0500 - - [SCEV] Record NI types in add exprs - - Summary: - This fixes a case where loop-reduce introduces ptrtoint/inttoptr for - non-integral address space pointers. Over the past several years, we - have gradually improved the SCEVExpander to actually do something - sensible for non-integral pointer types. However, that obviously - relies on the expander knowing what the type of the SCEV expression is. - That is usually the case, but there is one important case where it's - not: The type of an add expression is just the type of the last operand, - so if the non-integral pointer is not the last operand, later uses of - that SCEV may not realize that the given add expression contains - non-integral pointers and may try to expand it as integers. - - One interesting observation is that we do get away with this scheme in - shockingly many cases. The reason for this is that SCEV expressions - often have an `scUnknown` pointer base, which our sort order on the - operands of add expressions sort behind basically everything else, - so it usually ends up as the last operand. - - One situation where this fails is included as a test case. This test - case was bugpoint-reduced from the issue reported at - https://github.com/JuliaLang/julia/issues/31156. What happens here - is that the pointer base is an scAddRec from an outer loop, plus an - scUnknown integer offset. By our sort order, the scUnknown gets sorted - after the scAddRec pointer base, thus making an add expression of these - two operands have integer type. This then confuses the expander, into - attempting to expand the whole thing as integers, which will obviously - fail when reaching the non-integral pointer. - - I considered a few options to solve this, but here's what I ended up - settling on: The AddExpr class gains a new subclass that explicitly - stores the type of the expression. This subclass is used whenever one - of the operands is a non-integral pointer. To reduce the impact for the - regular case (where the SCEV expression contains no non-integral - pointers), a bit flag is kept in each flag expression to indicate - whether it is of non-integral pointer type (this should give the same - answer as asking if getType() is non-integral, but performing that - query may involve a pointer chase and requires the DataLayout). For - add expressions that flag is also used to indicate whether we're using - the subclass or not. This is slightly inefficient, because it uses - the subclass even in the (not uncommon) case where the last operand - does actually accurately reflect the non-integral pointer type. However, - it didn't seem worth the extra flag bit and complexity to do this - micro-optimization. - - I had hoped that we could additionally restrict mul exprs from - containing any non-integral pointers, and also require add exprs to - only have one operand containg such pointers (but not more), but this - turned out not to work. The reason for this is that SCEV wants to - form differences between pointers, which it represents as `A + B*-1`, - so we need to allow both multiplication by `-1` and addition with - multiple non-integral pointer arguments. I'm not super happy with - that situation, but I think it exposes a more general problem with - non-integral pointers in LLVM. We don't actually have a way to express - the difference between two non-integral pointers at the IR level. - In theory this is a problem for SCEV, because it means that we can't - materialize such SCEV expression. However, in practice, these - expressions generally have the same base pointer, so SCEV will - appropriately simplify them to just the integer components. - Nevertheless it is a bit unsatisfying. Perhaps we could have an - intrinsic that takes the byte difference between two pointers to the - same allocated object (in the same sense as is used in getelementptr), - which should be a sensible operation even for non-integral pointers. - However, given the practical considerations above, that's a project - for another time. For now, simply allowing the existing pointer-diff - pattern for non-integral pointers seems to work ok. - - Reviewers: sanjoy, reames, vtjnash, vchuravy - - Subscribers: hiraditya, javed.absar, llvm-commits - - Tags: #llvm - - Differential Revision: https://reviews.llvm.org/D75072 - -diff --git llvm/include/llvm/Analysis/ScalarEvolution.h llvm/include/llvm/Analysis/ScalarEvolution.h -index 0bd98ef37e7..317bdeac3f0 100644 ---- llvm/include/llvm/Analysis/ScalarEvolution.h -+++ llvm/include/llvm/Analysis/ScalarEvolution.h -@@ -118,6 +118,19 @@ public: - NoWrapMask = (1 << 3) - 1 - }; - -+ /// HasNonIntegralPointerFlag are bitfield indices into SubclassData. -+ /// -+ /// When constructing SCEV expressions for LLVM expressions with non-integral -+ /// pointer types, some additional processing is required to ensure that we -+ /// don't introduce any illegal transformations. However, non-integral pointer -+ /// types are a very rarely used feature, so we want to make sure to only do -+ /// such processing if they are actually used. To ensure minimal performance -+ /// impact, we memoize that fact in using these flags. -+ enum HasNonIntegralPointerFlag { -+ FlagNoNIPointers = 0, -+ FlagHasNIPointers = (1 << 3) -+ }; -+ - explicit SCEV(const FoldingSetNodeIDRef ID, unsigned SCEVTy, - unsigned short ExpressionSize) - : FastID(ID), SCEVType(SCEVTy), ExpressionSize(ExpressionSize) {} -@@ -154,6 +167,10 @@ public: - return ExpressionSize; - } - -+ bool hasNonIntegralPointers() const { -+ return SubclassData & FlagHasNIPointers; -+ } -+ - /// Print out the internal representation of this scalar to the specified - /// stream. This should really only be used for debugging purposes. - void print(raw_ostream &OS) const; -@@ -747,7 +764,7 @@ public: - BasicBlock *ExitingBlock); - - /// Return the number of times the backedge executes before the given exit -- /// would be taken; if not exactly computable, return SCEVCouldNotCompute. -+ /// would be taken; if not exactly computable, return SCEVCouldNotCompute. - /// For a single exit loop, this value is equivelent to the result of - /// getBackedgeTakenCount. The loop is guaranteed to exit (via *some* exit) - /// before the backedge is executed (ExitCount + 1) times. Note that there -diff --git llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h -index d008af7b7e6..39ab35a8b8c 100644 ---- llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h -+++ llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h -@@ -188,6 +188,13 @@ class Type; - return getNoWrapFlags(FlagNW) != FlagAnyWrap; - } - -+ void setHasNIPtr(bool HasNIPtr) { -+ if (HasNIPtr) -+ SubclassData |= FlagHasNIPointers; -+ else -+ SubclassData &= ~FlagHasNIPointers; -+ } -+ - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const SCEV *S) { - return S->getSCEVType() == scAddExpr || S->getSCEVType() == scMulExpr || -@@ -222,24 +229,54 @@ class Type; - class SCEVAddExpr : public SCEVCommutativeExpr { - friend class ScalarEvolution; - -+ protected: - SCEVAddExpr(const FoldingSetNodeIDRef ID, - const SCEV *const *O, size_t N) - : SCEVCommutativeExpr(ID, scAddExpr, O, N) {} - - public: -- Type *getType() const { -- // Use the type of the last operand, which is likely to be a pointer -- // type, if there is one. This doesn't usually matter, but it can help -- // reduce casts when the expressions are expanded. -- return getOperand(getNumOperands() - 1)->getType(); -+ /// Returns the type of the add expression, by looking either at the last -+ /// operand or deferring to the SCEVAddNIExpr subclass for non-integral -+ /// pointers. -+ Type *getType() const; -+ -+ /// Methods for support type inquiry through isa, cast, and dyn_cast: -+ static bool classof(const SCEV *S) { return S->getSCEVType() == scAddExpr; } -+ }; -+ -+ /// This node represents an addition of some number of SCEVs, one which -+ /// is a non-integral pointer type, requiring us to know the type exactly for -+ /// correctness. -+ class SCEVAddNIExpr : public SCEVAddExpr { -+ friend class ScalarEvolution; -+ PointerType *NIType; -+ -+ SCEVAddNIExpr(const FoldingSetNodeIDRef ID, const SCEV *const *O, size_t N, -+ PointerType *NIType) -+ : SCEVAddExpr(ID, O, N), NIType(NIType) { -+ SubclassData |= FlagHasNIPointers; - } - -+ public: -+ Type *getType() const { return NIType; } -+ - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const SCEV *S) { -- return S->getSCEVType() == scAddExpr; -+ return S->getSCEVType() == scAddExpr && S->hasNonIntegralPointers(); - } - }; - -+ inline Type *SCEVAddExpr::getType() const { -+ // In general, use the type of the last operand, which is likely to be a -+ // pointer type, if there is one. This doesn't usually matter, but it can -+ // help reduce casts when the expressions are expanded. In the (unusual) -+ // case that we're working with non-integral pointers, we have a subclass -+ // that stores that type explicitly. -+ if (hasNonIntegralPointers()) -+ return cast(this)->getType(); -+ return getOperand(getNumOperands() - 1)->getType(); -+ } -+ - /// This node represents multiplication of some number of SCEVs. - class SCEVMulExpr : public SCEVCommutativeExpr { - friend class ScalarEvolution; -@@ -249,6 +286,18 @@ class Type; - : SCEVCommutativeExpr(ID, scMulExpr, O, N) {} - - public: -+ Type *getType() const { -+ // In general, we can't form SCEVMulExprs with non-integral pointer types, -+ // but for the moment we need to allow a special case: Multiplying by -+ // -1 to be able express the difference between two pointers. In order -+ // to maintain the invariant that SCEVs with the NI flag set should have -+ // a type corresponding to the contained NI ptr, we need to return the -+ // type of the pointer here. -+ if (hasNonIntegralPointers()) -+ return getOperand(getNumOperands() - 1)->getType(); -+ return SCEVCommutativeExpr::getType(); -+ } -+ - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const SCEV *S) { - return S->getSCEVType() == scMulExpr; -@@ -475,9 +524,12 @@ class Type; - /// instances owned by a ScalarEvolution. - SCEVUnknown *Next; - -- SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V, -- ScalarEvolution *se, SCEVUnknown *next) : -- SCEV(ID, scUnknown, 1), CallbackVH(V), SE(se), Next(next) {} -+ SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V, ScalarEvolution *se, -+ SCEVUnknown *next, bool ValueIsNIPtr) -+ : SCEV(ID, scUnknown, 1), CallbackVH(V), SE(se), Next(next) { -+ if (ValueIsNIPtr) -+ SubclassData |= FlagHasNIPointers; -+ } - - // Implement CallbackVH. - void deleted() override; -diff --git llvm/lib/Analysis/ScalarEvolution.cpp llvm/lib/Analysis/ScalarEvolution.cpp -index bc2cfd6fcc4..2f8eb665c5d 100644 ---- llvm/lib/Analysis/ScalarEvolution.cpp -+++ llvm/lib/Analysis/ScalarEvolution.cpp -@@ -358,12 +358,13 @@ Type *SCEV::getType() const { - case scSignExtend: - return cast(this)->getType(); - case scAddRecExpr: -- case scMulExpr: - case scUMaxExpr: - case scSMaxExpr: - case scUMinExpr: - case scSMinExpr: - return cast(this)->getType(); -+ case scMulExpr: -+ return cast(this)->getType(); - case scAddExpr: - return cast(this)->getType(); - case scUDivExpr: -@@ -2441,8 +2442,9 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl &Ops, - } - - // Limit recursion calls depth. -- if (Depth > MaxArithDepth || hasHugeExpression(Ops)) -+ if (Depth > MaxArithDepth || hasHugeExpression(Ops)) { - return getOrCreateAddExpr(Ops, Flags); -+ } - - // Okay, check to see if the same value occurs in the operand list more than - // once. If so, merge them together into an multiply expression. Since we -@@ -2783,16 +2785,27 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, - SCEV::NoWrapFlags Flags) { - FoldingSetNodeID ID; - ID.AddInteger(scAddExpr); -- for (const SCEV *Op : Ops) -- ID.AddPointer(Op); -+ bool HasNIPtr = false; -+ PointerType *NIPtrType = nullptr; -+ for (unsigned i = 0, e = Ops.size(); i != e; ++i) { -+ ID.AddPointer(Ops[i]); -+ if (Ops[i]->hasNonIntegralPointers()) { -+ HasNIPtr = true; -+ NIPtrType = cast(Ops[i]->getType()); -+ } -+ } - void *IP = nullptr; - SCEVAddExpr *S = - static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); - if (!S) { - const SCEV **O = SCEVAllocator.Allocate(Ops.size()); - std::uninitialized_copy(Ops.begin(), Ops.end(), O); -- S = new (SCEVAllocator) -- SCEVAddExpr(ID.Intern(SCEVAllocator), O, Ops.size()); -+ if (HasNIPtr) -+ S = new (SCEVAllocator) -+ SCEVAddNIExpr(ID.Intern(SCEVAllocator), O, Ops.size(), NIPtrType); -+ else -+ S = new (SCEVAllocator) -+ SCEVAddExpr(ID.Intern(SCEVAllocator), O, Ops.size()); - UniqueSCEVs.InsertNode(S, IP); - addToLoopUseLists(S); - } -@@ -2805,8 +2818,10 @@ ScalarEvolution::getOrCreateAddRecExpr(ArrayRef Ops, - const Loop *L, SCEV::NoWrapFlags Flags) { - FoldingSetNodeID ID; - ID.AddInteger(scAddRecExpr); -- for (unsigned i = 0, e = Ops.size(); i != e; ++i) -+ for (unsigned i = 0, e = Ops.size(); i != e; ++i) { -+ assert(i == 0 || !Ops[i]->hasNonIntegralPointers()); - ID.AddPointer(Ops[i]); -+ } - ID.AddPointer(L); - void *IP = nullptr; - SCEVAddRecExpr *S = -@@ -2820,6 +2835,7 @@ ScalarEvolution::getOrCreateAddRecExpr(ArrayRef Ops, - addToLoopUseLists(S); - } - S->setNoWrapFlags(Flags); -+ S->setHasNIPtr(Ops[0]->hasNonIntegralPointers()); - return S; - } - -@@ -2828,8 +2844,11 @@ ScalarEvolution::getOrCreateMulExpr(ArrayRef Ops, - SCEV::NoWrapFlags Flags) { - FoldingSetNodeID ID; - ID.AddInteger(scMulExpr); -- for (unsigned i = 0, e = Ops.size(); i != e; ++i) -+ bool HasNIPtr = false; -+ for (unsigned i = 0, e = Ops.size(); i != e; ++i) { -+ HasNIPtr |= Ops[i]->hasNonIntegralPointers(); - ID.AddPointer(Ops[i]); -+ } - void *IP = nullptr; - SCEVMulExpr *S = - static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); -@@ -2842,6 +2861,7 @@ ScalarEvolution::getOrCreateMulExpr(ArrayRef Ops, - addToLoopUseLists(S); - } - S->setNoWrapFlags(Flags); -+ S->setHasNIPtr(HasNIPtr); - return S; - } - -@@ -3666,8 +3686,11 @@ const SCEV *ScalarEvolution::getMinMaxExpr(unsigned Kind, - return ExistingSCEV; - const SCEV **O = SCEVAllocator.Allocate(Ops.size()); - std::uninitialized_copy(Ops.begin(), Ops.end(), O); -- SCEV *S = new (SCEVAllocator) SCEVMinMaxExpr( -+ SCEVMinMaxExpr *S = new (SCEVAllocator) SCEVMinMaxExpr( - ID.Intern(SCEVAllocator), static_cast(Kind), O, Ops.size()); -+ // For MinMaxExprs it's sufficient to see if the first Op has NI data, as the -+ // operands all need to be of the same type. -+ S->setHasNIPtr(Ops[0]->hasNonIntegralPointers()); - - UniqueSCEVs.InsertNode(S, IP); - addToLoopUseLists(S); -@@ -3744,8 +3767,9 @@ const SCEV *ScalarEvolution::getUnknown(Value *V) { - "Stale SCEVUnknown in uniquing map!"); - return S; - } -+ bool ValueIsNIPtr = getDataLayout().isNonIntegralPointerType(V->getType()); - SCEV *S = new (SCEVAllocator) SCEVUnknown(ID.Intern(SCEVAllocator), V, this, -- FirstUnknown); -+ FirstUnknown, ValueIsNIPtr); - FirstUnknown = cast(S); - UniqueSCEVs.InsertNode(S, IP); - return S; -diff --git llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll -index 5648e3aa74a..6936521f3a6 100644 ---- llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll -+++ llvm/test/Transforms/LoopStrengthReduce/nonintegral.ll -@@ -2,7 +2,7 @@ - - ; Address Space 10 is non-integral. The optimizer is not allowed to use - ; ptrtoint/inttoptr instructions. Make sure that this doesn't happen --target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12" -+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12:13" - target triple = "x86_64-unknown-linux-gnu" - - define void @japi1__unsafe_getindex_65028(i64 addrspace(10)* %arg) { -@@ -43,3 +43,36 @@ if38: ; preds = %L119 - done: ; preds = %if38 - ret void - } -+ -+; This is a bugpoint-reduced regression test - It doesn't make too much sense by itself, -+; but creates the correct SCEV expressions to reproduce the issue. See -+; https://github.com/JuliaLang/julia/issues/31156 for the original bug report. -+define void @"japi1_permutedims!_4259"(i64 %a, i64 %b, i64 %c, i64 %d, i64 %e, i64 %f, i1 %g, i8 addrspace(13)* %base) #0 { -+; CHECK-NOT: inttoptr -+; CHECK-NOT: ptrtoint -+; CHECK: getelementptr i8, i8 addrspace(13)* {{.*}}, i64 {{.*}} -+top: -+ br label %L42.L46_crit_edge.us -+ -+L42.L46_crit_edge.us: ; preds = %L82.us.us.loopexit, %top -+ %value_phi11.us = phi i64 [ %a, %top ], [ %2, %L82.us.us.loopexit ] -+ %0 = sub i64 %value_phi11.us, %b -+ %1 = add i64 %0, %c -+ %spec.select = select i1 %g, i64 %d, i64 0 -+ br label %L62.us.us -+ -+L82.us.us.loopexit: ; preds = %L62.us.us -+ %2 = add i64 %e, %value_phi11.us -+ br label %L42.L46_crit_edge.us -+ -+L62.us.us: ; preds = %L62.us.us, %L42.L46_crit_edge.us -+ %value_phi21.us.us = phi i64 [ %6, %L62.us.us ], [ %spec.select, %L42.L46_crit_edge.us ] -+ %3 = add i64 %1, %value_phi21.us.us -+ %4 = getelementptr inbounds i8, i8 addrspace(13)* %base, i64 %3 -+ %5 = load i8, i8 addrspace(13)* %4, align 1 -+ %6 = add i64 %f, %value_phi21.us.us -+ br i1 %g, label %L82.us.us.loopexit, label %L62.us.us, !llvm.loop !1 -+} -+ -+!1 = distinct !{!1, !2} -+!2 = !{!"llvm.loop.isvectorized", i32 1} diff --git a/deps/patches/llvm-libunwind-force-dwarf.patch b/deps/patches/llvm-libunwind-force-dwarf.patch deleted file mode 100644 index 697782afe5e07..0000000000000 --- a/deps/patches/llvm-libunwind-force-dwarf.patch +++ /dev/null @@ -1,181 +0,0 @@ -An updated version of this libosxunwind commit: - -Author: Keno Fischer -Date: Tue Aug 27 15:01:22 2013 -0400 - - Add option to step with DWARF - ---- -diff --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h -index 23ef47f4ac83..ea6c5cb86438 100644 ---- a/libunwind/include/libunwind.h -+++ b/libunwind/include/libunwind.h -@@ -102,6 +102,7 @@ extern "C" { - - extern int unw_getcontext(unw_context_t *) LIBUNWIND_AVAIL; - extern int unw_init_local(unw_cursor_t *, unw_context_t *) LIBUNWIND_AVAIL; -+extern int unw_init_local_dwarf(unw_cursor_t *, unw_context_t *) LIBUNWIND_AVAIL; - extern int unw_step(unw_cursor_t *) LIBUNWIND_AVAIL; - extern int unw_get_reg(unw_cursor_t *, unw_regnum_t, unw_word_t *) LIBUNWIND_AVAIL; - extern int unw_get_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t *) LIBUNWIND_AVAIL; -diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp -index f346c720d22c..e44f22a91513 100644 ---- a/libunwind/src/UnwindCursor.hpp -+++ b/libunwind/src/UnwindCursor.hpp -@@ -436,6 +436,9 @@ public: - virtual bool isSignalFrame() { - _LIBUNWIND_ABORT("isSignalFrame not implemented"); - } -+ virtual void setForceDWARF(bool) { -+ _LIBUNWIND_ABORT("setForceDWARF not implemented"); -+ } - virtual bool getFunctionName(char *, size_t, unw_word_t *) { - _LIBUNWIND_ABORT("getFunctionName not implemented"); - } -@@ -891,6 +894,7 @@ public: - virtual void getInfo(unw_proc_info_t *); - virtual void jumpto(); - virtual bool isSignalFrame(); -+ virtual void setForceDWARF(bool force); - virtual bool getFunctionName(char *buf, size_t len, unw_word_t *off); - virtual void setInfoBasedOnIPRegister(bool isReturnAddress = false); - virtual const char *getRegisterName(int num); -@@ -938,7 +942,7 @@ private: - const UnwindInfoSections §s); - int stepWithCompactEncoding() { - #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) -- if ( compactSaysUseDwarf() ) -+ if ( _forceDwarf || compactSaysUseDwarf() ) - return stepWithDwarfFDE(); - #endif - R dummy; -@@ -1173,13 +1177,14 @@ private: - unw_proc_info_t _info; - bool _unwindInfoMissing; - bool _isSignalFrame; -+ bool _forceDwarf; - }; - - - template - UnwindCursor::UnwindCursor(unw_context_t *context, A &as) - : _addressSpace(as), _registers(context), _unwindInfoMissing(false), -- _isSignalFrame(false) { -+ _isSignalFrame(false), _forceDwarf(false) { - static_assert((check_fit, unw_cursor_t>::does_fit), - "UnwindCursor<> does not fit in unw_cursor_t"); - memset(&_info, 0, sizeof(_info)); -@@ -1187,7 +1192,8 @@ UnwindCursor::UnwindCursor(unw_context_t *context, A &as) - - template - UnwindCursor::UnwindCursor(A &as, void *) -- : _addressSpace(as), _unwindInfoMissing(false), _isSignalFrame(false) { -+ : _addressSpace(as), _unwindInfoMissing(false), _isSignalFrame(false), -+ _forceDwarf(false) { - memset(&_info, 0, sizeof(_info)); - // FIXME - // fill in _registers from thread arg -@@ -1243,6 +1249,10 @@ template bool UnwindCursor::isSignalFrame() { - return _isSignalFrame; - } - -+template void UnwindCursor::setForceDWARF(bool force) { -+ _forceDwarf = force; -+} -+ - #endif // defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) - - #if defined(_LIBUNWIND_ARM_EHABI) -@@ -1895,7 +1905,13 @@ void UnwindCursor::setInfoBasedOnIPRegister(bool isReturnAddress) { - // record that we have no unwind info. - if (_info.format == 0) - _unwindInfoMissing = true; -+ #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) -+ if (!(_forceDwarf || compactSaysUseDwarf(&dwarfOffset))) -+ return; -+ #else - return; -+ #endif -+ - } - } - #endif // defined(_LIBUNWIND_SUPPORT_COMPACT_UNWIND) -diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp -index fd079da30895..206afcbbaf78 100644 ---- a/libunwind/src/libunwind.cpp -+++ b/libunwind/src/libunwind.cpp -@@ -69,6 +69,7 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor, - new (reinterpret_cast *>(cursor)) - UnwindCursor( - context, LocalAddressSpace::sThisAddressSpace); -+ static_assert(sizeof(unw_cursor_t) >= sizeof(UnwindCursor), "libunwind header outdated"); - #undef REGISTER_KIND - AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; - co->setInfoBasedOnIPRegister(); -@@ -77,6 +78,54 @@ _LIBUNWIND_HIDDEN int __unw_init_local(unw_cursor_t *cursor, - } - _LIBUNWIND_WEAK_ALIAS(__unw_init_local, unw_init_local) - -+_LIBUNWIND_HIDDEN int __unw_init_local_dwarf(unw_cursor_t *cursor, -+ unw_context_t *context) { -+ _LIBUNWIND_TRACE_API("__unw_init_local_dwarf(cursor=%p, context=%p)", -+ static_cast(cursor), -+ static_cast(context)); -+#if defined(__i386__) -+# define REGISTER_KIND Registers_x86 -+#elif defined(__x86_64__) -+# define REGISTER_KIND Registers_x86_64 -+#elif defined(__powerpc64__) -+# define REGISTER_KIND Registers_ppc64 -+#elif defined(__ppc__) -+# define REGISTER_KIND Registers_ppc -+#elif defined(__aarch64__) -+# define REGISTER_KIND Registers_arm64 -+#elif defined(__arm__) -+# define REGISTER_KIND Registers_arm -+#elif defined(__or1k__) -+# define REGISTER_KIND Registers_or1k -+#elif defined(__hexagon__) -+# define REGISTER_KIND Registers_hexagon -+#elif defined(__mips__) && defined(_ABIO32) && _MIPS_SIM == _ABIO32 -+# define REGISTER_KIND Registers_mips_o32 -+#elif defined(__mips64) -+# define REGISTER_KIND Registers_mips_newabi -+#elif defined(__mips__) -+# warning The MIPS architecture is not supported with this ABI and environment! -+#elif defined(__sparc__) -+# define REGISTER_KIND Registers_sparc -+#elif defined(__riscv) && __riscv_xlen == 64 -+# define REGISTER_KIND Registers_riscv -+#else -+# error Architecture not supported -+#endif -+ // Use "placement new" to allocate UnwindCursor in the cursor buffer. -+ new (reinterpret_cast *>(cursor)) -+ UnwindCursor( -+ context, LocalAddressSpace::sThisAddressSpace); -+ static_assert(sizeof(unw_cursor_t) >= sizeof(UnwindCursor), "libunwind header outdated"); -+#undef REGISTER_KIND -+ AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; -+ co->setForceDWARF(true); -+ co->setInfoBasedOnIPRegister(); -+ -+ return UNW_ESUCCESS; -+} -+_LIBUNWIND_WEAK_ALIAS(__unw_init_local_dwarf, unw_init_local_dwarf) -+ - /// Get value of specified register at cursor position in stack frame. - _LIBUNWIND_HIDDEN int __unw_get_reg(unw_cursor_t *cursor, unw_regnum_t regNum, - unw_word_t *value) { -diff --git a/libunwind/src/libunwind_ext.h b/libunwind/src/libunwind_ext.h -index 316dee298246..5b9f7e2f56cd 100644 ---- a/libunwind/src/libunwind_ext.h -+++ b/libunwind/src/libunwind_ext.h -@@ -25,6 +25,7 @@ extern "C" { - - extern int __unw_getcontext(unw_context_t *); - extern int __unw_init_local(unw_cursor_t *, unw_context_t *); -+extern int __unw_init_local_dwarf(unw_cursor_t *, unw_context_t *); - extern int __unw_step(unw_cursor_t *); - extern int __unw_get_reg(unw_cursor_t *, unw_regnum_t, unw_word_t *); - extern int __unw_get_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t *); diff --git a/deps/patches/llvm-libunwind-prologue-epilogue.patch b/deps/patches/llvm-libunwind-prologue-epilogue.patch deleted file mode 100644 index 7dadca728f9cf..0000000000000 --- a/deps/patches/llvm-libunwind-prologue-epilogue.patch +++ /dev/null @@ -1,183 +0,0 @@ -An updated version of this libosxunwind commit: - -commit ca57a5b60de4cd1daa42ed2e5d1d4aa3e96a09d1 -Author: Keno Fischer -Date: Mon Aug 26 15:28:08 2013 -0400 - - Add support for unwinding during prologue/epilogue - ---- -diff --git a/libunwind/src/CompactUnwinder.hpp b/libunwind/src/CompactUnwinder.hpp -index 1c3175dff50a..78a658ccbc27 100644 ---- a/libunwind/src/CompactUnwinder.hpp -+++ b/libunwind/src/CompactUnwinder.hpp -@@ -310,6 +310,50 @@ int CompactUnwinder_x86_64::stepWithCompactEncodingRBPFrame( - uint32_t savedRegistersLocations = - EXTRACT_BITS(compactEncoding, UNWIND_X86_64_RBP_FRAME_REGISTERS); - -+ // If we have not stored EBP yet -+ if (functionStart == registers.getIP()) { -+ uint64_t rsp = registers.getSP(); -+ // old esp is ebp less return address -+ registers.setSP(rsp+8); -+ // pop return address into eip -+ registers.setIP(addressSpace.get64(rsp)); -+ -+ return UNW_STEP_SUCCESS; -+ } else if (functionStart + 1 == registers.getIP()) { -+ uint64_t rsp = registers.getSP(); -+ // old esp is ebp less return address -+ registers.setSP(rsp + 16); -+ // pop return address into eip -+ registers.setIP(addressSpace.get64(rsp + 8)); -+ -+ return UNW_STEP_SUCCESS; -+ } -+ -+ // If we're about to return, we've already popped the base pointer -+ uint8_t b = addressSpace.get8(registers.getIP()); -+ -+ // This is a hack to detect VZEROUPPER but in between popq rbp and ret -+ // It's not pretty but it works -+ if (b == 0xC5) { -+ if ((b = addressSpace.get8(registers.getIP() + 1)) == 0xF8 && -+ (b = addressSpace.get8(registers.getIP() + 2)) == 0x77) -+ b = addressSpace.get8(registers.getIP() + 3); -+ else -+ goto skip_ret; -+ } -+ -+ if (b == 0xC3 || b == 0xCB || b == 0xC2 || b == 0xCA) { -+ uint64_t rbp = registers.getSP(); -+ // old esp is ebp less return address -+ registers.setSP(rbp + 16); -+ // pop return address into eip -+ registers.setIP(addressSpace.get64(rbp + 8)); -+ -+ return UNW_STEP_SUCCESS; -+ } -+ -+ skip_ret: -+ - uint64_t savedRegisters = registers.getRBP() - 8 * savedRegistersOffset; - for (int i = 0; i < 5; ++i) { - switch (savedRegistersLocations & 0x7) { -@@ -430,6 +474,118 @@ int CompactUnwinder_x86_64::stepWithCompactEncodingFrameless( - } - } - } -+ -+ // Note that the order of these registers is so that -+ // registersSaved[0] is the one that will be pushed onto the stack last. -+ // Thus, if we want to walk this from the top, we need to go in reverse. -+ assert(regCount <= 6); -+ -+ // check whether we are still in the prologue -+ uint64_t curAddr = functionStart; -+ if (regCount > 0) { -+ for (int8_t i = (int8_t)(regCount) - 1; i >= 0; --i) { -+ if (registers.getIP() == curAddr) { -+ // None of the registers have been modified yet, so we don't need to reload them -+ framelessUnwind(addressSpace, registers.getSP() + 8 * (regCount - (uint64_t)(i + 1)), registers); -+ return UNW_STEP_SUCCESS; -+ } else { -+ assert(curAddr < registers.getIP()); -+ } -+ -+ -+ // pushq %rbp and pushq %rbx is 1 byte. Everything else 2 -+ if ((UNWIND_X86_64_REG_RBP == registersSaved[i]) || -+ (UNWIND_X86_64_REG_RBX == registersSaved[i])) -+ curAddr += 1; -+ else -+ curAddr += 2; -+ } -+ } -+ if (registers.getIP() == curAddr) { -+ // None of the registers have been modified yet, so we don't need to reload them -+ framelessUnwind(addressSpace, registers.getSP() + 8*regCount, registers); -+ return UNW_STEP_SUCCESS; -+ } else { -+ assert(curAddr < registers.getIP()); -+ } -+ -+ -+ // And now for the epilogue -+ { -+ uint8_t i = 0; -+ uint64_t p = registers.getIP(); -+ uint8_t b = 0; -+ -+ while (true) { -+ b = addressSpace.get8(p++); -+ // This is a hack to detect VZEROUPPER but in between the popq's and ret -+ // It's not pretty but it works -+ if (b == 0xC5) { -+ if ((b = addressSpace.get8(p++)) == 0xF8 && (b = addressSpace.get8(p++)) == 0x77) -+ b = addressSpace.get8(p++); -+ else -+ break; -+ } -+ // popq %rbx popq %rbp -+ if (b == 0x5B || b == 0x5D) { -+ i++; -+ } else if (b == 0x41) { -+ b = addressSpace.get8(p++); -+ if (b == 0x5C || b == 0x5D || b == 0x5E || b == 0x5F) -+ i++; -+ else -+ break; -+ } else if (b == 0xC3 || b == 0xCB || b == 0xC2 || b == 0xCA) { -+ // i pop's haven't happened yet -+ uint64_t savedRegisters = registers.getSP() + 8 * i; -+ if (regCount > 0) { -+ for (int8_t j = (int8_t)(regCount) - 1; j >= (int8_t)(regCount) - i; --j) { -+ uint64_t addr = savedRegisters - 8 * (regCount - (uint64_t)(j)); -+ switch (registersSaved[j]) { -+ case UNWIND_X86_64_REG_RBX: -+ registers.setRBX(addressSpace.get64(addr)); -+ break; -+ case UNWIND_X86_64_REG_R12: -+ registers.setR12(addressSpace.get64(addr)); -+ break; -+ case UNWIND_X86_64_REG_R13: -+ registers.setR13(addressSpace.get64(addr)); -+ break; -+ case UNWIND_X86_64_REG_R14: -+ registers.setR14(addressSpace.get64(addr)); -+ break; -+ case UNWIND_X86_64_REG_R15: -+ registers.setR15(addressSpace.get64(addr)); -+ break; -+ case UNWIND_X86_64_REG_RBP: -+ registers.setRBP(addressSpace.get64(addr)); -+ break; -+ default: -+ _LIBUNWIND_DEBUG_LOG("bad register for frameless, encoding=%08X for " -+ "function starting at 0x%llX", -+ encoding, functionStart); -+ _LIBUNWIND_ABORT("invalid compact unwind encoding"); -+ } -+ } -+ } -+ framelessUnwind(addressSpace, savedRegisters, registers); -+ return UNW_STEP_SUCCESS; -+ } else { -+ break; -+ } -+ } -+ } -+ -+ /* -+ 0x10fe2733a: 5b popq %rbx -+ 0x10fe2733b: 41 5c popq %r12 -+ 0x10fe2733d: 41 5d popq %r13 -+ 0x10fe2733f: 41 5e popq %r14 -+ 0x10fe27341: 41 5f popq %r15 -+ 0x10fe27343: 5d popq %rbp -+ */ -+ -+ - uint64_t savedRegisters = registers.getSP() + stackSize - 8 - 8 * regCount; - for (uint32_t i = 0; i < regCount; ++i) { - switch (registersSaved[i]) { From 7014ffb454ae7de34973d3ecae941cc3e386ac5c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 9 Oct 2021 03:25:38 -0400 Subject: [PATCH 49/88] Backport #42546 to 1.7 (#42563) * [OpenBLAS/lapack] Fix the `LinearAlgebra/tridiag` segfaults by adding the relevant patch and bumping the OpenBLAS JLLs (cherry picked from commit 6f535fa2203a8e8f023e3c5c82ce07c341b41bed) * bump OpenBLAS_jll Co-authored-by: Dilum Aluthge --- deps/checksums/openblas | 186 +++++++++--------- deps/openblas.mk | 7 +- ...as-julia42415-lapack625-openblas3392.patch | 95 +++++++++ stdlib/OpenBLAS_jll/Project.toml | 2 +- 4 files changed, 196 insertions(+), 94 deletions(-) create mode 100644 deps/patches/openblas-julia42415-lapack625-openblas3392.patch diff --git a/deps/checksums/openblas b/deps/checksums/openblas index 5a1668aa45254..2419e2c98775e 100644 --- a/deps/checksums/openblas +++ b/deps/checksums/openblas @@ -1,92 +1,94 @@ -OpenBLAS.v0.3.13+7.aarch64-apple-darwin-libgfortran5.tar.gz/md5/c9800f7e24105c92a5205c77ddbc4227 -OpenBLAS.v0.3.13+7.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/43703203a6d7c7aff8c8a257a2f5393d930e7e12064ff9a7890114dc250c28f0c73d735c4bbe09a811610cec6f4fe5079a806fb5898025c92067239dc70d6f62 -OpenBLAS.v0.3.13+7.aarch64-linux-gnu-libgfortran3.tar.gz/md5/ffb49e047b54a68b9de82ac3ae64a94d -OpenBLAS.v0.3.13+7.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/745f30477562ec0bcf754a36e0c0082a60afea518dbe9fc46f95ee7547c33eece8717f6c9ee54bf1420a221ab7fb779dd4ccc98ca74164315975b7ac8e8b6979 -OpenBLAS.v0.3.13+7.aarch64-linux-gnu-libgfortran4.tar.gz/md5/ccdd01f36e19f8269750c93901c54bf7 -OpenBLAS.v0.3.13+7.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/ef619a6b5d140253a5f310f975d1aca378a8419f75b90713baf73aa1f3be9cdc43ae96a8fc40bc7d3502947bce87de4fd5d869f16220bde1ced4e6730437ea5e -OpenBLAS.v0.3.13+7.aarch64-linux-gnu-libgfortran5.tar.gz/md5/cbe589a28fa89287502eb591d26c0a1d -OpenBLAS.v0.3.13+7.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/7d894dda5e3eb124e17dcaa6ca7b02e29177f2ac678e18b6e57f6ce34c654c0dafb81fe470e93a42fa4b63f904b2cee00139cc149c7868d3f70b69313242187b -OpenBLAS.v0.3.13+7.aarch64-linux-musl-libgfortran3.tar.gz/md5/ebf835b3264f4b63cedac8c10f65316c -OpenBLAS.v0.3.13+7.aarch64-linux-musl-libgfortran3.tar.gz/sha512/2de3869ae6505789ff2ebbc83672ddb4f7a3f1610a88040ac9407dbafd23b7a0bdf19328964f4d901e7389636564fefb82442a1bb89a0d18e4a6441267d886b3 -OpenBLAS.v0.3.13+7.aarch64-linux-musl-libgfortran4.tar.gz/md5/3d20fe5e4c37e40eafd2a07ac5b11cf8 -OpenBLAS.v0.3.13+7.aarch64-linux-musl-libgfortran4.tar.gz/sha512/9dadabace2cec1260b2a02b42102453fa4c7e832c89d5c4f06b8a58ead30c2d926e6f615da03016aec596324619d34b7e25dec88e1dfa9725e420fbf6397c0ca -OpenBLAS.v0.3.13+7.aarch64-linux-musl-libgfortran5.tar.gz/md5/53c4a96fb47aed019efc780d0e9e4929 -OpenBLAS.v0.3.13+7.aarch64-linux-musl-libgfortran5.tar.gz/sha512/2e3ebec1e64f29308d7e61e80ff95dd7ff45a7bf7696639f6b786990d4e183c5cb8357e65f16b9c98058ff8d197a3e1e7c355a304e56c644fbe8b321d8941988 -OpenBLAS.v0.3.13+7.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/59142e0c7a6e50c27e084f10982402c2 -OpenBLAS.v0.3.13+7.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/4e45b9a7087840edaf515af3a9ad15f6d5c2cbdb8be244b9c65542f6f6526e5f82fcd0939070b35a19a8ec1ea7c8886c82070359d74924b90f210ab3026b1d24 -OpenBLAS.v0.3.13+7.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/2c00dddb46cd74324c023d9cea5d12e0 -OpenBLAS.v0.3.13+7.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/e4b6b07016c59727be3cc01fbfe1ceb2fc19bbddf96bffbd8a0b8bbf10e30768a7d8ed04052cbc53093d8f6d6f8d57c0d05d6692ba456bb8aa31a0f736617d33 -OpenBLAS.v0.3.13+7.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/d98b02bba19262ebb4a6eae0971e19a8 -OpenBLAS.v0.3.13+7.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/f73413a520bf204d9c369dbc910e0df4b72e583ab31a66e5e64ae31e93464d6f8cc114be7c9f15738c900fa8762905f2c9ce198c45426eab22b119ac8fc489d3 -OpenBLAS.v0.3.13+7.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/5e34312709f68e06783e890d94447646 -OpenBLAS.v0.3.13+7.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/f127d0df4a0b4d91c810990108f0f3daf89373f29002249edd6225330bdc804a0a2282e05ab128b15ec58c75098213481e26bb0e9a5a2b642da9c43457b9f9f9 -OpenBLAS.v0.3.13+7.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/02d6189238fe4ef41e791f558324e32c -OpenBLAS.v0.3.13+7.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/fd5d4c2f43c4e98f0c28afdc43f2dfc97123fbe723c577688acaab959e96980c14b0ae76d150807da1814f9ea55dbc21a9cce9454d52804ba815cf8026d17117 -OpenBLAS.v0.3.13+7.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/14d77e7332ed0949342a4b659ce98088 -OpenBLAS.v0.3.13+7.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/354113f9877ecb04dbdbc105991ee20c58d9bd49d499ee476af87135fbd277c7729e909e528843b5fd4ae2f076996ea74284ad384fc06584882ea5fdfd7d4206 -OpenBLAS.v0.3.13+7.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/b32a6caa13c26d964a456f440a2df0ee -OpenBLAS.v0.3.13+7.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/4b19666ca3a32c1a145f89eed063cafea2eb468cafc3b47168977749a8e484e124b5008c58d00d40e4c7ba1b09669d7499fe259bd43c88ed0d064c326c85dea9 -OpenBLAS.v0.3.13+7.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/4b15013643544594e7a8a4948b9a4db3 -OpenBLAS.v0.3.13+7.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/2fd0e4d5ec22e3ef831a60909cbf803ba88e16b7ba12269cf22bd14808fb25dccad597e0690530b704dc971c681f1c075f3663f4d7cb05998835e584cb9779b8 -OpenBLAS.v0.3.13+7.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/7217154630d07a83fa84cbaf298d84e2 -OpenBLAS.v0.3.13+7.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/a9cded7959ef98027e1da87127464ac930dec3ba9c198296bf8c64918d31a8fcdd92d4d74e3aad2f3aff02553959e141986870873e01a5302c67e7efacc33616 -OpenBLAS.v0.3.13+7.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/65f601ff699b51719aacc4a495be5b82 -OpenBLAS.v0.3.13+7.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/c96e4fadf74eea0c74ccc7d57670222d6bc097ceecc38211a742bdaf8c48491266302a96a33317ab4e8e19669b41f3051c5ca409c076ae1993f5218fa30f2cd6 -OpenBLAS.v0.3.13+7.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/7d0f0e432a372ce94cd127153b8976ee -OpenBLAS.v0.3.13+7.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/b017bb4ffe9caec8410c72a80c5307e81cbfe84e4c148f3f99ca774efd17b47378b24ce95cfe6df45e8ee890ff0c326d480fabfbac0e494e25f620e82fdbbb8e -OpenBLAS.v0.3.13+7.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/398c894c743c181b4edcffebb5d91340 -OpenBLAS.v0.3.13+7.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/c4c7acae9dfb49252dab6a7d0217e8caa8df707da72fcab3dcb5ea6449e42effd1a9df18531e8077d91ad8fdb323482a7fa405eda1a4660f48e59927ef33f525 -OpenBLAS.v0.3.13+7.i686-linux-gnu-libgfortran3.tar.gz/md5/ac7f07c75d419712e4ddad380fda0177 -OpenBLAS.v0.3.13+7.i686-linux-gnu-libgfortran3.tar.gz/sha512/4522c5b5924ff976e58ee30bbd0bf933baa2f705e3d68a83aaeeabaa8cd4cacf41edf05612f4616052d78ce04e70d62a411f8e0cc7ab9ab3fbc56dbae2615b67 -OpenBLAS.v0.3.13+7.i686-linux-gnu-libgfortran4.tar.gz/md5/08254b64198705d5062db0526d6d8cde -OpenBLAS.v0.3.13+7.i686-linux-gnu-libgfortran4.tar.gz/sha512/5d8c1062f15b11066d7400811492b8e2e1c33150bda4b74d7f9d7cd64529f0c0b89d7a1a2e644dc321be18fd3e3ba7dff92fe597f3d42aad5d903c8b26fa0e87 -OpenBLAS.v0.3.13+7.i686-linux-gnu-libgfortran5.tar.gz/md5/5f610eff8a8e7b24868a2b915419d4a3 -OpenBLAS.v0.3.13+7.i686-linux-gnu-libgfortran5.tar.gz/sha512/8967a180b57ada258aea76a39b8c71b718314460eeef2bad1e407be0c60a54f04a0b733944feb036c5fd2d67a8f3761babef10530dd871006f7d7ba366b4c95b -OpenBLAS.v0.3.13+7.i686-linux-musl-libgfortran3.tar.gz/md5/1867e826c4cdc6b6964bf2e7be43671e -OpenBLAS.v0.3.13+7.i686-linux-musl-libgfortran3.tar.gz/sha512/c7e7206361a4ee379c40a483aae1dc5357b8ba77e561fbf961cd7269674705c83ba2b5b09891b4567a330f9621d5a7bc0c323c8ec9d2385222b4afb57e010f8e -OpenBLAS.v0.3.13+7.i686-linux-musl-libgfortran4.tar.gz/md5/5a4511b55512387315e42555a1f35222 -OpenBLAS.v0.3.13+7.i686-linux-musl-libgfortran4.tar.gz/sha512/3381a32dd47d7106a131f8e6be89675c29b8ff496336e8f4dbc5bac13df3b1de9bd03a2c027b94ee43d66f4cb8fcab1545327552ac45280252046072dde3ebd7 -OpenBLAS.v0.3.13+7.i686-linux-musl-libgfortran5.tar.gz/md5/9766d92bb2a0bc7376d42537c0bff642 -OpenBLAS.v0.3.13+7.i686-linux-musl-libgfortran5.tar.gz/sha512/34149b0ae5ab26d4b5ec9f5a8a981eae713e355248c56af0d71eeb2720cd4e453d96fb9e885a48c94389759f5e015536b7a21d9720c6b46b167e6bbbccc717aa -OpenBLAS.v0.3.13+7.i686-w64-mingw32-libgfortran3.tar.gz/md5/3e13fa70512da79cb19d15899e967e8b -OpenBLAS.v0.3.13+7.i686-w64-mingw32-libgfortran3.tar.gz/sha512/c4e99d0bcfd9de4ddcdbf819872257a91e45cd778c7bf927b6a3c69e24d555d6a757236b08113160790a4a8fe0a3b258c17c8d43386a0d9ecf926e4e542b9a5b -OpenBLAS.v0.3.13+7.i686-w64-mingw32-libgfortran4.tar.gz/md5/724db97fb05d2418325b84eff736b0d6 -OpenBLAS.v0.3.13+7.i686-w64-mingw32-libgfortran4.tar.gz/sha512/4869bc155e2c5bbca2ea6a0107a2b12e7d7ec226dfa5ab81c8f46751f5e2a9342127c0c8ed24731cbfa05904db319ffdd907b248b725043d8bd089e911cf6808 -OpenBLAS.v0.3.13+7.i686-w64-mingw32-libgfortran5.tar.gz/md5/4fd5c17e2432dfbf2fbf6930c9b08617 -OpenBLAS.v0.3.13+7.i686-w64-mingw32-libgfortran5.tar.gz/sha512/92c4b8b61d9d4dfc8cc60c05cc1a8663e2cc33f3e0683d562f723939697237cfaf3925eb903ec2b443e1a943260c91e04029e582f9f07f2b3655ee5ed9812dad -OpenBLAS.v0.3.13+7.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/6b509bdecd697472c5c96b947a3d016f -OpenBLAS.v0.3.13+7.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/494b8fa97c383554edd62d04b985f2fe25f1365d149af041d1d2d9c617df0fe12fff271e21a3811205e05412229e2f55043876ba6b553f22a7616653928b1908 -OpenBLAS.v0.3.13+7.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/5be5d102fd4c0537403a0fa8266a95d2 -OpenBLAS.v0.3.13+7.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/2fb952a7da419d64f41b5fdff7c49e8e750f8724348180b52e61a50b4b55e5a3c3d072455d3ce870fb240b9c50c6f4572f6211813edb965ca41fa27efc85de6a -OpenBLAS.v0.3.13+7.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/9bb7b2ac52789cd7eba17e4b564d95d8 -OpenBLAS.v0.3.13+7.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/a50700ab72ab169c91bd10eccb4a03231d0e223bcf3e158331af4a6805e2f17ab042eb6c9db335a800ab5b69554c0b9a5aa78c1f112c8b579f5148013afa15c2 -OpenBLAS.v0.3.13+7.x86_64-apple-darwin-libgfortran3.tar.gz/md5/2bfd33949884b29e2621bd4db9ea790b -OpenBLAS.v0.3.13+7.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/87e32e09c5fb6da7396a13646a19ddc9f0aa6070060fba1e4f4490fc447c041a0b6ae68cd338e1f1b2d610bf61e28274823c81ae229768d6825104337d82e3d5 -OpenBLAS.v0.3.13+7.x86_64-apple-darwin-libgfortran4.tar.gz/md5/e0a3f443cd840d5a9cca3748c0fd247b -OpenBLAS.v0.3.13+7.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/b4a55211a2a64fceb2eb89c1bbb06a5f658d4d81dcc6c67c1fc6a804ba16de8a05c341b81bae8b14788b85f772555785696a2b11b1cb6873ab9fbd174eebf1c1 -OpenBLAS.v0.3.13+7.x86_64-apple-darwin-libgfortran5.tar.gz/md5/3acd992bd55a527ff96cbc1fd208300a -OpenBLAS.v0.3.13+7.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/192300b6480efe523e3a196570743e3c091d9d29c6f16cb3f5f951b344e8ecc5a76f235c8fa2b2a9bd56c8dc394fca447c2bd1d4102ad7f9823ab71436154dbd -OpenBLAS.v0.3.13+7.x86_64-linux-gnu-libgfortran3.tar.gz/md5/35ede94f298e95ff772e3655692da81c -OpenBLAS.v0.3.13+7.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/109fbc3ee23528640011df500f7843bec3f42d92b6be99e2101bfd0c6bb798d5c5a0c8a9d2567d11e50bdf54213347ea204c383660d2fd6445ae0735f210d211 -OpenBLAS.v0.3.13+7.x86_64-linux-gnu-libgfortran4.tar.gz/md5/5d97a16fb7ba45d34aee0d1b55f81008 -OpenBLAS.v0.3.13+7.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/f957549494ec3c11fbb73cad4b43d8a39a7f0e509a3f797cd35898f40ed577aad27cc721a5720eb38e0ccd5064915a4ca93b67e517f7fa1cef86fbe3f88c2529 -OpenBLAS.v0.3.13+7.x86_64-linux-gnu-libgfortran5.tar.gz/md5/85903515954b13d71dfc1cfed5364000 -OpenBLAS.v0.3.13+7.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/ee3fdeede35b52987565e55c96a1a47964cf1da52b25753302c2ac4671b2921a70656a5f9e39bf1b7db0d6037c305f66b4aa22529713239ca30c322f5c3d8f97 -OpenBLAS.v0.3.13+7.x86_64-linux-musl-libgfortran3.tar.gz/md5/b9a86f939ec7d76674d67653d3acdfee -OpenBLAS.v0.3.13+7.x86_64-linux-musl-libgfortran3.tar.gz/sha512/8a9d10605d9fad833ece78bc0c4690e43050e5e276b0c76ff194b617134e05261db2b385fe2c4b0b2313a3be107731b4cc71dae79d6e403e64a6ca635a3d4b47 -OpenBLAS.v0.3.13+7.x86_64-linux-musl-libgfortran4.tar.gz/md5/6a4a082c4d73cb6dad69460deb75afdd -OpenBLAS.v0.3.13+7.x86_64-linux-musl-libgfortran4.tar.gz/sha512/8fa8c2f07ff044acc78caaf7e34f6e299567ac82436059c70d9a149ffd03d0d257a009592f845e22554a17dbd59fb13c23582a0e4131a186139c9be9c71b9f2d -OpenBLAS.v0.3.13+7.x86_64-linux-musl-libgfortran5.tar.gz/md5/50148e4dc8881c9f1f4c2bc936c3f59e -OpenBLAS.v0.3.13+7.x86_64-linux-musl-libgfortran5.tar.gz/sha512/df0019201f71a12867deb872d3a3f7b3c07919bb779b3f3f5612d52f9c02bba1c19e230c81c8421e32b5cf1140dc388f1dfae3379c081cecb4a516f1d28a3788 -OpenBLAS.v0.3.13+7.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/87b58444e006bb680e8139b2ee7bc998 -OpenBLAS.v0.3.13+7.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/c32638c812a3cc4e3c3916b6a9bf572ac202b2101946a18a7af89de1cd3171a44f9d9308a6de822bd703acd96533c963ad8a8205a1200039540191cd03fe1f6b -OpenBLAS.v0.3.13+7.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/f8a07c961fa2b6d268ff1b3f4e02b729 -OpenBLAS.v0.3.13+7.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/b3faaa4155971047a8f58123da5dbf51cd6cac574a46e4a339b2be0570f1868fddbe9b46ce07f75fb561bb5da42bf19466035a05286832a85f1f39c58265bfb4 -OpenBLAS.v0.3.13+7.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/67d69caa1877b74ca652f0e96718ddde -OpenBLAS.v0.3.13+7.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/bc72e2df6e0dec6962cd32b77f49ec93b05b34dbc95c0b0c31da6158d3a5f497f6321a895f3faa48c82ee956fbd8e82346bb8d8a20a9639e2e689f0b85ab5c2e -OpenBLAS.v0.3.13+7.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/dc755ddb59511ef049daf85a38ef0804 -OpenBLAS.v0.3.13+7.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/fa5a559165b97cc5ca24d5df02dfeb1f97b8619512d8f99e3c8c8ee800aec0d3ca56ac4170569dafee7cec738e9abc5017958c153bd44d19d60fbecac53a0ee2 -OpenBLAS.v0.3.13+7.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/ff56c35358fb846827f8f869fdca4b21 -OpenBLAS.v0.3.13+7.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/c8c0029c9b95f5a11dfc84bd02b944ed96de5c96835b2e6dc5e8c401fc37b667f8ea956f3715794b01be68ea86e0c74b4ebd22f728d1f9777516bfdca944c1b3 -OpenBLAS.v0.3.13+7.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/e5bbc60da2dce3c4abe0583cff4b985e -OpenBLAS.v0.3.13+7.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/344dac288566886013b59c40877b879578b11f57b90433e65909b56b7e06416c0ceffedf08cc3d05e08514a098309ae492fd57c30dc97737cdede1aebed2ea2d +OpenBLAS.v0.3.13+9.aarch64-apple-darwin-libgfortran5.tar.gz/md5/9c7065d3d00ff5221ac27e09bdbaed30 +OpenBLAS.v0.3.13+9.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/3212a7da3e290547d0726e654aa99280361ccd410e155e33544139710cb7eb4f29abac6ec7d8835256b46bbfce19be40a88b2083b22bb237171fdf26e6c00e86 +OpenBLAS.v0.3.13+9.aarch64-linux-gnu-libgfortran3.tar.gz/md5/6471a2b49cbb034a56ab9a173cf5b98a +OpenBLAS.v0.3.13+9.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/752ed545b3e70574ec246e9c56bdff1f3f205637c74a2ec18124056f857950b30228b6de4a7f362819cfbd2680254602ed9237f1c44bdf5d892b564b45dc9d9b +OpenBLAS.v0.3.13+9.aarch64-linux-gnu-libgfortran4.tar.gz/md5/9c81f9e73ff1aa0449c8fac8adb4103d +OpenBLAS.v0.3.13+9.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/b9db8ca9173bb08e5bf157df2b3ce938f897081b66066abf3ea7f4c1525015e01e7fec514237cfa2309753e84f625b612661c941d607b25d8b8263930a10b120 +OpenBLAS.v0.3.13+9.aarch64-linux-gnu-libgfortran5.tar.gz/md5/1f486d65f84aeb50d34e3024ee5f9d07 +OpenBLAS.v0.3.13+9.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/4d172fa056b827fccd0cc96a240024c795604cd6e602dd7b5121c1b31f8ce93e0e4a1086222fd6a0867fc611a5019ab1666d3375b20587b561e3acde31d92713 +OpenBLAS.v0.3.13+9.aarch64-linux-musl-libgfortran3.tar.gz/md5/92fac4f7c2293dda1fe0ab4a88bfde0f +OpenBLAS.v0.3.13+9.aarch64-linux-musl-libgfortran3.tar.gz/sha512/326cf4ab5513a144b1b948d28f0b243f9e2b52875ae72d3d4f01cc5ffbd67da5b653aa303aad5fed563fe8962bd8f87c7ad4bb729af4b82f1a1cd495515f2eb6 +OpenBLAS.v0.3.13+9.aarch64-linux-musl-libgfortran4.tar.gz/md5/2f9338a8398acdbecd8d9e05c69d4f62 +OpenBLAS.v0.3.13+9.aarch64-linux-musl-libgfortran4.tar.gz/sha512/683c5e55c9a4d49a69befc8fd13cb3c2fa570a1fee76bffef714e6fca4ded67bcc5917629086cb638177a034d8cad1cc28d4a5e4f16f09b5aae42290bf4e3603 +OpenBLAS.v0.3.13+9.aarch64-linux-musl-libgfortran5.tar.gz/md5/26c23c5cb7e1faab1f51ca36eeac411f +OpenBLAS.v0.3.13+9.aarch64-linux-musl-libgfortran5.tar.gz/sha512/9c70bb0ae7fbf0257c8a06dff9f1a266d63524965b22963b70ad0783d1435e8ea9efdb3edc3abb4bb114169264f11a4e758d364c65a0140724b46151747a124d +OpenBLAS.v0.3.13+9.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/07ba6855160affafe8cc6a353399110b +OpenBLAS.v0.3.13+9.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/b433a3bd12cc75f383e391681bce0e2702f630798b5200a3af11595b598c49d6acbf04cf0fa5e4427a514a40dfe063f8d95e9d487abce383eea5525835743e77 +OpenBLAS.v0.3.13+9.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/fad1db837910c62b67467f219ad64c0c +OpenBLAS.v0.3.13+9.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/95f3b653a83a9b61ac576c18ce058b37b2dd99eb74fd7f35710069c2144d98aa2aeec362cf105ef0094893d567bbc2d831148e75c2d26f0876455b17def5bb9b +OpenBLAS.v0.3.13+9.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/33d76e83c7296353a140689ff95783ea +OpenBLAS.v0.3.13+9.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/27f70f27d71b6bb243e061e0642be3115fd454bacdc8e16124b8e715a266306f4aadd8547d9fa6ad29dc47334e47484e130f6ae6d629ad30d9539df1cc2dbd91 +OpenBLAS.v0.3.13+9.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/ed22d1a874d0bfcb89a37cbf87d9a926 +OpenBLAS.v0.3.13+9.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/fdd3127f5fc86d4a1540d5532692fd06cd8eee77c9b50da0e6c272d13768e515d05cec727d984646e4cc73d265434921e80a46379e966256afa1905a19902d89 +OpenBLAS.v0.3.13+9.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/c6ff03a44db29db7435d01fee34ea7c5 +OpenBLAS.v0.3.13+9.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/d37220120022a9474c03010d25269f06a66283305034e87bfceea7501b5dd4478d8217ff22f3af4cbb72082d041c77ffda4e97abdbffe47bc8d94ed282ab4eac +OpenBLAS.v0.3.13+9.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/21792f589c4d1bd9c10a1a2293e7fb00 +OpenBLAS.v0.3.13+9.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/a254ae7c7b8fd4d4b876a9a5a10759d56e632843b562d67320a042f1e4ef586fff0bf53b91e614be79f99c54aabedc22005de89e83a00bc13df78cb9c7361657 +OpenBLAS.v0.3.13+9.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/d1ebcacbc56354f4a76c7e641969d7d6 +OpenBLAS.v0.3.13+9.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/76a6337078d8f9101c6c642609924d94818ae8146cdcabd61f87b05487ab0db96375fd0a118d668fd03d88fcb1fbef728db6f4438743b3a22569d9067a9a5029 +OpenBLAS.v0.3.13+9.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/c65ea90ee6704bbb35a83d17760ee8cd +OpenBLAS.v0.3.13+9.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/07511877b4395282e75c8a696f732985cb850fb8ee8066e4f8b8cb81246b823de35a9224f9a24de15a2fbb2fd680515c565fd34a4ab6961faa73c32cafa1ae1a +OpenBLAS.v0.3.13+9.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/3dbbfa4fb017445d1259186150ad678e +OpenBLAS.v0.3.13+9.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/2d598f96f03c1f3422db982109c2206920729ae466fe03404ec1ae2e503c6b0448e622c4fa8e7b45e0a3557f3a4fb3645d5b8c541ede256ec464f79f2fcbcfb1 +OpenBLAS.v0.3.13+9.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/5125b57dd059d1238903edf5fd98d1de +OpenBLAS.v0.3.13+9.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/452b0454dd398ed571aad549cd7164986fe1d3bff1df3351217a74f6dcd63e28672db6c3b227d9b79139670d8d9953a4953fe819214f27deb2bbd3924c2923cf +OpenBLAS.v0.3.13+9.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/84e08a9fa5f3261ea742acfb6a53e348 +OpenBLAS.v0.3.13+9.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/08bd50c6b1afd3736f0101e898c1d7a95ffbd7fefaadec5c9c7ec7ef8753aecb710e3843da7575af9a467059af03a79e08da7b980c84ad0cd72145574938c043 +OpenBLAS.v0.3.13+9.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/40880ef817f9a4cbbcacd769e0654ddf +OpenBLAS.v0.3.13+9.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/94abdf553ba216ec42d31e0d240859ce97acd862580d604723c5fd5fde4c7f0c45b3752b3130e5fc76cbb63ccebe81d345080825fddadd92e5b12174c9245acb +OpenBLAS.v0.3.13+9.i686-linux-gnu-libgfortran3.tar.gz/md5/8ec3205f37f37203fceac8e59a16dcce +OpenBLAS.v0.3.13+9.i686-linux-gnu-libgfortran3.tar.gz/sha512/fde27e0afc6ee2d6e86f2396ce6a9b9744c596c92de61b0d2b2f5e48898ff143255e445fec4f7f83da3f1d000b936baeff6271eec3ca3972b0b6825145d3c0cc +OpenBLAS.v0.3.13+9.i686-linux-gnu-libgfortran4.tar.gz/md5/40407ac7a16cc4e23f6c021a7ae7e22f +OpenBLAS.v0.3.13+9.i686-linux-gnu-libgfortran4.tar.gz/sha512/aeb764466c57c2c35f979c33c453335cfc5aff6e6b7615b8cf75a0f5ab15d549f7dbbe1f51e4376755c1968d3ea7d2cb7d7aff3443e951d9b4438dd7e024cddf +OpenBLAS.v0.3.13+9.i686-linux-gnu-libgfortran5.tar.gz/md5/0f76cb35ad32f92c374b6ff6c186f136 +OpenBLAS.v0.3.13+9.i686-linux-gnu-libgfortran5.tar.gz/sha512/82dc333b2beba94bd8948fe714255b8346fe1a1582767fc4ef6e912bdbce0e0f952831c28aa0c12ba1da66906adc30b7b9e9cf0763c784d29c998f3304813a48 +OpenBLAS.v0.3.13+9.i686-linux-musl-libgfortran3.tar.gz/md5/d5dcbd2ec95d1862f465d41bed59ad70 +OpenBLAS.v0.3.13+9.i686-linux-musl-libgfortran3.tar.gz/sha512/3e72142b2be54f48c845e3d0964956e0f87ab870b20a9a1ecafea1a114bf59918624387069d8cd51ef1e9e740eab94f9dbcafe23e6637dc024cc52a2690c5b6e +OpenBLAS.v0.3.13+9.i686-linux-musl-libgfortran4.tar.gz/md5/7880897bc2037bf2c3f657a4d48ecb2f +OpenBLAS.v0.3.13+9.i686-linux-musl-libgfortran4.tar.gz/sha512/8eb5b1dd6823f53e6832a96343e819a33d47ad89e6e3e0fbcf5cec962bd092a4a5ca2e26f3e1c52b6b37d1b2d42650c036d1efd384b5901773f4fc40cdb2133c +OpenBLAS.v0.3.13+9.i686-linux-musl-libgfortran5.tar.gz/md5/37a96efd98fc058c76bbb7202806ba46 +OpenBLAS.v0.3.13+9.i686-linux-musl-libgfortran5.tar.gz/sha512/4d5dc013e20860576056b1a58e243ec2d66d83942e867897c52f6e9c12c58598ee3bde0e5021d1cbb766c3c7d657b01f35dddf4816fca0e300cd84d265c37423 +OpenBLAS.v0.3.13+9.i686-w64-mingw32-libgfortran3.tar.gz/md5/2bcd665db4886a6b60cc366a33bb42c6 +OpenBLAS.v0.3.13+9.i686-w64-mingw32-libgfortran3.tar.gz/sha512/c5f06c27e53603915dc3692d33bd4345832fb7fd584f557699e736172c0e1cf4f02e1b9ec782933769b3174d6c43cea6e96924ba422fc90886f994ee16ddf928 +OpenBLAS.v0.3.13+9.i686-w64-mingw32-libgfortran4.tar.gz/md5/9fbac3f292b5a7a4f9e819b41ed8c00d +OpenBLAS.v0.3.13+9.i686-w64-mingw32-libgfortran4.tar.gz/sha512/1e7fe351f0c28489ae4eda327c6d4e6aa8c3bd55576ce3c9f81b0ca6b76cb6c8604cdcac0d59fd2716bb20eba2925d8f783037993109b5844be3035b25aa43dd +OpenBLAS.v0.3.13+9.i686-w64-mingw32-libgfortran5.tar.gz/md5/e8740b1d36ebd7c0f9a02453f50e50c5 +OpenBLAS.v0.3.13+9.i686-w64-mingw32-libgfortran5.tar.gz/sha512/a6ab67d0d8da77ecb208ff4a86b6a21728eb51d347245c30efc059f8894c9002cd33c0e422f31f63437075e27186833640411f381c0cec4e0481c9c4360e5c0f +OpenBLAS.v0.3.13+9.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/813ccffb1cda90991f5f53682fec0339 +OpenBLAS.v0.3.13+9.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/80c3434c82b286b50a9d23af62298add39893bbb22c6e45142366fb023b432ad039925dc008311b4a5dae785dc523691241cbc641b164911038198377a686764 +OpenBLAS.v0.3.13+9.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/f6f63c58af00cf2a00f30c57ac8cbda2 +OpenBLAS.v0.3.13+9.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/bf15cb18ae95e761f7780bff4414e282fae860d34adbfc5ac96ff113ab95440603901622eb35c8edf95faf9fe02a81aef901aa84806aa18547d7bb8da91253a2 +OpenBLAS.v0.3.13+9.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/d7829934a0766f3576e61313e293d275 +OpenBLAS.v0.3.13+9.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/fea11fca8919be30a69cfcf85a130bebd8aee59f1bc26031591f4be78a30f17656edf84a8134608158173274fc2d9cc4ed55b20063fa6a42a328ee8d94cc745c +OpenBLAS.v0.3.13+9.x86_64-apple-darwin-libgfortran3.tar.gz/md5/a2aeaeeb0b64abea0025db3f4395c4d0 +OpenBLAS.v0.3.13+9.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/8af3eb7b41558e739858fb94ebf36571caf4827de50ae5349530aa7caf8324d117803011b843483ef8ba843dc0e0a0b306dd6e099db0de3b7bb1c77e5e29da7f +OpenBLAS.v0.3.13+9.x86_64-apple-darwin-libgfortran4.tar.gz/md5/37ce9e7346d8ecb7911989c3c5206714 +OpenBLAS.v0.3.13+9.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/45df09be7f54fa9777a34f0d3445c8d39df5cfbf2b41c4ae7254bb688d1ea4c350b583427484465bab6f32e8441b95258d09b98afbe53ac77dfd24e1ee2ecae5 +OpenBLAS.v0.3.13+9.x86_64-apple-darwin-libgfortran5.tar.gz/md5/0b44d3dec4c92e3f03a41787771c48dc +OpenBLAS.v0.3.13+9.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/7bb0e107112dad72dde1b1e3c715fa6629bb7a979d77f1b1e270df3a7be5acdcf40aa25d61d387b46ae18b38a92bc73299dd4fff19565659822bd22ad2013f3c +OpenBLAS.v0.3.13+9.x86_64-linux-gnu-libgfortran3.tar.gz/md5/0887592f1dc790651a324b2642941d1c +OpenBLAS.v0.3.13+9.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/815d57aa0a0ceb6ca70a29e5b666266947e470c9bcdc3da92b36c677b8e7c13a1ff8179b8e93618015cf8d513663efd0aed0a940accf4cf9485cd5971991e338 +OpenBLAS.v0.3.13+9.x86_64-linux-gnu-libgfortran4.tar.gz/md5/c77016b34c94dafc72c3f33f8426d9af +OpenBLAS.v0.3.13+9.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/08e337be813507335e3fca07ef986bad74c905486dda6c1688f9ee1eee5afe33eff5c7701b69af49c38f6c96d7cb2885e79913c078b790b41da5fddb082e0524 +OpenBLAS.v0.3.13+9.x86_64-linux-gnu-libgfortran5.tar.gz/md5/682f1a6cad43848d07b24de44d3b4b1e +OpenBLAS.v0.3.13+9.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/f14145a96c69ad2179cae00755a4bd013594741cfae0efb780a86be6864e8ee99c5a4cf4b0e4d9e116cf620e6e680453c196dfaa31decf303ba8196ad41146d9 +OpenBLAS.v0.3.13+9.x86_64-linux-musl-libgfortran3.tar.gz/md5/7520c42e4924d95c40051a35a9047756 +OpenBLAS.v0.3.13+9.x86_64-linux-musl-libgfortran3.tar.gz/sha512/56501d655aae0c7431fa64f320caa12cccb2c9d73816f439cf5c019b6f7a4c285c141645c7ac2b49122f7d522bb3acee93ddd34840919fe2d8274fbd63d8be57 +OpenBLAS.v0.3.13+9.x86_64-linux-musl-libgfortran4.tar.gz/md5/feb8ed1722c2ded5afc427f1419d42d8 +OpenBLAS.v0.3.13+9.x86_64-linux-musl-libgfortran4.tar.gz/sha512/9bf9123240052f0500d9a50d1fffa4895618e9f312ae46267060c3fe1bba4181fcb3091b43f33db043c307ca4522987a118531330592ad4dce4f195d9e255257 +OpenBLAS.v0.3.13+9.x86_64-linux-musl-libgfortran5.tar.gz/md5/6ad4b179e2b9c0be6e0dd7ecddba1df9 +OpenBLAS.v0.3.13+9.x86_64-linux-musl-libgfortran5.tar.gz/sha512/4105e0378edb8cf39440e4fd69c30dc28ccc861f9c91a6d5b09b7b28891bfde731e380087ef9000da2ce1b9da9392d154437a8a5d376eeb3235f6b973bc3a757 +OpenBLAS.v0.3.13+9.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/847e64837dd6ed5dae27e6021c1c5346 +OpenBLAS.v0.3.13+9.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/0a432fe366e173f55961abc4439fc7c8924ea6d5268015141aa59c848fd502593296ed1c1ec6372ed23d6ffb88d69155086e33fa3644270adc47dde9f2f02908 +OpenBLAS.v0.3.13+9.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/d77005ce8ea9e66e8b72e3b1a6d161ae +OpenBLAS.v0.3.13+9.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/a5e113491f8564664b2d97417224a894d46dd79368d02fc73901acdb24cfa7d02c7c0cf7207dcfaa3ba8abb8f3e3af55484497c9e70df4ad4976986f4455a4e0 +OpenBLAS.v0.3.13+9.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/7badf0b966a67efeae3877ec7b1b42bf +OpenBLAS.v0.3.13+9.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/db4dae9bdd2e3b1da28a953e23a20262608cbbfe8025b4266ef3199342f4b92c0055991db9a056609290351ebc264861bc96ae3222cd3cb9020700fa0188bc11 +OpenBLAS.v0.3.13+9.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/5a9fae77775d82e80ca0769970227221 +OpenBLAS.v0.3.13+9.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/c1e99d7b2b2d6e9151d51de38c2a1d042b7f205efe97d6eccb3a7aba88deadad8edb429634a86952319ac244ba1a4b4f0473cb19827aee95f8a087ad893dd3a0 +OpenBLAS.v0.3.13+9.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/3880a1891b119105af8046611703ee58 +OpenBLAS.v0.3.13+9.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/60bc70ac32ec85dbbaa7489728e975539749e182d69907981fe84ad78f473a91b0e25ee6b1c4e3b02c3fb1e441b6f8c552051a1fa84198da187defd9cc3cb4e1 +OpenBLAS.v0.3.13+9.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/c6593f17375e85a8a33fca43332337c9 +OpenBLAS.v0.3.13+9.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/8d4290ac3fcffb8e175d767f91079e1e65dca4efa6dfd3601637c041c8c429db8dfddd38ff2af9fabe301d51e0b4d893990c67d8a44c572cb311940388132459 +openblas-d2b11c47774b9216660e76e2fc67e87079f26fa1.tar.gz/md5/d50510c8b60b477b1ece4abafe66bf4d +openblas-d2b11c47774b9216660e76e2fc67e87079f26fa1.tar.gz/sha512/95ce349353bea5e9c30455410b92fa9ebc833e58163a53a65b396c76fddf19147a323a3c69eea5892354488c67b027e20dc9b03754a0988f3bc8a4e9ad446b8b diff --git a/deps/openblas.mk b/deps/openblas.mk index ee6712d883de6..760e651ea5db4 100644 --- a/deps/openblas.mk +++ b/deps/openblas.mk @@ -103,7 +103,12 @@ $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-ofast-power.patch-applied: $(BUILDDIR)/ patch -p1 -f < $(SRCDIR)/patches/openblas-ofast-power.patch echo 1 > $@ -$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-exshift.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-ofast-power.patch-applied +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-julia42415-lapack625-openblas3392.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-ofast-power.patch-applied + cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ + patch -p1 -f < $(SRCDIR)/patches/openblas-julia42415-lapack625-openblas3392.patch + echo 1 > $@ + +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-exshift.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-julia42415-lapack625-openblas3392.patch-applied cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ patch -p1 -f < $(SRCDIR)/patches/openblas-exshift.patch echo 1 > $@ diff --git a/deps/patches/openblas-julia42415-lapack625-openblas3392.patch b/deps/patches/openblas-julia42415-lapack625-openblas3392.patch new file mode 100644 index 0000000000000..e7b874b961cca --- /dev/null +++ b/deps/patches/openblas-julia42415-lapack625-openblas3392.patch @@ -0,0 +1,95 @@ +From 2be5ee3cca97a597f2ee2118808a2d5eacea050c Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Fri, 1 Oct 2021 11:17:21 +0200 +Subject: [PATCH 1/4] Fix out of bounds read in ?llarv (Reference-LAPACK PR + 625) + +--- + lapack-netlib/SRC/clarrv.f | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lapack-netlib/SRC/clarrv.f b/lapack-netlib/SRC/clarrv.f +index a45f55ac3b..26a9febc87 100644 +--- a/lapack-netlib/SRC/clarrv.f ++++ b/lapack-netlib/SRC/clarrv.f +@@ -351,7 +351,7 @@ SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN, + * + * Quick return if possible + * +- IF( N.LE.0 ) THEN ++ IF( (N.LE.0) .OR. (M.LE.0) ) THEN + RETURN + END IF + * + +From fe497efa0510466fd93578aaf9da1ad8ed4edbe7 Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Fri, 1 Oct 2021 11:18:20 +0200 +Subject: [PATCH 2/4] Fix out of bounds read in ?llarv (Reference-LAPACK PR + 625) + +--- + lapack-netlib/SRC/dlarrv.f | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lapack-netlib/SRC/dlarrv.f b/lapack-netlib/SRC/dlarrv.f +index 4a59a2bbf9..a1c6e9c9d7 100644 +--- a/lapack-netlib/SRC/dlarrv.f ++++ b/lapack-netlib/SRC/dlarrv.f +@@ -353,7 +353,7 @@ SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN, + * + * Quick return if possible + * +- IF( N.LE.0 ) THEN ++ IF( (N.LE.0).OR.(M.LE.0) ) THEN + RETURN + END IF + * + +From ddb0ff5353637bb5f5ad060c9620e334c143e3d7 Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Fri, 1 Oct 2021 11:19:07 +0200 +Subject: [PATCH 3/4] Fix out of bounds read in ?llarv (Reference-LAPACK PR + 625) + +--- + lapack-netlib/SRC/slarrv.f | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lapack-netlib/SRC/slarrv.f b/lapack-netlib/SRC/slarrv.f +index 04519fde8c..9448b2fd92 100644 +--- a/lapack-netlib/SRC/slarrv.f ++++ b/lapack-netlib/SRC/slarrv.f +@@ -353,7 +353,7 @@ SUBROUTINE SLARRV( N, VL, VU, D, L, PIVMIN, + * + * Quick return if possible + * +- IF( N.LE.0 ) THEN ++ IF( (N.LE.0).OR.(M.LE.0) ) THEN + RETURN + END IF + * + +From 337b65133df174796794871b3988cd03426e6d41 Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Fri, 1 Oct 2021 11:19:53 +0200 +Subject: [PATCH 4/4] Fix out of bounds read in ?llarv (Reference-LAPACK PR + 625) + +--- + lapack-netlib/SRC/zlarrv.f | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lapack-netlib/SRC/zlarrv.f b/lapack-netlib/SRC/zlarrv.f +index 23976dbefe..8d10e3c2e3 100644 +--- a/lapack-netlib/SRC/zlarrv.f ++++ b/lapack-netlib/SRC/zlarrv.f +@@ -351,7 +351,7 @@ SUBROUTINE ZLARRV( N, VL, VU, D, L, PIVMIN, + * + * Quick return if possible + * +- IF( N.LE.0 ) THEN ++ IF( (N.LE.0).OR.(M.LE.0) ) THEN + RETURN + END IF + * diff --git a/stdlib/OpenBLAS_jll/Project.toml b/stdlib/OpenBLAS_jll/Project.toml index ac19d703cd523..5b88a5ed888c4 100644 --- a/stdlib/OpenBLAS_jll/Project.toml +++ b/stdlib/OpenBLAS_jll/Project.toml @@ -1,6 +1,6 @@ name = "OpenBLAS_jll" uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.13+7" +version = "0.3.13+9" [deps] CompilerSupportLibraries_jll = "e66e0078-7015-5450-92f7-15fbd957f2ae" From 60149fbadcfc86e0ea475217c5d0051cf3f2b230 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Sat, 9 Oct 2021 12:21:46 +0200 Subject: [PATCH 50/88] Revert "Xoshiro: allow any non-negative integer as a seed, via SHA2_256 (#41558)" This reverts commit 3b2c143100ccfbf25030382b6519e246c5f99fc4. --- doc/src/devdocs/subarrays.md | 10 ++--- doc/src/manual/performance-tips.md | 20 ++++----- stdlib/LinearAlgebra/test/dense.jl | 8 ++-- stdlib/LinearAlgebra/test/eigen.jl | 2 +- stdlib/Random/Project.toml | 1 - stdlib/Random/docs/src/index.md | 18 ++++---- stdlib/Random/src/RNGs.jl | 2 +- stdlib/Random/src/Random.jl | 1 - stdlib/Random/src/Xoshiro.jl | 60 +++++++++++++++++++++---- stdlib/Random/src/misc.jl | 4 +- stdlib/Random/test/runtests.jl | 4 +- stdlib/SparseArrays/src/sparsematrix.jl | 15 +++---- stdlib/SparseArrays/test/sparse.jl | 2 +- 13 files changed, 94 insertions(+), 53 deletions(-) diff --git a/doc/src/devdocs/subarrays.md b/doc/src/devdocs/subarrays.md index cec7a64a65245..02e75fa00ec48 100644 --- a/doc/src/devdocs/subarrays.md +++ b/doc/src/devdocs/subarrays.md @@ -19,14 +19,14 @@ julia> A = rand(2,3,4); julia> S1 = view(A, :, 1, 2:3) 2×2 view(::Array{Float64, 3}, :, 1, 2:3) with eltype Float64: - 0.839622 0.711389 - 0.967143 0.103929 + 0.342284 0.831961 + 0.237287 0.435938 julia> S2 = view(A, 1, :, 2:3) 3×2 view(::Array{Float64, 3}, 1, :, 2:3) with eltype Float64: - 0.839622 0.711389 - 0.789764 0.806704 - 0.566704 0.962715 + 0.342284 0.831961 + 0.988944 0.927795 + 0.178426 0.404876 ``` ```@meta DocTestSetup = nothing diff --git a/doc/src/manual/performance-tips.md b/doc/src/manual/performance-tips.md index 66ac33497e986..b2dc74ea5bf2c 100644 --- a/doc/src/manual/performance-tips.md +++ b/doc/src/manual/performance-tips.md @@ -77,12 +77,12 @@ julia> function sum_global() end; julia> @time sum_global() - 0.011539 seconds (9.08 k allocations: 373.386 KiB, 98.69% compilation time) -523.0007221951678 + 0.010414 seconds (9.07 k allocations: 373.448 KiB, 98.40% compilation time) +493.6199223951192 julia> @time sum_global() - 0.000091 seconds (3.49 k allocations: 70.156 KiB) -523.0007221951678 + 0.000108 seconds (3.49 k allocations: 70.156 KiB) +493.6199223951192 ``` On the first call (`@time sum_global()`) the function gets compiled. (If you've not yet used [`@time`](@ref) @@ -113,12 +113,12 @@ julia> function sum_arg(x) end; julia> @time sum_arg(x) - 0.007551 seconds (3.98 k allocations: 200.548 KiB, 99.77% compilation time) -523.0007221951678 + 0.007971 seconds (3.96 k allocations: 200.171 KiB, 99.83% compilation time) +493.6199223951192 julia> @time sum_arg(x) - 0.000006 seconds (1 allocation: 16 bytes) -523.0007221951678 + 0.000003 seconds (1 allocation: 16 bytes) +493.6199223951192 ``` The 1 allocation seen is from running the `@time` macro itself in global scope. If we instead run @@ -128,8 +128,8 @@ the timing in a function, we can see that indeed no allocations are performed: julia> time_sum(x) = @time sum_arg(x); julia> time_sum(x) - 0.000002 seconds -523.0007221951678 + 0.000001 seconds +493.6199223951192 ``` In some situations, your function may need to allocate memory as part of its operation, and this diff --git a/stdlib/LinearAlgebra/test/dense.jl b/stdlib/LinearAlgebra/test/dense.jl index 2f61c8af403e3..d6d882fabc65b 100644 --- a/stdlib/LinearAlgebra/test/dense.jl +++ b/stdlib/LinearAlgebra/test/dense.jl @@ -22,10 +22,10 @@ Random.seed!(1234323) @testset "for $elty" for elty in (Float32, Float64, ComplexF32, ComplexF64) ainit = convert(Matrix{elty}, ainit) for a in (copy(ainit), view(ainit, 1:n, 1:n)) - @test cond(a,1) ≈ 198.3324294531168 atol=0.5 - @test cond(a,2) ≈ 85.93920079319506 atol=0.5 - @test cond(a,Inf) ≈ 149.7523084803039 atol=0.4 - @test cond(a[:,1:5]) ≈ 8.319279144493297 atol=0.01 + @test cond(a,1) ≈ 122.15725126320953 atol=0.5 + @test cond(a,2) ≈ 78.44837047684149 atol=0.5 + @test cond(a,Inf) ≈ 174.10761543202744 atol=0.4 + @test cond(a[:,1:5]) ≈ 6.7492840150789135 atol=0.01 @test_throws ArgumentError cond(a,3) end end diff --git a/stdlib/LinearAlgebra/test/eigen.jl b/stdlib/LinearAlgebra/test/eigen.jl index fe42df785958a..9894da3827250 100644 --- a/stdlib/LinearAlgebra/test/eigen.jl +++ b/stdlib/LinearAlgebra/test/eigen.jl @@ -163,7 +163,7 @@ end end @testset "eigen of an Adjoint" begin - Random.seed!(4) + Random.seed!(1) A = randn(3,3) @test eigvals(A') == eigvals(copy(A')) @test eigen(A') == eigen(copy(A')) diff --git a/stdlib/Random/Project.toml b/stdlib/Random/Project.toml index 199dcab940c86..6958e618d3ea8 100644 --- a/stdlib/Random/Project.toml +++ b/stdlib/Random/Project.toml @@ -3,7 +3,6 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [deps] Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/stdlib/Random/docs/src/index.md b/stdlib/Random/docs/src/index.md index 6750dd35b40f7..a78b08ea89295 100644 --- a/stdlib/Random/docs/src/index.md +++ b/stdlib/Random/docs/src/index.md @@ -151,22 +151,22 @@ Scalar and array methods for `Die` now work as expected: ```jldoctest Die; setup = :(Random.seed!(1)) julia> rand(Die) -Die(5) +Die(7) julia> rand(MersenneTwister(0), Die) Die(11) julia> rand(Die, 3) 3-element Vector{Die}: - Die(9) - Die(15) - Die(14) + Die(13) + Die(8) + Die(20) julia> a = Vector{Die}(undef, 3); rand!(a) 3-element Vector{Die}: - Die(19) - Die(7) - Die(17) + Die(4) + Die(14) + Die(10) ``` #### A simple sampler without pre-computed data @@ -183,9 +183,9 @@ julia> rand(Die(4)) julia> rand(Die(4), 3) 3-element Vector{Any}: - 2 - 3 3 + 2 + 4 ``` Given a collection type `S`, it's currently assumed that if `rand(::S)` is defined, an object of type `eltype(S)` will be produced. In the last example, a `Vector{Any}` is produced; the reason is that `eltype(Die) == Any`. The remedy is to define `Base.eltype(::Type{Die}) = Int`. diff --git a/stdlib/Random/src/RNGs.jl b/stdlib/Random/src/RNGs.jl index 141ec14f4ed31..c483296fe3af1 100644 --- a/stdlib/Random/src/RNGs.jl +++ b/stdlib/Random/src/RNGs.jl @@ -384,7 +384,7 @@ end seed!(rng::_GLOBAL_RNG, ::Nothing) = seed!(rng) # to resolve ambiguity -seed!(seed::Union{Nothing,Integer,Vector{UInt32},Vector{UInt64}}=nothing) = +seed!(seed::Union{Nothing,Integer,Vector{UInt32},Vector{UInt64},NTuple{4,UInt64}}=nothing) = seed!(GLOBAL_RNG, seed) rng_native_52(::_GLOBAL_RNG) = rng_native_52(default_rng()) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 05fe872eb6ebc..45aa6442eed7e 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -13,7 +13,6 @@ include("DSFMT.jl") using .DSFMT using Base.GMP.MPZ using Base.GMP: Limb -import SHA using Base: BitInteger, BitInteger_types, BitUnsigned, require_one_based_indexing diff --git a/stdlib/Random/src/Xoshiro.jl b/stdlib/Random/src/Xoshiro.jl index 48d090d04a647..f695221ddd190 100644 --- a/stdlib/Random/src/Xoshiro.jl +++ b/stdlib/Random/src/Xoshiro.jl @@ -115,21 +115,65 @@ end # Shared implementation between Xoshiro and TaskLocalRNG -- seeding -function seed!(rng::Union{TaskLocalRNG,Xoshiro}) +function seed!(x::Union{TaskLocalRNG,Xoshiro}) # as we get good randomness from RandomDevice, we can skip hashing - rd = RandomDevice() - setstate!(rng, rand(rd, UInt64), rand(rd, UInt64), rand(rd, UInt64), rand(rd, UInt64)) + parent = RandomDevice() + # Constants have nothing up their sleeve, see task.c + # 0x02011ce34bce797f == hash(UInt(1))|0x01 + # 0x5a94851fb48a6e05 == hash(UInt(2))|0x01 + # 0x3688cf5d48899fa7 == hash(UInt(3))|0x01 + # 0x867b4bb4c42e5661 == hash(UInt(4))|0x01 + setstate!(x, + 0x02011ce34bce797f * rand(parent, UInt64), + 0x5a94851fb48a6e05 * rand(parent, UInt64), + 0x3688cf5d48899fa7 * rand(parent, UInt64), + 0x867b4bb4c42e5661 * rand(parent, UInt64)) end -function seed!(rng::Union{TaskLocalRNG,Xoshiro}, seed::Union{Vector{UInt32}, Vector{UInt64}}) - c = SHA.SHA2_256_CTX() - SHA.update!(c, reinterpret(UInt8, seed)) - s0, s1, s2, s3 = reinterpret(UInt64, SHA.digest!(c)) +function seed!(rng::Union{TaskLocalRNG,Xoshiro}, seed::NTuple{4,UInt64}) + # TODO: Consider a less ad-hoc construction + # We can afford burning a handful of cycles here, and we don't want any + # surprises with respect to bad seeds / bad interactions. + + s0 = s = Base.hash_64_64(seed[1]) + s1 = s += Base.hash_64_64(seed[2]) + s2 = s += Base.hash_64_64(seed[3]) + s3 = s += Base.hash_64_64(seed[4]) + setstate!(rng, s0, s1, s2, s3) + + rand(rng, UInt64) + rand(rng, UInt64) + rand(rng, UInt64) + rand(rng, UInt64) + rng end -seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::Integer) = seed!(rng, make_seed(seed)) +function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::UInt128) + seed0 = seed % UInt64 + seed1 = (seed>>>64) % UInt64 + seed!(rng, (seed0, seed1, zero(UInt64), zero(UInt64))) +end +seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::Integer) = seed!(rng, UInt128(seed)) + +function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::AbstractVector{UInt64}) + if length(seed) > 4 + throw(ArgumentError("seed should have no more than 256 bits")) + end + seed0 = length(seed)>0 ? seed[1] : UInt64(0) + seed1 = length(seed)>1 ? seed[2] : UInt64(0) + seed2 = length(seed)>2 ? seed[3] : UInt64(0) + seed3 = length(seed)>3 ? seed[4] : UInt64(0) + seed!(rng, (seed0, seed1, seed2, seed3)) +end +function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::AbstractVector{UInt32}) + if iseven(length(seed)) + seed!(rng, reinterpret(UInt64, seed)) + else + seed!(rng, UInt64[reinterpret(UInt64, @view(seed[begin:end-1])); seed[end] % UInt64]) + end +end @inline function rand(rng::Union{TaskLocalRNG, Xoshiro}, ::SamplerType{UInt128}) first = rand(rng, UInt64) diff --git a/stdlib/Random/src/misc.jl b/stdlib/Random/src/misc.jl index 0d6e06c444a09..2dff5a51eff9a 100644 --- a/stdlib/Random/src/misc.jl +++ b/stdlib/Random/src/misc.jl @@ -53,13 +53,13 @@ number generator, see [Random Numbers](@ref). # Examples ```jldoctest julia> Random.seed!(3); randstring() -"Lxz5hUwn" +"h8BzxSoS" julia> randstring(MersenneTwister(3), 'a':'z', 6) "ocucay" julia> randstring("ACGT") -"TGCTCCTC" +"CTTACTGC" ``` !!! note diff --git a/stdlib/Random/test/runtests.jl b/stdlib/Random/test/runtests.jl index 95aac29a61365..1a0628ef4f0c5 100644 --- a/stdlib/Random/test/runtests.jl +++ b/stdlib/Random/test/runtests.jl @@ -688,7 +688,7 @@ end @testset "$RNG(seed) & Random.seed!(m::$RNG, seed) produce the same stream" for RNG=(MersenneTwister,Xoshiro) seeds = Any[0, 1, 2, 10000, 10001, rand(UInt32, 8), rand(UInt128, 3)...] if RNG == Xoshiro - push!(seeds, rand(UInt64, rand(1:4))) + push!(seeds, rand(UInt64, rand(1:4)), Tuple(rand(UInt64, 4))) end for seed=seeds m = RNG(seed) @@ -699,7 +699,7 @@ end end @testset "Random.seed!(seed) sets Random.GLOBAL_SEED" begin - seeds = Any[0, rand(UInt128), rand(UInt64, 4)] + seeds = Any[0, rand(UInt128), rand(UInt64, 4), Tuple(rand(UInt64, 4))] for seed=seeds Random.seed!(seed) diff --git a/stdlib/SparseArrays/src/sparsematrix.jl b/stdlib/SparseArrays/src/sparsematrix.jl index 62243264baa99..ad005e70156f4 100644 --- a/stdlib/SparseArrays/src/sparsematrix.jl +++ b/stdlib/SparseArrays/src/sparsematrix.jl @@ -1613,13 +1613,12 @@ argument specifies a random number generator, see [Random Numbers](@ref). ```jldoctest; setup = :(using Random; Random.seed!(1234)) julia> sprand(Bool, 2, 2, 0.5) 2×2 SparseMatrixCSC{Bool, Int64} with 2 stored entries: - 1 1 - ⋅ ⋅ + 1 ⋅ + ⋅ 1 julia> sprand(Float64, 3, 0.75) -3-element SparseVector{Float64, Int64} with 2 stored entries: - [1] = 0.795547 - [2] = 0.49425 +3-element SparseVector{Float64, Int64} with 1 stored entry: + [3] = 0.787459 ``` """ function sprand(r::AbstractRNG, m::Integer, n::Integer, density::AbstractFloat, rfn::Function, ::Type{T}=eltype(rfn(r, 1))) where T @@ -1660,9 +1659,9 @@ argument specifies a random number generator, see [Random Numbers](@ref). # Examples ```jldoctest; setup = :(using Random; Random.seed!(0)) julia> sprandn(2, 2, 0.75) -2×2 SparseMatrixCSC{Float64, Int64} with 3 stored entries: - -1.20577 ⋅ - 0.311817 -0.234641 +2×2 SparseMatrixCSC{Float64, Int64} with 1 stored entry: + ⋅ ⋅ + ⋅ 1.32078 ``` """ sprandn(r::AbstractRNG, m::Integer, n::Integer, density::AbstractFloat) = diff --git a/stdlib/SparseArrays/test/sparse.jl b/stdlib/SparseArrays/test/sparse.jl index 7b55119dc5cfc..5842cae42cbd1 100644 --- a/stdlib/SparseArrays/test/sparse.jl +++ b/stdlib/SparseArrays/test/sparse.jl @@ -1742,7 +1742,7 @@ end A = guardseed(1234321) do triu(sprand(10, 10, 0.2)) end - @test getcolptr(SparseArrays.droptol!(A, 0.01)) == [1, 1, 1, 1, 2, 2, 2, 4, 4, 5, 5] + @test getcolptr(SparseArrays.droptol!(A, 0.01)) == [1, 1, 3, 4, 5, 6, 7, 11, 13, 15, 18] @test isequal(SparseArrays.droptol!(sparse([1], [1], [1]), 1), SparseMatrixCSC(1, 1, Int[1, 1], Int[], Int[])) end From bdf0f41536f2af2d49f2fdf3aeea884f06b214e4 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Sat, 9 Oct 2021 12:22:16 +0200 Subject: [PATCH 51/88] Revert "Revert "Xoshiro: allow any non-negative integer as a seed, via SHA2_256 (#41558)"" This reverts commit 60149fbadcfc86e0ea475217c5d0051cf3f2b230. --- doc/src/devdocs/subarrays.md | 10 ++--- doc/src/manual/performance-tips.md | 20 ++++----- stdlib/LinearAlgebra/test/dense.jl | 8 ++-- stdlib/LinearAlgebra/test/eigen.jl | 2 +- stdlib/Random/Project.toml | 1 + stdlib/Random/docs/src/index.md | 18 ++++---- stdlib/Random/src/RNGs.jl | 2 +- stdlib/Random/src/Random.jl | 1 + stdlib/Random/src/Xoshiro.jl | 60 ++++--------------------- stdlib/Random/src/misc.jl | 4 +- stdlib/Random/test/runtests.jl | 4 +- stdlib/SparseArrays/src/sparsematrix.jl | 15 ++++--- stdlib/SparseArrays/test/sparse.jl | 2 +- 13 files changed, 53 insertions(+), 94 deletions(-) diff --git a/doc/src/devdocs/subarrays.md b/doc/src/devdocs/subarrays.md index 02e75fa00ec48..cec7a64a65245 100644 --- a/doc/src/devdocs/subarrays.md +++ b/doc/src/devdocs/subarrays.md @@ -19,14 +19,14 @@ julia> A = rand(2,3,4); julia> S1 = view(A, :, 1, 2:3) 2×2 view(::Array{Float64, 3}, :, 1, 2:3) with eltype Float64: - 0.342284 0.831961 - 0.237287 0.435938 + 0.839622 0.711389 + 0.967143 0.103929 julia> S2 = view(A, 1, :, 2:3) 3×2 view(::Array{Float64, 3}, 1, :, 2:3) with eltype Float64: - 0.342284 0.831961 - 0.988944 0.927795 - 0.178426 0.404876 + 0.839622 0.711389 + 0.789764 0.806704 + 0.566704 0.962715 ``` ```@meta DocTestSetup = nothing diff --git a/doc/src/manual/performance-tips.md b/doc/src/manual/performance-tips.md index b2dc74ea5bf2c..66ac33497e986 100644 --- a/doc/src/manual/performance-tips.md +++ b/doc/src/manual/performance-tips.md @@ -77,12 +77,12 @@ julia> function sum_global() end; julia> @time sum_global() - 0.010414 seconds (9.07 k allocations: 373.448 KiB, 98.40% compilation time) -493.6199223951192 + 0.011539 seconds (9.08 k allocations: 373.386 KiB, 98.69% compilation time) +523.0007221951678 julia> @time sum_global() - 0.000108 seconds (3.49 k allocations: 70.156 KiB) -493.6199223951192 + 0.000091 seconds (3.49 k allocations: 70.156 KiB) +523.0007221951678 ``` On the first call (`@time sum_global()`) the function gets compiled. (If you've not yet used [`@time`](@ref) @@ -113,12 +113,12 @@ julia> function sum_arg(x) end; julia> @time sum_arg(x) - 0.007971 seconds (3.96 k allocations: 200.171 KiB, 99.83% compilation time) -493.6199223951192 + 0.007551 seconds (3.98 k allocations: 200.548 KiB, 99.77% compilation time) +523.0007221951678 julia> @time sum_arg(x) - 0.000003 seconds (1 allocation: 16 bytes) -493.6199223951192 + 0.000006 seconds (1 allocation: 16 bytes) +523.0007221951678 ``` The 1 allocation seen is from running the `@time` macro itself in global scope. If we instead run @@ -128,8 +128,8 @@ the timing in a function, we can see that indeed no allocations are performed: julia> time_sum(x) = @time sum_arg(x); julia> time_sum(x) - 0.000001 seconds -493.6199223951192 + 0.000002 seconds +523.0007221951678 ``` In some situations, your function may need to allocate memory as part of its operation, and this diff --git a/stdlib/LinearAlgebra/test/dense.jl b/stdlib/LinearAlgebra/test/dense.jl index d6d882fabc65b..2f61c8af403e3 100644 --- a/stdlib/LinearAlgebra/test/dense.jl +++ b/stdlib/LinearAlgebra/test/dense.jl @@ -22,10 +22,10 @@ Random.seed!(1234323) @testset "for $elty" for elty in (Float32, Float64, ComplexF32, ComplexF64) ainit = convert(Matrix{elty}, ainit) for a in (copy(ainit), view(ainit, 1:n, 1:n)) - @test cond(a,1) ≈ 122.15725126320953 atol=0.5 - @test cond(a,2) ≈ 78.44837047684149 atol=0.5 - @test cond(a,Inf) ≈ 174.10761543202744 atol=0.4 - @test cond(a[:,1:5]) ≈ 6.7492840150789135 atol=0.01 + @test cond(a,1) ≈ 198.3324294531168 atol=0.5 + @test cond(a,2) ≈ 85.93920079319506 atol=0.5 + @test cond(a,Inf) ≈ 149.7523084803039 atol=0.4 + @test cond(a[:,1:5]) ≈ 8.319279144493297 atol=0.01 @test_throws ArgumentError cond(a,3) end end diff --git a/stdlib/LinearAlgebra/test/eigen.jl b/stdlib/LinearAlgebra/test/eigen.jl index 9894da3827250..fe42df785958a 100644 --- a/stdlib/LinearAlgebra/test/eigen.jl +++ b/stdlib/LinearAlgebra/test/eigen.jl @@ -163,7 +163,7 @@ end end @testset "eigen of an Adjoint" begin - Random.seed!(1) + Random.seed!(4) A = randn(3,3) @test eigvals(A') == eigvals(copy(A')) @test eigen(A') == eigen(copy(A')) diff --git a/stdlib/Random/Project.toml b/stdlib/Random/Project.toml index 6958e618d3ea8..199dcab940c86 100644 --- a/stdlib/Random/Project.toml +++ b/stdlib/Random/Project.toml @@ -3,6 +3,7 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [deps] Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/stdlib/Random/docs/src/index.md b/stdlib/Random/docs/src/index.md index a78b08ea89295..6750dd35b40f7 100644 --- a/stdlib/Random/docs/src/index.md +++ b/stdlib/Random/docs/src/index.md @@ -151,22 +151,22 @@ Scalar and array methods for `Die` now work as expected: ```jldoctest Die; setup = :(Random.seed!(1)) julia> rand(Die) -Die(7) +Die(5) julia> rand(MersenneTwister(0), Die) Die(11) julia> rand(Die, 3) 3-element Vector{Die}: - Die(13) - Die(8) - Die(20) + Die(9) + Die(15) + Die(14) julia> a = Vector{Die}(undef, 3); rand!(a) 3-element Vector{Die}: - Die(4) - Die(14) - Die(10) + Die(19) + Die(7) + Die(17) ``` #### A simple sampler without pre-computed data @@ -183,9 +183,9 @@ julia> rand(Die(4)) julia> rand(Die(4), 3) 3-element Vector{Any}: - 3 2 - 4 + 3 + 3 ``` Given a collection type `S`, it's currently assumed that if `rand(::S)` is defined, an object of type `eltype(S)` will be produced. In the last example, a `Vector{Any}` is produced; the reason is that `eltype(Die) == Any`. The remedy is to define `Base.eltype(::Type{Die}) = Int`. diff --git a/stdlib/Random/src/RNGs.jl b/stdlib/Random/src/RNGs.jl index c483296fe3af1..141ec14f4ed31 100644 --- a/stdlib/Random/src/RNGs.jl +++ b/stdlib/Random/src/RNGs.jl @@ -384,7 +384,7 @@ end seed!(rng::_GLOBAL_RNG, ::Nothing) = seed!(rng) # to resolve ambiguity -seed!(seed::Union{Nothing,Integer,Vector{UInt32},Vector{UInt64},NTuple{4,UInt64}}=nothing) = +seed!(seed::Union{Nothing,Integer,Vector{UInt32},Vector{UInt64}}=nothing) = seed!(GLOBAL_RNG, seed) rng_native_52(::_GLOBAL_RNG) = rng_native_52(default_rng()) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 45aa6442eed7e..05fe872eb6ebc 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -13,6 +13,7 @@ include("DSFMT.jl") using .DSFMT using Base.GMP.MPZ using Base.GMP: Limb +import SHA using Base: BitInteger, BitInteger_types, BitUnsigned, require_one_based_indexing diff --git a/stdlib/Random/src/Xoshiro.jl b/stdlib/Random/src/Xoshiro.jl index f695221ddd190..48d090d04a647 100644 --- a/stdlib/Random/src/Xoshiro.jl +++ b/stdlib/Random/src/Xoshiro.jl @@ -115,65 +115,21 @@ end # Shared implementation between Xoshiro and TaskLocalRNG -- seeding -function seed!(x::Union{TaskLocalRNG,Xoshiro}) +function seed!(rng::Union{TaskLocalRNG,Xoshiro}) # as we get good randomness from RandomDevice, we can skip hashing - parent = RandomDevice() - # Constants have nothing up their sleeve, see task.c - # 0x02011ce34bce797f == hash(UInt(1))|0x01 - # 0x5a94851fb48a6e05 == hash(UInt(2))|0x01 - # 0x3688cf5d48899fa7 == hash(UInt(3))|0x01 - # 0x867b4bb4c42e5661 == hash(UInt(4))|0x01 - setstate!(x, - 0x02011ce34bce797f * rand(parent, UInt64), - 0x5a94851fb48a6e05 * rand(parent, UInt64), - 0x3688cf5d48899fa7 * rand(parent, UInt64), - 0x867b4bb4c42e5661 * rand(parent, UInt64)) + rd = RandomDevice() + setstate!(rng, rand(rd, UInt64), rand(rd, UInt64), rand(rd, UInt64), rand(rd, UInt64)) end -function seed!(rng::Union{TaskLocalRNG,Xoshiro}, seed::NTuple{4,UInt64}) - # TODO: Consider a less ad-hoc construction - # We can afford burning a handful of cycles here, and we don't want any - # surprises with respect to bad seeds / bad interactions. - - s0 = s = Base.hash_64_64(seed[1]) - s1 = s += Base.hash_64_64(seed[2]) - s2 = s += Base.hash_64_64(seed[3]) - s3 = s += Base.hash_64_64(seed[4]) - +function seed!(rng::Union{TaskLocalRNG,Xoshiro}, seed::Union{Vector{UInt32}, Vector{UInt64}}) + c = SHA.SHA2_256_CTX() + SHA.update!(c, reinterpret(UInt8, seed)) + s0, s1, s2, s3 = reinterpret(UInt64, SHA.digest!(c)) setstate!(rng, s0, s1, s2, s3) - - rand(rng, UInt64) - rand(rng, UInt64) - rand(rng, UInt64) - rand(rng, UInt64) - rng end -function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::UInt128) - seed0 = seed % UInt64 - seed1 = (seed>>>64) % UInt64 - seed!(rng, (seed0, seed1, zero(UInt64), zero(UInt64))) -end -seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::Integer) = seed!(rng, UInt128(seed)) - -function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::AbstractVector{UInt64}) - if length(seed) > 4 - throw(ArgumentError("seed should have no more than 256 bits")) - end - seed0 = length(seed)>0 ? seed[1] : UInt64(0) - seed1 = length(seed)>1 ? seed[2] : UInt64(0) - seed2 = length(seed)>2 ? seed[3] : UInt64(0) - seed3 = length(seed)>3 ? seed[4] : UInt64(0) - seed!(rng, (seed0, seed1, seed2, seed3)) -end +seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::Integer) = seed!(rng, make_seed(seed)) -function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::AbstractVector{UInt32}) - if iseven(length(seed)) - seed!(rng, reinterpret(UInt64, seed)) - else - seed!(rng, UInt64[reinterpret(UInt64, @view(seed[begin:end-1])); seed[end] % UInt64]) - end -end @inline function rand(rng::Union{TaskLocalRNG, Xoshiro}, ::SamplerType{UInt128}) first = rand(rng, UInt64) diff --git a/stdlib/Random/src/misc.jl b/stdlib/Random/src/misc.jl index 2dff5a51eff9a..0d6e06c444a09 100644 --- a/stdlib/Random/src/misc.jl +++ b/stdlib/Random/src/misc.jl @@ -53,13 +53,13 @@ number generator, see [Random Numbers](@ref). # Examples ```jldoctest julia> Random.seed!(3); randstring() -"h8BzxSoS" +"Lxz5hUwn" julia> randstring(MersenneTwister(3), 'a':'z', 6) "ocucay" julia> randstring("ACGT") -"CTTACTGC" +"TGCTCCTC" ``` !!! note diff --git a/stdlib/Random/test/runtests.jl b/stdlib/Random/test/runtests.jl index 1a0628ef4f0c5..95aac29a61365 100644 --- a/stdlib/Random/test/runtests.jl +++ b/stdlib/Random/test/runtests.jl @@ -688,7 +688,7 @@ end @testset "$RNG(seed) & Random.seed!(m::$RNG, seed) produce the same stream" for RNG=(MersenneTwister,Xoshiro) seeds = Any[0, 1, 2, 10000, 10001, rand(UInt32, 8), rand(UInt128, 3)...] if RNG == Xoshiro - push!(seeds, rand(UInt64, rand(1:4)), Tuple(rand(UInt64, 4))) + push!(seeds, rand(UInt64, rand(1:4))) end for seed=seeds m = RNG(seed) @@ -699,7 +699,7 @@ end end @testset "Random.seed!(seed) sets Random.GLOBAL_SEED" begin - seeds = Any[0, rand(UInt128), rand(UInt64, 4), Tuple(rand(UInt64, 4))] + seeds = Any[0, rand(UInt128), rand(UInt64, 4)] for seed=seeds Random.seed!(seed) diff --git a/stdlib/SparseArrays/src/sparsematrix.jl b/stdlib/SparseArrays/src/sparsematrix.jl index ad005e70156f4..62243264baa99 100644 --- a/stdlib/SparseArrays/src/sparsematrix.jl +++ b/stdlib/SparseArrays/src/sparsematrix.jl @@ -1613,12 +1613,13 @@ argument specifies a random number generator, see [Random Numbers](@ref). ```jldoctest; setup = :(using Random; Random.seed!(1234)) julia> sprand(Bool, 2, 2, 0.5) 2×2 SparseMatrixCSC{Bool, Int64} with 2 stored entries: - 1 ⋅ - ⋅ 1 + 1 1 + ⋅ ⋅ julia> sprand(Float64, 3, 0.75) -3-element SparseVector{Float64, Int64} with 1 stored entry: - [3] = 0.787459 +3-element SparseVector{Float64, Int64} with 2 stored entries: + [1] = 0.795547 + [2] = 0.49425 ``` """ function sprand(r::AbstractRNG, m::Integer, n::Integer, density::AbstractFloat, rfn::Function, ::Type{T}=eltype(rfn(r, 1))) where T @@ -1659,9 +1660,9 @@ argument specifies a random number generator, see [Random Numbers](@ref). # Examples ```jldoctest; setup = :(using Random; Random.seed!(0)) julia> sprandn(2, 2, 0.75) -2×2 SparseMatrixCSC{Float64, Int64} with 1 stored entry: - ⋅ ⋅ - ⋅ 1.32078 +2×2 SparseMatrixCSC{Float64, Int64} with 3 stored entries: + -1.20577 ⋅ + 0.311817 -0.234641 ``` """ sprandn(r::AbstractRNG, m::Integer, n::Integer, density::AbstractFloat) = diff --git a/stdlib/SparseArrays/test/sparse.jl b/stdlib/SparseArrays/test/sparse.jl index 5842cae42cbd1..7b55119dc5cfc 100644 --- a/stdlib/SparseArrays/test/sparse.jl +++ b/stdlib/SparseArrays/test/sparse.jl @@ -1742,7 +1742,7 @@ end A = guardseed(1234321) do triu(sprand(10, 10, 0.2)) end - @test getcolptr(SparseArrays.droptol!(A, 0.01)) == [1, 1, 3, 4, 5, 6, 7, 11, 13, 15, 18] + @test getcolptr(SparseArrays.droptol!(A, 0.01)) == [1, 1, 1, 1, 2, 2, 2, 4, 4, 5, 5] @test isequal(SparseArrays.droptol!(sparse([1], [1], [1]), 1), SparseMatrixCSC(1, 1, Int[1, 1], Int[], Int[])) end From e888fb8bc8119a7fe1639e5ecced5d3a5f5e8534 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Sun, 10 Oct 2021 18:46:05 +0200 Subject: [PATCH 52/88] Backport of #42581: fix Documenter link warnings. --- doc/src/base/collections.md | 2 -- doc/src/base/math.md | 2 +- doc/src/base/strings.md | 2 +- stdlib/LinearAlgebra/docs/src/index.md | 2 +- stdlib/LinearAlgebra/src/dense.jl | 2 ++ 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/base/collections.md b/doc/src/base/collections.md index 84e5702e0e396..d329ce6ef6119 100644 --- a/doc/src/base/collections.md +++ b/doc/src/base/collections.md @@ -119,8 +119,6 @@ Base.all(::Any) Base.all(::AbstractArray, ::Any) Base.all! Base.count -Base.any(::Any, ::Any) -Base.all(::Any, ::Any) Base.foreach Base.map Base.map! diff --git a/doc/src/base/math.md b/doc/src/base/math.md index 177324abccfaa..4d896c6cb712d 100644 --- a/doc/src/base/math.md +++ b/doc/src/base/math.md @@ -156,7 +156,7 @@ Base.copysign Base.sign Base.signbit Base.flipsign -Base.sqrt(::Real) +Base.sqrt(::Number) Base.isqrt Base.Math.cbrt Base.real(::Complex) diff --git a/doc/src/base/strings.md b/doc/src/base/strings.md index a7e9a8ee4eeee..c848830d7d254 100644 --- a/doc/src/base/strings.md +++ b/doc/src/base/strings.md @@ -48,7 +48,7 @@ Base.findlast(::AbstractChar, ::AbstractString) Base.findprev(::AbstractString, ::AbstractString, ::Integer) Base.occursin Base.reverse(::Union{String,SubString{String}}) -Base.replace(s::AbstractString, ::Pair) +Base.replace(s::AbstractString, ::Pair...) Base.split Base.rsplit Base.strip diff --git a/stdlib/LinearAlgebra/docs/src/index.md b/stdlib/LinearAlgebra/docs/src/index.md index baafe762cea3f..38c48bfe6d8d2 100644 --- a/stdlib/LinearAlgebra/docs/src/index.md +++ b/stdlib/LinearAlgebra/docs/src/index.md @@ -414,7 +414,7 @@ Base.cis(::AbstractMatrix) Base.:^(::AbstractMatrix, ::Number) Base.:^(::Number, ::AbstractMatrix) LinearAlgebra.log(::StridedMatrix) -LinearAlgebra.sqrt(::StridedMatrix{<:Real}) +LinearAlgebra.sqrt(::StridedMatrix) LinearAlgebra.cos(::StridedMatrix{<:Real}) LinearAlgebra.sin(::StridedMatrix{<:Real}) LinearAlgebra.sincos(::StridedMatrix{<:Real}) diff --git a/stdlib/LinearAlgebra/src/dense.jl b/stdlib/LinearAlgebra/src/dense.jl index c9ba9dd7482e8..c30cd7fd3b796 100644 --- a/stdlib/LinearAlgebra/src/dense.jl +++ b/stdlib/LinearAlgebra/src/dense.jl @@ -831,6 +831,8 @@ julia> sqrt(A) 0.0 2.0 ``` """ +sqrt(::StridedMatrix) + function sqrt(A::StridedMatrix{T}) where {T<:Union{Real,Complex}} if ishermitian(A) sqrtHermA = sqrt(Hermitian(A)) From b77ffe65ca9ac56d3f957e948e3845fd2a174b5d Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 6 Oct 2021 13:12:24 -0400 Subject: [PATCH 53/88] CI (buildkite): ensure passing --output-sync when passing -j (#42511) To be at feature-parity with old buildbots. (cherry picked from commit 82f60b4221ad054c7cc3e3f2ffe47834268c81fd) --- .buildkite/pipelines/main/misc/doctest.yml | 2 +- .buildkite/pipelines/main/misc/embedding.yml | 4 ++-- .buildkite/pipelines/main/misc/llvmpasses.yml | 12 ++++++------ .buildkite/pipelines/main/misc/whitespace.yml | 2 +- .../pipelines/main/platforms/package_linux.yml | 4 ++-- .../scheduled/coverage/coverage_linux64.yml | 2 +- .../coverage/coverage_linux64.yml.signature | Bin 96 -> 96 bytes 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.buildkite/pipelines/main/misc/doctest.yml b/.buildkite/pipelines/main/misc/doctest.yml index 6e68bd4f43f10..1f185284ec641 100644 --- a/.buildkite/pipelines/main/misc/doctest.yml +++ b/.buildkite/pipelines/main/misc/doctest.yml @@ -21,7 +21,7 @@ steps: - "/cache/repos:/cache/repos" commands: | echo "--- Build Julia from source" - make -j 6 + make --output-sync -j 6 echo "--- Print Julia version info" ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' diff --git a/.buildkite/pipelines/main/misc/embedding.yml b/.buildkite/pipelines/main/misc/embedding.yml index f870c69eb0093..45c740f4e8a6e 100644 --- a/.buildkite/pipelines/main/misc/embedding.yml +++ b/.buildkite/pipelines/main/misc/embedding.yml @@ -22,10 +22,10 @@ steps: commands: | prefix="/tmp/prefix" echo "+++ Build julia, deploy to $${prefix:?}" - make -j$${JULIA_CPU_THREADS:?} JULIA_PRECOMPILE=0 prefix=$${prefix:?} install + make --output-sync -j$${JULIA_CPU_THREADS:?} JULIA_PRECOMPILE=0 prefix=$${prefix:?} install embedding_output="/tmp/embedding-test" echo "+++ Run embedding tests, deploy to $${embedding_output:?}" mkdir -p "$${embedding_output:?}" - make -j$${JULIA_CPU_THREADS:?} -C test/embedding JULIA="$${prefix:?}/bin/julia" BIN="$${embedding_output:?}" + make --output-sync -j$${JULIA_CPU_THREADS:?} -C test/embedding JULIA="$${prefix:?}/bin/julia" BIN="$${embedding_output:?}" timeout_in_minutes: 60 diff --git a/.buildkite/pipelines/main/misc/llvmpasses.yml b/.buildkite/pipelines/main/misc/llvmpasses.yml index 8557e25133ea3..5b444a6db41aa 100644 --- a/.buildkite/pipelines/main/misc/llvmpasses.yml +++ b/.buildkite/pipelines/main/misc/llvmpasses.yml @@ -19,10 +19,10 @@ steps: - "/cache/repos:/cache/repos" commands: | echo "--- Install in-tree LLVM dependencies" - make -j$${JULIA_CPU_THREADS:?} -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind + make --output-sync -j$${JULIA_CPU_THREADS:?} -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind echo "+++ run clangsa/analyzegc" - make -j$${JULIA_CPU_THREADS:?} -C test/clangsa - make -j$${JULIA_CPU_THREADS:?} -C src analyzegc + make --output-sync -j$${JULIA_CPU_THREADS:?} -C test/clangsa + make --output-sync -j$${JULIA_CPU_THREADS:?} -C src analyzegc timeout_in_minutes: 60 - label: "llvmpasses" key: "llvmpasses" @@ -40,9 +40,9 @@ steps: - "/cache/repos:/cache/repos" commands: | echo "--- make release" - make -j$${JULIA_CPU_THREADS:?} release JULIA_PRECOMPILE=0 + make --output-sync -j$${JULIA_CPU_THREADS:?} release JULIA_PRECOMPILE=0 echo "--- make src/install-analysis-deps" - make -j$${JULIA_CPU_THREADS:?} -C src install-analysis-deps + make --output-sync -j$${JULIA_CPU_THREADS:?} -C src install-analysis-deps echo "+++ make test/llvmpasses" - make -j$${JULIA_CPU_THREADS:?} -C test/llvmpasses + make --output-sync -j$${JULIA_CPU_THREADS:?} -C test/llvmpasses timeout_in_minutes: 60 diff --git a/.buildkite/pipelines/main/misc/whitespace.yml b/.buildkite/pipelines/main/misc/whitespace.yml index a6f5c22d77675..5643c80e98db8 100644 --- a/.buildkite/pipelines/main/misc/whitespace.yml +++ b/.buildkite/pipelines/main/misc/whitespace.yml @@ -21,4 +21,4 @@ steps: - github_commit_status: context: "whitespace" commands: | - make -j$${JULIA_CPU_THREADS:?} check-whitespace + make --output-sync -j$${JULIA_CPU_THREADS:?} check-whitespace diff --git a/.buildkite/pipelines/main/platforms/package_linux.yml b/.buildkite/pipelines/main/platforms/package_linux.yml index 9108c5a41a212..1a6f15b8fe812 100644 --- a/.buildkite/pipelines/main/platforms/package_linux.yml +++ b/.buildkite/pipelines/main/platforms/package_linux.yml @@ -35,7 +35,7 @@ steps: echo "--- Build Julia from source" rm -rf $${ARTIFACT_FILENAME:?} - make -j 8 + make --output-sync -j 8 echo "--- Make sure that the working directory is clean" if [ -z "$(git status --short)" ]; then echo "INFO: The working directory is clean."; else echo "ERROR: The working directory is dirty."; echo "Output of git status:"; git status; exit 1; fi @@ -44,7 +44,7 @@ steps: ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' echo "--- Create build artifacts" - make -j 8 binary-dist + make --output-sync -j 8 binary-dist ls -l $${JULIA_BINARYDIST:?} if [[ "$${JULIA_BINARYDIST:?}" != "$${ARTIFACT_FILENAME:?}" ]]; then mv $${JULIA_BINARYDIST:?} $${ARTIFACT_FILENAME:?} diff --git a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml index 04fe536aa3efb..00ed8715645e2 100644 --- a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml +++ b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml @@ -21,7 +21,7 @@ steps: gid: 1000 commands: | echo "--- Build Julia from source" - make -j 6 + make --output-sync -j 6 echo "--- Print Julia version info" ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' diff --git a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml.signature b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml.signature index e8f964bc9214a610e6cca4cc7459de25ffb63e7a..163f352241682a33d9b6b5d2548a375d7e6c0346 100644 GIT binary patch literal 96 zcmV-m0H6O;VQh3|WM5xmRo^UZEg?oncNPPjttjPJK>~wG7^&KF%xtoYG!lixanmCp zQjmQqD4ll$lGAeb?T9@)c|`|vNufp?PkkD~NFRib7_ CKqg)Q literal 96 zcmV-m0H6O;VQh3|WM5yT|8cr-Q8?N%JJlb&*wh@$cn1NLB-QTcn(Rqe)BkhSC>}63 zgDBff_N%>8mGMYIn6!hCNz0x2xboEw-G10oh9>da*s`wxX-!>31_-^_@kCS|VvkQ+ CZ!vfP From e782674916eb2206f5b73a847491a5ca895ab0d2 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 7 Oct 2021 08:37:12 -0700 Subject: [PATCH 54/88] [buildkite] Fix env leakage of signed tokens (#42526) After a few days of debugging, the buildkite people figured out that the reason our "unprivileged" jobs were getting privileges was because of an obscure behavior of top-level `env:` blocks. To fix it, we should always scope our `env:` mappings to a particular step, and so that's exactly what this does. We also add a `.gitignore` mapping for the new, more convenient way that `cryptic` likes to store keys in the repository. (cherry picked from commit 39fd36c5bea43353a38cb5688905b0199d61767d) --- .buildkite/cryptic_repo_keys/.gitignore | 5 +++++ .../pipelines/main/misc/signed_pipeline_test.yml | 7 ++++--- .../main/misc/signed_pipeline_test.yml.signature | Bin 96 -> 96 bytes .../scheduled/coverage/coverage_linux64.yml | 7 ++++--- .../coverage/coverage_linux64.yml.signature | 3 +-- 5 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .buildkite/cryptic_repo_keys/.gitignore diff --git a/.buildkite/cryptic_repo_keys/.gitignore b/.buildkite/cryptic_repo_keys/.gitignore new file mode 100644 index 0000000000000..8d18931dbcf7c --- /dev/null +++ b/.buildkite/cryptic_repo_keys/.gitignore @@ -0,0 +1,5 @@ +# Ignore the unencrypted repo_key +repo_key + +# Ignore any agent keys (public or private) we have stored +agent_key* diff --git a/.buildkite/pipelines/main/misc/signed_pipeline_test.yml b/.buildkite/pipelines/main/misc/signed_pipeline_test.yml index fb13ac15a8d65..1d59253d43bce 100644 --- a/.buildkite/pipelines/main/misc/signed_pipeline_test.yml +++ b/.buildkite/pipelines/main/misc/signed_pipeline_test.yml @@ -5,6 +5,10 @@ agents: ## pipeline that showcases decryption of environment variable steps: - label: ":lock: :rocket: Signed pipeline test" + # We must accept the signed job id secret in order to propagate secrets + env: + BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?} + depends_on: plugins: - staticfloat/cryptic#v1: variables: @@ -12,6 +16,3 @@ steps: commands: | echo "SECRET_KEY: $${SECRET_KEY}" -# We must accept the signed job id secret in order to propagate secrets -env: - BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?} diff --git a/.buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature b/.buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature index 10220c758086a371b87c0876afb74ff620e62bc2..299f959c1db101e07ff0d5af706cea08748cca10 100644 GIT binary patch literal 96 zcmV-m0H6O;VQh3|WM5y#z;*A%N(Cx0^Y?C%Kep}fyq8nHC*u6kSiUpsr`4!Mrke}R zQhpg4tXhl}gn-9qbhbZzY6+M14Q&8J!mV|~HatJj@5!`vZQGFaYRECi4V8x#i8`2e CMKLu1 literal 96 zcmV-m0H6O;VQh3|WM5wytjSJAA|lZ{*7w($+?GbHZAf_x54x4wjK9KWrK)cHQ*VwTb5+s Date: Thu, 7 Oct 2021 11:37:30 -0400 Subject: [PATCH 55/88] CI (Buildkite): delete an empty YAML file (#42531) (cherry picked from commit dce7ebb3ade01258755b6e6a7041802fb1f064b1) --- .buildkite/pipelines/scheduled/launch_unsigned_builders.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .buildkite/pipelines/scheduled/launch_unsigned_builders.yml diff --git a/.buildkite/pipelines/scheduled/launch_unsigned_builders.yml b/.buildkite/pipelines/scheduled/launch_unsigned_builders.yml deleted file mode 100644 index e69de29bb2d1d..0000000000000 From 4bb882ab53792a68a1b2e9ca6164daf190a1c470 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 7 Oct 2021 15:59:16 -0400 Subject: [PATCH 56/88] make tests ignore root more robustly (#42533) (cherry picked from commit 536d35eb15af9a747bb8f427ca6e6d339f7d062c) --- base/libc.jl | 27 +++++++++++++++------------ src/sys.c | 24 +++++++++++++++++++++--- test/file.jl | 5 ++++- test/read.jl | 4 ++-- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/base/libc.jl b/base/libc.jl index 98d2910917ee4..8cce4ce2a259b 100644 --- a/base/libc.jl +++ b/base/libc.jl @@ -404,36 +404,36 @@ srand(seed=floor(Int, time()) % Cuint) = ccall(:srand, Cvoid, (Cuint,), seed) struct Cpasswd username::Cstring - uid::Clong - gid::Clong + uid::Culong + gid::Culong shell::Cstring homedir::Cstring gecos::Cstring - Cpasswd() = new(C_NULL, -1, -1, C_NULL, C_NULL, C_NULL) + Cpasswd() = new(C_NULL, typemax(Culong), typemax(Culong), C_NULL, C_NULL, C_NULL) end mutable struct Cgroup - groupname::Cstring # group name - gid::Clong # group ID - mem::Ptr{Cstring} # group members - Cgroup() = new(C_NULL, -1, C_NULL) + groupname::Cstring # group name + gid::Culong # group ID + mem::Ptr{Cstring} # group members + Cgroup() = new(C_NULL, typemax(Culong), C_NULL) end struct Passwd username::String - uid::Int - gid::Int + uid::UInt + gid::UInt shell::String homedir::String gecos::String end struct Group groupname::String - gid::Int + gid::UInt mem::Vector{String} end function getpwuid(uid::Unsigned, throw_error::Bool=true) ref_pd = Ref(Cpasswd()) - ret = ccall(:jl_os_get_passwd, Cint, (Ref{Cpasswd}, UInt), ref_pd, uid) + ret = ccall(:jl_os_get_passwd, Cint, (Ref{Cpasswd}, Culong), ref_pd, uid) if ret != 0 throw_error && Base.uv_error("getpwuid", ret) return @@ -452,7 +452,7 @@ function getpwuid(uid::Unsigned, throw_error::Bool=true) end function getgrgid(gid::Unsigned, throw_error::Bool=true) ref_gp = Ref(Cgroup()) - ret = ccall(:jl_os_get_group, Cint, (Ref{Cgroup}, UInt), ref_gp, gid) + ret = ccall(:jl_os_get_group, Cint, (Ref{Cgroup}, Culong), ref_gp, gid) if ret != 0 throw_error && Base.uv_error("getgrgid", ret) return @@ -475,6 +475,9 @@ function getgrgid(gid::Unsigned, throw_error::Bool=true) return gp end +getuid() = ccall(:jl_getuid, Culong, ()) +geteuid() = ccall(:jl_geteuid, Culong, ()) + # Include dlopen()/dlpath() code include("libdl.jl") using .Libdl diff --git a/src/sys.c b/src/sys.c index da5b7dabbc7f6..9a7759d021f03 100644 --- a/src/sys.c +++ b/src/sys.c @@ -232,7 +232,25 @@ JL_DLLEXPORT double jl_stat_ctime(char *statbuf) return (double)s->st_ctim.tv_sec + (double)s->st_ctim.tv_nsec * 1e-9; } -JL_DLLEXPORT int jl_os_get_passwd(uv_passwd_t *pwd, size_t uid) +JL_DLLEXPORT unsigned long jl_getuid(void) +{ +#ifdef _OS_WINDOWS_ + return -1; +#else + return getuid(); +#endif +} + +JL_DLLEXPORT unsigned long jl_geteuid(void) +{ +#ifdef _OS_WINDOWS_ + return -1; +#else + return geteuid(); +#endif +} + +JL_DLLEXPORT int jl_os_get_passwd(uv_passwd_t *pwd, unsigned long uid) { #ifdef _OS_WINDOWS_ return UV_ENOTSUP; @@ -345,11 +363,11 @@ JL_DLLEXPORT int jl_os_get_passwd(uv_passwd_t *pwd, size_t uid) typedef struct jl_group_s { char* groupname; - long gid; + unsigned long gid; char** members; } jl_group_t; -JL_DLLEXPORT int jl_os_get_group(jl_group_t *grp, size_t gid) +JL_DLLEXPORT int jl_os_get_group(jl_group_t *grp, unsigned long gid) { #ifdef _OS_WINDOWS_ return UV_ENOTSUP; diff --git a/test/file.jl b/test/file.jl index b6db735e7c483..caaeb0a12e9c3 100644 --- a/test/file.jl +++ b/test/file.jl @@ -516,7 +516,10 @@ end if !Sys.iswindows() # chown will give an error if the user does not have permissions to change files - if get(ENV, "USER", "") == "root" || get(ENV, "HOME", "") == "/root" + uid = Libc.geteuid() + @test stat(file).uid == uid + @test uid == Libc.getuid() + if uid == 0 # root user chown(file, -2, -1) # Change the file owner to nobody @test stat(file).uid != 0 chown(file, 0, -2) # Change the file group to nogroup (and owner back to root) diff --git a/test/read.jl b/test/read.jl index 78ecded83c80a..81ee7fea21fba 100644 --- a/test/read.jl +++ b/test/read.jl @@ -461,7 +461,7 @@ rm(f) io = Base.Filesystem.open(f, Base.Filesystem.JL_O_WRONLY | Base.Filesystem.JL_O_CREAT | Base.Filesystem.JL_O_EXCL, 0o000) @test write(io, "abc") == 3 close(io) -if !Sys.iswindows() && get(ENV, "USER", "") != "root" && get(ENV, "HOME", "") != "/root" +if !Sys.iswindows() && Libc.geteuid() != 0 # root user # msvcrt _wchmod documentation states that all files are readable, # so we don't test that it correctly set the umask on windows @test_throws SystemError open(f) @@ -511,7 +511,7 @@ close(f1) close(f2) @test eof(f1) @test_throws Base.IOError eof(f2) -if get(ENV, "USER", "") != "root" && get(ENV, "HOME", "") != "/root" +if Libc.geteuid() != 0 # root user @test_throws SystemError open(f, "r+") @test_throws Base.IOError Base.Filesystem.open(f, Base.Filesystem.JL_O_RDWR) else From caf3266f74805168226e33b87bcc3c11a4d029d9 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 7 Oct 2021 16:14:03 -0400 Subject: [PATCH 57/88] CI (Buildkite): reorganize some of the logic in the `tester_linux.yml` file (#42514) (cherry picked from commit 7782330cdc07190d3ad8a7652a3c84c17f9a305f) --- .../pipelines/main/platforms/tester_linux.yml | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/.buildkite/pipelines/main/platforms/tester_linux.yml b/.buildkite/pipelines/main/platforms/tester_linux.yml index c6e6c072904c1..a70dd5911ad9b 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.yml +++ b/.buildkite/pipelines/main/platforms/tester_linux.yml @@ -52,24 +52,40 @@ steps: echo "JULIA_CPU_THREADS is: $${JULIA_CPU_THREADS:?}" $${JULIA_BINARY:?} -e '@info "" Sys.CPU_THREADS' - echo "--- Run the Julia test suite" + echo "--- Set some environment variables in preparation for running the Julia test suite" unset JULIA_DEPOT_PATH - export JULIA_UNDER_RR="$${JULIA_BINARY:?} .buildkite/utilities/rr/rr_capture.jl $${JULIA_BINARY:?}" export OPENBLAS_NUM_THREADS=8 + export TESTS="[\"all\"]" + + if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_rr" ]]; then + export JULIA_BINARY_UNDER_RR="$${JULIA_BINARY:?} .buildkite/utilities/rr/rr_capture.jl $${JULIA_BINARY:?}" + + export JULIA_BINARY_FOR_TESTS="$${JULIA_BINARY_UNDER_RR:?}" + export NCORES_FOR_TESTS="parse(Int, ENV[\"JULIA_RRCAPTURE_NUM_CORES\"])" - if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_rr" ]]; then # For the `rr` job, we disable multi-threading. export JULIA_NUM_THREADS=1 - $${JULIA_UNDER_RR:?} -e 'Base.runtests(["all"]; ncores = parse(Int, ENV["JULIA_RRCAPTURE_NUM_CORES"]))' - elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_st" ]]; then - # "_st" = single-threaded - export JULIA_NUM_THREADS=1 - $${JULIA_BINARY:?} -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)' - elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_mt" ]]; then - # "_mt" = multi-threaded - export JULIA_NUM_THREADS=16 - # TODO: don't skip any tests - $${JULIA_BINARY:?} -e 'Base.runtests(["all", "--skip", "Distributed"]; ncores = Sys.CPU_THREADS)' else - $${JULIA_BINARY:?} -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)' + export JULIA_BINARY_FOR_TESTS="$${JULIA_BINARY:?}" + export NCORES_FOR_TESTS="Sys.CPU_THREADS" + + if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_st" ]]; then + # "_st" = single-threaded + export JULIA_NUM_THREADS=1 + elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_mt" ]]; then + # "_mt" = multi-threaded + export JULIA_NUM_THREADS=16 + + # We do not run the Distributed test suite when multithreading is enabled. + export TESTS="[\"all\", \"--skip\", \"Distributed\"]" + fi fi + + echo "JULIA_BINARY_FOR_TESTS is: $${JULIA_BINARY_FOR_TESTS:?}" + echo "JULIA_NUM_THREADS is: $${JULIA_NUM_THREADS}" # this variable might not be set + echo "NCORES_FOR_TESTS is: $${NCORES_FOR_TESTS:?}" + echo "OPENBLAS_NUM_THREADS is: $${OPENBLAS_NUM_THREADS:?}" + echo "TESTS is: $${TESTS:?}" + + echo "--- Run the Julia test suite" + $${JULIA_BINARY_FOR_TESTS:?} -e "Base.runtests($${TESTS:?}; ncores = $${NCORES_FOR_TESTS:?})" From 08edc951317ec19f71a29ef84beed29a3d6b9c00 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 7 Oct 2021 18:53:52 -0400 Subject: [PATCH 58/88] CI (Buildkite): TEMPORARILY allow the `asan` job to fail (#42541) (cherry picked from commit d633726c50f161a4c92e6f26d326d56ac50502b7) --- .buildkite/pipelines/main/misc/sanitizers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/pipelines/main/misc/sanitizers.yml b/.buildkite/pipelines/main/misc/sanitizers.yml index 6dfd13dde1718..f586881917f0a 100644 --- a/.buildkite/pipelines/main/misc/sanitizers.yml +++ b/.buildkite/pipelines/main/misc/sanitizers.yml @@ -21,6 +21,7 @@ steps: timeout_in_minutes: 120 if: | # We only run the `asan` job on Julia 1.8 and later. (pipeline.slug != "julia-release-1-dot-6") && (pipeline.slug != "julia-release-1-dot-7") + soft_fail: true # TODO: delete this line (and thus disallow failures) once JuliaLang/julia#42540 is fixed commands: | echo "--- Build julia-debug with ASAN" contrib/asan/build.sh ./tmp/test-asan -j$${JULIA_CPU_THREADS:?} debug From 4a787c0f9803a41c87eb2b47062d9eccf189a7ec Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Thu, 7 Oct 2021 14:57:37 -0700 Subject: [PATCH 59/88] Fix GMP build-patched def. (cherry picked from commit 24650600aadbbe66eef20d50b96abf741470dcbd) --- deps/gmp.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/gmp.mk b/deps/gmp.mk index 1d7d85556a2af..062e5e2207d34 100644 --- a/deps/gmp.mk +++ b/deps/gmp.mk @@ -39,10 +39,10 @@ $(SRCCACHE)/gmp-$(GMP_VER)/gmp_alloc_overflow_func.patch-applied: $(SRCCACHE)/gm patch -p1 < $(SRCDIR)/patches/gmp_alloc_overflow_func.patch echo 1 > $@ -$(SRCCACHE)/gmp-$(GMP_VER)/build-patched: - $(SRCCACHE)/gmp-$(GMP_VER)/gmp-HG-changeset.patch-applied - $(SRCCACHE)/gmp-$(GMP_VER)/gmp-exception.patch-applied - $(SRCCACHE)/gmp-$(GMP_VER)/gmp_alloc_overflow_func.patch-applied +$(SRCCACHE)/gmp-$(GMP_VER)/build-patched: \ + $(SRCCACHE)/gmp-$(GMP_VER)/gmp-HG-changeset.patch-applied \ + $(SRCCACHE)/gmp-$(GMP_VER)/gmp-exception.patch-applied \ + $(SRCCACHE)/gmp-$(GMP_VER)/gmp_alloc_overflow_func.patch-applied $(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted $(SRCCACHE)/gmp-$(GMP_VER)/build-patched mkdir -p $(dir $@) From aaaa68d1a6e7982b393811168609352ae4d3716e Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 9 Oct 2021 12:35:18 -0400 Subject: [PATCH 60/88] add option to allow stale_cachefile to ignore loaded modules (#42545) (cherry picked from commit bbe93759d5e3730f4e8b55fc5249b8252917c8c6) --- base/loading.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/loading.jl b/base/loading.jl index bf444831363e2..9981484ae6a2f 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1793,7 +1793,7 @@ get_compiletime_preferences(::Nothing) = String[] # returns true if it "cachefile.ji" is stale relative to "modpath.jl" # otherwise returns the list of dependencies to also check -function stale_cachefile(modpath::String, cachefile::String) +function stale_cachefile(modpath::String, cachefile::String; ignore_loaded = false) io = open(cachefile, "r") try if !isvalid_cache_header(io) @@ -1814,11 +1814,15 @@ function stale_cachefile(modpath::String, cachefile::String) M = root_module(req_key) if PkgId(M) == req_key && module_build_id(M) === req_build_id depmods[i] = M + elseif ignore_loaded + # Used by Pkg.precompile given that there it's ok to precompile different versions of loaded packages + @goto locate_branch else @debug "Rejecting cache file $cachefile because module $req_key is already loaded and incompatible." return true # Won't be able to fulfill dependency end else + @label locate_branch path = locate_package(req_key) get!(PkgOrigin, pkgorigins, req_key).path = path if path === nothing From 9627d53d4a5dd65752902f963eebdcdefb628084 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sun, 10 Oct 2021 10:03:09 -0400 Subject: [PATCH 61/88] fix libgit2 error throw. Fixes #42575 (#42576) (cherry picked from commit 7a8a39bfe4b5a41703f235186e5c31fb071535d5) --- stdlib/LibGit2/src/rebase.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/LibGit2/src/rebase.jl b/stdlib/LibGit2/src/rebase.jl index 8151217b3950b..51b52ef006c38 100644 --- a/stdlib/LibGit2/src/rebase.jl +++ b/stdlib/LibGit2/src/rebase.jl @@ -83,7 +83,7 @@ function commit(rb::GitRebase, sig::GitSignature) oid_ptr, rb.ptr, C_NULL, sig.ptr, C_NULL, C_NULL) catch err # TODO: return current HEAD instead - err.code === Error.EAPPLIED && return nothing + err isa GitError && err.code === Error.EAPPLIED && return nothing rethrow() end return oid_ptr[] From 14a74674de59a1eee3810fa26322c77e50de1c76 Mon Sep 17 00:00:00 2001 From: Dhivya S Date: Sun, 10 Oct 2021 20:23:02 +0530 Subject: [PATCH 62/88] Improve documentation for JULIA_NUM_THREADS=auto (#42501) Co-authored-by: Jameson Nash Co-authored-by: Fredrik Ekre (cherry picked from commit a8d42ebe697f8ccd19aacfbe53c8e964d375e4c7) --- doc/src/base/multi-threading.md | 1 + doc/src/manual/multi-threading.md | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/doc/src/base/multi-threading.md b/doc/src/base/multi-threading.md index cb8ad06488f1f..dea323832d61e 100644 --- a/doc/src/base/multi-threading.md +++ b/doc/src/base/multi-threading.md @@ -8,6 +8,7 @@ Base.Threads.threadid Base.Threads.nthreads ``` +See also [Multi-Threading](@ref man-multithreading). ## Synchronization ```@docs diff --git a/doc/src/manual/multi-threading.md b/doc/src/manual/multi-threading.md index 246fab74f8fe7..89bfaad299f0f 100644 --- a/doc/src/manual/multi-threading.md +++ b/doc/src/manual/multi-threading.md @@ -18,10 +18,16 @@ The number of execution threads is controlled either by using the [`JULIA_NUM_THREADS`](@ref JULIA_NUM_THREADS) environment variable. When both are specified, then `-t`/`--threads` takes precedence. +The number of threads can either be specified as an integer (`--threads=4`) or as `auto` +(`--threads=auto`), where `auto` sets the number of threads to the number of local CPU +threads. + !!! compat "Julia 1.5" The `-t`/`--threads` command line argument requires at least Julia 1.5. In older versions you must use the environment variable instead. +!!! compat "Julia 1.7" + Using `auto` together with the environment variable `JULIA_NUM_THREADS` requires at least Julia 1.7. Lets start Julia with 4 threads: ```bash From 1420ddb1b79671b955fbdf62c523fa1d61285811 Mon Sep 17 00:00:00 2001 From: KristofferC Date: Mon, 11 Oct 2021 13:51:52 +0200 Subject: [PATCH 63/88] bump Pkg version to latest 1.7 --- .../Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 | 1 - .../Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 | 1 - .../Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/md5 | 1 + .../Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/sha512 | 1 + stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/md5 create mode 100644 deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/sha512 diff --git a/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 b/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 deleted file mode 100644 index f0adb222ccb0d..0000000000000 --- a/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -26646eea94e930b2217e9cd6e7043735 diff --git a/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 b/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 deleted file mode 100644 index 6769fd1373c32..0000000000000 --- a/deps/checksums/Pkg-56228c448bb3695be32eecf0aa0d301dbb5e7f9f.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -5cae2fee81577007070ed89197a9b1241c46185bbe069a13e522248f0a295acab9875dfeb7718c6c7dc5bb13da41a57c070feb2c0bc708d0032fe875bab9c80d diff --git a/deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/md5 b/deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/md5 new file mode 100644 index 0000000000000..51a29ea2a88ea --- /dev/null +++ b/deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/md5 @@ -0,0 +1 @@ +7ce92ba7476912068e90f37e2246af4c diff --git a/deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/sha512 b/deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/sha512 new file mode 100644 index 0000000000000..9d8ff79b1573c --- /dev/null +++ b/deps/checksums/Pkg-a230dcf5f3546bd464e575e7752d6259a3221bd5.tar.gz/sha512 @@ -0,0 +1 @@ +0f532f97b39f6a3a5f326b635378bd64b2f5e6c1b0f67d1a3a597f848cac07031172d62a567d2ecead1f9a3522431fb1254cea29a96f2da10c3f8b3b3be6c9bc diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index ac1045de20fc5..b88b7bc5112e2 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = release-1.7 -PKG_SHA1 = 56228c448bb3695be32eecf0aa0d301dbb5e7f9f +PKG_SHA1 = a230dcf5f3546bd464e575e7752d6259a3221bd5 From 7b9dcf2ff818b82cef337fa4678548c7720c1cb3 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Tue, 12 Oct 2021 02:43:16 -0500 Subject: [PATCH 64/88] fix exp(NaN16) and add tests (#42555) * fix exp(NaN16) and add tests (cherry picked from commit c8cc1b56c15388ebb2d206dfb71d764fcf049ba3) --- base/special/exp.jl | 2 +- test/math.jl | 58 ++++++++++++++++----------------------------- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/base/special/exp.jl b/base/special/exp.jl index fd88eee3fc638..e21eca6b51386 100644 --- a/base/special/exp.jl +++ b/base/special/exp.jl @@ -279,7 +279,7 @@ end small_part = expb_kernel(base, r) if !(abs(x) <= SUBNORM_EXP(base, T)) x > MAX_EXP(base, T) && return Inf16 - N<=Int32(-24) && return zero(Float16) + x < MIN_EXP(base, T) && return zero(Float16) end twopk = reinterpret(T, (N+Int32(127)) << Int32(23)) return Float16(twopk*small_part) diff --git a/test/math.jl b/test/math.jl index 67522b9be4c7b..6c82f2d215eaf 100644 --- a/test/math.jl +++ b/test/math.jl @@ -297,47 +297,29 @@ end end end -@testset "exp function" for T in (Float64, Float32) - @testset "$T accuracy" begin - X = map(T, vcat(-10:0.0002:10, -80:0.001:80, 2.0^-27, 2.0^-28, 2.0^-14, 2.0^-13)) - for x in X - y, yb = exp(x), exp(big(x)) - @test abs(y-yb) <= 1.0*eps(T(yb)) - end - end - @testset "$T edge cases" begin - @test isnan_type(T, exp(T(NaN))) - @test exp(T(-Inf)) === T(0.0) - @test exp(T(Inf)) === T(Inf) - @test exp(T(0.0)) === T(1.0) # exact - @test exp(T(5000.0)) === T(Inf) - @test exp(T(-5000.0)) === T(0.0) - end -end - -@testset "exp10 function" begin - @testset "accuracy" begin - X = map(Float64, vcat(-10:0.00021:10, -35:0.0023:100, -300:0.001:300)) - for x in X - y, yb = exp10(x), exp10(big(x)) - @test abs(y-yb) <= 1.2*eps(Float64(yb)) +@testset "exponential functions" for T in (Float64, Float32, Float16) + for (func, invfunc) in ((exp2, log2), (exp, log), (exp10, log10)) + @testset "$T $func accuracy" begin + minval, maxval = invfunc(floatmin(T)),prevfloat(invfunc(floatmax(T))) + # Test range and extensively test numbers near 0. + X = Iterators.flatten((minval:T(.1):maxval, + minval/100:T(.0021):maxval/100, + minval/10000:T(.000021):maxval/10000, + nextfloat(zero(T)) )) + for x in X + y, yb = func(x), func(widen(x)) + @test abs(y-yb) <= 1.2*eps(T(yb)) + end end - X = map(Float32, vcat(-10:0.00021:10, -35:0.0023:35, -35:0.001:35)) - for x in X - y, yb = exp10(x), exp10(big(x)) - @test abs(y-yb) <= 1.2*eps(Float32(yb)) + @testset "$T $func edge cases" begin + @test func(T(-Inf)) === T(0.0) + @test func(T(Inf)) === T(Inf) + @test func(T(NaN)) === T(NaN) + @test func(T(0.0)) === T(1.0) # exact + @test func(T(5000.0)) === T(Inf) + @test func(T(-5000.0)) === T(0.0) end end - @testset "$T edge cases" for T in (Float64, Float32) - @test isnan_type(T, exp10(T(NaN))) - @test exp10(T(-Inf)) === T(0.0) - @test exp10(T(Inf)) === T(Inf) - @test exp10(T(0.0)) === T(1.0) # exact - @test exp10(T(1.0)) === T(10.0) - @test exp10(T(3.0)) === T(1000.0) - @test exp10(T(5000.0)) === T(Inf) - @test exp10(T(-5000.0)) === T(0.0) - end end @testset "test abstractarray trig functions" begin From c5ff7133cf1f71cee6b36a02b1c860df0d212bd8 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 6 Oct 2021 07:33:32 -0400 Subject: [PATCH 65/88] [LLVM] bump to 12.0.1-4 (#42512) * [LLVM] bump to 12.0.1-4 * Clang is now installed into usr/tools (cherry picked from commit 538541aaa07ad83ddaf4dc1fbfc46b455e96db0d) --- Make.inc | 2 +- contrib/asan/Make.user.asan | 2 +- contrib/asan/build.sh | 4 - deps/Versions.make | 10 +- deps/checksums/clang | 116 ++++---- deps/checksums/llvm | 464 ++++++++++++++++---------------- src/Makefile | 4 +- stdlib/libLLVM_jll/Project.toml | 2 +- 8 files changed, 301 insertions(+), 303 deletions(-) diff --git a/Make.inc b/Make.inc index 23eb6c0a77466..5651023261152 100644 --- a/Make.inc +++ b/Make.inc @@ -1396,7 +1396,7 @@ endif # Note: we're passing *FLAGS here computed based on your system compiler to # clang. If that causes you problems, you might want to build and/or run # specific clang-sa-* files with clang explicitly selected: -# make CC=~+/../usr/bin/clang CXX=~+/../usr/bin/clang USECLANG=1 analyzegc +# make CC=~+/../usr/tools/clang CXX=~+/../usr/tools/clang USECLANG=1 analyzegc # make USECLANG=1 clang-sa-* CLANGSA_FLAGS := CLANGSA_CXXFLAGS := diff --git a/contrib/asan/Make.user.asan b/contrib/asan/Make.user.asan index 7277350074188..05eb813e8996d 100644 --- a/contrib/asan/Make.user.asan +++ b/contrib/asan/Make.user.asan @@ -4,7 +4,7 @@ TOOLDIR=$(TOOLCHAIN)/usr/tools # use our new toolchain USECLANG=1 -override CC=$(BINDIR)/clang +override CC=$(TOOLDIR)/clang override CXX=$(TOOLDIR)/clang++ export ASAN_SYMBOLIZER_PATH=$(TOOLDIR)/llvm-symbolizer diff --git a/contrib/asan/build.sh b/contrib/asan/build.sh index 5ef75a78fa2b1..d124e0a92f1e0 100755 --- a/contrib/asan/build.sh +++ b/contrib/asan/build.sh @@ -41,10 +41,6 @@ fi make -C "$TOOLCHAIN/deps" install-clang install-llvm-tools -# TODO: https://github.com/JuliaPackaging/Yggdrasil/issues/3359 -rm "$TOOLCHAIN/usr/tools/clang++" -ln -s "$TOOLCHAIN/usr/bin/clang" "$TOOLCHAIN/usr/tools/clang++" - echo echo "Building Julia..." diff --git a/deps/Versions.make b/deps/Versions.make index 38f29a9089929..4bae019d0a11d 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -15,7 +15,8 @@ CSL_JLL_NAME := CompilerSupportLibraries # Clang (paired with LLVM, only here as a JLL download) CLANG_JLL_NAME := Clang -CLANG_JLL_VER := 12.0.1+0 +# equivalent to libLLVM 12.0.1+4 +CLANG_JLL_VER := 12.0.1+3 # DSFMT DSFMT_VER := 2.2.4 @@ -45,13 +46,14 @@ LIBUV_JLL_NAME := LibUV # LLVM LLVM_VER := 12.0.1 -LLVM_ASSERT_JLL_VER := 12.0.1+2 +LLVM_ASSERT_JLL_VER := 12.0.1+4 LLVM_JLL_NAME := libLLVM # LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`) LLVM_TOOLS_JLL_NAME := LLVM -LLVM_TOOLS_JLL_VER := 12.0.1+1 -LLVM_TOOLS_ASSERT_JLL_VER := 12.0.1+1 +# equivalent to libLLVM 12.0.1+4 +LLVM_TOOLS_JLL_VER := 12.0.1+3 +LLVM_TOOLS_ASSERT_JLL_VER := 12.0.1+3 # LLVM libunwind LLVMUNWIND_VER := 11.0.1 diff --git a/deps/checksums/clang b/deps/checksums/clang index 6d6d4d100a432..b5343f4965e0f 100644 --- a/deps/checksums/clang +++ b/deps/checksums/clang @@ -1,58 +1,58 @@ -Clang.v12.0.1+0.aarch64-apple-darwin.tar.gz/md5/9d0bd5ff9934f4d0832b89b2c896f13b -Clang.v12.0.1+0.aarch64-apple-darwin.tar.gz/sha512/1b6325b295047b4d31334dfbadabb7716e19ea1eccb809f366b06f241719f18ea54836f45d982d3cf66c4a6ae09686a4a55c76dcec1f883f0192347d6fb779d5 -Clang.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/d3e8c671f21b15522832e80844e81199 -Clang.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/3b37e689aca086b05dea1b2293eb0fa8554b9c846c0ab7bb132be3600e66efb48e929e5b84a3ea1cfc9e9a3941521a395d1fab3852c9877422a1f62133fe19fb -Clang.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/8f790f74846a5dada6a5d2db3384d783 -Clang.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/d8764c3f5fb5e8a3ccb93d4425145747d1e118c97beff42afc801db0189d72758b10c1ff72b9cef71e4d226065b3192710e34ecab3b988d9a27f48a88ad18194 -Clang.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/7a11f6ab531cf5e2f453145fb5f67df6 -Clang.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/6dad060cde272417daaa7a88bca17fcdbb1f2c4ab7ac2d888e013be34d150ff5fb5c5d74a5016b9bc666c2a8d02a2b68029a51c5cb27d63ec143bcbd5f1ae4c4 -Clang.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/4ff76d1479f9e8e1462302cf1c4eb209 -Clang.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/d295e13c0ae4eb22d499cac17dad660d47d2a4cd259295dafe33f0f9d160c0fa3a6d793fbcbe155914fd85b8fe65d44db2608e1e98d243ea08fd21abff5998cc -Clang.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/0f3945cf21990dd64da3f5a85e0203b4 -Clang.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/45a4817d5c0d6af588264f7c996bd583c437c67924f4220256cf0c2b77662b9c42d3f3aff1a83de95cbdef76c94a079a7c2dd52585501188c865049dd0221a7d -Clang.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/8bfc3fc5bb8e71c4e8ae22a65c93e2a4 -Clang.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/78d529f12928d950a5a6da16efe379c722628ac9647b325b7e6617623a9c809315b7e594dd9c2a12a7cd66c2a8a63956b2e0cd7c6f3ed149ba75b6300d766ccc -Clang.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/3fb0f6f8be3a722b2df4cdf1d1756170 -Clang.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/72c76603c732c56c4ac0f4235a38f6be739e4f630da9f93d50a4411fce7f9995f0b86d7ff1daf60177f329ac46145c2fa7d581ebdb55c4a7f314b85633cb31ab -Clang.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/b346689d4ab5757aad546521946ed622 -Clang.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/1af114292326176fcbda578a07f73c1eab90b31a0db87819bfc38c71623b3134952811390e2051466f0d48132040963fb1d93d5f121bf8fd81f58959a23c10ad -Clang.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/af253b7620b1e80772d5fd6d5d3b9603 -Clang.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/1cbe3695204607c667a64798a9d44a6de991e5445baf4952502c8c2bc22ad0c05f17aad76d58b634015079049afec934e805dd68029aa62c3bda7e3834abdeb2 -Clang.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/0e0129a8f6d2c09a2954cbf64b9dd9af -Clang.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/2c9bcd56f870038dd84e97cabd3861f16ee33aab99b8cf4feef9c27140ce79035394f41037f0ad8034eabf9195e22868317c74e177a68aef83b597aa67633745 -Clang.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/9c245166d829cd8743a9c726a803be06 -Clang.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/c4cd7a9478b44a4a518d5ebce3d1193d4b55c2d3e107a9b949805f4669965d1fc4c6704254bd31a7c86792fe278f06374ee2c691c92d9f32ca01c12d574727c4 -Clang.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/53686f336daa4d76dde90bbc0324635e -Clang.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/20ac50b52bf80edc6a729e513577f295e7b89a8aca3d618bd323cf0c44d2313e49e9549ade36100855345291425ef966ddd342c456ce26ea777a0b82ac837551 -Clang.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/4e5fcb61d9dea624dc30df1c6ea3e7ad -Clang.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/30b407d5420fd0b3da4a82cc5e1b1e7a8c1764793ca3e6d6c0dac9bbc212d67d95037ef8a6fce282299f9a3232371e410e2c8942f1b5958ecedcc8879e19ecf6 -Clang.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/70fd7d0b22447a1e1856bae3e58de0fc -Clang.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/4e2446c562834e308697135ec775b1d28119822c7a0028249c19ae9e495ed216d8e135781bad5ea722322dc5d24b725439cff9b4af8555b24886008690a574c2 -Clang.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/e30ae623bfd0c7af72d6ddd87343d3e6 -Clang.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/df9982ff7d83d9e25ec796d3de2a22d8bdf34d463d9dd0b4ed65289a3295235dffc621efe100408f7fced05c611dd44c74fbc4599ff0a4fc19d22fc305fcc2c0 -Clang.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/a4bcb55a537e553a0e95392e924aa46f -Clang.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/6747a2b607caf0606d4c5ea06f0c23fe39d8c31310bb773f18ff8a0e8e9a9b79e745f5d5d1c9fc69adcd1f3561020814e3088a693acf124662b81b8e92651455 -Clang.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/a513038e7b0849ed6daf1609ce5bfeec -Clang.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/3acf8c08b04137d5271cae03085eda859a1b3c519b9540d627d2b05581964234523d2bd3233bf59651f306f1cfa7e5862792503ceda39f0981ab25ced12b9ab9 -Clang.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/11214b74d6b50c68a5e5e7e21a9b3787 -Clang.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/ba7c29fc008a4b0c10530383ab30c0b2bb60f3572d471ded7089bba088163a05fc06af310931f12b057a8a932914bc6a0e0efd3f9832ae52a34d3cc066486874 -Clang.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/7802c4438fc9d83bd456cef8eb1bc2d9 -Clang.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/a24796700d12f15c827a43acab0b8bf9afd0f68ee32b4b98e8aa5d3df152f46230b13f072d50ac25986fde79a822ee78d595f8d1c28cff168e89a4e15d5cbd09 -Clang.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/bce9c20a48ea31265d3a57ecc598c146 -Clang.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/d35d2d1efab91fa2e7e244bb4dc9811adaf01cb42f448abf0ee688381959c304a5cc4ae5fceae9ed60a2b0d34dcc795b8dbb405b1f770e7e05a3d16962d97f99 -Clang.v12.0.1+0.x86_64-apple-darwin.tar.gz/md5/cddf72884b50d35dad7173625285d2a9 -Clang.v12.0.1+0.x86_64-apple-darwin.tar.gz/sha512/638dbf23827b7486a90ef5f1d79419a7c09411d4f8ad8da5fd20691d38185c28b5aab5b9a2acc43a4e596b831cd27eca489efe79e007f7540f98cd563eff8624 -Clang.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/86c8206b2e38d5cb7365dfcd50d1f027 -Clang.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/60d5e9db3d3bf4d8309e462b6d47b258433cd77fbdebfafb7c5f07ec4bf2408e61f645717c260a5c4be150fd86905174b9a806b194a153883bb16590b33a623b -Clang.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/83a0d75a072631c856ed2110acf8e444 -Clang.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/908fabecef669ba579bcc59e911b68ed8deb5b3bda49d0dff6ae01dfa44526ebca81e83238a1abaafbf6b249e56409652eec304e0e82cb056d6182dbff9fbb2d -Clang.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/8ba30a11ea311716ff27cc7631837f9f -Clang.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/3bace26a82809153826ecafa440e563576178fa0481c754d5d0b8a3c60cd0caf5d4db8f8c860fa0779bae768a5a6f4427951baa00588713c19328212662700b9 -Clang.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/c7ab6f58f6de37432b87c6f8607fa455 -Clang.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/1d9c9553710f0a7453a6d53b0529fd08782825870bac4074f55a2206c5f7372ec8578a951978f09aaccf481919096f4c4f16db4bb1ae707594b747402cad8213 -Clang.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/1aad4f620028b50ebb9b537f57fb5c48 -Clang.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/0dfc1e8d2dfbe481848f15b543dc1f22d43ca8a83ca4cfc870faeef046453ece621a866c1dbc384c58aca11ff607cc14e77c64438ca2f3402ac78c268671af8a -Clang.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/2d0b4f4f249d7e910b3566c9fe8253ab -Clang.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/e95329f809489ce64ba34e6c9bf773f6b5be0e69250bbcd45df995b7a88f4583339be3e9c1e353740e5047954b3a553b1a76bfd40ede5fc23b3504ec6dee91a2 -Clang.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/8d7178a3c1aae01a39a56c7b80e3d584 -Clang.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/6a838935a32c36c106cd105d3e0a8324c020dc400446a11d3b4dc266cd30b31eda1f26215429607377c332e989085331f6886ff2e3ec990711ae836eabe0498e +Clang.v12.0.1+3.aarch64-apple-darwin.tar.gz/md5/e48f17625df207526c56dc0010ae0daa +Clang.v12.0.1+3.aarch64-apple-darwin.tar.gz/sha512/e7b9844e84327e8624bb689302f103ad1e621e0e31f2824af54182c597873c38f5e7028ec055aba84645e0c6890c4d39ab2bc9a1acdaa6eaf0b3d648b3e4cdfc +Clang.v12.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/5da291e45739f3cf99c055364bd8c2fd +Clang.v12.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/6a06c06c6b03d4dbb5fc61d922ce5ff4f394fca2b39025b7e8ee0f50d2373917ad46d8c688f0a6e073a4ad3b14c981a8353d554356d634846be940d659b1da53 +Clang.v12.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/e732781718ddbd28567247c5d1ed0d1c +Clang.v12.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/5b8ee21c0661bd3221252964a1ef0b5be55e227a9d167453be5659bf21d006fcc921b275b35f9ee9c6535fae4e03ee9df585233af61b96d04acf3742997a20b5 +Clang.v12.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/6d93f705e632a2eef897e56510091bc6 +Clang.v12.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/75fa08aeb2c4aafa73e39109391f22c0469df2ef6a5973d7a0f72d9ba9f6602259732ec1d87ec48e019f7c1c7cb168747e1215e7a95b9faf7d12ef4928c2a087 +Clang.v12.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/92f83227bf548f2237ee367893ea5779 +Clang.v12.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/7215208979ca7b6cab569b1d23da554b62d0f09f5ce80b9240a0bdbc55307f2b2cf7dd53523800a620a635d0dc9a5355d0b62b9e943e5e054d527f12e1488283 +Clang.v12.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/cb434a7f448a848941150b676a000993 +Clang.v12.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/3c7075e543ca17d7c41d99fb123351fb5afe4b292afe45b2d5283d43b59fe07fe822721455b62dd35ce8eb72c061066eefbb9c72218a0b7cad92fbf0a7f78696 +Clang.v12.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/6867cd783ae6e8161f356c2de58b2b9e +Clang.v12.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/8a976ff74c14b475e4e06ec95b7d24d3e6fc1f8938569c38953314e3ff1be32f03b1aa7f681fcf852cdc4041c2eacbf8ef6110615267dd74c83cbd0e308b0975 +Clang.v12.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/03d7b293eec65433a10b72fce8822c45 +Clang.v12.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/9a2b00fe099c6481122252f2079692335bdc450b67ac094272725bf992d9376a55102db8221ad56e1575c75af09fbc5919f06faea63130785973afdadd7d5920 +Clang.v12.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/a7c9d6bfc7d6f203b50f9b4dcecd6965 +Clang.v12.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/0532eeb0c391927c897d7c050913d5b41d0869bb26da2e56d782e60b228fef859bc1928e563f4ee349d4bad450588e7706a144398ca47a849ca2c36b7721fa8d +Clang.v12.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/5cda8cbfc60a39c7e4426c0f12545337 +Clang.v12.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/ea35242499d3e658c72407e3caa42a642051d6a0245aa72605288b9c5f90335d3caf2c2f2c31768e1667fccaf3e6f3e6d003b98504aec4304f562ee6854cf434 +Clang.v12.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/460de1a7571da00e77ab43488cc5c81a +Clang.v12.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/e275ef8b01b142e8187dfc5420342fc6d889ce97458d4178f85b7951a37e37896d3d30793856475030d635d6df7fc20a380524ef24560d4d3a1681564135517e +Clang.v12.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/42b35ff028d6c4964083ac6218d783e6 +Clang.v12.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d941f82bff7917d8c8b9b260a8896d1af8d61c56dcc574e7a96a3971da8622f2d5822e340f8d5cf340adcc36760a757efa68c7e6a4686ecdec49207b68761ea0 +Clang.v12.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/2fffd7d0d994b8185b6b93e43ba0d187 +Clang.v12.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/d538b96f66e9d4935391abd51ed069a323c7dde561ab5daafbc31360c422a25fffcf924a676d50642275c3047cc2c733b89a9c130f78fa9862a63146d981ae0f +Clang.v12.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/cd41e8189cb89991cf25b2d29418b127 +Clang.v12.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/8c42ce277a94492e76c7719cc7aa9388fc167caa05bec7faec901dfaae953857c97a82c24edfa47d42e23bda3ccb13e6ef33b89d5e663177429b95304d74f6ba +Clang.v12.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/39e81ef66d081d99e63c3df56392f518 +Clang.v12.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/fe630a179fe59fa899bab114890b3e3f8d704b08eca933289f26ac888fff2dce295328b75c77c0a837890d0ef15a07e92df30a60c71e3db5be99b4dbc8e3bbe1 +Clang.v12.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/db4f1a883aff089f3e939ea73019ce92 +Clang.v12.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/4dafc8b917a4fbfa07477d6fd95b08c14ad3a5101017e539ca6b09c572a671117f30336f705a1a494ea123b5afdfd84ae3e4d3e18d7179225fd20873e758be27 +Clang.v12.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/f06fdcc12560bfa49659fd074d7c3e85 +Clang.v12.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/5f5b70b2f52752a255ada165408adab30f5c3549a9a0c07ab02efa86af437610eb948309cf7c62282edbf0f19b6c72ef011c276405b9c80207775211a15409b9 +Clang.v12.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/a45b6e1a73bfe6c89e42e02fb0a7c8d5 +Clang.v12.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/d0a8a539e2ae9ae0c652e80c2a321b2ea5e1e0d2b7d50850ef9fb2013b5b1ee8dda86e159b17aba9e5c4fa35d777dd6cf99e10bd54fbd51d9a2e235486e70956 +Clang.v12.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/0cf24f2a471eaa7979f8b08dbc6384df +Clang.v12.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/3cb5d20140c3e10a079e603377e5963844a85c6c50f3df7ec7981a16c0c2b7810cbab3460be9b96412ee9cfc6664d6d2dfefc554101a2b8934b4fc8551a90ece +Clang.v12.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/01c8ca0f75ca27893933b0f56dc2e4f7 +Clang.v12.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/c00bd0c1ec5a602c2343865ba3267904b24daa92bcd384240d7f09190dfaaa9ec7d1927c60245345a9b207224ac15834332406f67a0ba152239c4064f38800de +Clang.v12.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/901196acf617f5e7113197b9f555e357 +Clang.v12.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/efab074365fa8597fe3c383d69cad981edebe9919128c9de01801cfc2e77e83c070fad61cc606670045af696b00f724f1b4fd9166d54090984a587b4c3c193db +Clang.v12.0.1+3.x86_64-apple-darwin.tar.gz/md5/ce31160483e0a9872391988530012ee9 +Clang.v12.0.1+3.x86_64-apple-darwin.tar.gz/sha512/a091f580ed8ffec36aecb5b7b929b0c4753ecce2f0a4421fe99a8b98d1e615bb975ffe1a82acc3921eac8a2e92055012c8222c7b8a52214acc87e2d8b0b16fb4 +Clang.v12.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/ad4f1b6309c845816fe20b974e02acf1 +Clang.v12.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/9a6b18091bdf586c554fd9c4c0a97da2324e69443ebc732d4863028f099ea0523c1ac476726b6310ef95f438673d317170cba38e571a5de16805b43d9b6fa64c +Clang.v12.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/3cf260c1df00939fdaf322320b19264b +Clang.v12.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/15951398a9d2c176caee370e004234e7db7eda5d590b74183ee5696678b4bb8ecad6047cdd4cb7c62f25847035b0e52d4c8ee8cb25d08e0edf00a68dbee12e98 +Clang.v12.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/ce07838922efed663d6aea0ee0b0995e +Clang.v12.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/e05a903feda1868d17b311816943f00745ce79fc859ed92782b8606c11015f13884380ddc5fa6e1fad2174b2f5f32ec3208eb76e000ffc9825ff532926ff8859 +Clang.v12.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/a59f567abcc0adbed004ba0d0e590407 +Clang.v12.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/45e6f46f028beb879f9fec18137593882a7d81fc0825b623d9884f9b8fa400ca847e0c975ad2a7f1fce6ab7bee6d2f7d3cd3c6ad4ee49cbf879584ea7b3e2e58 +Clang.v12.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/5caa4b65706d5bcce71e72ac8dae39bc +Clang.v12.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/d49041ff192b1af43778afed30d0ab8f8e6a6b0cf1a8b0382712dd54e0362de2a58a9ea69ef51a1924f34480a79bb6a498904fb7eecb76e6cb40bffc98427093 +Clang.v12.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/88e8ce154a83ac41fa8bdee270453f54 +Clang.v12.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/d9087edb3ee10bb91783340f27717a690a7e659aeb7bbff138f1a9ce1db2763c9f3cabd8cb0a1d1c79e2587a993ca609d815166db009b214689c7d4f1c55f05c +Clang.v12.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/1394c306638fe127292414f6144e6d90 +Clang.v12.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/88f6aa01c851cb26f8999d4a1996527351237fd3331048b4255de303c3cd8e8e90ba217bbf709bc1277e9eab46258b831d0bdaccdcc58dbf086b8be0a1ae49d0 diff --git a/deps/checksums/llvm b/deps/checksums/llvm index 9934452a0032e..c50a204af944b 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -1,234 +1,234 @@ -LLVM.v12.0.1+1.aarch64-apple-darwin.tar.gz/md5/018fd0deb7418d941c10ae8deed2d0cf -LLVM.v12.0.1+1.aarch64-apple-darwin.tar.gz/sha512/c7e52d1ac71877a22b5b46ab861f97bbe6237fcd7ac06482afeffd8deb3030d5473d0d449e277448224d231fbc35ce4d0ed4fe98b51a85d9afc0a7a88ba5d537 -LLVM.v12.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/md5/0e95e9ab1baf1f3e6aeaf3d730e2a1c3 -LLVM.v12.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/af3d358b266137d7fc8179068e89d0fc6f4ebb7326561446dfb31e696a47105b34b54dfb77fe5dd5744fe1551c71366a420941e74d948a698d3b4a73201e33d7 -LLVM.v12.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/md5/ffca91e1f8134a7f90fdab18e5ec1592 -LLVM.v12.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/58c156bcbc9c80401bf6256ca54496ba1fca8cb0ea0f143007919de2339f9573d9758cba0104f2a3ede6a43eb9cbeb28914597a877e65764055d04bdc41ce62d -LLVM.v12.0.1+1.aarch64-linux-musl-cxx03.tar.gz/md5/e49d4e8be1ae16f6b9204cf8bbf91591 -LLVM.v12.0.1+1.aarch64-linux-musl-cxx03.tar.gz/sha512/faf56c0fcf9b698bf8e093230578627f054821326aac54dec6621e0cc55b184d45d478ec62715fd439ea71c735418b7b04f73c12e52a28ed5e82c5c9c72334b7 -LLVM.v12.0.1+1.aarch64-linux-musl-cxx11.tar.gz/md5/d17de5cfcb9add02d1961e5599c7fdb2 -LLVM.v12.0.1+1.aarch64-linux-musl-cxx11.tar.gz/sha512/0703f5bd1e26349cc062ddfa13909c21445c23e7c405b2f19eded196b0ba4f8aade95251e20161bda58a22437e6f04af8071cec64d2780eea1786eae96637ee9 -LLVM.v12.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/921837b2b5ecfa14e6654a5d78d384c8 -LLVM.v12.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/6adb2f2b997a43d16e4c6fd37bdb39f9f5543166e5acf0c6ee8f2b56ee2ef2cba9265593f64a4dfb56984cf9beeebcfee76e4023ed1852da0f33b38f0a128810 -LLVM.v12.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/4554fb682c0b683095277b36d0123540 -LLVM.v12.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/90fc3bf90e7907f6b232194698514d36356eaada65faf6034e9c9857d563c97d8cb80761d4ec6cb4a7e74388afd19d1165b25e0358450c1b23da0041f3950485 -LLVM.v12.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/ea3a11b790014926b60e77f6dc816f86 -LLVM.v12.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/0d6ad6c01d32e2575a69e5e98c8696a04472d1cc4274d87e2224eb64e3f4ef298ceb5677387260e968842d4a49a22655e150199dbfe2b578056ae6b208686e93 -LLVM.v12.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/ed9b3187f3b014c083b2fa431c725fad -LLVM.v12.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/8196e557831fd5e9dbe77bbce89d36eb176d2bdf4a6153581d134805705de60b2750b550e65097f6d1df6055283c13492af9a4662a9551397ba338641e8dd5e3 -LLVM.v12.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/45e0a39364d2d55d264e792e588dd12f -LLVM.v12.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/ededc6a86c1a22ca3efa88d619d4e1401f16ea2994b9c87dd712e4e9140a37cd9113187c00c9d4135ce06a6302fb19cfa4f851321a09b365c877b8fa03d8c3ae -LLVM.v12.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/7a9481c183c25599ceed7581a57a2a84 -LLVM.v12.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/1edd0308d5abd0cf01146babde620f71f5694388cb92b4d466478cde78572db4c2070eb3c15ad4df31bd32a422214f720233c6b953e941123d633e0f567e3ed3 -LLVM.v12.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/f49517d0cc876477c22a01ecea60a5fa -LLVM.v12.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/71df055ae6f2e2be40cc15abe5677ca24a1dab5e03eacea0febc328f4c0a4fbcb8add8a0790fec98e6ecf2bb0e15bbde65c72ccc173774c644a8c6a2bf5e1dde -LLVM.v12.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/1dd4115b020fe5cb61c0552ba198f545 -LLVM.v12.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/0c710f7866169b83004cb61ca85f0b6fa8ba35a1ccec16e99ca1c3fc847eef7e26955e97ee3270080dab32e8eb81a53d179e9c614095aa5ccee2b5d57c8f97de -LLVM.v12.0.1+1.i686-linux-gnu-cxx03.tar.gz/md5/0c2651a9461d060c840deddc4ea21c6b -LLVM.v12.0.1+1.i686-linux-gnu-cxx03.tar.gz/sha512/4db61020ad13c311bbd3470b0591cc38b7f0d8466277cf8eda74e91001e14e50932e6f1326be38f3e1efc40be699bad3218632239d5a4bb74a7c915798db2c8f -LLVM.v12.0.1+1.i686-linux-gnu-cxx11.tar.gz/md5/fbd20dbf82d029367fa95503cbbb0f1c -LLVM.v12.0.1+1.i686-linux-gnu-cxx11.tar.gz/sha512/f17a9f6870aca14e5ed6ce41f89713c7c2fc6814952b751744f3a5e20f71b5ca77e5bb3adf882e2442586bc2be776bbb968c4f89b4b526ecb7a20102bdae95f0 -LLVM.v12.0.1+1.i686-linux-musl-cxx03.tar.gz/md5/3ede17005a679df3178cd95af57a0ea7 -LLVM.v12.0.1+1.i686-linux-musl-cxx03.tar.gz/sha512/cd210a273b0cb9cf41c73f2c5bedb58e8a69a9bcd35693ba09e6ce6579d91f5680470e57e46c0c1a06698a580324fc79427cdd98a2076e931fe7765baa05bd3a -LLVM.v12.0.1+1.i686-linux-musl-cxx11.tar.gz/md5/d053bfe9ba85607d45f80799746bf907 -LLVM.v12.0.1+1.i686-linux-musl-cxx11.tar.gz/sha512/f2cafb2679b99d4f3b2b6d0bb8e71eab35a4517c2ceeb70f4c145f6cb965c2c97b9f3fb290203049a7c87c6bd4fef0938edf11d2669dae0ee5e2fa9b82e0b6a6 -LLVM.v12.0.1+1.i686-w64-mingw32-cxx03.tar.gz/md5/fc2e7e03520f06852e2ca9884ecbe585 -LLVM.v12.0.1+1.i686-w64-mingw32-cxx03.tar.gz/sha512/4225acae04e88fdaa5474677c5f296ff3bb4ed81384ea0cd523a0e6cd3b075a3bb72366ac92ab127d4abf266d2571ff8e07f96c7860d3e751a8b6c04f9c7d802 -LLVM.v12.0.1+1.i686-w64-mingw32-cxx11.tar.gz/md5/2b5fb50c1460ec09be0d1c25c419d7ed -LLVM.v12.0.1+1.i686-w64-mingw32-cxx11.tar.gz/sha512/69936063b3a76aaab7cd1a85797d900018675fff02e919df730fda98473b23421f6202608cfbc165ebe6f6ff671b25a156b174dd6b777a7863be23d3668ed27d -LLVM.v12.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/2fe450ba1967b9aea8f58d4b33bc6375 -LLVM.v12.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/2b89a323f393fb7e313871d0847ec37a467e5573550b582186d08a1d96853eee648c08784a2406dcf811f1e9277e4ef80554fa5291797191bf91ce0f96e7a3bc -LLVM.v12.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/21952446ed6d08da3149053fd65fd141 -LLVM.v12.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/6062afaf673d6b3e12aa49e7d610e0a88ccf2c32b35afeba0d5218fe069aaf976d322124a81d39cfa0eb10348c827ed490ebab608f0f700747929e3fc8c5fb72 -LLVM.v12.0.1+1.x86_64-apple-darwin.tar.gz/md5/553d3763c7218396219c28fd97175ebf -LLVM.v12.0.1+1.x86_64-apple-darwin.tar.gz/sha512/442faa329ce9f342dc578fd1e4cb85dac028435470bcd2c01bc760a9993483a97f2f0a12692f093ebae45e8735f056b1bf82c4b617d3f8e44bf88c9cdafe2e0c -LLVM.v12.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/md5/f6cc478bdc0f154c5fc86e7e414d9c29 -LLVM.v12.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/87c7cd3f1deaf59f0c561bf0abe85444751197258e48292b227e88967eed6b6931a0b216ad1c0de87d2177d334bd39991879afb6e344f0eeb48cfaa81a84f27a -LLVM.v12.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/md5/4afe3486963abae253b87db50f82b009 -LLVM.v12.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/73dbff82923beda019d95f21a7fe5a5329a8c10192452b6c5c434e31c16fea12e1312bc84d98107f66852ba91e04a07b4fe2d72c90ea391695613170d23bfeb0 -LLVM.v12.0.1+1.x86_64-linux-musl-cxx03.tar.gz/md5/9e47765fea0a6536338e5302ceadd3eb -LLVM.v12.0.1+1.x86_64-linux-musl-cxx03.tar.gz/sha512/458273965c259f8ba2bc51c155243ec0680416db890bb5fd065522d5ea56dbec7decad6b7d78423e8b43559a93aa8fdd2c50bb60ee2b9dd8a2a57acbdbb91e3d -LLVM.v12.0.1+1.x86_64-linux-musl-cxx11.tar.gz/md5/888133076beec923efb9b1bf75ee20f0 -LLVM.v12.0.1+1.x86_64-linux-musl-cxx11.tar.gz/sha512/a5d41b29edb84ecfcf816f453e5e9e3b3d1bf8dece26e8a7f7a5be779c64ffe8ff7a9489fbf182adb6995b690f1ab46eef0f4fc141db9dd7aea6c587f60d3feb -LLVM.v12.0.1+1.x86_64-unknown-freebsd.tar.gz/md5/b3693273e103304207675abf58421bf5 -LLVM.v12.0.1+1.x86_64-unknown-freebsd.tar.gz/sha512/1512658ef37618c0ba7f5101fe2c052bfd7106d693b8a9a42872af70c2bfc829d457435d929848ca0fbada9b25795dcba97940a53d31ab0530fc33ee4c1cff27 -LLVM.v12.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/4408a5c31c70034be0037109a4627b2f -LLVM.v12.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/dc8f676a424966358569a0704b8cfe6bd57bfa305cd031f7b95326b44e4660f323d3e4f8bc819d3611a2d54750c25c23d36925dc784020f4a95da21ccf3ba66f -LLVM.v12.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/9dd5dc1e19c67f762619da4ae95e485b -LLVM.v12.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/c7abb84172ad54edc79926b284a04799582920a2239919cf0f0b5688529dd0d2d271766456b6a354ec1ea7ee24e73362e0043e4a6d2e8648203fd2996fb8c3a0 -LLVM_assert.v12.0.1+1.aarch64-apple-darwin.tar.gz/md5/1532fd99bc07f83e49fac41c086a9c52 -LLVM_assert.v12.0.1+1.aarch64-apple-darwin.tar.gz/sha512/91fa0df20486433b1a9e2117a75c7308996c8bb7fa22b35839de3565c0513884f8a47b939c8fa11675f980a2013b0a1a8d70a46da163e62cc80a31cc27c9b5e0 -LLVM_assert.v12.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/md5/06a0f3b6d142096db17c25fdef40bf23 -LLVM_assert.v12.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/760966f26b4b5541062c2d2d0a944d5e5905ca8a6352323fa52019a3579408ca7b45b82b3aa286c1856674a08bfc06dbc1a76ddc9774630616a002a92eacd9a0 -LLVM_assert.v12.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/md5/8b48d079f7fb48ab33d50fe003502ee4 -LLVM_assert.v12.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/6e3c64b9e3bdc66017435ae349fe839062f5ede43d332719c99068268c12990d2e907f2f8f1a7437f402b41efbf640f5fb85ee0515e8274b657858db3066b51a -LLVM_assert.v12.0.1+1.aarch64-linux-musl-cxx03.tar.gz/md5/23d54e9f3b917152d3dda0d97c6a7ba0 -LLVM_assert.v12.0.1+1.aarch64-linux-musl-cxx03.tar.gz/sha512/23663d9e2ceda43786e2d0389fb511c5678cd9beaab587dca35ade7dacbb5d1baa188055887d8ac51a1c103d61709622c305aeac51632d7faa270cf100c266c9 -LLVM_assert.v12.0.1+1.aarch64-linux-musl-cxx11.tar.gz/md5/cd9c64434db8f38ee231c8571b100b40 -LLVM_assert.v12.0.1+1.aarch64-linux-musl-cxx11.tar.gz/sha512/a6ab28865c21e4e20ed749ce295512b0932bda5f4dc1f48d8e8451e028e90e1af0dae95f2e37a3dfed80af8dfc848d16571377f88ace836bfb1ee169cba45735 -LLVM_assert.v12.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/3de76adada774f7a970cf125edd9c019 -LLVM_assert.v12.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/74ef625ce9d5e53b5a8284ed54bd8bde767f69865172e9ceeca3be89eceaedb13610ac0059756beea117342f2d22d5f45dc1c9350c13220fd1edbaa96d42ac09 -LLVM_assert.v12.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/7265f8c2cfe26a8ee46d5fdbb0f9a919 -LLVM_assert.v12.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/5d3d38456669873295360f6e9546cf075f5d336a47890065f8af548a1a42a0f1e69377090837837d09500ff0218297aa3e6880c76c869ed8fffac03e3a1a8ca1 -LLVM_assert.v12.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/3edd4e115e0ac7b246122e3f3241daa3 -LLVM_assert.v12.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/7932e1721f660ce0a9a63a9f7fabf96aa67043ef2e79bf97435f0812b664197b3e91e56d00914c7077010bef1cf76f745ef0e96025048c063831c48c621b4ccd -LLVM_assert.v12.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/f483c8a2cf09d60b0f9930eeba0d90d3 -LLVM_assert.v12.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/4fe9b2bb7a96029eb48f51e013e4c7851fc74c077e769e71dcf3dfcbf8fb3f07c5c5a7d83ea13a92dfc3798c921f0586f6f0582b532f9f4390863cec00f6b123 -LLVM_assert.v12.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/2dc56ba4acbbc21471e884a4e1df0e02 -LLVM_assert.v12.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/d358ff5b842cdcdd3a361a0a311ab543fe02d60814eb8d782bf6dc4be31f086540c9d896517f187d1e448a8db8cdea52f1dde1082e073f567946ae4a91818239 -LLVM_assert.v12.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/b67bdd6cd66e9a62ae116f19906f671c -LLVM_assert.v12.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/f0d76f3fc106f7b80abf05951b6e65b6e58fb5329a3aa7bddace6294349a7d40d6c4ac17b7f15130f5a17f29994c16914fcbe9f0aaeb85105e9b3016280e0599 -LLVM_assert.v12.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/c8b2757d1953ef7dd50e5113b27cb85b -LLVM_assert.v12.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/8c40d3bc693f89ef343e0291ce1b39e27d2904f50f3f8a9cc446b57d457044b836ad66db0090d4542a06956661bcf591b5f2a81cf173b18e935b8f4aa29453c4 -LLVM_assert.v12.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/82181bf38bd349da6bd7aef59963a81e -LLVM_assert.v12.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/a4c3265276294f5ba3ef12f67e50a87a7b3900b79a30d222290db5838719ff42a014f6979645e6184eac9c02b431c2bd805be9a7dc8919558278f39841c4438f -LLVM_assert.v12.0.1+1.i686-linux-gnu-cxx03.tar.gz/md5/8210028367f15561999a03a1c2a93fe9 -LLVM_assert.v12.0.1+1.i686-linux-gnu-cxx03.tar.gz/sha512/21a8ae9d4ae38a71cab0615638e243ed20d9870847129e79b6656cc1b008f0350a4946badd01857683f030bdd283a1ab134a867ed516366d73cbc1a2bf851bfb -LLVM_assert.v12.0.1+1.i686-linux-gnu-cxx11.tar.gz/md5/ae4a09c3de0a06accbefdd702eedc8d8 -LLVM_assert.v12.0.1+1.i686-linux-gnu-cxx11.tar.gz/sha512/54ed67f5d149803cbc4df25069eb85f820cf6bdefbea0094d7479c5a12a3be1bc6c8ac2d5ffe4f720c922409a1742fbb06f9d39291447a2d3574f312e62c40c0 -LLVM_assert.v12.0.1+1.i686-linux-musl-cxx03.tar.gz/md5/60d06f345e37ebf70ff1325e626fef8f -LLVM_assert.v12.0.1+1.i686-linux-musl-cxx03.tar.gz/sha512/ac8b5cc4f74491927b10b472ecae5300d7f5c77c5c0937fcdc6f02eade68c51556d19c8342f5ca3f25054271706e52e668a8573970cf42084b4049bf662bc929 -LLVM_assert.v12.0.1+1.i686-linux-musl-cxx11.tar.gz/md5/5882fc5c1be75524d966f9f3d098f03e -LLVM_assert.v12.0.1+1.i686-linux-musl-cxx11.tar.gz/sha512/5889203a22709bff28143f8c2da4566db9cdc38a721e32385d5ccb0c4846cd5e7952f7c963b27bdc9400c4ec28adb6f9d86701badc57721a0b57e3962c7b2814 -LLVM_assert.v12.0.1+1.i686-w64-mingw32-cxx03.tar.gz/md5/b4595b311fcaf548261f4116a11a100f -LLVM_assert.v12.0.1+1.i686-w64-mingw32-cxx03.tar.gz/sha512/db1b216449476a9f0c9d70085006fe63ae9443e3e5d1d7506e49f8ccf3d16a1025c0ef381c76d96ea7c715bb5b47eb7a2c97c94324f3f631df21dfb66bd641d3 -LLVM_assert.v12.0.1+1.i686-w64-mingw32-cxx11.tar.gz/md5/a78cb93cf5803279b436829f2ed5c220 -LLVM_assert.v12.0.1+1.i686-w64-mingw32-cxx11.tar.gz/sha512/c202e493e31cefdab942f011a8d7878b53bb786b7ff00c0d543600f8b8036a651672bc5ae9d151093f464a4dd9f47e17c03c4b5f6423961976cd711806313eb9 -LLVM_assert.v12.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/34c229bdc65eed979a44a98acaf9e1de -LLVM_assert.v12.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/d5f9e20b70f8a8fd31af2f56602d8478df09e174419fa79497b3c8340d2d0443e895121aefd343dad100074e951b594a328936caadd8a5fc0f15b7081f45a850 -LLVM_assert.v12.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/ec8946388b42bac6ee3dc0b33faf328a -LLVM_assert.v12.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/8b149ee3f604ca591cba6d4fcd4fb79ebbab83a0f91700547b55d4096f8c8c640bbb89b75b5eae83092b8ca4f5cf328c85ed60057a35595ad057801321f88333 -LLVM_assert.v12.0.1+1.x86_64-apple-darwin.tar.gz/md5/cc21b6f29016a2469cb6d4a27b7d8ef8 -LLVM_assert.v12.0.1+1.x86_64-apple-darwin.tar.gz/sha512/1be370f3bd31fec800cb4b2c013e419d33ef40a5c5653f2a206b154fb990517a4006f51f8809214e01355cd82e35f18a7c7954378bd264d9d76212ed9bbaba37 -LLVM_assert.v12.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/md5/45e18cccb9c58a6733c91e767e2ae372 -LLVM_assert.v12.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/8fd9c0b7d1b33696ddbdfc214153c790fe238354c5d9808953c02bf8da3671454f41c04edbc2e011896334663ef7c3b9d04a2e9d8e053a9579d26692962ba4cf -LLVM_assert.v12.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/md5/96cb426cd97eb637d7142235d8bfaa8c -LLVM_assert.v12.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/ca9ad66500b7729e99484d20085187e33efdf88f44012f72b06fa0194c16907583670c07e5cc2fb5468eaca4eead5676216a57d49897d622d1dca252b84661cd -LLVM_assert.v12.0.1+1.x86_64-linux-musl-cxx03.tar.gz/md5/6a73eeeeec0ce67efeeb9bf17fde8e5a -LLVM_assert.v12.0.1+1.x86_64-linux-musl-cxx03.tar.gz/sha512/a9c633eb042108b09fe580f39afa1560f2c4322e2eab88603be449c6f45d5a55a6e03e6ac63291152fb1e0934cefdc86cf61ccb5ea96a853ecb2cf5cb9d0811f -LLVM_assert.v12.0.1+1.x86_64-linux-musl-cxx11.tar.gz/md5/41eccb5971a66fa0680d09f1299361ac -LLVM_assert.v12.0.1+1.x86_64-linux-musl-cxx11.tar.gz/sha512/34a90c54d6388cdd6670aa1a42534df7e27a9ecee45e416bb44a32eca5bc834520c928891ae6dac3389fa7135c318f9a2460fb85abfb9ce8f3f531a8176a0d81 -LLVM_assert.v12.0.1+1.x86_64-unknown-freebsd.tar.gz/md5/2036ba9fbd0ce221f03dab3b3d3b3ac2 -LLVM_assert.v12.0.1+1.x86_64-unknown-freebsd.tar.gz/sha512/b0bafa3e841f487b5c8e17dd1da097b5ec2ccdce4e6e3348f764b7d8597d940dcb9f293eb4ecae1d8ac89021b3a33ca4ecdfd126c4ced3571447972a7aadd54b -LLVM_assert.v12.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/081bd2b00b3e82babd52a4ec6352d1d1 -LLVM_assert.v12.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/b4a628c9a6f0b614a3a51ef37eeea34e6d92ca33cf11f5a1ab0f30079faad95a247b832c4b13150fa0a594333105d80c0b71e05a651fa3ec816dae92582debf6 -LLVM_assert.v12.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/5e52a437c11b7479af270a7e3341eece -LLVM_assert.v12.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/2b168d7a2b725adcac27beaac70091a6cd48a2487a7479a3ea6ae043529d7bb193065e0b8a41e1dc2a8d2a62ed0f1da2cc8fbad48d357f1ce4619f9b62560e71 -libLLVM.v12.0.1+2.aarch64-apple-darwin.tar.gz/md5/e84ed662b26fe049a4fbb7bc3b9fed4d -libLLVM.v12.0.1+2.aarch64-apple-darwin.tar.gz/sha512/c9895f85013b5862bab1e1d3efefc623d3724262bba4396cf8e91967bb28ffcff50af4345e89e4b45482b8f417921fe2a664d2f88a73b2a407766acbcdbdc307 -libLLVM.v12.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/md5/b2d525ad4d5556971cbd23fabdf74eba -libLLVM.v12.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/sha512/f5b6b7d2579bb6066ca891274d812a84ce2188826a697726e6770f0148c0896df196e05527b532b83db36dc5086d9f2d8362763f646c6469918e5eae5f5e1330 -libLLVM.v12.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/md5/7466406ed23a40ab8fb19199cbae753a -libLLVM.v12.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/sha512/02d3bbf93f89bf370556f1ede4315cf7cbd285a88c5998867a49c5a78acf5082557e426fc8f721ec3cc6d42dc43aebc9f78106b8d306d04604ed0cc4a06dd712 -libLLVM.v12.0.1+2.aarch64-linux-musl-cxx03.tar.gz/md5/bd30e8f2f477efb559989e63696114cd -libLLVM.v12.0.1+2.aarch64-linux-musl-cxx03.tar.gz/sha512/5a1c5e0779dc0e1b001192b5ca7a5b92cd9b3b98d992743b981db7052f9c5316fe7126e70da9f116cf8524c46756dbdcb3de4833d4de28adc3c4373811ab1fbf -libLLVM.v12.0.1+2.aarch64-linux-musl-cxx11.tar.gz/md5/1364ca3c87d7009a15ffc0b89883bcaa -libLLVM.v12.0.1+2.aarch64-linux-musl-cxx11.tar.gz/sha512/4cc5d4065fe565b3c93debe38fa6ea7895c769917a048023526387f349e087d1ab011ea92f046e690be262a8fb4720840186af802e790f6900d9ab38369d3c23 -libLLVM.v12.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/e778315d291293c33f7546a1e1afcbfa -libLLVM.v12.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/a95d701ff6eeaafb65d60e468c928a1a3a4014a9f880a9d78381b9cc71e7696f37ff306fb132b987ce3e49c89fa7846a29617b1ebf1e35a86cb04dcf926749ca -libLLVM.v12.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/f64ae7f5a6a73897e010beff3ae5ee2c -libLLVM.v12.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/2b40ee947aecd6b9485eeaf57d73ebb0e7fd916bca3a6da4784918a9b0da31833ec75f69bff48c858f46591b99130f8fdd03d473d716460438dca7e9a188089d -libLLVM.v12.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/md5/7c15ee1f6fa63cdca01ca184a2777533 -libLLVM.v12.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/6a2cba3952321aaba814c4b14d12e8d50d46d91afb3d927ff368b0e3370259091dc5a3970dc4b24c2f9525accd671dcbc89f416ff520c215d3090aeacaac47e0 -libLLVM.v12.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/md5/3e8413007f738730ce99f7ed866ce821 -libLLVM.v12.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/4db901b4e4c15fef476511427412834a300fb0c2d634d1df2f7ba73c8b780324fd135a26d97fe9f27f1e3cf59f6f060a41d387267aa450726a224e77e8224064 -libLLVM.v12.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/c06c54bc2eae6a6d5c71e5f2005e8bc2 -libLLVM.v12.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/1c0f537166a4bd6f37e6a61aea463ee5e44e149d3d8afdc7487baee418ac740a6e58f441dbb20d750cf51df91b17d66c6a1880e164fb89db027fdb217762fdb4 -libLLVM.v12.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/358b89876a8f100dc7d48e2f01d87c38 -libLLVM.v12.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/4a3032531bc24eff5ba37b3456a80933a02d0b7d3569c744ead8abc5bd4c637efffc2967c42ee851d33d22ebcd4a44a397b38e68e50dd947a2b4dc97076073c4 -libLLVM.v12.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/md5/6d2ed7cd5510617fbb5b1ecf58078579 -libLLVM.v12.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/30cc79d1d916119aaf86c9f3aed14851f76a254e2c18765bc03c3864f573ace7d801525ca9b484c80918781b84f1ad886d0f20b9b8c6035282ee3d7a5561e8e0 -libLLVM.v12.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/md5/8af32855811582f19fc3c1a20e8d060f -libLLVM.v12.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/3a91ffc28f496f9e1b62f55b997db0a0a85fdc33c1d2931715c74762213e234b18794bc94df56f1713fcaa63b3c3ecad0b6652dc0f896226f8eb6db17cc9138f -libLLVM.v12.0.1+2.i686-linux-gnu-cxx03.tar.gz/md5/08a14f781d94581fa507ed14df58e0ce -libLLVM.v12.0.1+2.i686-linux-gnu-cxx03.tar.gz/sha512/7c6b6939d921c0151bc4c658d42076fb5d4c8d1acb80efeff632dee90e627acac5ae08b0186f7a56be638cd2eef0e92167dc6357ff31faf141b204441972dc67 -libLLVM.v12.0.1+2.i686-linux-gnu-cxx11.tar.gz/md5/5621acd8be3be7f43edb56438ab20507 -libLLVM.v12.0.1+2.i686-linux-gnu-cxx11.tar.gz/sha512/9d14ccd9ab4d43cb0b440720c61393a878a3c12f97b1ed001012d7dc7c38e63936db831208746053bb8ab07a30d8e23ac9ef60934a099180fbb777fb879a7e8e -libLLVM.v12.0.1+2.i686-linux-musl-cxx03.tar.gz/md5/529a66f76db2feea55930bd063d4339a -libLLVM.v12.0.1+2.i686-linux-musl-cxx03.tar.gz/sha512/f0a85adcd00cdaa0c01a5535827fa0999ff9dbc46e6da7e77a50ca8c3d927980f673ffdb6ecddbf745bfe64c5c474883a83102b3899bb29a5ab735bf97c3dc38 -libLLVM.v12.0.1+2.i686-linux-musl-cxx11.tar.gz/md5/c7a60b1307f14b14eb268931266ca05e -libLLVM.v12.0.1+2.i686-linux-musl-cxx11.tar.gz/sha512/2c3f2c45367b54dbda1042915b87518fd71a88a643d98c9c565a62d6064cdf4af97052da2324f3851207e888c74f0f6dabe355d60d9a5bb03fe2d7563f2be622 -libLLVM.v12.0.1+2.i686-w64-mingw32-cxx03.tar.gz/md5/d9b5f572efd17c82be56c9f63c0026be -libLLVM.v12.0.1+2.i686-w64-mingw32-cxx03.tar.gz/sha512/8ac2988c5c25ce388686f7a0e10077380003f741721683ea7ebd900f0bdf4dc9915c7d104b831e5947858e87031024c4d4a4933c255bf5b0dd1ce91109553964 -libLLVM.v12.0.1+2.i686-w64-mingw32-cxx11.tar.gz/md5/bc1c9e9ad8da3e797e877b63635080a0 -libLLVM.v12.0.1+2.i686-w64-mingw32-cxx11.tar.gz/sha512/c1f63fa46ebbe1cc6d7dfc2563025a0e27f55e0ea446afc51ad595d5d75bf12b5efa6330df8dc61828915b1f041809170303ea0fdb7af92d5d64830d799e1cfc -libLLVM.v12.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/md5/a60dd82c5a2517f03f435fe1b266b68b -libLLVM.v12.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/cb85c36fd9f6830a5bf903c3390a6ad62e0eaa8da29f61ef4e0e6ac1da1f0298916b17b0835d2f8b21ae06dc8227a94e637dd4bcfca28396f9867331e95387d3 -libLLVM.v12.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/md5/00bfd340021d82f49f154e6e4136caf2 -libLLVM.v12.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/762c548ab257451fc4e818d2cf2905ee3c942791c5bdd67714918bb050ff98a49a0ef97c78293e2f43f00d02b3ddbd786c2b2427038b5528931a6808e14b01a6 -libLLVM.v12.0.1+2.x86_64-apple-darwin.tar.gz/md5/a127dd2c0ba04be06bf57e1354005e6f -libLLVM.v12.0.1+2.x86_64-apple-darwin.tar.gz/sha512/548efeaf3bdbf04c83d989c2acd700271b2e42b796f7125ec5a13c1467b7453221acbafe94a19d657f78c18a24d3e9dd9310224aca3c24615432a8ebb5b49b52 -libLLVM.v12.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/md5/a7ad4d444fe1e9bc97bd8189f93fd412 -libLLVM.v12.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/sha512/63895f2415c2edf6640d9f3ad213d501d0b27a817f8e29bcc2df3fb3a836c11bd8673fec863c197ee202764517dd041150a27bb4a077797ffd9b637f1db65055 -libLLVM.v12.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/md5/e5f920cd744b876a9aea1522b7b6bac8 -libLLVM.v12.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/sha512/1a41b2d48601dc6c1da0249c60c4ed6dd93c23c0dd0b400d438ead4264665318a8eca0a2c8d05f3b9bae96af28f621fb249f9463e4b9cf9e75c9a68db83725bc -libLLVM.v12.0.1+2.x86_64-linux-musl-cxx03.tar.gz/md5/37dc7ca066e4578419ec543aaef7c696 -libLLVM.v12.0.1+2.x86_64-linux-musl-cxx03.tar.gz/sha512/20975d9eb03cdd8edfdf3df345a6b54b70f14d1fe7af5f8fce048901f093ab39b6b7100885b9e0a7c4ca7512e5f0d0386c1ab6ca4b24978b89d4e8c67375c0b0 -libLLVM.v12.0.1+2.x86_64-linux-musl-cxx11.tar.gz/md5/81dd7446e3704587c23785f214761088 -libLLVM.v12.0.1+2.x86_64-linux-musl-cxx11.tar.gz/sha512/852f7fafd0bc05293c40b0fa31df7048b20aa22375c75d3e2368f2e73770c4a7f5b92c89e5f453e3240ced7d703aacbb03d82931f4bf60091ebce44f2d8af8b2 -libLLVM.v12.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/b650e268bb01184d45f823f74180ce3f -libLLVM.v12.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/226b94d2dbfa21c93d2085f9574c2d4690b7b2f5a12adc6dd92f24dd49c40277aa99eabf3e0b605ca03b598838c408d5dcec42314cc5428706144d12fa3729d7 -libLLVM.v12.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/7f688f4d9e7c810a3aee2f5913ac6a75 -libLLVM.v12.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/1f228e6b53cc4f99190f3bfac6bee626836d09cc8990112f45d4441d9d21575d42c51f5f020db877ce0f889a829a9ba9a20263dbadde733243bdbe7211b125a6 -libLLVM.v12.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/ebcc454920e6558905137a05f88ead06 -libLLVM.v12.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/49d8319c75c2e32cac3fb57a0807cc14b9c9143d64eabfd00d463c0165bd6bd43d9a21c05fb20e9aa54951712592ebc55826033bb28818579d587159568dd67f -libLLVM_assert.v12.0.1+2.aarch64-apple-darwin.tar.gz/md5/0aacf9dbd485ee4a81c0f6e37a1863e4 -libLLVM_assert.v12.0.1+2.aarch64-apple-darwin.tar.gz/sha512/f444a53b824af2684a520a1d8f560f3a6d4c05a94176a9ebfc449b0128ec65e1cf6f1a9bb09c8848b5348f9cfb65d693baaf354598d41214067876135423f179 -libLLVM_assert.v12.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/md5/f631cd0006e4efd4af18d0bd5de42f47 -libLLVM_assert.v12.0.1+2.aarch64-linux-gnu-cxx03.tar.gz/sha512/35de8d97f3d5aebf2810e3fc3dd0267998b1e1510ca9b56d17a12e74e0308f84624278a8425f6b1a099b3f71f739841d0b2a662488a13fd3e239afef3ceb4151 -libLLVM_assert.v12.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/md5/5e776c9d73c784c9b004c114dee178b9 -libLLVM_assert.v12.0.1+2.aarch64-linux-gnu-cxx11.tar.gz/sha512/c04e049cfea7b896bc8be186fc0ed6699e2b04dbd628e360d28e3d42bd4eb947f7bd5ae1bfbc6db69bf5a49e1adf64c9d2409e2c2b4aa0afc7f16ae46fc3f4ce -libLLVM_assert.v12.0.1+2.aarch64-linux-musl-cxx03.tar.gz/md5/d55a2fd982192d4eeae0e875e43acc33 -libLLVM_assert.v12.0.1+2.aarch64-linux-musl-cxx03.tar.gz/sha512/46998d556f8f194915c0395d1d380da7531b4b584b7f177cc5eef320b472345203cc5bd2f20aaff5b2eccf1014b1c470bfcd5a903419567534e13fb14f634707 -libLLVM_assert.v12.0.1+2.aarch64-linux-musl-cxx11.tar.gz/md5/8ae807f87a98e6234931aef5f51e7934 -libLLVM_assert.v12.0.1+2.aarch64-linux-musl-cxx11.tar.gz/sha512/17d14df91e85f1fc82b6b5c1e2f4bc02d43ef87842c094f0962657feedc4286721ea1e7e5eb4846ecea8e9ed0fd1177c1967f0776811067835b3927d0d6c4c1d -libLLVM_assert.v12.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/a4b074177f30c5a0dc26fd163378b81c -libLLVM_assert.v12.0.1+2.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/7de6dc154218f70247eea9eb0f20e64964a9449217fed5d791ff7e391364bf0bf8831463cc455c6db6e7748fb34768e2f607eedc6ae7707012bf208f04b3b42b -libLLVM_assert.v12.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/727ea2bb2244dd349ffb9f84b47755e5 -libLLVM_assert.v12.0.1+2.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/5bad3572cb68363e430388824472b8997c308db0abdfbac59bcaa1a2d32a6d82007e00340ccde75f9431f69ab9d7c6e66f585fdb1d99178d9292a52b90db9780 -libLLVM_assert.v12.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/md5/44f4e1eb3eb99baaddf5ac2f7f0d4126 -libLLVM_assert.v12.0.1+2.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/19f454f13ffdf38e1a7a456f19ac3744dc8642c7ca1ce849663dc7f832b32847033f12814000d1e131b01d1b247cef2ca32cdbbe99f4e6bc3db2766960b72ca0 -libLLVM_assert.v12.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/md5/757d03ac4d8409d9b8c12fe786e60994 -libLLVM_assert.v12.0.1+2.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/f204c3c1068b544294fa3b0a761c446acf1761c50f3ecd3b8c9d82c0a998165c8deda34cea12518cf6c349cb8f86122ccd834b7c37cf06745062336bccc8268f -libLLVM_assert.v12.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/0cd8f5a515742454145f1708459a9f3e -libLLVM_assert.v12.0.1+2.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/a9e3c2f93f82734211480429813e93ea798a4c99bf120c6a5631e70b1dc4e177d81fb21a21afe9f6426a5070868459219f10dc8839fe8e85fdf52af09eb446c1 -libLLVM_assert.v12.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/c8ad8ea621ab3ee9d829e6ac25ac5868 -libLLVM_assert.v12.0.1+2.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/7115fab12bdcfe7c77e607eff6bb79da7b4cd106f57b43fb5c0a48cf1b236eaa5c9f39674e8664e12792ac48c3fe5b4b4c55911c244a36d0de4aafa54c67b86d -libLLVM_assert.v12.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/md5/aab34b69b28e15182ef32b0ae11ddbb1 -libLLVM_assert.v12.0.1+2.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d6c0fe996e678653636258781a142f67214b29afa7ff116626aad3a51013b1452d5f9920fe97e1f10a1112322e3e2c0cf03ec0ad9c737f9839dd0a6cfe0d39f1 -libLLVM_assert.v12.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/md5/a6843afc8f36c9b1572d38e1f5d1e56b -libLLVM_assert.v12.0.1+2.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/720701e8af8dfc1a5056ba109e39420f0a9a22ea0fc5bbcc373ba12640b9f20170041bb1c562b9849a4f77280104221334422340081d0333119cce80a2cd6c43 -libLLVM_assert.v12.0.1+2.i686-linux-gnu-cxx03.tar.gz/md5/abdde94e8b14e9096a76d8928e4fc64b -libLLVM_assert.v12.0.1+2.i686-linux-gnu-cxx03.tar.gz/sha512/36f2ce89027ea1d55a9c4becd37756fab256d08d964c2a1e45f71c97b753573d8fd57af4a7104774c176a0bcf7114a96a5a14ed11b7693f74348bce9036f3ff3 -libLLVM_assert.v12.0.1+2.i686-linux-gnu-cxx11.tar.gz/md5/c443ae1c885cf6c3ca7cf7c99ee07df0 -libLLVM_assert.v12.0.1+2.i686-linux-gnu-cxx11.tar.gz/sha512/d13ce059757df382f00ea55972218533513acdb288dec1bdcbc7301e3702bbb62781f3431c2f5e452f42ea370ad6dc64da45094f5abba347b73c4b918432bb4b -libLLVM_assert.v12.0.1+2.i686-linux-musl-cxx03.tar.gz/md5/b71dcf91f2db6a9120018d211ca3ac11 -libLLVM_assert.v12.0.1+2.i686-linux-musl-cxx03.tar.gz/sha512/40c0953a031d208e830b5ca350fc9900a9490d2567fc1bcdc4d5106569987d335e81ae13ceb0b7085a7b2245b4a92af3828fed8b8f1a9dee63482c2ac29602d3 -libLLVM_assert.v12.0.1+2.i686-linux-musl-cxx11.tar.gz/md5/0eedb793368d995736c7a19ced95271e -libLLVM_assert.v12.0.1+2.i686-linux-musl-cxx11.tar.gz/sha512/9c4650aadd1f6e6337b36e64d5d6b02bf25492c9b7f709f8a2354aaaee89d297574f1ebe4b69a53a62a6661e4abe30e342bcc14b4d54b82715f0931151c9abae -libLLVM_assert.v12.0.1+2.i686-w64-mingw32-cxx03.tar.gz/md5/2f618e39d477e17cc281a82bd220c002 -libLLVM_assert.v12.0.1+2.i686-w64-mingw32-cxx03.tar.gz/sha512/eba547abc168516a6a36ed47cf4e52590e2e6baac508ee56bf591d25ca4c3f821aa3b089a363008113a28e0fa94509332c62e33a8adb743e9cdaf2101cf8230f -libLLVM_assert.v12.0.1+2.i686-w64-mingw32-cxx11.tar.gz/md5/df0f1201918edbfeaff9f2909fabdfed -libLLVM_assert.v12.0.1+2.i686-w64-mingw32-cxx11.tar.gz/sha512/e461d214af7ddcbc19d276e4879f7db1db1cf06d9fb5277541ea5a06b055e2ccf3772faaa4500603e6dd4c476495e45705aa80907f8c994f8ac9d5b9000afbda -libLLVM_assert.v12.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/md5/2af2e44f362c547ebc6bb41569e25545 -libLLVM_assert.v12.0.1+2.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/c93cd92943d0348be9750de935b1247995b191c0bc622841cc46a109d65f86b953181e2f79e303afca4ba3d89bd2f9e794e89bb986e5de22a8c176d4df8ad736 -libLLVM_assert.v12.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/md5/62ca84f8d1311c577d33443ba7d3cf92 -libLLVM_assert.v12.0.1+2.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/15af332615ad7323d05c461010cbf701e03faf2e1dfde54f9f8fec5f19c7999765b0381b8d19b3e0686bbd5321c17e2620db328a9cba0cf871da66ac0e210011 -libLLVM_assert.v12.0.1+2.x86_64-apple-darwin.tar.gz/md5/767278c81a749aa8695e29cf347ad28e -libLLVM_assert.v12.0.1+2.x86_64-apple-darwin.tar.gz/sha512/4e855687e68b6e557f8b5525629535c1fd581d386e7b65eb78ccb59d594219d1bca39caf3a9c2cb2a1ccdd0a25f88211129b5415af4832fc590da14d21db2c40 -libLLVM_assert.v12.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/md5/8deb25fdc40604c146dc016e32453431 -libLLVM_assert.v12.0.1+2.x86_64-linux-gnu-cxx03.tar.gz/sha512/802e32fe0f6041e3c7071d6e60ccced09dc5a7e70f8cce610c8847abf4bf00d0d5ab3796728fc67d34a0c363a904bbb56f5c50331b39d3ed857fd412eea42f05 -libLLVM_assert.v12.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/md5/e564f95954fbd421a971ce4444283d7e -libLLVM_assert.v12.0.1+2.x86_64-linux-gnu-cxx11.tar.gz/sha512/8b5d9630f6ceb80966750ea3bcf4d990b561eae88c5e3a33058ce1345e52f0ba1189fab2553f3cf2f32b5e2b1f9b29ee0f5b836648feff4fd35dc695cda9f30c -libLLVM_assert.v12.0.1+2.x86_64-linux-musl-cxx03.tar.gz/md5/95c1417ea91753a2bb61b6285a3dacca -libLLVM_assert.v12.0.1+2.x86_64-linux-musl-cxx03.tar.gz/sha512/503c688989195be65bb0909d2f002934c32ffaedf8e87c706acc3157ca6ab7a6e42368c36698ef042f049cfb6bb6fdf9cca7d7ffdeb633f93e2b51ac1574c6f6 -libLLVM_assert.v12.0.1+2.x86_64-linux-musl-cxx11.tar.gz/md5/1e92666a295405e5fd1afc93c8bd35dd -libLLVM_assert.v12.0.1+2.x86_64-linux-musl-cxx11.tar.gz/sha512/6705ab4bd4b05bc77370aaffab4d2a638e92a8370394390d289c1fec2b453872739271d1c04058f7f4e0371c11ef3a55b43bceab7900af42b8af1f827f427a3c -libLLVM_assert.v12.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/03496b7e97a88944e0ec8a5ade21fccc -libLLVM_assert.v12.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/93c46aecf5792122bed5c266e2e66b898643b437017fd1d709e693eb862b90eb0741c6cc04c8f3065c377078c04f7b339e6d057daa3d94c94022212dfda48622 -libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/md5/21f09693ee068d6882c034890e71a158 -libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx03.tar.gz/sha512/cff5601bf70bfdce22cc416ea8ceb469a7e14c02d759ce505b52cd9f9f9579397a9fbb446749bd1e2c3dd7556d221949c0ff13892764d5e71efcb890cf5da40e -libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/md5/eae391563d980dd469071072c1ddcf47 -libLLVM_assert.v12.0.1+2.x86_64-w64-mingw32-cxx11.tar.gz/sha512/32cc745a2225f8fefd1d466d6ada7411c9ec2fd5454f79c393e38dec383c4e46ec183e9b8f8acabfaeaf8dd335a4a76fad28bdee0f056e0d314c572fab36fb0f +LLVM.v12.0.1+3.aarch64-apple-darwin.tar.gz/md5/030bb63a3b713d16f0ac3435c0a43e09 +LLVM.v12.0.1+3.aarch64-apple-darwin.tar.gz/sha512/db1bbf60acef681a8305fc0e4112d6833dc1ea700a1620e0bcd8d03df558dd4acf0581c6a7f11bafa09dcc96c49c8acc0b3d5d958a232ac389890fd9ad618b7c +LLVM.v12.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/fe34d2e02cee760c62f1f41fe47ae253 +LLVM.v12.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/66e825ff27e9dbbfa751c96484ff62335b5630e71278e4b10bb965ce4b5e73766a0ac5f50c2a5ed4383550220f45c5fc408a944f1948e0a7a2b4447893cc1d8d +LLVM.v12.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/85a6bbde762fafa2a1807852f56248d4 +LLVM.v12.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/0c6d130888eaff79b7d754a169330f7e8faa11d783953bc53822a29c312f60402bf151286f6f621ab08e6d25119f54becfceef6714e3a5aa388dcb0d2254332a +LLVM.v12.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/3d1eb8fd9704fefac898226b3d4ab97d +LLVM.v12.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/d0f1f76d408102dc2cbeb4ea14718e00b829c8a7f5d5673dca285025d123d2fc8d523729ff637339f32067347bc1e7a235fe209b9d7a997c642499094a2cbc86 +LLVM.v12.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/6369070026fc863a83ec0ffca0ee86f4 +LLVM.v12.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/7895fddea3a29073cf317699b44b84cdea93c30897da2b6adde23831d44414ef21f09a33107084eefb596bac114a40b13d6387820fe0a2b380ec657eebeea2e8 +LLVM.v12.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/56508e7869dfd808945120b5a821d076 +LLVM.v12.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/f55cfa6cb399bcba239e7669e0223ede9908204d3f7af880cf83f7e75eac3f33e0555d38c72a7dab8e5a0b69b9c829ebe045a9a5823561f2f8ecc34406d43d56 +LLVM.v12.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/254db0016b8f28e79637bc6fcb802b3e +LLVM.v12.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/c84b5ca1c0db254c567613748034a4be7682d96462abbb842bf64924b35f48a999a43feeacb3f4e2603eb343fc4dac3cc3fd6f30520c915236637bca8e8bd040 +LLVM.v12.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/6e0c7c26a2e4b3a740d13c2fa8a8ffb3 +LLVM.v12.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/78c214b5e8330663de05f376107778457a94df300660142ac5598b41aad52b7cf39de47b9fc7a589c90425e6adba41e1e816dbe41705897f2eafa060faae60cc +LLVM.v12.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/47349be8a91bcb4e9c02c6b3d1a48834 +LLVM.v12.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/9c6c0820c60de53512e8b0f35f6fca87d9bc96f37fcfae616fd49dc37f6f0ba46a5d9cf8fe61d2a6b3248c1add386cd850e0faf6049dbe4b399fe43f3e9ddd6a +LLVM.v12.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/0f192ef028db44efcdba51d82f263449 +LLVM.v12.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/65eed323640babaf50adb8274e1b69dc71132991d2e67523f52550267a4021dad159bbaf66ce94b7bc05b5b449440aa043025533d57d7c6e94d2d1c7b9b15450 +LLVM.v12.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/90bfc9c6cf1699b912dac03305c515f4 +LLVM.v12.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/ad3a2e3e6d6f699145e4752786ba807715c33312d86ac0f14b17d31ac252d0a99ace0238ae7cd5ca439c5a48ad9451fa8eab9efd0a954e6df96ed99612234812 +LLVM.v12.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/42a829237e9b00b53ecb4ab0c34ef1eb +LLVM.v12.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/8b7aa5e5da8bad8760ad43d647c7b2c0ff26282d79310c78661be43817bef03adfa5b0084f441571e74eb4733cb5fa088952563faabdd473e2f997aa06035913 +LLVM.v12.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/b60ffd48c020b1ac576d27cce13e03e3 +LLVM.v12.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/de804988c639dfab72a6850e7513340f0bd927f0e5ab0dc059f58967f7d296f71d84771533fbc5869a540c6d25b668f3f239f6ccbb7f6ccbce02bc978f457f73 +LLVM.v12.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/70922a7a3c7e140d603c419b89ff309e +LLVM.v12.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/340f438b091f88f637d86dae2494fcc2bbd874a61dec3b52a2a336328da650a787f310c5b53e52a6c0afd0b2821b44784451e3ecd6419a81f1159f345b4a31ac +LLVM.v12.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/0d3f5843efc9ff41ec26b0d2fe06d1d0 +LLVM.v12.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/6c7afe936a6fea6c546b86365649c5e3eaeabb676155b1de6a51040d3851bdf6a3cd9ac4b18ad4293e809cde6452adf6ce82dbe34e87dcb063dbf8e20e6e1848 +LLVM.v12.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/af24092be60361066596900ca710068c +LLVM.v12.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/73733c177e32cd04227b480974e9fb46f4c3aad294a024be971a2ca6b902c711449bc610947a4dfeff596f45f3b384d03b77478a9c552328be11282e6d58fd4a +LLVM.v12.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/423b80b7428ef930a9f1491544ab265c +LLVM.v12.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/050f92f6700289aea6cfcef16cf3dd74d6aa67fcb1dfab3d3c763d8079e3981277e1466910b5d292cd3be8abcafa683c4b6666bf8eeaf0ec239b970a2aea46d0 +LLVM.v12.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/f29d5c7daa02e68011359b4e833ee93f +LLVM.v12.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/647a861b043411ff0ee543d2e348a8a67d4287708444df16b61a184d42a03749ce31f3a1c3ba0854c30c1b94998e263f992a69b0989ce2bd83227aeb779bcb35 +LLVM.v12.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/3cea1896bf46e17788a7bf3cfcda1572 +LLVM.v12.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/d077a8cf530391fbaf7f7ff9866fc006ffe875c63a2b2757e5585cd96fcf50a71aa67bcde7f3d122286c978b91f69949542add4f94d18b36c18fd88dd9d14640 +LLVM.v12.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/52a64aae6d3502b6b6da316826a6f781 +LLVM.v12.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/ec631dc651f97d7c5406439f2c43c1975cb15903593c808749b419904ee19505e404cf6a2c2030928972bbdf3c135443978e6710b628549a52f18be4860447db +LLVM.v12.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/fd65e34e2fdbe1db1936bca6a60dceb9 +LLVM.v12.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/788efc06e2c48d409e3bfa3be1cbc52884c41884af409d90fb666ed2f8c0ddae2ff0e440a189d64db98919d8630dc6aecf033cef73cb363a2882dcd005e9fa58 +LLVM.v12.0.1+3.x86_64-apple-darwin.tar.gz/md5/114ce26c4df444bab96f990241ce9bed +LLVM.v12.0.1+3.x86_64-apple-darwin.tar.gz/sha512/fd3d929389c56574fb21ec1c0f587801f312da6938a09c6ca521a378c6e0b268157f4b712b335652033fabcea1baae376d26d52f54022c615fb0d23edc805d47 +LLVM.v12.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/ab03079efbe7d09f21b338810ce3eeae +LLVM.v12.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/804fb8b233f2b07f2485be6f9335b3a55e2c9905147f628f949dd12295c2f2fd8fd50b6a4a2332660430bf967402d9ad9adb8eab1990d548a6e5c6bab7afbf45 +LLVM.v12.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/d0990981455842c45be8d65d8d546ba1 +LLVM.v12.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/95394cc64bf53487c855179a8e415cfd6cf31165d8ddb42c00121212b37c1e2024c6183e3a52f6e251ffd153437b115a5601780530d8c97bd428b961d7b43196 +LLVM.v12.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/d5386c4593c7ab43b19d2a9606bf5832 +LLVM.v12.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/4413d5bddaa3b9e90c2e6913ce62046c2b6325f602c8e8922ef32c8f801ba258d1e4cc15e7865b5ca43ffaa9202e84d7f595959863dca8ab4a34bff4f4e228f8 +LLVM.v12.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/8ea5455eade726090f609be3150dfa60 +LLVM.v12.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/06499fbe80700ca5b9c935a24c5e12ed68a17aa8fc57b7b51cf6b35e9ad4866ed4c7cae60a9cf68c89bc662a7854e61e6d8e4580bc1e5f05f53e6943ad2c2dd0 +LLVM.v12.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/79e28ee303ac6b62a2573defe7465e50 +LLVM.v12.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/1b563fa34102d4354ef5703875bc4d3814dedce22891e1ec70f418af523a2dc759f10d1c063b571fc098660a0269cc92e72b6239d30098ff6bb0f190e3c3037e +LLVM.v12.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/5907621595ffb08e6e4b32662f864d04 +LLVM.v12.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/c28d2d41e97609f43b820f0702ab73d099a84e33e0dcc73f60e7d9d780ac14cbb041f508cf7948af7647086495e6704b49671ee32454309c57cca7275d3da3f2 +LLVM.v12.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/d1947f14710a789be153ac7dbaf07fd6 +LLVM.v12.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/a1872be87a399b2488fc71106c6deeaf76508efbf3a8149dabcd9bf704fdf365071b2c159f46834401c17c2a677dc3e94b877f759ba421a5f8fa44a9f6f41c01 +LLVM_assert.v12.0.1+3.aarch64-apple-darwin.tar.gz/md5/4552a6310882e53f4811c8c489cc606c +LLVM_assert.v12.0.1+3.aarch64-apple-darwin.tar.gz/sha512/ca06e15aa74aff65ddd860f4cc0277996f34411f88a83e8719233b9b4aaa23a2c8a1299215e44a55fa9810b9f762be896a41ac643791ac06fdd0fcafc98e7ee2 +LLVM_assert.v12.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/md5/b748609f646cb3764890a8dfb7e1bd8e +LLVM_assert.v12.0.1+3.aarch64-linux-gnu-cxx03.tar.gz/sha512/9ef7ee15bcc062f329951e90c743b3abd8ea522f7a1464a9e250483a6f087f3e74a70f7b0344fa882b2cd3e00af2b0f436789111885248b0ef0ce846123c84eb +LLVM_assert.v12.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/md5/63e23a25c16b1eee756cb5030a37a13f +LLVM_assert.v12.0.1+3.aarch64-linux-gnu-cxx11.tar.gz/sha512/08493eb6d8b3599f216417590775394cef147ddc4b4582c4176a39890084432c05bd1806256953310a0a18e6d3d76e498f75bbb8994af0b4e13b7e4144f60499 +LLVM_assert.v12.0.1+3.aarch64-linux-musl-cxx03.tar.gz/md5/46a0faaee1285bab78d8c3eae37172c6 +LLVM_assert.v12.0.1+3.aarch64-linux-musl-cxx03.tar.gz/sha512/110370eec758240e347d3ed749ed4ec2734f30887cf1ba433f88eb9ce86d5392fb566e41b8834a1dd802aad9c06ae2997050c4e67ac3d9d8bd02a5607cd155a7 +LLVM_assert.v12.0.1+3.aarch64-linux-musl-cxx11.tar.gz/md5/3118c11faac4a3a6ae28816620e1e5cf +LLVM_assert.v12.0.1+3.aarch64-linux-musl-cxx11.tar.gz/sha512/8659202d60c105e15f761417e5e234a9a28e3d430f76919a3a97b3468f82a83773fa82b71b388f9db427f64b37cb32850631e69541dad9e4bf3879aa9b259ae5 +LLVM_assert.v12.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/c85321f3bf4921332771f52f91bc1242 +LLVM_assert.v12.0.1+3.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/a364948840635cebd140d3392e1f13ce91e91ba3621b542ff8944fbf467aaeeebe3a2de29faf0a5a0704244f7befc2bacd27637aac8fa82027cddb158a279f22 +LLVM_assert.v12.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/8cf84c038afa0f88c433ef80de7fcf78 +LLVM_assert.v12.0.1+3.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/a212d9468bb65aa940bc80cd4e3bd325359997231a1d1b736cf3374c8eaabd1e542483a915b9b31dded4fc954e8969dad89a8d80af66e20030b3ec68ee910e44 +LLVM_assert.v12.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/md5/be16a49eae21f6cc64ebb702942fe056 +LLVM_assert.v12.0.1+3.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/4b3a8a5ffdb699267a8664e774dad3a3fc57459d2d5e91e58382ce0cb62bad43e6e6fd40bca70c0e09131a7a6c11106e14099efcbdb80100391a50db13d74a39 +LLVM_assert.v12.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/md5/24bc7545947c7849e4a682681963792e +LLVM_assert.v12.0.1+3.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/be3a91ea0c48dcca90d537db774fd02c1a7eed1e260c3b5e15d9cf1659dc7abae74375e85203dac9ffd218c69700b3ce2f411d01fb8c31380f0c662dad3ce8b2 +LLVM_assert.v12.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/b426daf1d4f60f22f4640a0a8cbe2c1b +LLVM_assert.v12.0.1+3.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/b7f1cb3611fe0b0e66904654e7afb7e1f122a25b17505eaf9000b3832924b8801166ffda3e9195ac30cf0dd97c74847418f25701169e561807bd638acb9f16f8 +LLVM_assert.v12.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/1027a5d4137f2454cc431b42a9a5669e +LLVM_assert.v12.0.1+3.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/96d3df07e31cb91dee4f179bf82e38c6c81de711a05aae69342d04f615e1f87cd3e51b977cd66603577a79b59485dc6253aebe55b75cac0016227d2b86c5a348 +LLVM_assert.v12.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/md5/63c82c7c3d0a641433c724409fb98a8a +LLVM_assert.v12.0.1+3.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/905404dcde1b59b6a43ec5bae571bb1c50d8571e5add5fe97d72dcfed48d825419bad03a5d54bf9c86387d97b1e01411ab6bc62be736aa944ca559317c7a036b +LLVM_assert.v12.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/md5/2135e5b0431edb042700f39ed23d277d +LLVM_assert.v12.0.1+3.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/415d81437863cb9b86d68e31c676c30e011af59c2399446d96b99adc9e928a5af346ecd26119fb9a170d2f89a7bd7abfbd07021ace5a4f2e8cab7abd5d158f7a +LLVM_assert.v12.0.1+3.i686-linux-gnu-cxx03.tar.gz/md5/bc45e5019e32802cc430c3e9b267e3ff +LLVM_assert.v12.0.1+3.i686-linux-gnu-cxx03.tar.gz/sha512/a84fd21fb29781b07ae20a7bcd3204fc48ed109d66318310d95fdf03633eeb02fd81d0ea9647502b0696940b8b03af790846a936d7fe9a0cfc906e6a8150d309 +LLVM_assert.v12.0.1+3.i686-linux-gnu-cxx11.tar.gz/md5/e30e5b78b50aeeb5f26b1c9825ebf82e +LLVM_assert.v12.0.1+3.i686-linux-gnu-cxx11.tar.gz/sha512/38e96b6b214bb731f339cd48387bcdad8efdce1be8e10e6b9762ffdc22c18938112a2f3886d60ab439ce0ed6c6b9f65553ea0316a46f373def02ee481cacb953 +LLVM_assert.v12.0.1+3.i686-linux-musl-cxx03.tar.gz/md5/33574d54af8ecaef67643f1d23c97a54 +LLVM_assert.v12.0.1+3.i686-linux-musl-cxx03.tar.gz/sha512/5bbeac360ea5fe8cd3f6d341463bac7aff8b173cc6e3c1566957c8f88e50e51197d094cdc6fdcf01437d0c4a0a9eadc912cab94084c9f549bd29d449b2d82981 +LLVM_assert.v12.0.1+3.i686-linux-musl-cxx11.tar.gz/md5/ba2480e263bc3c97d580686ddc0b3683 +LLVM_assert.v12.0.1+3.i686-linux-musl-cxx11.tar.gz/sha512/9c4ac694c45482f7a156a00e357fc966262f26e1dbfbce1c0812824c629f38bbda457d49e1952656993d0e7b8ac72dd56dbabef30c2192d42885aca0db419329 +LLVM_assert.v12.0.1+3.i686-w64-mingw32-cxx03.tar.gz/md5/11a8ffa4d3e4786bf68b810ae6f66369 +LLVM_assert.v12.0.1+3.i686-w64-mingw32-cxx03.tar.gz/sha512/dca1cf597ac3014f8e91b9049aab559b6648d9e6e143d926621f45ec0b949ed3527df017258645ce85556f3cc89e15ba92850e53977b94315041a4ae4788ab2c +LLVM_assert.v12.0.1+3.i686-w64-mingw32-cxx11.tar.gz/md5/af7db3b8fad4eedd384f79c87c24eefc +LLVM_assert.v12.0.1+3.i686-w64-mingw32-cxx11.tar.gz/sha512/ecce308df2f2beb782a3daec890e05f5231ae3f0d92ade72429f2c4b5e53d8003f72b4e580397c5199f1cfdbba31b9d1439cb7ee921a1b7480d16ad38a4f6ffe +LLVM_assert.v12.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/md5/207ece8c5dfb46a0fb8da91424a98e72 +LLVM_assert.v12.0.1+3.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/1a89cd456656933d341a742411d8439aea4968c94b23e42fb776690c82630e15fbaf9c3f71f4577377dd6b719a3f8e3c45d9b2e7887b15748f39d8c852943979 +LLVM_assert.v12.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/md5/557492c1ee401357e59412728bff6606 +LLVM_assert.v12.0.1+3.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/166376da0e6a53bd613f8029bccd1ed348a16226fee7bfeb2ea8682f3a919a243d54c08708bdd0bfed053383f5c9e53ccc494e92289d1418b9dfc7fbca3e0596 +LLVM_assert.v12.0.1+3.x86_64-apple-darwin.tar.gz/md5/789248a43777cac637c111c29f7bf455 +LLVM_assert.v12.0.1+3.x86_64-apple-darwin.tar.gz/sha512/6638ef4237961821cedb69b54993609274c10e9b8116b1a64e8cce68c6a09cda4e65f2661a5ea37a359e6bdde7e7b1055571434d852e6edb57f95fb7490b0036 +LLVM_assert.v12.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/md5/e9c6659bbb538ef970e9b678d2c0e382 +LLVM_assert.v12.0.1+3.x86_64-linux-gnu-cxx03.tar.gz/sha512/b167c002d394890b304ad245f644754c0077fed559bb0570001cb01bb14341d6f7807a1b231a12aba274a097ccf347fec2e87b5d86a21381685e27bffbfea9d7 +LLVM_assert.v12.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/md5/a19ade942624f4e0bd589419fd4a4a3d +LLVM_assert.v12.0.1+3.x86_64-linux-gnu-cxx11.tar.gz/sha512/a0e1376c598706dccb681acc13a4e653e2cc8d0a9ffbaab39fc242ca4a14bb24ad5579d0caa716f21de9b5cae365c1aaf9245d05364d5d9fbf5bd820585bc824 +LLVM_assert.v12.0.1+3.x86_64-linux-musl-cxx03.tar.gz/md5/8c9729ce6a72e13c43cd135437e2d4ed +LLVM_assert.v12.0.1+3.x86_64-linux-musl-cxx03.tar.gz/sha512/45cff53b9d7444ad50f3e6769b54d5de8ae971909839e8a96207671b6e693ab9583c4d28c9e892190e5826d8c571f746de6298e37dc308c5f79dbc4fc2f4342a +LLVM_assert.v12.0.1+3.x86_64-linux-musl-cxx11.tar.gz/md5/5ac2b72a7a51d90a1479b6bd09f1c584 +LLVM_assert.v12.0.1+3.x86_64-linux-musl-cxx11.tar.gz/sha512/1f64459828c02f76d4a03bf49157ee3e617cf39ffcb4cdadc74444eebd9485393751bfb2fc00b552a52cdfbe2a4a068e8c39ac7eda9744ee0f70159299e8fe25 +LLVM_assert.v12.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/2fe9735db03a1e3a86065c09e660b589 +LLVM_assert.v12.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/d846b78f90c3fda31e228b12c5444fc58a657b7c1a2cedcd2965ae798ce114039b81eb531327a0ee53a87822a2610b11f6a38c5e55fd3f26b37fff2fe6387972 +LLVM_assert.v12.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/md5/22fc04ad75e0ecc828b8a41f5aff6741 +LLVM_assert.v12.0.1+3.x86_64-w64-mingw32-cxx03.tar.gz/sha512/a78770fb2af0ebd4a020b9dcbbfc30b0f422b4d4c2d52e49714f1c3e67bccc492c2ef6e322326899586de45fc2628a36d3a86fba26672f1ac13c152f545725c5 +LLVM_assert.v12.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/md5/03f376024f9a8b757c148f23a09f0ffe +LLVM_assert.v12.0.1+3.x86_64-w64-mingw32-cxx11.tar.gz/sha512/8ef022894b6d488a93d38837a629ee11b6c6ee2962e7bfc8b169effb6ff7f949aa50b6282b212ca6b3e1cf8fd1c94f2ee4621619c5e1b842385758a07c42be43 +libLLVM.v12.0.1+4.aarch64-apple-darwin.tar.gz/md5/621f8bfbcbe5f9b7438803620be58eb0 +libLLVM.v12.0.1+4.aarch64-apple-darwin.tar.gz/sha512/9699c073dbbaa33b9d31fbca5d0ea6d7306d771462f257dce29d95e02bf6272ed3dc16049521ec4628967bf3bb86467b0eb659ca85c12d5c5c80b9a333d8b785 +libLLVM.v12.0.1+4.aarch64-linux-gnu-cxx03.tar.gz/md5/c06a14c4a509e1257ac2f15abd8e8003 +libLLVM.v12.0.1+4.aarch64-linux-gnu-cxx03.tar.gz/sha512/e410ce7602e7c167742f865963435c200321d8bb76bfb23c1239008b8c62660bba4735a3b6e0121127db7624d0ff209211b66ca2f57cc736bfc3177d68c1b22c +libLLVM.v12.0.1+4.aarch64-linux-gnu-cxx11.tar.gz/md5/c1c8af2f5c640d160283a4d2a54520c1 +libLLVM.v12.0.1+4.aarch64-linux-gnu-cxx11.tar.gz/sha512/e4fe03a8065358d30954a935307b5589afb8cd979b05d21c1d19efe6bea7b698bcff338c5fe9ff16c2eb03475414b4dce1dbfb513ce43ba7e82ad61c827969af +libLLVM.v12.0.1+4.aarch64-linux-musl-cxx03.tar.gz/md5/8ed77b634120fa18d2835470b1967948 +libLLVM.v12.0.1+4.aarch64-linux-musl-cxx03.tar.gz/sha512/11494d13f855a411a41faf64a59269d9fbe0a82cdc2ce48e435d3d6883e3e48dd8a1c157aa0de2545ef020f061271dadbf1988053d3a908a7e64f8efbda1f9e2 +libLLVM.v12.0.1+4.aarch64-linux-musl-cxx11.tar.gz/md5/a952dd78e79a3a1923d9cdc9836bc1e7 +libLLVM.v12.0.1+4.aarch64-linux-musl-cxx11.tar.gz/sha512/64281d032eef688af5ff9828564b1f919526129a7a8b3e14d39819763e65805eb64ddb9cd1c037c76b3fa4f9a31ff5116d5838d36ead33840dd0ef159400d46c +libLLVM.v12.0.1+4.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/0cf98dfeb06bbfe271d039c02e1f65a5 +libLLVM.v12.0.1+4.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/344f163964299d40c6124375d8ef825afd77616440f0bfa7888407c7ad4ab9b89b605dbb9a8fff78ee14b79fdb56102852e9243a77839902683b87094e808cc3 +libLLVM.v12.0.1+4.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/8d414f272c7c85806f231219dfb31601 +libLLVM.v12.0.1+4.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/4cd1d2b5fb8fab8f97fd409a7e444add73904b5db0ab590efe0c687d6b2a9e12cf3e2937c52b520ad95cfe88ca2ed5f565eb2dfd50be0dfa0e58f694ea456488 +libLLVM.v12.0.1+4.armv6l-linux-musleabihf-cxx03.tar.gz/md5/7d91435a2ad1e33f0c774437674573eb +libLLVM.v12.0.1+4.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/150a220b18f8afbda55a818bbe00f68a64c04f824fbe948c9a227f002d1fe3dbe7cf23f0ff1edb38b42085174f0f8f3a80f512924729ba44b11ee6d5d872b75f +libLLVM.v12.0.1+4.armv6l-linux-musleabihf-cxx11.tar.gz/md5/13ca171abf028cd207863967fe4472ca +libLLVM.v12.0.1+4.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/4d7a38de2a2d39f06bb37c3621f04ebe23769ccd9958d1235c940b5b12e94128ed0623e7b86a5d579582ec0b6b2191349306cbe1d6af8202e0932ec7609c829b +libLLVM.v12.0.1+4.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a7f2e34c93ec4bbecea33a22c64d889e +libLLVM.v12.0.1+4.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/18c0066daa48fbc87e9501e646e7b3ecf34e8778f159d9ad623950c7a87d27b2cd46a204d948223aa1fdd1c283f89fbaae9096a3b381f641450b4ad720b07738 +libLLVM.v12.0.1+4.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/84c827833c3d4a3ccee9e31634abd568 +libLLVM.v12.0.1+4.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/8aa13a464ff45402cf95b31b15ff410aa6986cc5328867f8b443b940e144eaf7491290c92177b2b3355f40accec3a27254978efb095e5a88be8f4096f2aa464c +libLLVM.v12.0.1+4.armv7l-linux-musleabihf-cxx03.tar.gz/md5/0f009e3e1496d6dba9b00a13c2b3f78b +libLLVM.v12.0.1+4.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/5f3115b2fcfb5e92c0cbfa1e9f22e62d6ae7ff8b8febd147fa01acfb52ac67a99f7b38df379374fc91506e5b2178ab4672788ee9e39776afe0172485c0585412 +libLLVM.v12.0.1+4.armv7l-linux-musleabihf-cxx11.tar.gz/md5/2fd2e1f3f61566f99d7532d423c345e1 +libLLVM.v12.0.1+4.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/2cded91fe2cf936e358204372002abf6b1b3dc4b19f7f858e8d240d7d5f401d28992df9bb06b342217588a2a0f59743e53bd763c5d20da7d6bd28e267a526e9f +libLLVM.v12.0.1+4.i686-linux-gnu-cxx03.tar.gz/md5/8f05950d76774eb69496c0405b7867d3 +libLLVM.v12.0.1+4.i686-linux-gnu-cxx03.tar.gz/sha512/7dabedad8408d7420112c26b34273e40f8a0407115a200dcb3e44865cc74a35102615c75819c5fc07e280e35f7391bd67b5a67db62d2aeaf46fa56005543e1fd +libLLVM.v12.0.1+4.i686-linux-gnu-cxx11.tar.gz/md5/faeb19a3c2ba3f960357d792e78367b4 +libLLVM.v12.0.1+4.i686-linux-gnu-cxx11.tar.gz/sha512/0629a2ff321f6c8e9cefbd40838dea3cd728fafeb2ae65c3feb2296922e07015a6c97161e16a9792bd4675c87f13ea9ad3295c343170ebc99eaf36a444580ada +libLLVM.v12.0.1+4.i686-linux-musl-cxx03.tar.gz/md5/ecd268fc164b119365262a7b576ed6c2 +libLLVM.v12.0.1+4.i686-linux-musl-cxx03.tar.gz/sha512/666978c259f5e7762a75f5fcf9ef0f480cd75d710c14a9e2dd2cf95522404f51e412934c9ffba644b5d065bf8d9e01fb4e8552be1fedd8e01b888de8ab7f30f2 +libLLVM.v12.0.1+4.i686-linux-musl-cxx11.tar.gz/md5/44f5b84a241ae43381fe63484599a7c0 +libLLVM.v12.0.1+4.i686-linux-musl-cxx11.tar.gz/sha512/feedcafc79c4d83908ffb06b4d4ae05273c92f2fd775511603af90a154a8be3b61f3d3998366c343b405a6e4365ebd540b29cfe6a3cea7deb843907bff277c27 +libLLVM.v12.0.1+4.i686-w64-mingw32-cxx03.tar.gz/md5/36476c00f600b9e3aa11e4ff3b2b737a +libLLVM.v12.0.1+4.i686-w64-mingw32-cxx03.tar.gz/sha512/8b85b80588a6fdddfc6ac52fb27e5fe337789ae82de86ac436aff05ee18d1771c43628fde7bfe9f4fabdb34cacdc198dc05c1f2c9c1b0ce18f244201a91c94b1 +libLLVM.v12.0.1+4.i686-w64-mingw32-cxx11.tar.gz/md5/c8594e76923ddb14e054b469b693b1e5 +libLLVM.v12.0.1+4.i686-w64-mingw32-cxx11.tar.gz/sha512/f846ff64003ec35b608798e4f31f404f0f228b20d0c8d499131ec62d0f3ac688c51a773149a9a3be65e8dedd0bc6ccd76a337ebe347f439290fbb35835aaab10 +libLLVM.v12.0.1+4.powerpc64le-linux-gnu-cxx03.tar.gz/md5/407e8dbbb31748898960b50b457f643f +libLLVM.v12.0.1+4.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/0acf0afe1686943c7c69e55b6419a32a071490fc104cac815aee9529c4dad60ef94617bfc2e865d56a5f064302d1bb69d9caa1211c24364afdea34e7a1d56214 +libLLVM.v12.0.1+4.powerpc64le-linux-gnu-cxx11.tar.gz/md5/65e5cd3e35cf6823e42e79ea39b1cc1c +libLLVM.v12.0.1+4.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/4a3908c699c1d90bf845d1e7dab0a1be1eb32dce5db8916f3498514ba0a09099dada2f2632c418b14b33731d18b802f60844eb333ef53ff642e9d3cd7c2ea1c3 +libLLVM.v12.0.1+4.x86_64-apple-darwin.tar.gz/md5/848ae9725ce3d3a86c6af68d2fabbbb8 +libLLVM.v12.0.1+4.x86_64-apple-darwin.tar.gz/sha512/57a445e0e7fe344f3ad486c518b01b1c2713c8b7b5bbe0ff066bd64b49a6c6755f01455745c2c618988655f90977b1562a438d947121c93cefc9a2a5dd3b32a6 +libLLVM.v12.0.1+4.x86_64-linux-gnu-cxx03.tar.gz/md5/7aada269027b825655011c2f2a797a9e +libLLVM.v12.0.1+4.x86_64-linux-gnu-cxx03.tar.gz/sha512/b05e052c403d26e689c625e6ed9c01fac5d5d5e5af246066c3c83a16b92b927a21525955a3a6ddf64afd6921883a5c1631055a6783630455db3815a630a5c172 +libLLVM.v12.0.1+4.x86_64-linux-gnu-cxx11.tar.gz/md5/6c3c26c9d9af98ed13e1d74287e8a8fa +libLLVM.v12.0.1+4.x86_64-linux-gnu-cxx11.tar.gz/sha512/a1530c1c69e44fa7a737219c58a36ebdbdd0fba7abc175660e37a0ee095a11b46e2aa2cf9858a69ca26654293d1ceeb024520762a78ed02178b5979dce6b26ed +libLLVM.v12.0.1+4.x86_64-linux-musl-cxx03.tar.gz/md5/c0e3c8d1755dcdbc63c4ae401deddd5e +libLLVM.v12.0.1+4.x86_64-linux-musl-cxx03.tar.gz/sha512/f1de0aec33fa628d965d43037dcd1de7838668ac98e7fc338b956f18a770ff1372bc05e13288c5bd45b18b15a6ca0a3ce5c090d869605bd5476bf9ec1c0cf884 +libLLVM.v12.0.1+4.x86_64-linux-musl-cxx11.tar.gz/md5/252cb346d0f14220ab59150e9f3cba3d +libLLVM.v12.0.1+4.x86_64-linux-musl-cxx11.tar.gz/sha512/2fb74c90e9df2d06e7a6dbdc62d6b80b1e9b7d2db80b487210d130788cbc749853776276ad5790d4efc2edf950a7fecbb809b2502a2a44f930518139326cf781 +libLLVM.v12.0.1+4.x86_64-unknown-freebsd.tar.gz/md5/5f6b694aa723b4596aa5fe494e599769 +libLLVM.v12.0.1+4.x86_64-unknown-freebsd.tar.gz/sha512/4c1f256522de561d1edd305822da9aed067614e8c46b26bd1448c713e9587ad1f44dd4f539e9eb3f53f6d84a3846567dbbbc6638751afeea17cace6dffa853da +libLLVM.v12.0.1+4.x86_64-w64-mingw32-cxx03.tar.gz/md5/55331e2ed8c38591ae62b17d53c99775 +libLLVM.v12.0.1+4.x86_64-w64-mingw32-cxx03.tar.gz/sha512/b45e87e50f8161b5f234539ab796aa2e0d7845878b6b6aa73e96708a27480ba9dffa0b6d2bb15f19f6b269046b75c67902c7913bdb1fef33a74a78488f7031ae +libLLVM.v12.0.1+4.x86_64-w64-mingw32-cxx11.tar.gz/md5/19996847c13ee330b6e3716296c9e0e3 +libLLVM.v12.0.1+4.x86_64-w64-mingw32-cxx11.tar.gz/sha512/17b8ac789369c27eed7c0cdddffc758a9dc795f38d3cd862d8e87a68186a451a92641cee0ba2dbd5f80bd0b42d832898d79db633bae34fc7659d57308d470df7 +libLLVM_assert.v12.0.1+4.aarch64-apple-darwin.tar.gz/md5/fb6217c318081e176aa16109f84a5f50 +libLLVM_assert.v12.0.1+4.aarch64-apple-darwin.tar.gz/sha512/4fa1c310185b81a4ea9908b9fe0c0947f8bd012ec1ff7eab7a12ea37d26d0556b576bab5531c2262f638728efa83d5d7843fe381dd070b45741725171b1c9635 +libLLVM_assert.v12.0.1+4.aarch64-linux-gnu-cxx03.tar.gz/md5/7bc0b9dfb642a3ddefca68d8ee0a2a6a +libLLVM_assert.v12.0.1+4.aarch64-linux-gnu-cxx03.tar.gz/sha512/7b7dbbddb69cb9a261d44dfc01b1443de65770b37ab2e2d4130b34fa00328b166afbed5361b84f92047c152a2754402b4a6bc4d61134f956d38685ab0e514693 +libLLVM_assert.v12.0.1+4.aarch64-linux-gnu-cxx11.tar.gz/md5/6041ae140d2bcffd58a385f6901ab939 +libLLVM_assert.v12.0.1+4.aarch64-linux-gnu-cxx11.tar.gz/sha512/1873b4861540ce349d5f6ebd939af793ba876c6270f4f9f11afcda98768201f28c36eb80c3310133be833938367960b4464efaf94051edb21ce332c1b13069af +libLLVM_assert.v12.0.1+4.aarch64-linux-musl-cxx03.tar.gz/md5/dba4630abf36ff9e1cc20bd7f18b1982 +libLLVM_assert.v12.0.1+4.aarch64-linux-musl-cxx03.tar.gz/sha512/9b9b506a0b733f8f61af197b6de3365059346b66c014cfce1488ad03760898ec52ac505e41e14b6dc6db0481cc97b85b6f82b64132060e8c0d40777ba4d20e40 +libLLVM_assert.v12.0.1+4.aarch64-linux-musl-cxx11.tar.gz/md5/aa120cd6debf20831208543e027199a1 +libLLVM_assert.v12.0.1+4.aarch64-linux-musl-cxx11.tar.gz/sha512/92bc4d48a8f57939c61c3a4bf8efdf552a43b46898bc67379c541dbfee58641b1591519f55abb35a1f342b43ecd9563d663361e80ca42816b5e89bdaca0eab34 +libLLVM_assert.v12.0.1+4.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/dea1228bd476eb8550bd3bc47ee5b973 +libLLVM_assert.v12.0.1+4.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/f7e878e1c1206cd7a666f3741e12ff09931f13ced2c5eb24222feb10189c690cea294087b50ea974b90386cf91214dc91b0e70f0e2e1cda52f9b6abce65bba8b +libLLVM_assert.v12.0.1+4.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/e6927105c60d50d1f6045e65e066f382 +libLLVM_assert.v12.0.1+4.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/d17a31d3219c07d4633afc3fcc08e1031cb5a0f2c90b749ce078d3f5ce9cdf653d2cac565ac0ff01813266ae3d5eba899469db7e9ceec5849e89286ce68910f9 +libLLVM_assert.v12.0.1+4.armv6l-linux-musleabihf-cxx03.tar.gz/md5/740fd5056703049ffee3cfa983f8c2fb +libLLVM_assert.v12.0.1+4.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/4eb0a0e5ab3b9d358e1cd266c83a330d507a2ad70719cd0be28ea7bc465d4cef1134cd75f186b9ec7a4932be77e32fa1a0ba3304575d28198c12a3384c3a8aa3 +libLLVM_assert.v12.0.1+4.armv6l-linux-musleabihf-cxx11.tar.gz/md5/fa4bfeca2b20e59548f1a3b8b033eec9 +libLLVM_assert.v12.0.1+4.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/7a5294805627f03ebc307a40d623e24b07bc428db200ae7f9dcf19d977426ab996920ea8e023155fedb5dabc6e8bfa12669bc5ebbab579c9380f61fa1082d4b0 +libLLVM_assert.v12.0.1+4.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/f67bb394d4dc62872ea1e4dc86444e8c +libLLVM_assert.v12.0.1+4.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/885fd434ac972badb040f0a70dfdf4c6dd27e4cd30395b9c6bdd78caf2703ebbda61b5a7137dc42dd4458276bd6821e0027c77e21405812c33999cc910a0d04d +libLLVM_assert.v12.0.1+4.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/040dc97394599f9b8bc3f776e0586c66 +libLLVM_assert.v12.0.1+4.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/1ec3fe1fac87169667928723f2426ed5321052f6b6731ddb30b42cf50a0e791dfdd706f9c0d3f9c216ac3589baccd08e0f9ac1bc2b4f2974883f13d83367c0cf +libLLVM_assert.v12.0.1+4.armv7l-linux-musleabihf-cxx03.tar.gz/md5/aa7320fafbb6289e5814cd30ee433268 +libLLVM_assert.v12.0.1+4.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/809aa4d7b2e0fb65f8100e75ada90e9bdb8f7f2ef4d30b91af110ed4dd0a5ff7faa35d8384469fef0eb4306bf1f3c7ba678aceeaa1552047b88a5bd3566faeb1 +libLLVM_assert.v12.0.1+4.armv7l-linux-musleabihf-cxx11.tar.gz/md5/e52889326dfd0987ef586354d2616eb0 +libLLVM_assert.v12.0.1+4.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/5fde4dd0ec4ed45c11e4c2c44516609c02cf24a7de8bbe2e6c6181738969f32a44d50e1bb0350be250353161b5dd5586b272e1fde135adf834b7114272ab14cd +libLLVM_assert.v12.0.1+4.i686-linux-gnu-cxx03.tar.gz/md5/cb0a3775ce8f814a02006abdd14a09b5 +libLLVM_assert.v12.0.1+4.i686-linux-gnu-cxx03.tar.gz/sha512/e47411e25df40b39cd4ba30fa0525ed563c3664a8381e2d103c77d39e799dfda5f2aa2e5ab188796db5bcc39018a5db85a82b412177982b9fd4aa83d2fffa5ad +libLLVM_assert.v12.0.1+4.i686-linux-gnu-cxx11.tar.gz/md5/e96885bc37f46e254df788d9ef617acf +libLLVM_assert.v12.0.1+4.i686-linux-gnu-cxx11.tar.gz/sha512/ceee99f7dd64cd2785dfad4d7b172250e12e560fc5e489d907b0b5ea9a363b50e833377ae31ce12e6bf7f640841a108fbea15408bfa15a8609ce3599ab1c67c6 +libLLVM_assert.v12.0.1+4.i686-linux-musl-cxx03.tar.gz/md5/ed57762608e698bbc1aa47fbebdc4300 +libLLVM_assert.v12.0.1+4.i686-linux-musl-cxx03.tar.gz/sha512/440061bf11373eb9e1a1d549a0fb7b89010bec464b2da64ad2a067fa53c297d1d8e3590bf5724d656a2664f1ebb3c168c011a267436ccb3a354f9e2cf3e303b4 +libLLVM_assert.v12.0.1+4.i686-linux-musl-cxx11.tar.gz/md5/a712486b6fa6b1275bc17ed7b7daed94 +libLLVM_assert.v12.0.1+4.i686-linux-musl-cxx11.tar.gz/sha512/9ba2f48ab4a3c1b25a5e792a4ca54b525b1a54546354baa63169b7eda02456bb7b7c725ce99af5f5ece3ae4a1d342fe535807ff53ba4f72d849846c430e1893f +libLLVM_assert.v12.0.1+4.i686-w64-mingw32-cxx03.tar.gz/md5/b34bf1afd4ac90460ff2c7eb2123b1c7 +libLLVM_assert.v12.0.1+4.i686-w64-mingw32-cxx03.tar.gz/sha512/160e27cb5fefd19759aac18ac720194897142e1aa6d82225ab1c752df121cd10734e24183958ae3b734dfb56bdda73761846d1d051559a8d67e0c64db61b2455 +libLLVM_assert.v12.0.1+4.i686-w64-mingw32-cxx11.tar.gz/md5/74b2df8045efc59e33a0300d183557b5 +libLLVM_assert.v12.0.1+4.i686-w64-mingw32-cxx11.tar.gz/sha512/81680815c716e9a50f6c4fa3dbe19d646115eaea19f076ae1a6820cf2b0363862ce8e077fdb1e819e6b33ad040245487281cc3a928798db77fa3ef4719749615 +libLLVM_assert.v12.0.1+4.powerpc64le-linux-gnu-cxx03.tar.gz/md5/7211cd3d6dc3776f75c2ac9f4391bb38 +libLLVM_assert.v12.0.1+4.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/1bc70c15fec2f4558e815c6160e84d4802039ec5d2159c71299f7a830a87cd4e5fa7c88ce214bf65b18146c0de178e11ca00f19bb9998567e57c6e0cd9ed4734 +libLLVM_assert.v12.0.1+4.powerpc64le-linux-gnu-cxx11.tar.gz/md5/cfd50e9f55a048c792baa2750e028084 +libLLVM_assert.v12.0.1+4.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/0e76ac71af7d1d8af63f245bd6d23b853e477079c469d2ea41fde991a100c9fa5670abdf0c50d62b8ec046bec816f14438d241c6c65790edd315547eac105e51 +libLLVM_assert.v12.0.1+4.x86_64-apple-darwin.tar.gz/md5/de4388d774bd849388028e45f4746bf6 +libLLVM_assert.v12.0.1+4.x86_64-apple-darwin.tar.gz/sha512/1196ebc9ccc29ee0ba351fa6d96c07d09a6d7f3aa35928ef6673eb7155a7b0d2658f7eae5ddbda48f567b07736be0473e32d5b4ae72627e500ec68aa44cc09ac +libLLVM_assert.v12.0.1+4.x86_64-linux-gnu-cxx03.tar.gz/md5/282a8a04447201dbce2e5d3f4f6dd693 +libLLVM_assert.v12.0.1+4.x86_64-linux-gnu-cxx03.tar.gz/sha512/23899c5c597f6fdd122eee2cad30acfa81cefc4990665dfe6fe86477a215a4729a5e50c8880a7c8614edcf23fc951fcc4022c4868ea8bc9babe05d373f75fa46 +libLLVM_assert.v12.0.1+4.x86_64-linux-gnu-cxx11.tar.gz/md5/cdb8ef28e47de1273401bfdc1cc502b1 +libLLVM_assert.v12.0.1+4.x86_64-linux-gnu-cxx11.tar.gz/sha512/5d8380428f60a06500b0afa3d808d1d01060c28401dc7b9323823011dfe9264d0abf72482c0d3775b586276ec5509aec7bc619c031d31984408cbb6027703ac1 +libLLVM_assert.v12.0.1+4.x86_64-linux-musl-cxx03.tar.gz/md5/cd0c6b627367cbb82d5ca8c1eca94c33 +libLLVM_assert.v12.0.1+4.x86_64-linux-musl-cxx03.tar.gz/sha512/c20e070f33ba4bc654dc9e53d5e884b86d0beed9f83a4eacc8eb0792113f1689bda42af6609cde8edf262d4e2325558b06f0acb85a2f0bfc53a220ae54f87bc0 +libLLVM_assert.v12.0.1+4.x86_64-linux-musl-cxx11.tar.gz/md5/6cf2033565bd51c057113d2ec0cb46f6 +libLLVM_assert.v12.0.1+4.x86_64-linux-musl-cxx11.tar.gz/sha512/75fd6f53dcf01a40aac5cfd9a7a0edecd3dc99bc1ac32591d8152f3c9930dd1d255219c74e4f609131d271343802a31d487387072ecf6ead3f72a8562513bf57 +libLLVM_assert.v12.0.1+4.x86_64-unknown-freebsd.tar.gz/md5/28c0970426c16c31d247f521cc4a4196 +libLLVM_assert.v12.0.1+4.x86_64-unknown-freebsd.tar.gz/sha512/388837a840d4fb07cc991ddbe06e56d3c9747439a11578a565b89b7f44a298d0d1a4aaeb9ead1e4219ea2410215cf8ff51410a93e7389bc9caf4b9b0229ce98a +libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx03.tar.gz/md5/cc94941da66349a81a6e2f7ac39e7282 +libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx03.tar.gz/sha512/3300cf6c1d7c860e80a3013f3ca0f2de269543372621a1de0550dd80c198bb500688fb58261f3ddecb4d0cb955c9049c584476faff9762e17e469d5d419e7f8b +libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx11.tar.gz/md5/fd9779e1d84db70068119d36f991114d +libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx11.tar.gz/sha512/70fbee1a6f050c0a0610b246085e1d3dc4e9a3192ba22185752b7e09d2a67f68522572eea7d1d6c5ef04c06b0b6e8053c993a9fd6b42028e1d137c0fd10aefe3 llvm-julia-12.0.1-3.tar.gz/md5/6aa35f64f20f338647b25bb5b4c7e48e llvm-julia-12.0.1-3.tar.gz/sha512/45ae103a6992fe71cc28eec638eb4c765b5601f7a42a857ce31daaae6e126f8a72b05f417696f612051431505fd833a40d7455cbd50f6d210c8195d0cc4bc9d1 diff --git a/src/Makefile b/src/Makefile index 37cfe91df9869..18a5dbf8b90e2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -358,9 +358,9 @@ endif clangsa: $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) clang-sa-%: $(SRCDIR)/%.c $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) | analyzegc-deps-check - @$(call PRINT_ANALYZE, $(build_bindir)/clang --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text -Xclang -load -Xclang $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) $(CLANGSA_FLAGS) $(JCPPFLAGS) $(JCFLAGS) $(DEBUGFLAGS) -Xclang -analyzer-checker=core$(COMMA)julia.GCChecker --analyzer-no-default-checks -fcolor-diagnostics -Werror -x c $<) + @$(call PRINT_ANALYZE, $(build_depsbindir)/clang --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text -Xclang -load -Xclang $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) $(CLANGSA_FLAGS) $(JCPPFLAGS) $(JCFLAGS) $(DEBUGFLAGS) -Xclang -analyzer-checker=core$(COMMA)julia.GCChecker --analyzer-no-default-checks -fcolor-diagnostics -Werror -x c $<) clang-sa-%: $(SRCDIR)/%.cpp $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) | analyzegc-deps-check - @$(call PRINT_ANALYZE, $(build_bindir)/clang --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text -Xclang -load -Xclang $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) $(CLANGSA_FLAGS) $(CLANGSA_CXXFLAGS) $(LLVM_CXXFLAGS) $(JCPPFLAGS) $(JCXXFLAGS) $(DEBUGFLAGS) -Xclang -analyzer-checker=core$(COMMA)julia.GCChecker --analyzer-no-default-checks -fcolor-diagnostics -Werror -x c++ $<) + @$(call PRINT_ANALYZE, $(build_depsbindir)/clang --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text -Xclang -load -Xclang $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) $(CLANGSA_FLAGS) $(CLANGSA_CXXFLAGS) $(LLVM_CXXFLAGS) $(JCPPFLAGS) $(JCXXFLAGS) $(DEBUGFLAGS) -Xclang -analyzer-checker=core$(COMMA)julia.GCChecker --analyzer-no-default-checks -fcolor-diagnostics -Werror -x c++ $<) # Add C files as a target of `analyzegc` analyzegc: $(addprefix clang-sa-,$(RUNTIME_SRCS)) diff --git a/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml index c94d884bf5d21..f09c9305b195c 100644 --- a/stdlib/libLLVM_jll/Project.toml +++ b/stdlib/libLLVM_jll/Project.toml @@ -1,6 +1,6 @@ name = "libLLVM_jll" uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" -version = "12.0.1+2" +version = "12.0.1+4" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 3a383ea77148445d51ca6838fec7578a570914db Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 6 Oct 2021 19:07:18 -0400 Subject: [PATCH 66/88] fix LLVM link to include new zlib dependency (#42524) (cherry picked from commit 2f00fe1d10eb54ee697abf09169b396b9264cb53) --- deps/llvm.mk | 4 ++-- src/Makefile | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/deps/llvm.mk b/deps/llvm.mk index c04cd96e7eb67..690c4338c4752 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -83,7 +83,7 @@ LLVM_CXXFLAGS += $(CXXFLAGS) LLVM_CPPFLAGS += $(CPPFLAGS) LLVM_LDFLAGS += $(LDFLAGS) LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)" -LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" +LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=ON -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" LLVM_CMAKE += -DCOMPILER_RT_ENABLE_IOS=OFF -DCOMPILER_RT_ENABLE_WATCHOS=OFF -DCOMPILER_RT_ENABLE_TVOS=OFF ifeq ($(USE_POLLY_ACC),1) LLVM_CMAKE += -DPOLLY_ENABLE_GPGPU_CODEGEN=ON @@ -276,7 +276,7 @@ $(eval $(call LLVM_PATCH,llvm7-symver-jlprefix)) endif # declare that all patches must be applied before running ./configure -$(LLVM_BUILDDIR_withtype)/build-configured: | $(LLVM_PATCH_PREV) +$(LLVM_BUILDDIR_withtype)/build-configured: | $(LLVM_PATCH_PREV) $(build_prefix)/manifest/zlib $(LLVM_BUILDDIR_withtype)/build-configured: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted | $(llvm_python_workaround) mkdir -p $(dir $@) diff --git a/src/Makefile b/src/Makefile index 18a5dbf8b90e2..412967003ed5a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -105,7 +105,8 @@ LLVMLINK += $(LLVM_LDFLAGS) $(shell $(LLVM_CONFIG_HOST) --libs --system-libs) # https://github.com/JuliaLang/julia/issues/29981 else ifneq ($(USE_LLVM_SHLIB),1) -LLVMLINK += $(LLVM_LDFLAGS) $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS)) $($(LLVM_LDFLAGS) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null) +LLVM_LINK_ARGS := $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS) --system-libs) +LLVMLINK += $(LLVM_LDFLAGS) $(LLVM_LINK_ARGS) else LLVMLINK += $(LLVM_LDFLAGS) -lLLVM endif From 6853711c11f7a415bda15e1757b4aca31c532410 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 7 Oct 2021 15:17:09 -0400 Subject: [PATCH 67/88] [LLVM] actually update the branch for manual builds (cherry picked from commit b2398862edbf35ca3191637084608cdb4a4c76d7) --- deps/checksums/llvm | 4 ++-- deps/llvm.version | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/checksums/llvm b/deps/checksums/llvm index c50a204af944b..4278c6e75c7ff 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -230,5 +230,5 @@ libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx03.tar.gz/md5/cc94941da66349a81a6 libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx03.tar.gz/sha512/3300cf6c1d7c860e80a3013f3ca0f2de269543372621a1de0550dd80c198bb500688fb58261f3ddecb4d0cb955c9049c584476faff9762e17e469d5d419e7f8b libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx11.tar.gz/md5/fd9779e1d84db70068119d36f991114d libLLVM_assert.v12.0.1+4.x86_64-w64-mingw32-cxx11.tar.gz/sha512/70fbee1a6f050c0a0610b246085e1d3dc4e9a3192ba22185752b7e09d2a67f68522572eea7d1d6c5ef04c06b0b6e8053c993a9fd6b42028e1d137c0fd10aefe3 -llvm-julia-12.0.1-3.tar.gz/md5/6aa35f64f20f338647b25bb5b4c7e48e -llvm-julia-12.0.1-3.tar.gz/sha512/45ae103a6992fe71cc28eec638eb4c765b5601f7a42a857ce31daaae6e126f8a72b05f417696f612051431505fd833a40d7455cbd50f6d210c8195d0cc4bc9d1 +llvm-julia-12.0.1-4.tar.gz/md5/1e19759d7c91fed6d2331335140f2dd8 +llvm-julia-12.0.1-4.tar.gz/sha512/476c5488123cda48a864028068253133811f46ef702014ca0c33d5747a4b9408d5952b84154386fe1ac25f31d7f84ea0ee593ef1875b6ae800dd5b81c427c856 diff --git a/deps/llvm.version b/deps/llvm.version index 2407d0ac1a04f..45b9c6a057346 100644 --- a/deps/llvm.version +++ b/deps/llvm.version @@ -1,2 +1,2 @@ -LLVM_BRANCH=julia-12.0.1-3 -LLVM_SHA1=julia-12.0.1-3 +LLVM_BRANCH=julia-12.0.1-4 +LLVM_SHA1=julia-12.0.1-4 From 0a3718e1fb9357047296ebfc303788f414b04b4a Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Wed, 13 Oct 2021 08:55:40 +0200 Subject: [PATCH 68/88] Pass location of built zlib to LLVM cmake. (cherry picked from commit 56bae3cde971822bab09b829366fdcba15627e8b) and (cherry picked from commit 88c338e60d09e56b5cc3b172ca0a5883f844323b) --- deps/llvm.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/llvm.mk b/deps/llvm.mk index 690c4338c4752..643df8b2829bc 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -83,7 +83,8 @@ LLVM_CXXFLAGS += $(CXXFLAGS) LLVM_CPPFLAGS += $(CPPFLAGS) LLVM_LDFLAGS += $(LDFLAGS) LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)" -LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=ON -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" +LLVM_CMAKE += -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" +LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=ON -DZLIB_LIBRARY="$(build_prefix)/lib" LLVM_CMAKE += -DCOMPILER_RT_ENABLE_IOS=OFF -DCOMPILER_RT_ENABLE_WATCHOS=OFF -DCOMPILER_RT_ENABLE_TVOS=OFF ifeq ($(USE_POLLY_ACC),1) LLVM_CMAKE += -DPOLLY_ENABLE_GPGPU_CODEGEN=ON From fc86c16e534233ef95aee8e6b50c567773c9e812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Farneb=C3=A4ck?= Date: Mon, 16 Aug 2021 19:32:52 +0200 Subject: [PATCH 69/88] [REPL] 0nly do NFD normalization for latex tab-completion help if no match without it (#41870) (cherry picked from commit ab600f8ce704cafd519581ad62858d00f82a40d8) --- stdlib/REPL/src/docview.jl | 8 ++++++-- test/docs.jl | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index 2e5fc361d8cbc..f4467b3e787bc 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -403,9 +403,13 @@ function symbol_latex(s::String) return get(symbols_latex, s, "") end function repl_latex(io::IO, s::String) - # decompose NFC-normalized identifier to match tab-completion input - s = normalize(s, :NFD) latex = symbol_latex(s) + if isempty(latex) + # Decompose NFC-normalized identifier to match tab-completion + # input if the first search came up empty. + s = normalize(s, :NFD) + latex = symbol_latex(s) + end if !isempty(latex) print(io, "\"") printstyled(io, s, color=:cyan) diff --git a/test/docs.jl b/test/docs.jl index 05442df9d4cbe..41c3746d7476f 100644 --- a/test/docs.jl +++ b/test/docs.jl @@ -1271,6 +1271,8 @@ end # issue #36378 (\u1e8b and x\u307 are the fully composed and decomposed forms of ẋ, respectively) @test sprint(repl_latex, "\u1e8b") == "\"x\u307\" can be typed by x\\dot\n\n" +# issue 39814 +@test sprint(repl_latex, "\u2209") == "\"\u2209\" can be typed by \\notin\n\n" # issue #15684 begin From 91706adb4a2832f8a33e14e8704796a72e204296 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Mon, 20 Sep 2021 05:11:09 -0700 Subject: [PATCH 70/88] Remove buffer pool for tiled GEMM (#42309) (cherry picked from commit 6893f21a896e51989c40b0b6de5cb2512b8afc97) --- stdlib/LinearAlgebra/src/LinearAlgebra.jl | 3 --- stdlib/LinearAlgebra/src/matmul.jl | 12 +++--------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/stdlib/LinearAlgebra/src/LinearAlgebra.jl b/stdlib/LinearAlgebra/src/LinearAlgebra.jl index 89ad60e275a59..c6979c069aff7 100644 --- a/stdlib/LinearAlgebra/src/LinearAlgebra.jl +++ b/stdlib/LinearAlgebra/src/LinearAlgebra.jl @@ -536,9 +536,6 @@ function __init__() BLAS.lbt_forward(liblapack_path) end BLAS.check() - Threads.resize_nthreads!(Abuf) - Threads.resize_nthreads!(Bbuf) - Threads.resize_nthreads!(Cbuf) catch ex Base.showerror_nostdio(ex, "WARNING: Error during initialization of module LinearAlgebra") end diff --git a/stdlib/LinearAlgebra/src/matmul.jl b/stdlib/LinearAlgebra/src/matmul.jl index 82f44c8e559fc..716026b392a18 100644 --- a/stdlib/LinearAlgebra/src/matmul.jl +++ b/stdlib/LinearAlgebra/src/matmul.jl @@ -779,10 +779,6 @@ function generic_matmatmul(tA, tB, A::AbstractVecOrMat{T}, B::AbstractMatrix{S}) end const tilebufsize = 10800 # Approximately 32k/3 -# per-thread arrays of buffers resized by __init__ if needed -const Abuf = [Vector{UInt8}(undef, tilebufsize)] -const Bbuf = [Vector{UInt8}(undef, tilebufsize)] -const Cbuf = [Vector{UInt8}(undef, tilebufsize)] function generic_matmatmul!(C::AbstractMatrix, tA, tB, A::AbstractMatrix, B::AbstractMatrix, _add::MulAddMul=MulAddMul()) @@ -828,9 +824,8 @@ function _generic_matmatmul!(C::AbstractVecOrMat{R}, tA, tB, A::AbstractVecOrMat @inbounds begin if tile_size > 0 sz = (tile_size, tile_size) - # FIXME: This code is completely invalid!!! - Atile = unsafe_wrap(Array, convert(Ptr{T}, pointer(Abuf[Threads.threadid()])), sz) - Btile = unsafe_wrap(Array, convert(Ptr{S}, pointer(Bbuf[Threads.threadid()])), sz) + Atile = Array{T}(undef, sz) + Btile = Array{S}(undef, sz) z1 = zero(A[1, 1]*B[1, 1] + A[1, 1]*B[1, 1]) z = convert(promote_type(typeof(z1), R), z1) @@ -850,8 +845,7 @@ function _generic_matmatmul!(C::AbstractVecOrMat{R}, tA, tB, A::AbstractVecOrMat end end else - # FIXME: This code is completely invalid!!! - Ctile = unsafe_wrap(Array, convert(Ptr{R}, pointer(Cbuf[Threads.threadid()])), sz) + Ctile = Array{R}(undef, sz) for jb = 1:tile_size:nB jlim = min(jb+tile_size-1,nB) jlen = jlim-jb+1 From 15fef0dc4b5c489a5ffd37061f932f6a98c65419 Mon Sep 17 00:00:00 2001 From: Denis Barucic Date: Wed, 13 Oct 2021 16:04:01 +0200 Subject: [PATCH 71/88] Base: fix `tryparse(Bool, " ")` (#42623) The `while` conditions were incorrectly ordered, resulting in `BoundsError`. (cherry picked from commit 9739f504e584eefe3cdd0e1f1255893dfe3e39d9) --- base/parse.jl | 4 ++-- test/parse.jl | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/base/parse.jl b/base/parse.jl index 1097e8a19b804..1c911c96e1479 100644 --- a/base/parse.jl +++ b/base/parse.jl @@ -194,10 +194,10 @@ function tryparse_internal(::Type{Bool}, sbuff::Union{String,SubString{String}}, orig_end = endpos # Ignore leading and trailing whitespace - while isspace(sbuff[startpos]) && startpos <= endpos + while startpos <= endpos && isspace(sbuff[startpos]) startpos = nextind(sbuff, startpos) end - while isspace(sbuff[endpos]) && endpos >= startpos + while endpos >= startpos && isspace(sbuff[endpos]) endpos = prevind(sbuff, endpos) end diff --git a/test/parse.jl b/test/parse.jl index 2deeecd516f2a..ae07936b3a18e 100644 --- a/test/parse.jl +++ b/test/parse.jl @@ -236,6 +236,13 @@ end @test_throws ArgumentError parse(Int, "2", base = 63) end +@testset "issue #42616" begin + @test tryparse(Bool, "") === nothing + @test tryparse(Bool, " ") === nothing + @test_throws ArgumentError parse(Bool, "") + @test_throws ArgumentError parse(Bool, " ") +end + # issue #17333: tryparse should still throw on invalid base for T in (Int32, BigInt), base in (0,1,100) @test_throws ArgumentError tryparse(T, "0", base = base) From 126054679ed212747d26938328a7e390ae476b6a Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 13 Oct 2021 21:39:27 -0400 Subject: [PATCH 72/88] fix #42590, long attribute loop compiling `cfunction` (#42635) (cherry picked from commit 687b1e0ba30df145ba1422e775e13c0fb7f09050) --- src/codegen.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 8db4a7503b116..839ca2837a883 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -5249,9 +5249,11 @@ static Function* gen_cfun_wrapper( newAttributes.emplace_back(it, AttributeSet::get(jl_LLVMContext, attrBuilder)); // Shift forward the rest of the attributes - for(;it < attributes.index_end(); ++it) { - if (attributes.hasAttributes(it)) { - newAttributes.emplace_back(it + 1, attributes.getAttributes(it)); + if (attributes.getNumAttrSets() > 0) { // without this check the loop range below is invalid + for(;it < attributes.index_end(); ++it) { + if (attributes.hasAttributes(it)) { + newAttributes.emplace_back(it + 1, attributes.getAttributes(it)); + } } } From 96dcd52cac3df4d456a20e9d4a4886f74facdb18 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 14 Oct 2021 03:06:25 -0400 Subject: [PATCH 73/88] CI (Buildbot, GHA): Rename "Statuses" to "Create Buildbot Statuses" (#42640) (cherry picked from commit 92365f593361ef8d285999136bce7416a8246ad7) --- .github/workflows/statuses.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/statuses.yml b/.github/workflows/statuses.yml index 97e7b246d7e65..57d7596d8ee83 100644 --- a/.github/workflows/statuses.yml +++ b/.github/workflows/statuses.yml @@ -9,7 +9,7 @@ # 2. We do not run any external actions. # 3. We only give the `GITHUB_TOKEN` the minimum necessary set of permissions. -name: Statuses +name: Create Buildbot Statuses on: push: @@ -31,8 +31,8 @@ permissions: statuses: write jobs: - statuses: - name: statuses + create-buildbot-statuses: + name: Create Buildbot Statuses runs-on: ubuntu-latest if: github.repository == 'JuliaLang/julia' steps: From 0af52655319754cddbe9ffcfdf48ac1fbb64a694 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 14 Oct 2021 03:09:47 -0400 Subject: [PATCH 74/88] CI (Buildkite, GHA): Rename "Retry" to "Retry Failed Buildkite Jobs" (#42641) (cherry picked from commit 96e8bdc7c2718d2f8853b8e3863ebb88655e0288) --- .github/workflows/retry.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/retry.yml b/.github/workflows/retry.yml index 90160c8ee15e7..71bdf12a3fd9c 100644 --- a/.github/workflows/retry.yml +++ b/.github/workflows/retry.yml @@ -39,8 +39,8 @@ permissions: statuses: none jobs: - retry: - name: retry + retry-failed-buildkite-jobs: + name: Retry Failed Buildkite Jobs runs-on: ubuntu-latest # TODO: delete the following line (once we have completely transitioned from Buildbot to Buildkite) From 73d2db1ce28338cc8b2927f700dee88fc52ae0d4 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 14 Oct 2021 03:21:42 -0400 Subject: [PATCH 75/88] CI (Buildkite, GHA): in the "Retry Failed Buildkite Jobs" workflow, remove the `labeled` trigger (#42642) (cherry picked from commit e6d0465135fb765fd509a7684ee1501d5ed3863b) --- .github/workflows/retry.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/retry.yml b/.github/workflows/retry.yml index 71bdf12a3fd9c..d07eeef393ab7 100644 --- a/.github/workflows/retry.yml +++ b/.github/workflows/retry.yml @@ -27,12 +27,7 @@ on: # the PR is from a fork. Therefore, for security reasons, we do not checkout any code in # this workflow. pull_request_target: - - # TODO: delete the following line (once we have completely transitioned from Buildbot to Buildkite) - types: [ reopened, labeled ] - - # TODO: uncomment the following line (once we have completely transitioned from Buildbot to Buildkite) - # types: [ reopened ] + types: [ reopened ] # We do not give the `GITHUB_TOKEN` any permissions. permissions: From 8b6de87404c8aa0a5f83f98f40051231e2b49768 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 14 Oct 2021 15:53:22 -0400 Subject: [PATCH 76/88] fix #42604, export `jl_field_isdefined` (#42611) (cherry picked from commit e837046290d7ba9ec08efea0cf29138d5bf42bef) --- src/jl_exported_funcs.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index f056cbc504ac7..9edea85c4cd38 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -151,6 +151,7 @@ XX(jl_expand_with_loc_warn) \ XX(jl_extern_c) \ XX(jl_field_index) \ + XX(jl_field_isdefined) \ XX(jl_gc_add_finalizer) \ XX(jl_gc_add_finalizer_th) \ XX(jl_gc_add_ptr_finalizer) \ From a5994d6d157b93d2153af578ff2ec5fee0ba82e8 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 14 Oct 2021 15:54:07 -0400 Subject: [PATCH 77/88] CI (Buildkite): Add a once-daily scheduled job that builds Julia with `USE_BINARYBUILDER=0` (and runs the test suite) on linux64 (#42592) (cherry picked from commit 4c222c9071a142c9c6b3685eecc0bf88ee0ef85d) --- .../main/launch_unsigned_builders.yml | 4 +- .../main/platforms/package_linux.arches | 14 +++--- .../main/platforms/package_linux.yml | 16 +++---- .../pipelines/main/platforms/platforms.sh | 26 ----------- .../main/platforms/tester_linux.arches | 18 ++++---- .../pipelines/main/platforms/tester_linux.yml | 20 ++++----- .buildkite/pipelines/scheduled/0_webui.yml | 4 +- .../scheduled/launch_unsigned_jobs.yml | 8 ++++ .../no_bb/no_bb_package_linux.arches | 2 + .../scheduled/no_bb/no_bb_tester_linux.arches | 2 + .buildkite/utilities/platforms/platforms.sh | 43 +++++++++++++++++++ 11 files changed, 93 insertions(+), 64 deletions(-) delete mode 100755 .buildkite/pipelines/main/platforms/platforms.sh create mode 100644 .buildkite/pipelines/scheduled/launch_unsigned_jobs.yml create mode 100644 .buildkite/pipelines/scheduled/no_bb/no_bb_package_linux.arches create mode 100644 .buildkite/pipelines/scheduled/no_bb/no_bb_tester_linux.arches create mode 100755 .buildkite/utilities/platforms/platforms.sh diff --git a/.buildkite/pipelines/main/launch_unsigned_builders.yml b/.buildkite/pipelines/main/launch_unsigned_builders.yml index 4ff6e310e3c12..2b6794ed13bd1 100644 --- a/.buildkite/pipelines/main/launch_unsigned_builders.yml +++ b/.buildkite/pipelines/main/launch_unsigned_builders.yml @@ -22,8 +22,8 @@ steps: buildkite-agent pipeline upload .buildkite/pipelines/main/misc/sanitizers.yml # Launch all of the platform jobs. - bash .buildkite/pipelines/main/platforms/platforms.sh package_linux - bash .buildkite/pipelines/main/platforms/platforms.sh tester_linux + bash .buildkite/utilities/platforms/platforms.sh .buildkite/pipelines/main/platforms/package_linux.arches .buildkite/pipelines/main/platforms/package_linux.yml + bash .buildkite/utilities/platforms/platforms.sh .buildkite/pipelines/main/platforms/tester_linux.arches .buildkite/pipelines/main/platforms/tester_linux.yml # Launch the `whitespace` job last. Uploading it last actually causes it to start # first. We want this job to start first because we want it to finish as quickly diff --git a/.buildkite/pipelines/main/platforms/package_linux.arches b/.buildkite/pipelines/main/platforms/package_linux.arches index 58d5b87f4c3a3..89e3c9fd7dc4d 100644 --- a/.buildkite/pipelines/main/platforms/package_linux.arches +++ b/.buildkite/pipelines/main/platforms/package_linux.arches @@ -1,7 +1,7 @@ -# PLATFORM ARCH ARCH_LABEL ROOTFS_ARCH ALLOW_FAIL TIMEOUT ROOTFS_TAG ROOTFS_TREE -# linux aarch64 aarch64 aarch64 false 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff -# linux armv7l armv7l armv7l false 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 -linux 32 32 i686 false 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 -# linux ppc64le ppc64le powerpc64le false 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 -linux 64 64 x86_64 false 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 -musl 64 64 x86_64 false 60 v3.19 e6a2730e37c386c46915b2650d6aaaa398195152 +# PLATFORM LABEL ALLOW_FAIL ARCH ARCH_ROOTFS MAKE_FLAGS TIMEOUT IS_RR IS_ST IS_MT ROOTFS_TAG ROOTFS_HASH +# linux _aarch64 false _aarch64 aarch64 none 60 no no no v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff +# linux _armv7l false _armv7l armv7l none 60 no no no v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 +linux 32 false 32 i686 none 60 no no no v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 +# linux _ppc64le false _ppc64le powerpc64le none 60 no no no v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 +linux 64 false 64 x86_64 none 60 no no no v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +musl 64 false 64 x86_64 none 60 no no no v3.19 e6a2730e37c386c46915b2650d6aaaa398195152 diff --git a/.buildkite/pipelines/main/platforms/package_linux.yml b/.buildkite/pipelines/main/platforms/package_linux.yml index 1a6f15b8fe812..66c0f4784d942 100644 --- a/.buildkite/pipelines/main/platforms/package_linux.yml +++ b/.buildkite/pipelines/main/platforms/package_linux.yml @@ -4,16 +4,16 @@ agents: sandbox.jl: "true" os: "linux" steps: - - label: "package_${PLATFORM?}${ARCH_LABEL?}" - key: package_${PLATFORM?}${ARCH_LABEL?} + - label: "package_${PLATFORM?}${LABEL?}" + key: package_${PLATFORM?}${LABEL?} plugins: - JuliaCI/julia#v1: # Drop default "registries" directory, so it is not persisted from execution to execution persist_depot_dirs: packages,artifacts,compiled version: '1.6' - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_${PLATFORM?}.${ROOTFS_ARCH?}.tar.gz - rootfs_treehash: "${ROOTFS_TREE?}" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_${PLATFORM?}.${ARCH_ROOTFS?}.tar.gz + rootfs_treehash: "${ROOTFS_HASH?}" uid: 1000 gid: 1000 workspaces: @@ -26,7 +26,7 @@ steps: SHORT_COMMIT=`echo $${BUILDKITE_COMMIT:?} | cut -c1-$${SHORT_COMMIT_LENGTH:?}` ARTIFACT_FILE_EXTENSION="tar.gz" ARTIFACT_FILENAME="julia-$${SHORT_COMMIT:?}-${PLATFORM?}${ARCH?}.$${ARTIFACT_FILE_EXTENSION:?}" - JULIA_BINARYDIST_FILENAME=`make print-JULIA_BINARYDIST_FILENAME | cut -c27-` + JULIA_BINARYDIST_FILENAME=`make print-JULIA_BINARYDIST_FILENAME ${MAKE_FLAGS?} | cut -c27- | tr -s ' '` JULIA_BINARYDIST="$${JULIA_BINARYDIST_FILENAME:?}.$${ARTIFACT_FILE_EXTENSION:?}" echo "The full commit is: $${BUILDKITE_COMMIT:?}" @@ -35,16 +35,16 @@ steps: echo "--- Build Julia from source" rm -rf $${ARTIFACT_FILENAME:?} - make --output-sync -j 8 + make --output-sync -j 8 ${MAKE_FLAGS?} - echo "--- Make sure that the working directory is clean" + echo "--- Check that the working directory is clean" if [ -z "$(git status --short)" ]; then echo "INFO: The working directory is clean."; else echo "ERROR: The working directory is dirty."; echo "Output of git status:"; git status; exit 1; fi echo "--- Print Julia version info" ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' echo "--- Create build artifacts" - make --output-sync -j 8 binary-dist + make --output-sync -j 8 binary-dist ${MAKE_FLAGS?} ls -l $${JULIA_BINARYDIST:?} if [[ "$${JULIA_BINARYDIST:?}" != "$${ARTIFACT_FILENAME:?}" ]]; then mv $${JULIA_BINARYDIST:?} $${ARTIFACT_FILENAME:?} diff --git a/.buildkite/pipelines/main/platforms/platforms.sh b/.buildkite/pipelines/main/platforms/platforms.sh deleted file mode 100755 index 760d65c4e842f..0000000000000 --- a/.buildkite/pipelines/main/platforms/platforms.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -OS="$1" - -cat "$SCRIPT_DIR/$OS.arches" | tr -s ' ' | while read _line; do - # Remove whitespace from the beginning and end of each line - line=`echo $_line | tr -s ' '` - - # Skip all lines that begin with `#` - if [[ $line == \#* ]]; then - continue - fi - - export PLATFORM=`echo $line | cut -d ' ' -f 1` - export ARCH=`echo $line | cut -d ' ' -f 2` - export ARCH_LABEL=`echo $line | cut -d ' ' -f 3` - export ROOTFS_ARCH=`echo $line | cut -d ' ' -f 4` - export ALLOW_FAIL=`echo $line | cut -d ' ' -f 5` - export TIMEOUT=`echo $line | cut -d ' ' -f 6` - export ROOTFS_TAG=`echo $line | cut -d ' ' -f 7` - export ROOTFS_TREE=`echo $line | cut -d ' ' -f 8` - echo "Launching: $OS $PLATFORM $ARCH $ARCH_LABEL $ROOTFS_ARCH $ALLOW_FAIL $TIMEOUT" - buildkite-agent pipeline upload "$SCRIPT_DIR/$OS.yml" -done diff --git a/.buildkite/pipelines/main/platforms/tester_linux.arches b/.buildkite/pipelines/main/platforms/tester_linux.arches index 33216f39a5eb8..9d07ff26d2775 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.arches +++ b/.buildkite/pipelines/main/platforms/tester_linux.arches @@ -1,9 +1,9 @@ -# PLATFORM ARCH ARCH_LABEL ROOTFS_ARCH ALLOW_FAIL TIMEOUT ROOTFS_TAG ROOTFS_TREE -# linux aarch64 aarch64 aarch64 false 60 v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff -# linux armv7l armv7l armv7l false 60 v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 -linux 32 32 i686 false 60 v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 -# linux ppc64le ppc64le powerpc64le false 60 v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 -linux 64 64_rr x86_64 false 180 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 -linux 64 64_st x86_64 false 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 -linux 64 64_mt x86_64 false 60 v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 -musl 64 64 x86_64 true 60 v3.19 e6a2730e37c386c46915b2650d6aaaa398195152 +# PLATFORM LABEL ALLOW_FAIL ARCH ARCH_ROOTFS MAKE_FLAGS TIMEOUT IS_RR IS_ST IS_MT ROOTFS_TAG ROOTFS_HASH +# linux _aarch64 false _aarch64 aarch64 none 60 no no no v3.2 0566841e29f0f9880541c26a6595fd5ce0beb5ff +# linux _armv7l false _armv7l armv7l none 60 no no no v3.2 fb359370b052a47ce5c84cc6b4a7a03ed7053b25 +linux 32 false 32 i686 none 60 no no no v3.2 209c4db679a515befd7fb50ecc6bfbecf7ec3d32 +# linux _ppc64le false _ppc64le powerpc64le none 60 no no no v3.2 c03a0158b19d48ac84b426834fce0d3584cdd0c7 +linux 64_rr false 64 x86_64 none 60 yes no no v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +linux 64_st false 64 x86_64 none 60 no yes no v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +linux 64_mt false 64 x86_64 none 60 no no yes v3.2 474bf61a926b2d7fcf202284d59d4b11a04601d7 +musl 64 true 64 x86_64 none 60 no no no v3.19 e6a2730e37c386c46915b2650d6aaaa398195152 diff --git a/.buildkite/pipelines/main/platforms/tester_linux.yml b/.buildkite/pipelines/main/platforms/tester_linux.yml index a70dd5911ad9b..8016d85523a8b 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.yml +++ b/.buildkite/pipelines/main/platforms/tester_linux.yml @@ -4,8 +4,8 @@ agents: sandbox.jl: "true" os: "linux" steps: - - label: "tester_${PLATFORM?}${ARCH_LABEL?}" - key: tester_${PLATFORM?}${ARCH_LABEL?} + - label: "tester_${PLATFORM?}${LABEL?}" + key: tester_${PLATFORM?}${LABEL?} depends_on: package_${PLATFORM?}${ARCH?} plugins: - JuliaCI/julia#v1: @@ -13,9 +13,9 @@ steps: persist_depot_dirs: packages,artifacts,compiled version: '1.6' - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_${PLATFORM?}.${ROOTFS_ARCH?}.tar.gz - # rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/tester${PLATFORM?}.${ROOTFS_ARCH?}.tar.gz - rootfs_treehash: "${ROOTFS_TREE?}" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/package_${PLATFORM?}.${ARCH_ROOTFS?}.tar.gz + # rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/${ROOTFS_TAG?}/tester${PLATFORM?}.${ARCH_ROOTFS?}.tar.gz + rootfs_treehash: "${ROOTFS_HASH?}" uid: 1000 gid: 1000 workspaces: @@ -57,7 +57,7 @@ steps: export OPENBLAS_NUM_THREADS=8 export TESTS="[\"all\"]" - if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_rr" ]]; then + if [[ "${IS_RR?}" == "yes" ]]; then export JULIA_BINARY_UNDER_RR="$${JULIA_BINARY:?} .buildkite/utilities/rr/rr_capture.jl $${JULIA_BINARY:?}" export JULIA_BINARY_FOR_TESTS="$${JULIA_BINARY_UNDER_RR:?}" @@ -69,11 +69,11 @@ steps: export JULIA_BINARY_FOR_TESTS="$${JULIA_BINARY:?}" export NCORES_FOR_TESTS="Sys.CPU_THREADS" - if [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_st" ]]; then - # "_st" = single-threaded + if [[ "${IS_ST?}" == "yes" ]]; then + # "ST" = single-threaded export JULIA_NUM_THREADS=1 - elif [[ "$${BUILDKITE_STEP_KEY:?}" == "tester_linux64_mt" ]]; then - # "_mt" = multi-threaded + elif [[ "${IS_MT?}" == "yes" ]]; then + # "MT" = multi-threaded export JULIA_NUM_THREADS=16 # We do not run the Distributed test suite when multithreading is enabled. diff --git a/.buildkite/pipelines/scheduled/0_webui.yml b/.buildkite/pipelines/scheduled/0_webui.yml index 03024bd51c680..78031b49d9f17 100644 --- a/.buildkite/pipelines/scheduled/0_webui.yml +++ b/.buildkite/pipelines/scheduled/0_webui.yml @@ -13,8 +13,8 @@ steps: # Build secrets will not be available in these pipelines (or their children) # but some of our signed pipelines can wait upon the completion of these unsigned # pipelines. - # unsigned_pipelines: - # - .buildkite/pipelines/scheduled/launch_unsigned_builders.yml + unsigned_pipelines: + - .buildkite/pipelines/scheduled/launch_unsigned_jobs.yml # Our signed pipelines must have a `signature` or `signature_file` parameter that # verifies the treehash of the pipeline itself and the inputs listed in `inputs` diff --git a/.buildkite/pipelines/scheduled/launch_unsigned_jobs.yml b/.buildkite/pipelines/scheduled/launch_unsigned_jobs.yml new file mode 100644 index 0000000000000..300c8d8466aea --- /dev/null +++ b/.buildkite/pipelines/scheduled/launch_unsigned_jobs.yml @@ -0,0 +1,8 @@ +steps: + - label: ":buildkite: Launch unsigned jobs" + commands: | + # Launch all of the `USE_BINARYBUILDER=0` jobs. + bash .buildkite/utilities/platforms/platforms.sh .buildkite/pipelines/scheduled/no_bb/no_bb_package_linux.arches .buildkite/pipelines/main/platforms/package_linux.yml + bash .buildkite/utilities/platforms/platforms.sh .buildkite/pipelines/scheduled/no_bb/no_bb_tester_linux.arches .buildkite/pipelines/main/platforms/tester_linux.yml + agents: + queue: julia diff --git a/.buildkite/pipelines/scheduled/no_bb/no_bb_package_linux.arches b/.buildkite/pipelines/scheduled/no_bb/no_bb_package_linux.arches new file mode 100644 index 0000000000000..ce76950e626f7 --- /dev/null +++ b/.buildkite/pipelines/scheduled/no_bb/no_bb_package_linux.arches @@ -0,0 +1,2 @@ +# PLATFORM LABEL ALLOW_FAIL ARCH ARCH_ROOTFS MAKE_FLAGS TIMEOUT IS_RR IS_ST IS_MT ROOTFS_TAG ROOTFS_HASH +linux 64_no_bb false 64_no_bb x86_64 USE_BINARYBUILDER=0 240 no no no v4.4 ec3873fc1756ecb4c815e8785e9ca45cf54c68b6 diff --git a/.buildkite/pipelines/scheduled/no_bb/no_bb_tester_linux.arches b/.buildkite/pipelines/scheduled/no_bb/no_bb_tester_linux.arches new file mode 100644 index 0000000000000..9cbe03b0c0d43 --- /dev/null +++ b/.buildkite/pipelines/scheduled/no_bb/no_bb_tester_linux.arches @@ -0,0 +1,2 @@ +# PLATFORM LABEL ALLOW_FAIL ARCH ARCH_ROOTFS MAKE_FLAGS TIMEOUT IS_RR IS_ST IS_MT ROOTFS_TAG ROOTFS_HASH +linux 64_st_no_bb false 64_no_bb x86_64 none 60 no yes no v4.4 ec3873fc1756ecb4c815e8785e9ca45cf54c68b6 diff --git a/.buildkite/utilities/platforms/platforms.sh b/.buildkite/utilities/platforms/platforms.sh new file mode 100755 index 0000000000000..87daa8a2a9e28 --- /dev/null +++ b/.buildkite/utilities/platforms/platforms.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +ARCHES="$1" +YAML="$2" + +if [[ ! -f "${ARCHES:?}" ]] ; then + echo "File does not exist: ${ARCHES:?}" + exit 1 +fi + +if [[ ! -f "${YAML:?}" ]] ; then + echo "File does not exist: ${YAML:?}" + exit 1 +fi + +cat "${ARCHES:?}" | tr -s ' ' | while read _line; do + # Remove whitespace from the beginning and end of each line + line=`echo $_line | tr -s ' '` + + # Skip all lines that begin with `#` + if [[ $line == \#* ]]; then + continue + fi + + export PLATFORM=`echo $line | cut -d ' ' -f 1 | tr -s ' '` + export LABEL=`echo $line | cut -d ' ' -f 2 | tr -s ' '` + export ALLOW_FAIL=`echo $line | cut -d ' ' -f 3 | tr -s ' '` + export ARCH=`echo $line | cut -d ' ' -f 4 | tr -s ' '` + export ARCH_ROOTFS=`echo $line | cut -d ' ' -f 5 | tr -s ' '` + export MAKE_FLAGS=`echo $line | cut -d ' ' -f 6 | tr -s ' '` + export TIMEOUT=`echo $line | cut -d ' ' -f 7 | tr -s ' '` + export IS_RR=`echo $line | cut -d ' ' -f 8 | tr -s ' '` + export IS_ST=`echo $line | cut -d ' ' -f 9 | tr -s ' '` + export IS_MT=`echo $line | cut -d ' ' -f 10 | tr -s ' '` + export ROOTFS_TAG=`echo $line | cut -d ' ' -f 11 | tr -s ' '` + export ROOTFS_HASH=`echo $line | cut -d ' ' -f 12 | tr -s ' '` + + if [[ "${MAKE_FLAGS:?}" == "none" ]]; then + export MAKE_FLAGS="" + fi + + buildkite-agent pipeline upload "${YAML:?}" +done From a97cdfcabeb532afbd5167e369f06c8eb656f3fd Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 14 Oct 2021 21:57:44 -0400 Subject: [PATCH 78/88] Add a comment trigger for rerunning failed Buildkite jobs (#42655) (cherry picked from commit c13d5fe0d2d44981b9727ffd60711f565e48aae7) --- .github/workflows/rerun_failed.yml | 87 ++++++++++++++++++++++++++++++ .github/workflows/retry.yml | 54 ------------------- 2 files changed, 87 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/rerun_failed.yml delete mode 100644 .github/workflows/retry.yml diff --git a/.github/workflows/rerun_failed.yml b/.github/workflows/rerun_failed.yml new file mode 100644 index 0000000000000..51c54b83fac32 --- /dev/null +++ b/.github/workflows/rerun_failed.yml @@ -0,0 +1,87 @@ +# Please ping @DilumAluthge when making any changes to this file. + +# Here are some steps that we take in this workflow file for security reasons: +# 1. We do not checkout any code. +# 2. We only run actions that are defined in a repository in the `JuliaLang` GitHub organization. +# 3. We do not give the `GITHUB_TOKEN` any permissions. +# 4. We only give the Buildkite API token (`BUILDKITE_API_TOKEN_RETRY`) the minimum necessary +# set of permissions. + +# Important note to Buildkite maintainers: +# In order to make this work, you need to tell Buildkite that it should NOT create a brand-new +# build when someone closes and reopens a pull request. To do so: +# 1. Go to the relevant pipeline (e.g. https://buildkite.com/julialang/julia-master). +# 2. Click on the "Pipeline Settings" button. +# 3. In the left sidebar, under "Pipeline Settings", click on "GitHub". +# 4. In the "GitHub Settings", under "Build Pull Requests", make sure that the "Skip pull +# request builds for existing commits" checkbox is checked. This is the setting that tells +# Buildkite that it should NOT create a brand-new build when someone closes and reopens a +# pull request. +# 5. At the bottom of the page, click the "Save GitHub Settings" button. + +name: Rerun Failed Buildkite Jobs + +# There are two ways that a user can rerun the failed Buildkite jobs: +# 1. Close and reopen the pull request. +# In order to use this approach, the user must be in one of the following three categories: +# (i) Author of the pull request +# (ii) Commit permissions +# (iii) Triage permissions +# 2. Post a comment on the pull request with exactly the following contents: /buildkite rerun failed +# In order to use this approach, the user must be in the following category: +# - A member of the JuliaLang GitHub organization (the membership must be publicized) + +on: + # When using the `pull_request_target` event, all PRs will get access to secret environment + # variables (such as the `BUILDKITE_API_TOKEN_RETRY` secret environment variable), even if + # the PR is from a fork. Therefore, for security reasons, we do not checkout any code in + # this workflow. + pull_request_target: + types: [ reopened ] + issue_comment: + types: [ created ] + +# We do not give the `GITHUB_TOKEN` any permissions. +# Therefore, the `GITHUB_TOKEN` only has the same access as any member of the public. +permissions: + contents: none + +jobs: + rerun-failed-buildkite-jobs: + name: Rerun Failed Buildkite Jobs + runs-on: ubuntu-latest + if: (github.repository == 'DilumAluthge/julia') && ((github.event_name == 'pull_request_target' && github.event.action == 'reopened') || (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/buildkite rerun failed')) + steps: + - name: Check organization membership + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then + if [[ "${{ github.event.action }}" == "reopened" ]]; then + echo "This is a \"reopened\" event, so we do not need to check the user's organization membership." + echo "GOOD_TO_PROCEED=yes" >> ${GITHUB_ENV:?} + else + echo "ERROR: The github.event_name is \"pull_request_target\", but the github.event.action is not \"reopened\"." + exit 1 + fi + else + curl -H "Authorization: token ${GITHUB_TOKEN:?}" "https://api.github.com/users/${{ github.event.sender.login }}" + curl -H "Authorization: token ${GITHUB_TOKEN:?}" "https://api.github.com/users/${{ github.event.sender.login }}/orgs" + export USER_IS_ORGANIZATION_MEMBER=`curl -H "Authorization: token ${GITHUB_TOKEN:?}" "https://api.github.com/users/${{ github.event.sender.login }}/orgs" | jq '[.[] | .login] | index("JuliaLang") != null' | tr -s ' '` + if [[ "${USER_IS_ORGANIZATION_MEMBER:?}" == "true" ]]; then + echo "The \"${{ github.event.sender.login }}\" user is a public member of the JuliaLang organization." + echo "GOOD_TO_PROCEED=yes" >> ${GITHUB_ENV:?} + else + echo "ERROR: the \"${{ github.event.sender.login }}\" user is NOT a public member of the JuliaLang organization." + echo "If you are a member, please make sure that you have publicized your membership." + exit 1 + fi + fi + # For security reasons, we do not checkout any code in this workflow. + - uses: JuliaLang/buildkite-rerun-failed@057f6f2d37aa29a57b7679fd2af0df1d9f9188b4 + if: env.GOOD_TO_PROCEED == 'yes' + with: + buildkite_api_token: ${{ secrets.BUILDKITE_API_TOKEN_RETRY }} + buildkite_organization_slug: 'julialang' + buildkite_pipeline_slug: 'julia-master' + pr_number: ${{github.event.number}} diff --git a/.github/workflows/retry.yml b/.github/workflows/retry.yml deleted file mode 100644 index d07eeef393ab7..0000000000000 --- a/.github/workflows/retry.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Please ping @DilumAluthge when making any changes to this file. - -# Here are some steps that we take in this workflow file for security reasons: -# 1. We do not checkout any code. -# 2. We only run actions that are defined in a repository in the `JuliaLang` GitHub organization. -# 3. We do not give the `GITHUB_TOKEN` any permissions. -# 4. We only give the Buildkite API token (`BUILDKITE_API_TOKEN_RETRY`) the minimum necessary -# set of permissions. - -# Important note to Buildkite maintainers: -# In order to make this work, you need to tell Buildkite that it should NOT create a brand-new -# build when someone closes and reopens a pull request. To do so: -# 1. Go to the relevant pipeline (e.g. https://buildkite.com/julialang/julia-master). -# 2. Click on the "Pipeline Settings" button. -# 3. In the left sidebar, under "Pipeline Settings", click on "GitHub". -# 4. In the "GitHub Settings", under "Build Pull Requests", make sure that the "Skip pull -# request builds for existing commits" checkbox is checked. This is the setting that tells -# Buildkite that it should NOT create a brand-new build when someone closes and reopens a -# pull request. -# 5. At the bottom of the page, click the "Save GitHub Settings" button. - -name: Retry Failed Buildkite Jobs - -on: - # When using the `pull_request_target` event, all PRs will get access to secret environment - # variables (such as the `BUILDKITE_API_TOKEN_RETRY` secret environment variable), even if - # the PR is from a fork. Therefore, for security reasons, we do not checkout any code in - # this workflow. - pull_request_target: - types: [ reopened ] - -# We do not give the `GITHUB_TOKEN` any permissions. -permissions: - statuses: none - -jobs: - retry-failed-buildkite-jobs: - name: Retry Failed Buildkite Jobs - runs-on: ubuntu-latest - - # TODO: delete the following line (once we have completely transitioned from Buildbot to Buildkite) - if: github.repository == 'JuliaLang/julia' && (github.event.label.name == 'Buildkite - retry failed jobs' || github.event.action == 'reopened') - - # TODO: uncomment the following line (once we have completely transitioned from Buildbot to Buildkite) - # if: github.repository == 'JuliaLang/julia' - - steps: - # For security reasons, we do not checkout any code in this workflow. - - uses: JuliaLang/retry-buildkite@057f6f2d37aa29a57b7679fd2af0df1d9f9188b4 - with: - buildkite_api_token: ${{ secrets.BUILDKITE_API_TOKEN_RETRY }} - buildkite_organization_slug: 'julialang' - buildkite_pipeline_slug: 'julia-master' - pr_number: ${{github.event.number}} From 7374f0b2bc93bedba33606b87145b8bfd5880fcd Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 14 Oct 2021 22:09:07 -0400 Subject: [PATCH 79/88] CI (Buildkite, GHA): Fix some bugs in the "Retry" workflow (#42657) (cherry picked from commit 2bdbc6fdbcf55482a9d5257ace7e69314ed88126) --- .github/workflows/rerun_failed.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rerun_failed.yml b/.github/workflows/rerun_failed.yml index 51c54b83fac32..7d022920658a9 100644 --- a/.github/workflows/rerun_failed.yml +++ b/.github/workflows/rerun_failed.yml @@ -50,8 +50,9 @@ jobs: rerun-failed-buildkite-jobs: name: Rerun Failed Buildkite Jobs runs-on: ubuntu-latest - if: (github.repository == 'DilumAluthge/julia') && ((github.event_name == 'pull_request_target' && github.event.action == 'reopened') || (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/buildkite rerun failed')) + if: (github.repository == 'JuliaLang/julia') && ((github.event_name == 'pull_request_target' && github.event.action == 'reopened') || (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == '/buildkite rerun failed')) steps: + # For security reasons, we do not checkout any code in this workflow. - name: Check organization membership env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -60,6 +61,7 @@ jobs: if [[ "${{ github.event.action }}" == "reopened" ]]; then echo "This is a \"reopened\" event, so we do not need to check the user's organization membership." echo "GOOD_TO_PROCEED=yes" >> ${GITHUB_ENV:?} + echo "PULL_REQUEST_NUMBER=${{ github.event.number }}" >> ${GITHUB_ENV:?} else echo "ERROR: The github.event_name is \"pull_request_target\", but the github.event.action is not \"reopened\"." exit 1 @@ -71,17 +73,20 @@ jobs: if [[ "${USER_IS_ORGANIZATION_MEMBER:?}" == "true" ]]; then echo "The \"${{ github.event.sender.login }}\" user is a public member of the JuliaLang organization." echo "GOOD_TO_PROCEED=yes" >> ${GITHUB_ENV:?} + echo "PULL_REQUEST_NUMBER=${{ github.event.issue.number }}" >> ${GITHUB_ENV:?} else echo "ERROR: the \"${{ github.event.sender.login }}\" user is NOT a public member of the JuliaLang organization." echo "If you are a member, please make sure that you have publicized your membership." exit 1 fi fi - # For security reasons, we do not checkout any code in this workflow. + - run: | + echo "GOOD_TO_PROCEED: ${{ env.GOOD_TO_PROCEED }}" + echo "PULL_REQUEST_NUMBER: ${{ env.PULL_REQUEST_NUMBER }}" - uses: JuliaLang/buildkite-rerun-failed@057f6f2d37aa29a57b7679fd2af0df1d9f9188b4 if: env.GOOD_TO_PROCEED == 'yes' with: buildkite_api_token: ${{ secrets.BUILDKITE_API_TOKEN_RETRY }} buildkite_organization_slug: 'julialang' buildkite_pipeline_slug: 'julia-master' - pr_number: ${{github.event.number}} + pr_number: ${{ env.PULL_REQUEST_NUMBER }} From 3a6a5a4de2a1c79e5a7a0b5ed31e6ecf43943bc0 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 14 Oct 2021 23:04:28 -0400 Subject: [PATCH 80/88] CI (Buildkite): Run the Distributed test suite with multithreading enabled (#42479) (cherry picked from commit 72ec349ad1257996a7c40a4098a1b65599712943) --- .buildkite/pipelines/main/platforms/tester_linux.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.buildkite/pipelines/main/platforms/tester_linux.yml b/.buildkite/pipelines/main/platforms/tester_linux.yml index 8016d85523a8b..123462458cfa1 100644 --- a/.buildkite/pipelines/main/platforms/tester_linux.yml +++ b/.buildkite/pipelines/main/platforms/tester_linux.yml @@ -76,8 +76,16 @@ steps: # "MT" = multi-threaded export JULIA_NUM_THREADS=16 - # We do not run the Distributed test suite when multithreading is enabled. - export TESTS="[\"all\", \"--skip\", \"Distributed\"]" + if [[ "$${BUILDKITE_PIPELINE_SLUG:?}" == "julia-release-1-dot-6" ]]; then + # On Julia 1.6, we skip the Distributed test suite if multithreading is enabled. + export TESTS="[\"all\", \"--skip\", \"Distributed\"]" + elif [[ "$${BUILDKITE_PIPELINE_SLUG:?}" == "julia-release-1-dot-7" ]]; then + # On Julia 1.7, we skip the Distributed test suite if multithreading is enabled. + export TESTS="[\"all\", \"--skip\", \"Distributed\"]" + else + # On Julia 1.8 and later, we do not skip any test suites. + export TESTS="[\"all\"]" + fi fi fi From 38c6b791cface6da383e7465dc1646ca5f64d873 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 15 Oct 2021 15:03:58 -0700 Subject: [PATCH 81/88] Add cryptic secret for docs deploy key (#42667) (cherry picked from commit b8ed1ae9e759949ceef1cf6974cb2e9c03394d50) --- .buildkite/secrets/.gitignore | 11 +++++++++++ .buildkite/secrets/ssh_docs_deploy.encrypted | Bin 0 -> 1856 bytes .buildkite/secrets/ssh_docs_deploy.pub | 1 + 3 files changed, 12 insertions(+) create mode 100644 .buildkite/secrets/.gitignore create mode 100644 .buildkite/secrets/ssh_docs_deploy.encrypted create mode 100644 .buildkite/secrets/ssh_docs_deploy.pub diff --git a/.buildkite/secrets/.gitignore b/.buildkite/secrets/.gitignore new file mode 100644 index 0000000000000..2a84f48682a04 --- /dev/null +++ b/.buildkite/secrets/.gitignore @@ -0,0 +1,11 @@ +# Ignore everything +* + +# Don't ignore this `.gitignore` file +!.gitignore + +# Don't ignore encrypted files +!*.encrypted + +# Don't ignore public keys, that's fine to include +!*.pub diff --git a/.buildkite/secrets/ssh_docs_deploy.encrypted b/.buildkite/secrets/ssh_docs_deploy.encrypted new file mode 100644 index 0000000000000000000000000000000000000000..8b7e2ffe279402c74a57005d327220a4806500d0 GIT binary patch literal 1856 zcmV-G2fz4JVQh3|WM5x6_BQu$(kQ%->4|0fa6`t(&xPEIE=okh>cTg)MnE6hWl4%W z%<3W-{MyzND_s>N=jAkwv=;0N%hTRP{Cvd@J_VNs`*gk&F>exm{qkM5tsA}DTlf{R zE3wfuA1RqY3nBxTkXkcD(Homn*7scj70QL=N#-$yyBFcv>M0p_5i7lvUA=JQhG3Z+2M#8S>T*R*KB;@y_|LL#USeKun zkfFh$9|tFr_kr7O0Ql?;<^&yF6V>Ef_^4H5{F9V5G3qwi<-e|_aeeqH6Owo8;Rrxo zER^|Tk@}rbeW>kdJH7Id@zC2jnZu)5rJL0_p-$QD*LUAw?J(|;mrWh`aEL}&i${cZ zY)9c(4&4g(YI$*P$Uy@y4*%%H4eDuo_PIMyknL`x$yy}5&8_!DWuxhtrLErV$9Yk!bromBYjTI}xQ6_n+A$HgyXBLV)@ybZI~VFDh6B2@^*>Lj*b-pbw{G=x0sV~412 zD^63?S_Jp7Yw_f9vE6|`Rzeh$kOKcHQ#g#$nc5-bokDPt0>54uD*tsi`jrC?C6Hnp zyta39hntcy$WBN?9Lzx69D+`$2(Ofh)~8PNRvU@V*T`0o;K)roVPfVBwCkalL{maZ5qqQLtJG; zPN^s$@56cDc1#rP?@^P~J=N7j6JB`kMqKKE%1zt~u}KiyTt{NsNUL5c$j^c_AHyOl ziX5j1M3+!k&H%g}NZ9n}!wQ^c!`@wtk70?|6IWO^3+RzA&t;XE@Qgeo*f|$?HNc#v zroCb}MgdxKJ1&nVgVk(ADAtVfMA*sdWr5li%*zneS9atN$?KHX6#h92?9s;f57^ya zwO}Q*b*P=ao`JFwLr9tH*%M&;EB`lZ)XvM)%znRP_lHz~^Y^V4r$)=d@Q8q5N;|riRzw4GteZ)2amD zu<@cbLZp~&>IO(=XVO6c62;Kj*;x)plTO2Q!68R*?$j|bnm_Eoh%i^v_6mn*HF7a1 zZv_!pari;`$#s97Z*XA>vg~`325A;w0W0Vw{1h%&{fKK1oM`Eeg^I~}WtpZ^ch{yd z%lS?c8IqGcJCDb!LI2wP9R_NG@}l;~Tj&xjC}98gTC|vs2iXz^DkT-j6{m~aFz`xf zH_+Cd`skfz8WSz>I<$zoRitWpm@@!zcJ$K3rn~Y0ebJLgz)Un_68_D1Lk7K)o=w}v zm`MzC4hhfT2d8758RTL=q+sKAxexZ1n7v-c4%Bw=c zvfVjEpgF=yzWJ;HC;fqYJg&3car(huXIu zTy-=%EaXCo$MpXLIYe&JpuG9O*g=d9-maj{#}IEyzeRcUguycE(_agoB<=P>B46VH za)c3lWQrd2sWAp6c;OeEjOnGInOh?7zR#b7V%4x0$sB#%9_K{@9Y6rJ+^iAg+yv4` z7~bPZGm>{d1NhK}DMKyfLwaxAH z;(X}Vd;1P}+WzJ5u1k`KR6bB$I$}XI5B6xx%}Z|)Z4mFEyU3=${b) z-YJO2(&)IoTz6MidbNwn3Mv#8(69wQmsj6Y1I3Svw5o+r(*XNBO_<%$mmh?vjKI1ze;=FMc9)PSS&U0!++8Co}z4{($e zWfbj0!zl{njIk$UDNDGhSLFu*Fg|WQBX7T2=Dm3rb)_pHap Date: Sun, 17 Oct 2021 20:22:31 -0400 Subject: [PATCH 82/88] Fix #42670 - error in sparsevec outer product with stored zeros (#42671) The SparseMatrixCSC constructor checks that the passed in buffers have length matching the expected number of non-zeros, but the _outer constructor allocated buffers of the number of structural non-zeros, not actual non-zeros. Fix this by shrinking the buffers once the outer product is fully computed. (cherry picked from commit d885fc235a45b81f0efc7a5950ee68700fa4f533) --- stdlib/SparseArrays/src/higherorderfns.jl | 12 ++++++++++-- stdlib/SparseArrays/test/higherorderfns.jl | 9 +++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/stdlib/SparseArrays/src/higherorderfns.jl b/stdlib/SparseArrays/src/higherorderfns.jl index a5941da764883..70cf7a2b9ba89 100644 --- a/stdlib/SparseArrays/src/higherorderfns.jl +++ b/stdlib/SparseArrays/src/higherorderfns.jl @@ -840,13 +840,19 @@ function _outer(trans::Tf, x, y) where Tf @inbounds colptrC[1] = 1 @inbounds for jj = 1:nnzy yval = nzvalsy[jj] - iszero(yval) && continue + if iszero(yval) + nnzC -= nnzx + continue + end col = rowvaly[jj] yval = trans(yval) for ii = 1:nnzx xval = nzvalsx[ii] - iszero(xval) && continue + if iszero(xval) + nnzC -= 1 + continue + end idx += 1 colptrC[col+1] += 1 rowvalC[idx] = rowvalx[ii] @@ -854,6 +860,8 @@ function _outer(trans::Tf, x, y) where Tf end end cumsum!(colptrC, colptrC) + resize!(rowvalC, nnzC) + resize!(nzvalsC, nnzC) return SparseMatrixCSC(nx, ny, colptrC, rowvalC, nzvalsC) end diff --git a/stdlib/SparseArrays/test/higherorderfns.jl b/stdlib/SparseArrays/test/higherorderfns.jl index af8d15e57375e..1fc0b7e52a86b 100644 --- a/stdlib/SparseArrays/test/higherorderfns.jl +++ b/stdlib/SparseArrays/test/higherorderfns.jl @@ -726,4 +726,13 @@ end @test extrema(x; dims=[]) == extrema(y; dims=[]) end +@testset "issue #42670 - error in sparsevec outer product" begin + A = spzeros(Int, 4) + B = copy(A) + C = sparsevec([0 0 1 1 0 0])' + A[2] = 1 + A[2] = 0 + @test A * C == B * C == spzeros(Int, 4, 6) +end + end # module From b739ff4a89a5fdb2222e6c610fc5d82da63c91c4 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Tue, 19 Oct 2021 07:26:00 -0400 Subject: [PATCH 83/88] fix exp of large negative Float16 (#42688) (cherry picked from commit 02f7861bf1fac5b043512819fb952731679d2d84) --- base/special/exp.jl | 6 +++--- test/math.jl | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/base/special/exp.jl b/base/special/exp.jl index e21eca6b51386..230f979ec91f7 100644 --- a/base/special/exp.jl +++ b/base/special/exp.jl @@ -277,9 +277,9 @@ end N = unsafe_trunc(Int32, N_float) r = muladd(N_float, LogB(base, Float16), x) small_part = expb_kernel(base, r) - if !(abs(x) <= SUBNORM_EXP(base, T)) - x > MAX_EXP(base, T) && return Inf16 - x < MIN_EXP(base, T) && return zero(Float16) + if !(abs(x) <= 25) + x > 16 && return Inf16 + x < 25 && return zero(Float16) end twopk = reinterpret(T, (N+Int32(127)) << Int32(23)) return Float16(twopk*small_part) diff --git a/test/math.jl b/test/math.jl index 6c82f2d215eaf..a3ce2c92527ab 100644 --- a/test/math.jl +++ b/test/math.jl @@ -305,10 +305,13 @@ end X = Iterators.flatten((minval:T(.1):maxval, minval/100:T(.0021):maxval/100, minval/10000:T(.000021):maxval/10000, - nextfloat(zero(T)) )) + nextfloat(zero(T)), + T(-100):T(1):T(100) )) for x in X y, yb = func(x), func(widen(x)) - @test abs(y-yb) <= 1.2*eps(T(yb)) + if isfinite(eps(T(yb))) + @test abs(y-yb) <= 1.2*eps(T(yb)) + end end end @testset "$T $func edge cases" begin From 8269a1987c81a0a214b9c4b69ba7bb36618ddbb6 Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Tue, 19 Oct 2021 14:18:14 +0200 Subject: [PATCH 84/88] Simplify `_isequal`, `_isless`, `__inc`, and `__dec` ...by removing unnecessary type checks/assertions. This basically restores the function bodies to what they looked like prior to #40594 and only keeps the changed signatures (with the additional changes to circumvent #39088. (cherry picked from commit df81a0d33d81e54c662932fd482cab9c67a09e39) --- base/multidimensional.jl | 18 ++++++------------ base/tuple.jl | 7 ++----- test/tuple.jl | 9 +++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/base/multidimensional.jl b/base/multidimensional.jl index 25688edbe8f82..d93d2ddaae250 100644 --- a/base/multidimensional.jl +++ b/base/multidimensional.jl @@ -125,11 +125,9 @@ module IteratorsMD # comparison @inline isless(I1::CartesianIndex{N}, I2::CartesianIndex{N}) where {N} = _isless(0, I1.I, I2.I) - @inline function _isless(ret, I1::Tuple{Int,Vararg{Int,N}}, I2::Tuple{Int,Vararg{Int,N}}) where {N} + @inline function _isless(ret, I1::Tuple{Int,Vararg{Int}}, I2::Tuple{Int,Vararg{Int}}) newret = ifelse(ret==0, icmp(last(I1), last(I2)), ret) - t1, t2 = Base.front(I1), Base.front(I2) - # avoid dynamic dispatch by telling the compiler relational invariants - return isa(t1, Tuple{}) ? _isless(newret, (), ()) : _isless(newret, t1, t2::Tuple{Int,Vararg{Int}}) + return _isless(newret, Base.front(I1), Base.front(I2)) end _isless(ret, ::Tuple{}, ::Tuple{}) = ifelse(ret==1, true, false) icmp(a, b) = ifelse(isless(a,b), 1, ifelse(a==b, 0, -1)) @@ -409,15 +407,13 @@ module IteratorsMD valid = __is_valid_range(I, rng) && state[1] != last(rng) return valid, (I, ) end - @inline function __inc(state::Tuple{Int,Int,Vararg{Int,N}}, indices::Tuple{OrdinalRangeInt,OrdinalRangeInt,Vararg{OrdinalRangeInt,N}}) where {N} + @inline function __inc(state::Tuple{Int,Int,Vararg{Int}}, indices::Tuple{OrdinalRangeInt,OrdinalRangeInt,Vararg{OrdinalRangeInt}}) rng = indices[1] I = state[1] + step(rng) if __is_valid_range(I, rng) && state[1] != last(rng) return true, (I, tail(state)...) end - t1, t2 = tail(state), tail(indices) - # avoid dynamic dispatch by telling the compiler relational invariants - valid, I = isa(t1, Tuple{Int}) ? __inc(t1, t2::Tuple{OrdinalRangeInt}) : __inc(t1, t2::Tuple{OrdinalRangeInt,OrdinalRangeInt,Vararg{OrdinalRangeInt}}) + valid, I = __inc(tail(state), tail(indices)) return valid, (first(rng), I...) end @@ -522,15 +518,13 @@ module IteratorsMD valid = __is_valid_range(I, rng) && state[1] != first(rng) return valid, (I,) end - @inline function __dec(state::Tuple{Int,Int,Vararg{Int,N}}, indices::Tuple{OrdinalRangeInt,OrdinalRangeInt,Vararg{OrdinalRangeInt,N}}) where {N} + @inline function __dec(state::Tuple{Int,Int,Vararg{Int}}, indices::Tuple{OrdinalRangeInt,OrdinalRangeInt,Vararg{OrdinalRangeInt}}) rng = indices[1] I = state[1] - step(rng) if __is_valid_range(I, rng) && state[1] != first(rng) return true, (I, tail(state)...) end - t1, t2 = tail(state), tail(indices) - # avoid dynamic dispatch by telling the compiler relational invariants - valid, I = isa(t1, Tuple{Int}) ? __dec(t1, t2::Tuple{OrdinalRangeInt}) : __dec(t1, t2::Tuple{OrdinalRangeInt,OrdinalRangeInt,Vararg{OrdinalRangeInt}}) + valid, I = __dec(tail(state), tail(indices)) return valid, (last(rng), I...) end diff --git a/base/tuple.jl b/base/tuple.jl index 1abcccef3dab5..15132ec38c145 100644 --- a/base/tuple.jl +++ b/base/tuple.jl @@ -366,11 +366,8 @@ filter(f, t::Tuple) = length(t) < 32 ? filter_rec(f, t) : Tuple(filter(f, collec isequal(t1::Tuple, t2::Tuple) = length(t1) == length(t2) && _isequal(t1, t2) _isequal(::Tuple{}, ::Tuple{}) = true -function _isequal(t1::Tuple{Any,Vararg{Any,N}}, t2::Tuple{Any,Vararg{Any,N}}) where {N} - isequal(t1[1], t2[1]) || return false - t1, t2 = tail(t1), tail(t2) - # avoid dynamic dispatch by telling the compiler relational invariants - return isa(t1, Tuple{}) ? true : _isequal(t1, t2::Tuple{Any,Vararg{Any}}) +function _isequal(t1::Tuple{Any,Vararg{Any}}, t2::Tuple{Any,Vararg{Any}}) + return isequal(t1[1], t2[1]) && _isequal(tail(t1), tail(t2)) end function _isequal(t1::Any32, t2::Any32) for i = 1:length(t1) diff --git a/test/tuple.jl b/test/tuple.jl index 6087253d19167..a1582e8916dd8 100644 --- a/test/tuple.jl +++ b/test/tuple.jl @@ -636,3 +636,12 @@ end # https://github.com/JuliaLang/julia/issues/40814 @test Base.return_types(NTuple{3,Int}, (Vector{Int},)) == Any[NTuple{3,Int}] + +# issue #42457 +f42457(a::NTuple{3,Int}, b::Tuple)::Bool = Base.isequal(a, Base.inferencebarrier(b)::Tuple) +@test f42457((1, 1, 1), (1, 1, 1)) +@test !isempty(methods(Base._isequal, (NTuple{3, Int}, Tuple))) +g42457(a, b) = Base.isequal(a, b) ? 1 : 2.0 +@test only(Base.return_types(g42457, (NTuple{3, Int}, Tuple))) === Union{Float64, Int} +@test only(Base.return_types(g42457, (NTuple{3, Int}, NTuple))) === Union{Float64, Int} +@test only(Base.return_types(g42457, (NTuple{3, Int}, NTuple{4}))) === Float64 From 53432d5215dd185f36543c34a154033635bcef1b Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 15 Oct 2021 17:00:44 -0400 Subject: [PATCH 85/88] codegen: add missing jl_get_fieldtypes calls Fixes #42645 (cherry picked from commit 485495f6274ebaa00c99db828c5dbbeb33b90149) --- src/cgutils.cpp | 24 +++++++++++++----------- src/codegen.cpp | 2 +- src/datatype.c | 1 + test/compiler/codegen.jl | 21 +++++++++++++++++++++ 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 43f35c2a51813..a1c9b37c7d935 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -136,7 +136,7 @@ static DIType *_julia_type_to_di(jl_codegen_params_t *ctx, jl_value_t *jt, DIBui size_t ntypes = jl_datatype_nfields(jdt); std::vector Elements(ntypes); for (unsigned i = 0; i < ntypes; i++) { - jl_value_t *el = jl_svecref(jdt->types, i); + jl_value_t *el = jl_field_type_concrete(jdt, i); DIType *di; if (jl_field_isptr(jdt, i)) di = jl_pvalue_dillvmt; @@ -2035,9 +2035,10 @@ static bool emit_getfield_unknownidx(jl_codectx_t &ctx, if (!strct.ispointer()) { // unboxed assert(jl_is_concrete_immutable((jl_value_t*)stt)); bool isboxed = is_datatype_all_pointers(stt); - bool issame = is_tupletype_homogeneous(stt->types); + jl_svec_t *types = stt->types; + bool issame = is_tupletype_homogeneous(types); if (issame) { - jl_value_t *jft = jl_svecref(stt->types, 0); + jl_value_t *jft = jl_svecref(types, 0); if (strct.isghost) { (void)idx0(); *ret = ghostValue(jft); @@ -2077,7 +2078,7 @@ static bool emit_getfield_unknownidx(jl_codectx_t &ctx, ctx.builder.CreateExtractValue(strct.V, makeArrayRef(i)), fld); } - jl_value_t *jft = issame ? jl_svecref(stt->types, 0) : (jl_value_t*)jl_any_type; + jl_value_t *jft = issame ? jl_svecref(types, 0) : (jl_value_t*)jl_any_type; if (isboxed && maybe_null) null_pointer_check(ctx, fld); *ret = mark_julia_type(ctx, fld, isboxed, jft); @@ -2119,9 +2120,9 @@ static bool emit_getfield_unknownidx(jl_codectx_t &ctx, *ret = mark_julia_type(ctx, fld, true, jl_any_type); return true; } - else if (is_tupletype_homogeneous(stt->types)) { + else if (is_tupletype_homogeneous(jl_get_fieldtypes(stt))) { assert(nfields > 0); // nf == 0 trapped by all_pointers case - jl_value_t *jft = jl_svecref(stt->types, 0); + jl_value_t *jft = jl_svecref(stt->types, 0); // n.b. jl_get_fieldtypes assigned stt->types for here assert(jl_is_concrete_type(jft)); idx = idx0(); Value *ptr = maybe_decay_tracked(ctx, data_pointer(ctx, strct)); @@ -3242,9 +3243,10 @@ static void find_perm_offsets(jl_datatype_t *typ, SmallVector &res, // This is a inlined field at `offset`. if (!typ->layout || typ->layout->npointers == 0) return; - size_t nf = jl_svec_len(typ->types); + jl_svec_t *types = jl_get_fieldtypes(typ); + size_t nf = jl_svec_len(types); for (size_t i = 0; i < nf; i++) { - jl_value_t *_fld = jl_svecref(typ->types, i); + jl_value_t *_fld = jl_svecref(types, i); if (!jl_is_datatype(_fld)) continue; jl_datatype_t *fld = (jl_datatype_t*)_fld; @@ -3293,7 +3295,7 @@ static jl_cgval_t emit_setfield(jl_codectx_t &ctx, emit_bitcast(ctx, maybe_decay_tracked(ctx, addr), T_pint8), ConstantInt::get(T_size, byte_offset)); // TODO: use emit_struct_gep } - jl_value_t *jfty = jl_svecref(sty->types, idx0); + jl_value_t *jfty = jl_field_type(sty, idx0); if (!jl_field_isptr(sty, idx0) && jl_is_uniontype(jfty)) { size_t fsz = 0, al = 0; bool isptr = !jl_islayout_inline(jfty, &fsz, &al); @@ -3418,7 +3420,7 @@ static jl_cgval_t emit_new_struct(jl_codectx_t &ctx, jl_value_t *ty, size_t narg } for (unsigned i = 0; i < na; i++) { - jl_value_t *jtype = jl_svecref(sty->types, i); + jl_value_t *jtype = jl_svecref(sty->types, i); // n.b. ty argument must be concrete jl_cgval_t fval_info = argv[i]; emit_typecheck(ctx, fval_info, jtype, "new"); fval_info = update_julia_type(ctx, fval_info, jtype); @@ -3553,7 +3555,7 @@ static jl_cgval_t emit_new_struct(jl_codectx_t &ctx, jl_value_t *ty, size_t narg need_wb = !rhs.isboxed; else need_wb = false; - emit_typecheck(ctx, rhs, jl_svecref(sty->types, i), "new"); + emit_typecheck(ctx, rhs, jl_svecref(sty->types, i), "new"); // n.b. ty argument must be concrete emit_setfield(ctx, sty, strctinfo, i, rhs, jl_cgval_t(), false, need_wb, AtomicOrdering::NotAtomic, AtomicOrdering::NotAtomic, false, true, false, false, false, nullptr, ""); } return strctinfo; diff --git a/src/codegen.cpp b/src/codegen.cpp index 839ca2837a883..a5eda27b95424 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -2708,7 +2708,7 @@ static bool emit_f_opfield(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, idx = i - 1; } if (idx != -1) { - jl_value_t *ft = jl_svecref(uty->types, idx); + jl_value_t *ft = jl_field_type(uty, idx); if (!jl_has_free_typevars(ft)) { if (!ismodifyfield && !jl_subtype(val.typ, ft)) { emit_typecheck(ctx, val, ft, fname); diff --git a/src/datatype.c b/src/datatype.c index aecbe6f407ae6..cf4c0cd94b5f2 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -242,6 +242,7 @@ int jl_struct_try_layout(jl_datatype_t *dt) return 1; else if (!jl_has_fixed_layout(dt)) return 0; + // jl_has_fixed_layout also ensured that dt->types is assigned now jl_compute_field_offsets(dt); assert(dt->layout); return 1; diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index 7c89261bea92b..daef9aafa769f 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -637,3 +637,24 @@ t41096 = Term41096{:t}(Modulate41096(:t, false)) U41096 = Term41096{:U}(Modulate41096(:U, false)) @test !newexpand41096((t=t41096, μ=μ41096, U=U41096), :U) + +# issue #42645 +mutable struct A42645{T} + x::Bool + function A42645(a::Vector{T}) where T + r = new{T}() + r.x = false + return r + end +end +mutable struct B42645{T} + y::A42645{T} +end +x42645 = 1 +function f42645() + res = B42645(A42645([x42645])) + res.y = A42645([x42645]) + res.y.x = true + res +end +@test ((f42645()::B42645).y::A42645{Int}).x From 0d79b95a026d42319426957a65eb27f6ac37d9b4 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 15 Oct 2021 17:02:06 -0400 Subject: [PATCH 86/88] codegen: fix setfield! error message emission (cherry picked from commit a11d8048fde2260d087e998c9f2210528a5d22a0) --- src/cgutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index a1c9b37c7d935..85b95f6e17f24 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -3280,7 +3280,7 @@ static jl_cgval_t emit_setfield(jl_codectx_t &ctx, const jl_cgval_t *modifyop, const std::string &fname) { if (!sty->name->mutabl && checked) { - std::string msg = fname + "immutable struct of type " + std::string msg = fname + ": immutable struct of type " + std::string(jl_symbol_name(sty->name->name)) + " cannot be changed"; emit_error(ctx, msg); From 97e65d35eca5b5ed5283dd87baff73a0c483cb83 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Fri, 8 Oct 2021 08:44:41 -0400 Subject: [PATCH 87/88] Add compat note for `printstyled` (#42547) (cherry picked from commit f2080d57c8fb796f8f05dc4914e27094a600bcf8) --- base/strings/io.jl | 4 +++- base/util.jl | 18 +++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/base/strings/io.jl b/base/strings/io.jl index d54ec3aa43ccb..f759d187251be 100644 --- a/base/strings/io.jl +++ b/base/strings/io.jl @@ -15,7 +15,7 @@ avoid Julia-specific details. For example, `show` displays strings with quotes, and `print` displays strings without quotes. -[`string`](@ref) returns the output of `print` as a string. +See also [`println`](@ref), [`string`](@ref), [`printstyled`](@ref). # Examples ```jldoctest @@ -57,6 +57,8 @@ end Print (using [`print`](@ref)) `xs` followed by a newline. If `io` is not supplied, prints to [`stdout`](@ref). +See also [`printstyled`](@ref) to add colors etc. + # Examples ```jldoctest julia> println("Hello, world") diff --git a/base/util.jl b/base/util.jl index cf7644ad82ccf..08827665635eb 100644 --- a/base/util.jl +++ b/base/util.jl @@ -113,14 +113,18 @@ end Print `xs` in a color specified as a symbol or integer, optionally in bold. -`color` may take any of the values $(Base.available_text_colors_docstring) +Keyword `color` may take any of the values $(Base.available_text_colors_docstring) or an integer between 0 and 255 inclusive. Note that not all terminals support 256 colors. -If the keyword `bold` is given as `true`, the result will be printed in bold. -If the keyword `underline` is given as `true`, the result will be printed underlined. -If the keyword `blink` is given as `true`, the result will blink. -If the keyword `reverse` is given as `true`, the result will have foreground and background colors inversed. -If the keyword `hidden` is given as `true`, the result will be hidden. -Keywords can be given in any combination. + +Keywords `bold=true`, `underline=true`, `blink=true` are self-explanatory. +Keyword `reverse=true` prints with foreground and background colors exchanged, +and `hidden=true` should be invisibe in the terminal but can still be copied. +These properties can be used in any combination. + +See also [`print`](@ref), [`println`](@ref), [`show`](@ref). + +!!! compat "Julia 1.7" + Keywords except `color` and `bold` were added in Julia 1.7. """ printstyled(io::IO, msg...; bold::Bool=false, underline::Bool=false, blink::Bool=false, reverse::Bool=false, hidden::Bool=false, color::Union{Int,Symbol}=:normal) = with_output_color(print, color, io, msg...; bold=bold, underline=underline, blink=blink, reverse=reverse, hidden=hidden) From 12b91782804c03672edeffe56be2f8998603b6ce Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 13 Oct 2021 10:35:01 +0200 Subject: [PATCH 88/88] fix some issues with buildbot path not updating in stacktraces / method errors (#37427) (cherry picked from commit 1217aa4e5283239f5da40cf72b6ffd658e8a2cf3) --- base/errorshow.jl | 22 +++++++++++++-------- stdlib/InteractiveUtils/test/runtests.jl | 25 ++++++++++++++++++++++++ test/errorshow.jl | 5 +++-- test/worlds.jl | 4 +++- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/base/errorshow.jl b/base/errorshow.jl index 6cd94cbed371a..7199a24edd3f9 100644 --- a/base/errorshow.jl +++ b/base/errorshow.jl @@ -362,6 +362,13 @@ function showerror_nostdio(err, msg::AbstractString) ccall(:jl_printf, Cint, (Ptr{Cvoid},Cstring), stderr_stream, "\n") end +stacktrace_expand_basepaths()::Bool = + tryparse(Bool, get(ENV, "JULIA_STACKTRACE_EXPAND_BASEPATHS", "false")) === true +stacktrace_contract_userdir()::Bool = + tryparse(Bool, get(ENV, "JULIA_STACKTRACE_CONTRACT_HOMEDIR", "true")) === true +stacktrace_linebreaks()::Bool = + tryparse(Bool, get(ENV, "JULIA_STACKTRACE_LINEBREAKS", "false")) === true + function show_method_candidates(io::IO, ex::MethodError, @nospecialize kwargs=()) is_arg_types = isa(ex.args, DataType) arg_types = is_arg_types ? ex.args : typesof(ex.args...) @@ -489,7 +496,12 @@ function show_method_candidates(io::IO, ex::MethodError, @nospecialize kwargs=() end print(iob, ")") show_method_params(iob0, tv) - print(iob, " at ", method.file, ":", method.line) + file, line = functionloc(method) + if file === nothing + file = string(method.file) + end + stacktrace_contract_userdir() && (file = contractuser(file)) + print(iob, " at ", file, ":", line) if !isempty(kwargs)::Bool unexpected = Symbol[] if isempty(kwords) || !(any(endswith(string(kword), "...") for kword in kwords)) @@ -549,13 +561,6 @@ const update_stackframes_callback = Ref{Function}(identity) const STACKTRACE_MODULECOLORS = [:magenta, :cyan, :green, :yellow] const STACKTRACE_FIXEDCOLORS = IdDict(Base => :light_black, Core => :light_black) -stacktrace_expand_basepaths()::Bool = - tryparse(Bool, get(ENV, "JULIA_STACKTRACE_EXPAND_BASEPATHS", "false")) === true -stacktrace_contract_userdir()::Bool = - tryparse(Bool, get(ENV, "JULIA_STACKTRACE_CONTRACT_HOMEDIR", "true")) === true -stacktrace_linebreaks()::Bool = - tryparse(Bool, get(ENV, "JULIA_STACKTRACE_LINEBREAKS", "false")) === true - function show_full_backtrace(io::IO, trace::Vector; print_linebreaks::Bool) num_frames = length(trace) ndigits_max = ndigits(num_frames) @@ -684,6 +689,7 @@ end # Print a stack frame where the module color is set manually with `modulecolor`. function print_stackframe(io, i, frame::StackFrame, n::Int, digit_align_width, modulecolor) file, line = string(frame.file), frame.line + file = fixup_stdlib_path(file) stacktrace_expand_basepaths() && (file = something(find_source_file(file), file)) stacktrace_contract_userdir() && (file = contractuser(file)) diff --git a/stdlib/InteractiveUtils/test/runtests.jl b/stdlib/InteractiveUtils/test/runtests.jl index f9e3a4ce71e9f..622b366b86315 100644 --- a/stdlib/InteractiveUtils/test/runtests.jl +++ b/stdlib/InteractiveUtils/test/runtests.jl @@ -563,6 +563,31 @@ file, ln = functionloc(versioninfo, Tuple{}) @test isfile(pathof(InteractiveUtils)) @test isdir(pkgdir(InteractiveUtils)) +@testset "buildbot path updating" begin + file, ln = functionloc(versioninfo, Tuple{}) + @test isfile(file) + + e = try versioninfo("wat") + catch e + e + end + @test e isa MethodError + m = @which versioninfo() + s = sprint(showerror, e) + m = match(Regex("at (.*?):$(m.line)"), s) + @test isfile(expanduser(m.captures[1])) + + g() = x + e, bt = try code_llvm(g, Tuple{Int}) + catch e + e, catch_backtrace() + end + @test e isa Exception + s = sprint(showerror, e, bt) + m = match(r"(\S*InteractiveUtils[\/\\]src\S*):", s) + @test isfile(expanduser(m.captures[1])) +end + @testset "Issue #34434" begin io = IOBuffer() code_native(io, eltype, Tuple{Int}) diff --git a/test/errorshow.jl b/test/errorshow.jl index 24d0241049da0..95b606c555762 100644 --- a/test/errorshow.jl +++ b/test/errorshow.jl @@ -48,8 +48,9 @@ include("testenv.jl") end end - -cfile = " at $(@__FILE__):" +file = @__FILE__ +Base.stacktrace_contract_userdir() && (file = Base.contractuser(file)) +cfile = " at $file:" c1line = @__LINE__() + 1 method_c1(x::Float64, s::AbstractString...) = true diff --git a/test/worlds.jl b/test/worlds.jl index 2b4f575e1905a..c542851d591fd 100644 --- a/test/worlds.jl +++ b/test/worlds.jl @@ -136,7 +136,9 @@ f265(::Int) = 1 # test for method errors h265() = true -loc_h265 = "$(@__FILE__):$(@__LINE__() - 1)" +file = @__FILE__ +Base.stacktrace_contract_userdir() && (file = Base.contractuser(file)) +loc_h265 = "$file:$(@__LINE__() - 3)" @test h265() @test_throws TaskFailedException(t265) put_n_take!(h265, ()) @test_throws TaskFailedException(t265) fetch(t265)