From 534ae686f0cf65122e7e0695b94aa66a7b91ff69 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Thu, 10 Jun 2021 09:50:31 +0200 Subject: [PATCH 001/146] [automated] Bump the Pkg stdlib from 9bb5a401 to b8bea6c6 (#41160) (#41168) --- .../Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/md5 | 1 - .../Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/sha512 | 1 - .../Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 | 1 + .../Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 | 1 + stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 create mode 100644 deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 diff --git a/deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/md5 b/deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/md5 deleted file mode 100644 index c9868a16f1a3d..0000000000000 --- a/deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -0853b6f8084e0ae679d2bf9086a16861 diff --git a/deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/sha512 b/deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/sha512 deleted file mode 100644 index a3c12951b14ba..0000000000000 --- a/deps/checksums/Pkg-9bb5a40154d31dee74a88f782bc915676840349e.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -1584231adeaa040dd77d29b7c1d494197ccdae6e4ad3843a405898e6a84e36d85a6b7a63c241cdf45c81ff50f40f8e8a14bc9128c4a954f485ede311e9abb6bb diff --git a/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 b/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 new file mode 100644 index 0000000000000..025d7aaf8f053 --- /dev/null +++ b/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 @@ -0,0 +1 @@ +e8e708623c4fa90c429bb2ae08098d3a diff --git a/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 b/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 new file mode 100644 index 0000000000000..722bb4730f6c4 --- /dev/null +++ b/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 @@ -0,0 +1 @@ +0c6a5a4c1f88da4d7934495aa8a7de4742729f518df72c3cacdf7a048b24dab8bfc0eb8608eeccc7e2d2c9e3af8670c265b24b51d499648e1a0d2bbca5895dc3 diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index d7252446d8677..63e485c031c9f 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = master -PKG_SHA1 = 9bb5a40154d31dee74a88f782bc915676840349e +PKG_SHA1 = b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9 From f03832028aa4669cffb50b59308da37c2ec64545 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Thu, 10 Jun 2021 22:51:42 +0200 Subject: [PATCH 002/146] [automated] Bump the Pkg stdlib from b8bea6c6 to b2b215e0 (#41175) (#41179) --- .../Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 | 1 + .../Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 | 1 + .../Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 | 1 - .../Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 | 1 - stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 create mode 100644 deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 delete mode 100644 deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 diff --git a/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 b/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 new file mode 100644 index 0000000000000..4ed6c1b24126d --- /dev/null +++ b/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 @@ -0,0 +1 @@ +3f0eee56f32d35781202114b07b689c7 diff --git a/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 b/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 new file mode 100644 index 0000000000000..aa8e5b62a7e64 --- /dev/null +++ b/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 @@ -0,0 +1 @@ +7571eff80086e80535d588ebad76d1da82e607ea5de69e90b0a50767cfea3634f7f3466e73c45f394432b47b1f926b60cad220ba73e7cec31e9ec7a11c911a3f diff --git a/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 b/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 deleted file mode 100644 index 025d7aaf8f053..0000000000000 --- a/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -e8e708623c4fa90c429bb2ae08098d3a diff --git a/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 b/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 deleted file mode 100644 index 722bb4730f6c4..0000000000000 --- a/deps/checksums/Pkg-b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -0c6a5a4c1f88da4d7934495aa8a7de4742729f518df72c3cacdf7a048b24dab8bfc0eb8608eeccc7e2d2c9e3af8670c265b24b51d499648e1a0d2bbca5895dc3 diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 63e485c031c9f..50b55f6ce364b 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = master -PKG_SHA1 = b8bea6c6e21c3cd54cebc465d842dd6c5137d9f9 +PKG_SHA1 = b2b215e098550c22e0e694890f964ed14299e4ba From aabf93d50d085f5ad3a699baa10fa8494ce250a4 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Mon, 14 Jun 2021 09:56:19 +0200 Subject: [PATCH 003/146] bump Pkg version to latest 1.7 --- .../Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 | 1 + .../sha512 | 1 + .../Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 | 1 - .../sha512 | 1 - stdlib/Pkg.version | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 create mode 100644 deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 delete mode 100644 deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 diff --git a/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 b/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 new file mode 100644 index 0000000000000..db4568978c35f --- /dev/null +++ b/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 @@ -0,0 +1 @@ +f43acba27f74535ddff2c5dbdb91fab2 diff --git a/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 b/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 new file mode 100644 index 0000000000000..84f42657203b4 --- /dev/null +++ b/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 @@ -0,0 +1 @@ +bed263cf6c731c0a2aabb09545e29c74efe394385e7df77747d56a4c93aaa14f64f943c73d6eca8353042a79faa1a451fb2b73cdb0f3e3264fe7d7f8f222004a diff --git a/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 b/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 deleted file mode 100644 index 4ed6c1b24126d..0000000000000 --- a/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -3f0eee56f32d35781202114b07b689c7 diff --git a/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 b/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 deleted file mode 100644 index aa8e5b62a7e64..0000000000000 --- a/deps/checksums/Pkg-b2b215e098550c22e0e694890f964ed14299e4ba.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -7571eff80086e80535d588ebad76d1da82e607ea5de69e90b0a50767cfea3634f7f3466e73c45f394432b47b1f926b60cad220ba73e7cec31e9ec7a11c911a3f diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 50b55f6ce364b..32a4abfb83c63 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ -PKG_BRANCH = master -PKG_SHA1 = b2b215e098550c22e0e694890f964ed14299e4ba +PKG_BRANCH = release-1.7 +PKG_SHA1 = 452c36782ceb4cc4fc257ea4ef96bcbcf380496f From b8de53b54ef866f96dd56825fd19004c1c1649ef Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Thu, 17 Jun 2021 18:39:09 +0200 Subject: [PATCH 004/146] update Pkg to newest 1.7 version (#41249) --- .../Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 | 1 + .../Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 | 1 + .../Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 | 1 - .../Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 | 1 - stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 create mode 100644 deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 delete mode 100644 deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 diff --git a/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 b/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 new file mode 100644 index 0000000000000..29a205ec1886e --- /dev/null +++ b/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 @@ -0,0 +1 @@ +0bc28e338a09e83031d20d176bde17bb diff --git a/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 b/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 new file mode 100644 index 0000000000000..624389dcf8076 --- /dev/null +++ b/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 @@ -0,0 +1 @@ +f351e1bdfef8b3cd07aa605e24127898d3f73b819aa16de477bcf351419d26351f304c9695a99ae6f8db2d65962e9ab1143ce05c12aea6fcb50f3e47c86aafd5 diff --git a/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 b/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 deleted file mode 100644 index db4568978c35f..0000000000000 --- a/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -f43acba27f74535ddff2c5dbdb91fab2 diff --git a/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 b/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 deleted file mode 100644 index 84f42657203b4..0000000000000 --- a/deps/checksums/Pkg-452c36782ceb4cc4fc257ea4ef96bcbcf380496f.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -bed263cf6c731c0a2aabb09545e29c74efe394385e7df77747d56a4c93aaa14f64f943c73d6eca8353042a79faa1a451fb2b73cdb0f3e3264fe7d7f8f222004a diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 32a4abfb83c63..df985ac9d3167 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = release-1.7 -PKG_SHA1 = 452c36782ceb4cc4fc257ea4ef96bcbcf380496f +PKG_SHA1 = 13ed9373de1c6da3952ed6db99b1bac37d8deedc From a15fbbc80994bac8a79cdb64fe5b0305d98ac3cf Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Thu, 17 Jun 2021 18:39:24 +0200 Subject: [PATCH 005/146] Set VERSION to 1.7.0-beta1 (#41151) --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 17522d544ab96..306efb8b1ad43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.0-DEV +1.7.0-beta1 From 7ef2ae2b7b21de17d4b70168cb23806618b6815c Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 10 Jun 2021 13:26:22 +0200 Subject: [PATCH 006/146] Add world age and interpreter arguments to code_warntype. (#41149) (cherry picked from commit 15c19c8a6b1c1a87e6dd24fd058de5192826b250) --- stdlib/InteractiveUtils/src/codeview.jl | 5 +++-- test/reflection.jl | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/stdlib/InteractiveUtils/src/codeview.jl b/stdlib/InteractiveUtils/src/codeview.jl index 3cb792c75b9b4..d6f7cd9daa24d 100644 --- a/stdlib/InteractiveUtils/src/codeview.jl +++ b/stdlib/InteractiveUtils/src/codeview.jl @@ -57,10 +57,11 @@ Keyword argument `debuginfo` may be one of `:source` or `:none` (default), to sp See [`@code_warntype`](@ref man-code-warntype) for more information. """ -function code_warntype(io::IO, @nospecialize(f), @nospecialize(t); debuginfo::Symbol=:default, optimize::Bool=false) +function code_warntype(io::IO, @nospecialize(f), @nospecialize(t); + debuginfo::Symbol=:default, optimize::Bool=false, kwargs...) debuginfo = Base.IRShow.debuginfo(debuginfo) lineprinter = Base.IRShow.__debuginfo[debuginfo] - for (src, rettype) in code_typed(f, t, optimize=optimize) + for (src, rettype) in code_typed(f, t; optimize, kwargs...) lambda_io::IOContext = io p = src.parent nargs::Int = 0 diff --git a/test/reflection.jl b/test/reflection.jl index 2e0ad68cf8aa1..4faa367817104 100644 --- a/test/reflection.jl +++ b/test/reflection.jl @@ -936,3 +936,19 @@ end @test f !== Core._apply @test occursin("f2#", String(nameof(f))) end + + +@testset "code_typed(; world)" begin + mod = @eval module $(gensym()) end + + @eval mod foo() = 1 + world1 = Base.get_world_counter() + @test only(code_typed(mod.foo, ())).second == Int + @test only(code_typed(mod.foo, (); world=world1)).second == Int + + @eval mod foo() = 2. + world2 = Base.get_world_counter() + @test only(code_typed(mod.foo, ())).second == Float64 + @test only(code_typed(mod.foo, (); world=world1)).second == Int + @test only(code_typed(mod.foo, (); world=world2)).second == Float64 +end From 6268b74ec8613d6ca14a15495c325e4b4afcf7f9 Mon Sep 17 00:00:00 2001 From: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Date: Thu, 10 Jun 2021 18:51:07 +0000 Subject: [PATCH 007/146] [automated] Bump the Statistics stdlib from 4b3ef9a to 54f9b0d (#41165) Co-authored-by: Dilum Aluthge (cherry picked from commit 752ac81c8f8f6023a6a01a629ebcfa5de75b7266) --- .../md5 | 1 - .../sha512 | 1 - .../md5 | 1 + .../sha512 | 1 + stdlib/Statistics.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/md5 delete mode 100644 deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/sha512 create mode 100644 deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/md5 create mode 100644 deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/sha512 diff --git a/deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/md5 b/deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/md5 deleted file mode 100644 index ca87f66636631..0000000000000 --- a/deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -13496a277a7e7ef7a11debd3f8384064 diff --git a/deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/sha512 b/deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/sha512 deleted file mode 100644 index 3629aef65d450..0000000000000 --- a/deps/checksums/Statistics-4b3ef9aaa79350510ca0be395458f66051c2f92d.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -25333568516ddbd319456ae13cb3e12dcf3d2d9ca23bf8da32e59d8024ca03650987289792ed9641628bc78f5c79f3498495287c8fb2795e9eed4e70881eb831 diff --git a/deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/md5 b/deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/md5 new file mode 100644 index 0000000000000..62f1954037241 --- /dev/null +++ b/deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/md5 @@ -0,0 +1 @@ +4c09536f4f769b23e88fee769f5a09bd diff --git a/deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/sha512 b/deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/sha512 new file mode 100644 index 0000000000000..a79b037b94de2 --- /dev/null +++ b/deps/checksums/Statistics-54f9b0d999813aa9fab039f632df222ffd2a96a8.tar.gz/sha512 @@ -0,0 +1 @@ +e409fa943a9683a129b80c78ef74572df316ed414dfc8c208f1500d0f07d4d41870d44654446e2c20d1b9ed11e62c4fc6107b6e5789939edbd049fc2aaf22f63 diff --git a/stdlib/Statistics.version b/stdlib/Statistics.version index 50d261cc008b0..84cdf8630e8fc 100644 --- a/stdlib/Statistics.version +++ b/stdlib/Statistics.version @@ -1,2 +1,2 @@ STATISTICS_BRANCH = master -STATISTICS_SHA1 = 4b3ef9aaa79350510ca0be395458f66051c2f92d +STATISTICS_SHA1 = 54f9b0d999813aa9fab039f632df222ffd2a96a8 From 4fa832a45b4f5e75ac02d95d1381e9daab0c2909 Mon Sep 17 00:00:00 2001 From: Rafael Fourquet Date: Fri, 11 Jun 2021 11:48:36 +0200 Subject: [PATCH 008/146] simplify seeding for Xoshiro/TaskLocalRNG/GLOBAL_RNG (#41106) 1. `seed!(rng::Xoshiro, seed::NTuple{4,UInt64})` and `seed!(rng::TaskLocalRNG, seed::NTuple{4,UInt64})` were doing almost the same thing; factor out what was identical; 2. `seed!(rng::Union{TaskLocalRNG, Xoshiro})` was calling the above methods passing a random tuple generated by `RandomDevice`: in this case, we don't really need to hash the seed, as it's presumably random enough; so use the same algorithm as in `Xoshiro()` constructor, and let `Xoshiro()` re-use this new implementation of `seed!`. (cherry picked from commit e35028acd307db6c33cf857c5faa1da497d197ad) --- stdlib/Random/src/RNGs.jl | 14 ++--- stdlib/Random/src/Xoshiro.jl | 96 +++++++++++++++++----------------- stdlib/Random/test/runtests.jl | 34 ++++++++++++ 3 files changed, 89 insertions(+), 55 deletions(-) diff --git a/stdlib/Random/src/RNGs.jl b/stdlib/Random/src/RNGs.jl index 0809505addfc9..c483296fe3af1 100644 --- a/stdlib/Random/src/RNGs.jl +++ b/stdlib/Random/src/RNGs.jl @@ -377,15 +377,15 @@ copy(::_GLOBAL_RNG) = copy(default_rng()) GLOBAL_SEED = 0 -seed!(::_GLOBAL_RNG, seed) = (global GLOBAL_SEED = seed; seed!(default_rng(), seed)) - -function seed!(rng::_GLOBAL_RNG) - seed!(rng, (rand(RandomDevice(), UInt64), rand(RandomDevice(), UInt64), - rand(RandomDevice(), UInt64), rand(RandomDevice(), UInt64))) +function seed!(::_GLOBAL_RNG, seed=rand(RandomDevice(), UInt64, 4)) + global GLOBAL_SEED = seed + seed!(default_rng(), seed) end -seed!() = seed!(GLOBAL_RNG) + seed!(rng::_GLOBAL_RNG, ::Nothing) = seed!(rng) # to resolve ambiguity -seed!(seed::Union{Integer,Vector{UInt32},Vector{UInt64},NTuple{4,UInt64}}) = seed!(GLOBAL_RNG, seed) + +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()) rand(::_GLOBAL_RNG, sp::SamplerBoolBitInteger) = rand(default_rng(), sp) diff --git a/stdlib/Random/src/Xoshiro.jl b/stdlib/Random/src/Xoshiro.jl index c1c37b3c1c134..8fd866732dbf9 100644 --- a/stdlib/Random/src/Xoshiro.jl +++ b/stdlib/Random/src/Xoshiro.jl @@ -25,23 +25,15 @@ mutable struct Xoshiro <: AbstractRNG s3::UInt64 Xoshiro(s0::Integer, s1::Integer, s2::Integer, s3::Integer) = new(s0, s1, s2, s3) - Xoshiro(seed) = seed!(new(), seed) + Xoshiro(seed=nothing) = seed!(new(), seed) end -Xoshiro(::Nothing) = Xoshiro() - -function Xoshiro() - 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 - - Xoshiro(0x02011ce34bce797f * rand(parent, UInt64), - 0x5a94851fb48a6e05 * rand(parent, UInt64), - 0x3688cf5d48899fa7 * rand(parent, UInt64), - 0x867b4bb4c42e5661 * rand(parent, UInt64)) +function setstate!(x::Xoshiro, s0::UInt64, s1::UInt64, s2::UInt64, s3::UInt64) + x.s0 = s0 + x.s1 = s1 + x.s2 = s2 + x.s3 = s3 + x end copy(rng::Xoshiro) = Xoshiro(rng.s0, rng.s1, rng.s2, rng.s3) @@ -57,18 +49,6 @@ end rng_native_52(::Xoshiro) = UInt64 -function seed!(rng::Xoshiro, seed::NTuple{4,UInt64}) - s = Base.hash_64_64(seed[1]) - rng.s0 = s - s += Base.hash_64_64(seed[2]) - rng.s1 = s - s += Base.hash_64_64(seed[3]) - rng.s2 = s - s += Base.hash_64_64(seed[4]) - rng.s3 = s - rng -end - @inline function rand(rng::Xoshiro, ::SamplerType{UInt64}) s0, s1, s2, s3 = rng.s0, rng.s1, rng.s2, rng.s3 tmp = s0 + s3 @@ -108,24 +88,13 @@ struct TaskLocalRNG <: AbstractRNG end TaskLocalRNG(::Nothing) = TaskLocalRNG() rng_native_52(::TaskLocalRNG) = UInt64 -function seed!(rng::TaskLocalRNG, 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. +function setstate!(x::TaskLocalRNG, s0::UInt64, s1::UInt64, s2::UInt64, s3::UInt64) t = current_task() - s = Base.hash_64_64(seed[1]) - t.rngState0 = s - s += Base.hash_64_64(seed[2]) - t.rngState1 = s - s += Base.hash_64_64(seed[3]) - t.rngState2 = s - s += Base.hash_64_64(seed[4]) - t.rngState3 = s - rand(rng, UInt64) - rand(rng, UInt64) - rand(rng, UInt64) - rand(rng, UInt64) - rng + t.rngState0 = s0 + t.rngState1 = s1 + t.rngState2 = s2 + t.rngState3 = s3 + x end @inline function rand(::TaskLocalRNG, ::SamplerType{UInt64}) @@ -145,6 +114,41 @@ end end # Shared implementation between Xoshiro and TaskLocalRNG -- seeding + +function seed!(x::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)) +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]) + + 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 @@ -152,10 +156,6 @@ function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::UInt128) end seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::Integer) = seed!(rng, UInt128(seed)) -seed!(rng::Union{TaskLocalRNG, Xoshiro}) = - seed!(rng, (rand(RandomDevice(), UInt64), rand(RandomDevice(), UInt64), - rand(RandomDevice(), UInt64), rand(RandomDevice(), UInt64))) - function seed!(rng::Union{TaskLocalRNG, Xoshiro}, seed::AbstractVector{UInt64}) if length(seed) > 4 throw(ArgumentError("seed should have no more than 256 bits")) diff --git a/stdlib/Random/test/runtests.jl b/stdlib/Random/test/runtests.jl index dc1102531ce89..1a0628ef4f0c5 100644 --- a/stdlib/Random/test/runtests.jl +++ b/stdlib/Random/test/runtests.jl @@ -698,6 +698,40 @@ end end end +@testset "Random.seed!(seed) sets Random.GLOBAL_SEED" begin + seeds = Any[0, rand(UInt128), rand(UInt64, 4), Tuple(rand(UInt64, 4))] + + for seed=seeds + Random.seed!(seed) + @test Random.GLOBAL_SEED === seed + end + # two separate loops as otherwise we are no sure that the second call (with GLOBAL_RNG) + # actually sets GLOBAL_SEED + for seed=seeds + Random.seed!(Random.GLOBAL_RNG, seed) + @test Random.GLOBAL_SEED === seed + end + + Random.seed!(nothing) + seed1 = Random.GLOBAL_SEED + @test seed1 isa Vector{UInt64} # could change, but must not be nothing + + Random.seed!(Random.GLOBAL_RNG, nothing) + seed2 = Random.GLOBAL_SEED + @test seed2 isa Vector{UInt64} + @test seed2 != seed1 + + Random.seed!() + seed3 = Random.GLOBAL_SEED + @test seed3 isa Vector{UInt64} + @test seed3 != seed2 + + Random.seed!(Random.GLOBAL_RNG) + seed4 = Random.GLOBAL_SEED + @test seed4 isa Vector{UInt64} + @test seed4 != seed3 +end + struct RandomStruct23964 end @testset "error message when rand not defined for a type" begin @test_throws ArgumentError rand(nothing) From f115b745cf0d339db6d339db69e8725c0daa9db9 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sun, 13 Jun 2021 19:39:38 -0700 Subject: [PATCH 009/146] Fix escaping of rhs for `@atomic a.x = y` (#41216) (cherry picked from commit 82ae530db62f364853b355bcd64b28c71445a2c4) --- base/expr.jl | 2 +- test/atomics.jl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/base/expr.jl b/base/expr.jl index 94a4a3cbb059f..84b521543111b 100644 --- a/base/expr.jl +++ b/base/expr.jl @@ -534,7 +534,7 @@ function make_atomic(order, ex) elseif isexpr(ex, :call, 3) return make_atomic(order, ex.args[2], ex.args[1], ex.args[3]) elseif ex.head === :(=) - l, r = ex.args[1], ex.args[2] + l, r = ex.args[1], esc(ex.args[2]) if is_expr(l, :., 2) ll, lr = esc(l.args[1]), esc(l.args[2]) return :(setproperty!($ll, $lr, $r, $order)) diff --git a/test/atomics.jl b/test/atomics.jl index 9ffd65d5ded49..59c45299db221 100644 --- a/test/atomics.jl +++ b/test/atomics.jl @@ -299,6 +299,9 @@ let a = ARefxy(1, -1) @test 1 === @atomic a.x @test 2 === @atomic :sequentially_consistent a.x = 2 @test 3 === @atomic :monotonic a.x = 3 + local four = 4 + @test 4 === @atomic :monotonic a.x = four + @test 3 === @atomic :monotonic a.x = four - 1 @test_throws ConcurrencyViolationError @atomic :not_atomic a.x = 2 @test_throws ConcurrencyViolationError @atomic :not_atomic a.x @test_throws ConcurrencyViolationError @atomic :not_atomic a.x += 1 From 594bc51f843e2e9a8bebac726a27cb0d089e4939 Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Mon, 14 Jun 2021 21:57:16 +1200 Subject: [PATCH 010/146] Bump Documenter to 0.27.0 (#41184) (cherry picked from commit 3f27f88ec9344e96d4c51b538bf0352e4674b037) --- doc/Manifest.toml | 122 ++++++++++++---------------------------------- 1 file changed, 32 insertions(+), 90 deletions(-) diff --git a/doc/Manifest.toml b/doc/Manifest.toml index 455ab49223998..a4887b9eef295 100644 --- a/doc/Manifest.toml +++ b/doc/Manifest.toml @@ -1,147 +1,89 @@ # This file is machine-generated - editing it directly is not advised -[[ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +manifest_format = "2.0" -[[Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[Base64]] +[[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[Dates]] +[[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -[[DocStringExtensions]] -deps = ["LibGit2", "Markdown", "Pkg", "Test"] -git-tree-sha1 = "50ddf44c53698f5e784bbebb3f4b21c5807401b1" +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.8.3" +version = "0.8.5" -[[Documenter]] +[[deps.Documenter]] deps = ["Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] -git-tree-sha1 = "3ebb967819b284dc1e3c0422229b58a40a255649" +git-tree-sha1 = "5acbebf1be22db43589bc5aa1bb5fcc378b17780" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.26.3" - -[[Downloads]] -deps = ["ArgTools", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "0.27.0" -[[IOCapture]] -deps = ["Logging"] -git-tree-sha1 = "377252859f740c217b936cebcd918a44f9b53b59" +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.1.1" +version = "0.2.2" -[[InteractiveUtils]] +[[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[JSON]] +[[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.1" -[[LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" - -[[LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" - -[[LibGit2]] +[[deps.LibGit2]] deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[Logging]] +[[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[Markdown]] +[[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -[[MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" - -[[Mmap]] +[[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" -[[MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" - -[[NetworkOptions]] +[[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -[[Parsers]] +[[deps.Parsers]] deps = ["Dates"] -git-tree-sha1 = "50c9a9ed8c714945e01cd53a21007ed3865ed714" +git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "1.0.15" +version = "1.1.0" -[[Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[Printf]] +[[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[REPL]] +[[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -[[Random]] +[[deps.Random]] deps = ["Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -[[SHA]] +[[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -[[Serialization]] +[[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[Sockets]] +[[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -[[TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" - -[[Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" - -[[Test]] +[[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -[[UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] +[[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" - -[[nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" - -[[p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" From 1eba757188462c7fd5bb34623ce3c0a967f68b4d Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Mon, 14 Jun 2021 17:41:22 +0200 Subject: [PATCH 011/146] make `show(::SparseMatrixCSC)` more consistent (#41150) This now always uses `sparse(I, J, K, m, n)` for showing sparse matrices. The three-arg `show` used for REPL printing should still behave the same but has been refactored to share more code with the existing methods in Base. closes #41135 (cherry picked from commit f280766e27224aedb094a7a873009735b6f06d97) --- stdlib/SparseArrays/src/sparsematrix.jl | 39 +++++++++++++------------ stdlib/SparseArrays/test/sparse.jl | 17 +++++++++++ test/show.jl | 15 +++++++--- 3 files changed, 49 insertions(+), 22 deletions(-) diff --git a/stdlib/SparseArrays/src/sparsematrix.jl b/stdlib/SparseArrays/src/sparsematrix.jl index 9fd4bf62492c3..41d0414b662ea 100644 --- a/stdlib/SparseArrays/src/sparsematrix.jl +++ b/stdlib/SparseArrays/src/sparsematrix.jl @@ -227,22 +227,37 @@ end Base.replace_in_print_matrix(A::AbstractSparseMatrix, i::Integer, j::Integer, s::AbstractString) = Base.isstored(A, i, j) ? s : Base.replace_with_centered_mark(s) -function Base.show(io::IO, ::MIME"text/plain", S::AbstractSparseMatrixCSC) +function Base.array_summary(io::IO, S::AbstractSparseMatrixCSC, dims::Tuple{Vararg{Base.OneTo}}) _checkbuffers(S) xnnz = nnz(S) m, n = size(S) print(io, m, "×", n, " ", typeof(S), " with ", xnnz, " stored ", xnnz == 1 ? "entry" : "entries") - if !(m == 0 || n == 0) - print(io, ":") - show(IOContext(io, :typeinfo => eltype(S)), S) + nothing +end + +# called by `show(io, MIME("text/plain"), ::AbstractSparseMatrixCSC)` +function Base.print_array(io::IO, S::AbstractSparseMatrixCSC) + if max(size(S)...) < 16 + Base.print_matrix(io, S) + else + _show_with_braille_patterns(io, S) end end -Base.show(io::IO, S::AbstractSparseMatrixCSC) = Base.show(convert(IOContext, io), S::AbstractSparseMatrixCSC) +# always show matrices as `sparse(I, J, K)` +function Base.show(io::IO, S::AbstractSparseMatrixCSC) + _checkbuffers(S) + # can't use `findnz`, because that expects all values not to be #undef + I = rowvals(S) + J = [col for col = 1 : size(S, 2) for k = getcolptr(S)[col] : (getcolptr(S)[col+1]-1)] + K = nonzeros(S) + m, n = size(S) + print(io, "sparse(", I, ", ", J, ", ", K, ", ", m, ", ", n, ")") +end const brailleBlocks = UInt16['⠁', '⠂', '⠄', '⡀', '⠈', '⠐', '⠠', '⢀'] -function _show_with_braille_patterns(io::IOContext, S::AbstractSparseMatrixCSC) +function _show_with_braille_patterns(io::IO, S::AbstractSparseMatrixCSC) m, n = size(S) (m == 0 || n == 0) && return show(io, MIME("text/plain"), S) @@ -303,18 +318,6 @@ function _show_with_braille_patterns(io::IOContext, S::AbstractSparseMatrixCSC) foreach(c -> print(io, Char(c)), @view brailleGrid[1:end-1]) end -function Base.show(io::IOContext, S::AbstractSparseMatrixCSC) - _checkbuffers(S) - if max(size(S)...) < 16 && !(get(io, :compact, false)::Bool) - ioc = IOContext(io, :compact => true) - println(ioc) - Base.print_matrix(ioc, S) - return - end - println(io) - _show_with_braille_patterns(io, S) -end - ## Reshape function sparse_compute_reshaped_colptr_and_rowval!(colptrS::Vector{Ti}, rowvalS::Vector{Ti}, diff --git a/stdlib/SparseArrays/test/sparse.jl b/stdlib/SparseArrays/test/sparse.jl index a5e4f48fd4e2d..96630b4be0b8c 100644 --- a/stdlib/SparseArrays/test/sparse.jl +++ b/stdlib/SparseArrays/test/sparse.jl @@ -3172,4 +3172,21 @@ end end end +@testset "issue #41135" begin + @test repr(SparseMatrixCSC([7;;])) == "sparse([1], [1], [7], 1, 1)" + + m = SparseMatrixCSC([0 3; 4 0]) + @test repr(m) == "sparse([2, 1], [1, 2], [4, 3], 2, 2)" + @test eval(Meta.parse(repr(m))) == m + @test summary(m) == "2×2 $SparseMatrixCSC{$Int, $Int} with 2 stored entries" + + m = sprand(100, 100, .1) + @test occursin(r"^sparse\(\[.+\], \[.+\], \[.+\], \d+, \d+\)$", repr(m)) + @test eval(Meta.parse(repr(m))) == m + + m = sparse([85, 5, 38, 37, 59], [19, 72, 76, 98, 162], [0.8, 0.3, 0.2, 0.1, 0.5], 100, 200) + @test repr(m) == "sparse([85, 5, 38, 37, 59], [19, 72, 76, 98, 162], [0.8, 0.3, 0.2, 0.1, 0.5], 100, 200)" + @test eval(Meta.parse(repr(m))) == m +end + end # module diff --git a/test/show.jl b/test/show.jl index 6990323afd1da..e4bfd3f95af32 100644 --- a/test/show.jl +++ b/test/show.jl @@ -728,11 +728,18 @@ Base.zero(x::T12960) = T12960() let A = sparse(1.0I, 3, 3) B = similar(A, T12960) - @test sprint(show, B) == "\n #undef ⋅ ⋅ \n ⋅ #undef ⋅ \n ⋅ ⋅ #undef" - @test sprint(print, B) == "\n #undef ⋅ ⋅ \n ⋅ #undef ⋅ \n ⋅ ⋅ #undef" + @test repr(B) == "sparse([1, 2, 3], [1, 2, 3], $T12960[#undef, #undef, #undef], 3, 3)" + @test occursin( + "\n #undef ⋅ ⋅ \n ⋅ #undef ⋅ \n ⋅ ⋅ #undef", + repr(MIME("text/plain"), B), + ) + B[1,2] = T12960() - @test sprint(show, B) == "\n #undef T12960() ⋅ \n ⋅ #undef ⋅ \n ⋅ ⋅ #undef" - @test sprint(print, B) == "\n #undef T12960() ⋅ \n ⋅ #undef ⋅ \n ⋅ ⋅ #undef" + @test repr(B) == "sparse([1, 1, 2, 3], [1, 2, 2, 3], $T12960[#undef, $T12960(), #undef, #undef], 3, 3)" + @test occursin( + "\n #undef T12960() ⋅ \n ⋅ #undef ⋅ \n ⋅ ⋅ #undef", + repr(MIME("text/plain"), B), + ) end # issue #13127 From 94975dbe1d831922d570fb37f35515b013eb2277 Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Mon, 14 Jun 2021 11:44:58 -0400 Subject: [PATCH 012/146] Added to docstring, reorganized helper methods (#41195) (cherry picked from commit fe94fbddd978cbbed8d7c6fe5b0a15d5544207b9) --- base/abstractarray.jl | 61 +++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 16fdb61e1d3fe..7bda12abcc354 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1635,6 +1635,12 @@ cat_size(A::AbstractArray) = size(A) cat_size(A, d) = 1 cat_size(A::AbstractArray, d) = size(A, d) +cat_length(::Any) = 1 +cat_length(a::AbstractArray) = length(a) + +cat_ndims(a) = 0 +cat_ndims(a::AbstractArray) = ndims(a) + cat_indices(A, d) = OneTo(1) cat_indices(A::AbstractArray, d) = axes(A, d) @@ -2034,22 +2040,25 @@ function typed_hvcat(::Type{T}, rows::Tuple{Vararg{Int}}, as...) where T T[rs...;] end -# nd concatenation +## N-dimensional concatenation ## """ + hvncat(dim::Int, row_first, values...) hvncat(dims::Tuple{Vararg{Int}}, row_first, values...) hvncat(shape::Tuple{Vararg{Tuple}}, row_first, values...) Horizontal, vertical, and n-dimensional concatenation of many `values` in one call. -This function is called -for block matrix syntax. The first argument either specifies the shape of the concatenation, -similar to `hvcat`, as a tuple of tuples, or the dimensions that specify the key number of -elements along each axis, and is used to determine the output dimensions. The `dims` form -is more performant, and is used by default when the concatenation operation has the same -number of elements along each axis (e.g., [a b; c d;;; e f ; g h]). The `shape` form is used -when the number of elements along each axis is unbalanced (e.g., [a b ; c]). Unbalanced -syntax needs additional validation overhead. +This function is called for block matrix syntax. The first argument either specifies the +shape of the concatenation, similar to `hvcat`, as a tuple of tuples, or the dimensions that +specify the key number of elements along each axis, and is used to determine the output +dimensions. The `dims` form is more performant, and is used by default when the concatenation +operation has the same number of elements along each axis (e.g., [a b; c d;;; e f ; g h]). +The `shape` form is used when the number of elements along each axis is unbalanced +(e.g., [a b ; c]). Unbalanced syntax needs additional validation overhead. The `dim` form +is an optimization for concatenation along just one dimension. `row_first` indicates how +`values` are ordered. The meaning of the first and second elements of `shape` are also +swapped based on `row_first`. # Examples ```jldoctest @@ -2097,6 +2106,24 @@ julia> hvncat(((3, 3), (3, 3), (6,)), true, a, b, c, d, e, f) [:, :, 2] = 4 5 6 ``` + +# Examples for construction of the arguments: +[a b c ; d e f ;;; + g h i ; j k l ;;; + m n o ; p q r ;;; + s t u ; v w x] +=> dims = (2, 3, 4) + +[a b ; c ;;; d ;;;;] + ___ _ _ + 2 1 1 = elements in each row (2, 1, 1) + _______ _ + 3 1 = elements in each column (3, 1) + _____________ + 4 = elements in each 3d slice (4,) + _____________ + 4 = elements in each 4d slice (4,) + => shape = ((2, 1, 1), (3, 1), (4,), (4,)) with `rowfirst` = true """ hvncat(::Tuple{}, ::Bool) = [] hvncat(::Tuple{}, ::Bool, xs...) = [] @@ -2188,9 +2215,6 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as::AbstractArray...) where {T, N} return A end -cat_ndims(a) = 0 -cat_ndims(a::AbstractArray) = ndims(a) - function _typed_hvncat(::Type{T}, ::Val{N}, as...) where {T, N} # optimization for scalars and 1-length arrays that can be concatenated by copying them linearly # into the destination @@ -2257,12 +2281,12 @@ function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, elseif currentdims[d] < outdims[d] # dimension in progress break else # exceeded dimension - ArgumentError("argument $i has too many elements along axis $d") |> throw + throw(ArgumentError("argument $i has too many elements along axis $d")) end end end elseif currentdims[d1] > outdims[d1] # exceeded dimension - ArgumentError("argument $i has too many elements along axis $d1") |> throw + throw(ArgumentError("argument $i has too many elements along axis $d1")) end end @@ -2308,7 +2332,8 @@ function _typed_hvncat(::Type{T}, shape::Tuple{Vararg{Tuple, N}}, row_first::Boo if d == 1 || i == 1 || wasstartblock currentdims[d] += dsize elseif dsize != cat_size(as[i - 1], ad) - ArgumentError("argument $i has a mismatched number of elements along axis $ad; expected $(cat_size(as[i - 1], ad)), got $dsize") |> throw + throw(ArgumentError("""argument $i has a mismatched number of elements along axis $ad; \ + expected $(cat_size(as[i - 1], ad)), got $dsize""")) end wasstartblock = blockcounts[d] == 1 # remember for next dimension @@ -2318,7 +2343,8 @@ function _typed_hvncat(::Type{T}, shape::Tuple{Vararg{Tuple, N}}, row_first::Boo if outdims[d] == 0 outdims[d] = currentdims[d] elseif outdims[d] != currentdims[d] - ArgumentError("argument $i has a mismatched number of elements along axis $ad; expected $(abs(outdims[d] - (currentdims[d] - dsize))), got $dsize") |> throw + throw(ArgumentError("""argument $i has a mismatched number of elements along axis $ad; \ + expected $(abs(outdims[d] - (currentdims[d] - dsize))), got $dsize""")) end currentdims[d] = 0 blockcounts[d] = 0 @@ -2382,9 +2408,6 @@ end Ai end -cat_length(a::AbstractArray) = length(a) -cat_length(::Any) = 1 - ## Reductions and accumulates ## function isequal(A::AbstractArray, B::AbstractArray) From 938853189450f42a1b5123633d0c31bbcd288962 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Mon, 14 Jun 2021 18:05:07 +0200 Subject: [PATCH 013/146] fix equality of eigen factorizations (#41132) At least the newly added field `rcondv` may contain `undef` values, so these can cause the same eigen factorizations not to compare equal. Not 100% sure whether the other fields should be ignored as well, but since we didn't have them before, it seems at least consistent to ignore them here. fixes JuliaDiff/ChainRules.jl#422 (cherry picked from commit bc3ce48636b700d153d2c84614aaea8cb8843d43) --- stdlib/LinearAlgebra/src/eigen.jl | 10 ++++++++++ stdlib/LinearAlgebra/test/eigen.jl | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/stdlib/LinearAlgebra/src/eigen.jl b/stdlib/LinearAlgebra/src/eigen.jl index 04825be663eef..3341a2a9bc744 100644 --- a/stdlib/LinearAlgebra/src/eigen.jl +++ b/stdlib/LinearAlgebra/src/eigen.jl @@ -685,6 +685,16 @@ function show(io::IO, mime::MIME{Symbol("text/plain")}, F::Union{Eigen,Generaliz nothing end +function Base.hash(F::Eigen, h::UInt) + return hash(F.values, hash(F.vectors, hash(Eigen, h))) +end +function Base.:(==)(A::Eigen, B::Eigen) + return A.values == B.values && A.vectors == B.vectors +end +function Base.isequal(A::Eigen, B::Eigen) + return isequal(A.values, B.values) && isequal(A.vectors, B.vectors) +end + # Conversion methods ## Can we determine the source/result is Real? This is not stored in the type Eigen diff --git a/stdlib/LinearAlgebra/test/eigen.jl b/stdlib/LinearAlgebra/test/eigen.jl index 487c72d2e01f4..6ac0dc6852df9 100644 --- a/stdlib/LinearAlgebra/test/eigen.jl +++ b/stdlib/LinearAlgebra/test/eigen.jl @@ -170,5 +170,11 @@ end @test eigmax(A') == eigmax(copy(A')) end +@testset "equality of eigen factorizations" begin + A = randn(3, 3) + @test eigen(A) == eigen(A) + @test hash(eigen(A)) == hash(eigen(A)) + @test isequal(eigen(A), eigen(A)) +end end # module TestEigen From 6daa48e63f5c977512b2bf442d5d25a377404973 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 14 Jun 2021 21:38:52 +0200 Subject: [PATCH 014/146] Fixes for overlay tables (#41174) * Add support for at-overlay with parametric function definitions. * Fix error message with at-MethodTable. * Fix function signature to avoid compiler warning. (cherry picked from commit 27ef9e0e3ce4e982f7847ae79c9d4589dcb29638) --- base/experimental.jl | 12 +++++++++--- src/toplevel.c | 2 +- test/compiler/contextual.jl | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/base/experimental.jl b/base/experimental.jl index fd25ff1c0c0dc..232d2efd11d21 100644 --- a/base/experimental.jl +++ b/base/experimental.jl @@ -268,15 +268,21 @@ method tables (e.g., using [`Core.Compiler.OverlayMethodTable`](@ref)). """ macro overlay(mt, def) def = macroexpand(__module__, def) # to expand @inline, @generated, etc - if !isexpr(def, [:function, :(=)]) || !isexpr(def.args[1], :call) + if !isexpr(def, [:function, :(=)]) + error("@overlay requires a function Expr") + end + if isexpr(def.args[1], :call) + def.args[1].args[1] = Expr(:overlay, mt, def.args[1].args[1]) + elseif isexpr(def.args[1], :where) + def.args[1].args[1].args[1] = Expr(:overlay, mt, def.args[1].args[1].args[1]) + else error("@overlay requires a function Expr") end - def.args[1].args[1] = Expr(:overlay, mt, def.args[1].args[1]) esc(def) end let new_mt(name::Symbol, mod::Module) = begin - ccall(:jl_check_top_level_effect, Cvoid, (Any, Cstring), mod, name) + ccall(:jl_check_top_level_effect, Cvoid, (Any, Cstring), mod, "@MethodTable") ccall(:jl_new_method_table, Any, (Any, Any), name, mod) end @eval macro MethodTable(name::Symbol) diff --git a/src/toplevel.c b/src/toplevel.c index 01ea633d95488..c11dea57c8489 100644 --- a/src/toplevel.c +++ b/src/toplevel.c @@ -922,7 +922,7 @@ static void jl_check_open_for(jl_module_t *m, const char* funcname) } } -JL_DLLEXPORT void jl_check_top_level_effect(jl_value_t *m, char *fname) +JL_DLLEXPORT void jl_check_top_level_effect(jl_module_t *m, char *fname) { if (jl_current_task->ptls->in_pure_callback) jl_errorf("%s cannot be used in a generated function", fname); diff --git a/test/compiler/contextual.jl b/test/compiler/contextual.jl index dbd0c788e363a..5d97f4f6542b7 100644 --- a/test/compiler/contextual.jl +++ b/test/compiler/contextual.jl @@ -153,6 +153,9 @@ end # short function def @overlay mt cos(x::Float64) = 2 +# parametric function def +@overlay mt tan(x::T) where {T} = 3 + end methods = Base._methods_by_ftype(Tuple{typeof(sin), Float64}, nothing, 1, typemax(UInt)) From 3b84786ca55642dcbb47b5e942c2811a612d5eab Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 14 Jun 2021 15:41:02 -0400 Subject: [PATCH 015/146] fix #34288, method errors in nothrow inference of division intrinsics (#41178) (cherry picked from commit cd68571afa8bde3fca5fa1277047ce10e31e8eff) --- base/compiler/tfuncs.jl | 9 ++++++--- test/compiler/inference.jl | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index 56fe9d1591848..57b86bf504217 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1568,6 +1568,10 @@ end # Query whether the given intrinsic is nothrow +_iszero(x) = x === Intrinsics.xor_int(x, x) +_isneg1(x) = _iszero(Intrinsics.not_int(x)) +_istypemin(x) = !_iszero(x) && Intrinsics.neg_int(x) === x + function intrinsic_nothrow(f::IntrinsicFunction, argtypes::Array{Any, 1}) # First check that we have the correct number of arguments iidx = Int(reinterpret(Int32, f::IntrinsicFunction)) + 1 @@ -1594,11 +1598,10 @@ function intrinsic_nothrow(f::IntrinsicFunction, argtypes::Array{Any, 1}) return false end den_val = argtypes[2].val - den_val !== zero(typeof(den_val)) || return false + _iszero(den_val) && return false f !== Intrinsics.checked_sdiv_int && return true # Nothrow as long as we additionally don't do typemin(T)/-1 - return den_val !== -1 || (isa(argtypes[1], Const) && - argtypes[1].val !== typemin(typeof(den_val))) + return !_isneg1(den_val) || (isa(argtypes[1], Const) && !_istypemin(argtypes[1].val)) end if f === Intrinsics.pointerref # Nothrow as long as the types are ok. N.B.: dereferencability is not diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 76fd93bb75763..52602a58c517b 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3319,3 +3319,7 @@ end |> first === Tuple{Int, String} # issue #40804 @test Base.return_types(()) do; ===(); end == Any[Union{}] @test Base.return_types(()) do; typeassert(); end == Any[Union{}] + +primitive type UInt24ish 24 end +f34288(x) = Core.Intrinsics.checked_sdiv_int(x, Core.Intrinsics.trunc_int(UInt24ish, 0)) +@test Base.return_types(f34288, (UInt24ish,)) == Any[UInt24ish] From 0f8223fb02e65c5c879851c5eba710555544d274 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Mon, 14 Jun 2021 21:54:18 +0200 Subject: [PATCH 016/146] Correct _in_range for NaN/Inf (#41169) (cherry picked from commit 9a9e5a38aff0eccf235a45b111c51d22c04aff37) --- base/range.jl | 4 +++- test/ranges.jl | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/base/range.jl b/base/range.jl index 8051b0cdb7ccb..9e6d6c0946250 100644 --- a/base/range.jl +++ b/base/range.jl @@ -1217,7 +1217,9 @@ function sum(r::AbstractRange{<:Real}) end function _in_range(x, r::AbstractRange) - if step(r) == 0 + if !isfinite(x) + return false + elseif iszero(step(r)) return !isempty(r) && first(r) == x else n = round(Integer, (x - first(r)) / step(r)) + 1 diff --git a/test/ranges.jl b/test/ranges.jl index b06bae88b02a7..783120c361bcd 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -459,6 +459,11 @@ end @test !(1 in 1:0) @test !(1.0 in 1.0:0.0) + + for r = (1:10, 1//1:10//1, 1:2:5, 1//2:1//2:5//2, 1.0:5.0, LinRange(1.5, 5.5, 9)), + x = (NaN16, Inf32, -Inf64, 1//0, -1//0) + @test !(x in r) + end end @testset "in() works across types, including non-numeric types (#21728)" begin @test 1//1 in 1:3 From c202610b8b0951e41502f2105ebb7418337273ff Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Mon, 14 Jun 2021 19:52:52 -0400 Subject: [PATCH 017/146] `hvncat`: enable concatenations to return an array of the same kind (#41194) (cherry picked from commit 2f1a958826f5d38751d566b62ab5ffc78a83655d) --- base/abstractarray.jl | 16 ++++++++++------ test/bitarray.jl | 7 +++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 7bda12abcc354..b438a0ad36339 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1644,8 +1644,12 @@ cat_ndims(a::AbstractArray) = ndims(a) cat_indices(A, d) = OneTo(1) cat_indices(A::AbstractArray, d) = axes(A, d) -cat_similar(A, ::Type{T}, shape) where T = Array{T}(undef, shape) -cat_similar(A::AbstractArray, ::Type{T}, shape) where T = similar(A, T, shape) +cat_similar(A, ::Type{T}, shape::Tuple) where T = Array{T}(undef, shape) +cat_similar(A, ::Type{T}, shape::Vector) where T = Array{T}(undef, shape...) +cat_similar(A::Array, ::Type{T}, shape::Tuple) where T = Array{T}(undef, shape) +cat_similar(A::Array, ::Type{T}, shape::Vector) where T = Array{T}(undef, shape...) +cat_similar(A::AbstractArray, T::Type, shape::Tuple) = similar(A, T, shape) +cat_similar(A::AbstractArray, T::Type, shape::Vector) = similar(A, T, shape...) # These are for backwards compatibility (even though internal) cat_shape(dims, shape::Tuple{Vararg{Int}}) = shape @@ -2204,7 +2208,7 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as::AbstractArray...) where {T, N} end end - A = Array{T, nd}(undef, ntuple(d -> cat_size(as[1], d), N - 1)..., Ndim, ntuple(x -> 1, nd - N)...) + A = cat_similar(as[1], T, (ntuple(d -> size(as[1], d), N - 1)..., Ndim, ntuple(x -> 1, nd - N)...)) k = 1 for a ∈ as for i ∈ eachindex(a) @@ -2300,7 +2304,7 @@ function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, len == outlen || ArgumentError("too many elements in arguments; expected $(outlen), got $(len)") |> throw # copy into final array - A = Array{T, nd}(undef, outdims...) + A = cat_similar(as[1], T, outdims) # @assert all(==(0), currentdims) outdims .= 0 hvncat_fill!(A, currentdims, outdims, d1, d2, as) @@ -2361,12 +2365,12 @@ function _typed_hvncat(::Type{T}, shape::Tuple{Vararg{Tuple, N}}, row_first::Boo # @assert all(==(0), blockcounts) # copy into final array - A = Array{T, nd}(undef, outdims...) + A = cat_similar(as[1], T, outdims) hvncat_fill!(A, currentdims, blockcounts, d1, d2, as) return A end -function hvncat_fill!(A::Array{T, N}, scratch1::Vector{Int}, scratch2::Vector{Int}, d1::Int, d2::Int, as::Tuple{Vararg}) where {T, N} +function hvncat_fill!(A::AbstractArray{T, N}, scratch1::Vector{Int}, scratch2::Vector{Int}, d1::Int, d2::Int, as::Tuple{Vararg}) where {T, N} outdims = size(A) offsets = scratch1 inneroffsets = scratch2 diff --git a/test/bitarray.jl b/test/bitarray.jl index cee7624d9a81a..b565252664876 100644 --- a/test/bitarray.jl +++ b/test/bitarray.jl @@ -1704,3 +1704,10 @@ end @check_bit_operation all!(falses(100), trues(100, 100)) @check_bit_operation all!(falses(1000), trues(1000, 100)) end + +@testset "multidimensional concatenation returns BitArrays" begin + a = BitVector(ones(5)) + @test typeof([a ;;; a]) <: BitArray + @test typeof([a a ;;; a a]) <: BitArray + @test typeof([a a ;;; [a a]]) <: BitArray +end From d0a909b2a4f1cb6f89987f6e4daeeec892034b63 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Tue, 15 Jun 2021 09:00:56 +0200 Subject: [PATCH 018/146] Fix Rational{T} constructor for abstract T (#41229) (cherry picked from commit e34c77b41d75f5ad7b321de2f876e3a1b3594fc7) --- base/rational.jl | 7 ++++--- test/rational.jl | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/base/rational.jl b/base/rational.jl index a998787f69685..ab4e7d6d0abbd 100644 --- a/base/rational.jl +++ b/base/rational.jl @@ -18,21 +18,22 @@ unsafe_rational(num::T, den::T) where {T<:Integer} = unsafe_rational(T, num, den unsafe_rational(num::Integer, den::Integer) = unsafe_rational(promote(num, den)...) @noinline __throw_rational_argerror_typemin(T) = throw(ArgumentError("invalid rational: denominator can't be typemin($T)")) -function checked_den(num::T, den::T) where T<:Integer +function checked_den(::Type{T}, num::T, den::T) where T<:Integer if signbit(den) den = -den - signbit(den) && __throw_rational_argerror_typemin(T) + signbit(den) && __throw_rational_argerror_typemin(typeof(den)) num = -num end return unsafe_rational(T, num, den) end +checked_den(num::T, den::T) where T<:Integer = checked_den(T, num, den) checked_den(num::Integer, den::Integer) = checked_den(promote(num, den)...) @noinline __throw_rational_argerror_zero(T) = throw(ArgumentError("invalid rational: zero($T)//zero($T)")) function Rational{T}(num::Integer, den::Integer) where T<:Integer iszero(den) && iszero(num) && __throw_rational_argerror_zero(T) num, den = divgcd(num, den) - return checked_den(T(num), T(den)) + return checked_den(T, T(num), T(den)) end Rational(n::T, d::T) where {T<:Integer} = Rational{T}(n, d) diff --git a/test/rational.jl b/test/rational.jl index aa7d48fb52513..24b99cdc8b6d9 100644 --- a/test/rational.jl +++ b/test/rational.jl @@ -618,3 +618,7 @@ end @testset "checked_den with different integer types" begin @test Base.checked_den(Int8(4), Int32(8)) == Base.checked_den(Int32(4), Int32(8)) end + +@testset "Rational{T} with non-concrete T (issue #41222)" begin + @test @inferred(Rational{Integer}(2,3)) isa Rational{Integer} +end From aa3a19f67a82c31b55c46110e1c469281fad1041 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Tue, 15 Jun 2021 09:04:02 +0200 Subject: [PATCH 019/146] =?UTF-8?q?Fix=20for=20reverse=20search,=20fixes?= =?UTF-8?q?=20#39401,=20fixes=20#40244=EF=BB=BF(#41203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 88a05605f7186d68c44ea8845e2bb5e2e087bc42) --- base/strings/search.jl | 2 +- test/strings/search.jl | 2 ++ test/strings/util.jl | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/base/strings/search.jl b/base/strings/search.jl index 338222ac5e1c1..c1fd3fd6fedd1 100644 --- a/base/strings/search.jl +++ b/base/strings/search.jl @@ -459,7 +459,7 @@ function _rsearchindex(s::AbstractVector{<:Union{Int8,UInt8}}, t::AbstractVector n = length(t) m = length(s) k = Int(_k) - sentinel - k < 1 && throw(BoundsError(s, _k)) + k < 0 && throw(BoundsError(s, _k)) if n == 0 return 0 <= k <= m ? max(k, 1) : sentinel diff --git a/test/strings/search.jl b/test/strings/search.jl index 5f52f8024cdd1..491987af06888 100644 --- a/test/strings/search.jl +++ b/test/strings/search.jl @@ -97,6 +97,8 @@ for str in [astr] @test findprev('l', str, 2) == nothing @test findlast(',', str) == 6 @test findprev(',', str, 5) == nothing + @test findlast(str, "") == nothing + @test findlast(str^2, str) == nothing @test findlast('\n', str) == 14 end diff --git a/test/strings/util.jl b/test/strings/util.jl index 3cf434feab113..2b08e2819e33b 100644 --- a/test/strings/util.jl +++ b/test/strings/util.jl @@ -163,6 +163,7 @@ end @test split("", "") == rsplit("", "") == [""] @test split("abc", "") == rsplit("abc", "") == ["a","b","c"] @test rsplit("abc", "", limit=2) == ["ab","c"] + @test rsplit("", "//") == [""] @test split("abc", "", limit=2) == ["a","bc"] @test split("", r"") == [""] From ed9fda25095387b3016c1f1d375ebc0a4a572c05 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Fri, 18 Jun 2021 11:03:31 +0200 Subject: [PATCH 020/146] update Pkg to newest 1.7 version --- .../Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 | 1 - .../Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 | 1 - .../Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 | 1 + .../Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 | 1 + stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 create mode 100644 deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 diff --git a/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 b/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 deleted file mode 100644 index 29a205ec1886e..0000000000000 --- a/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -0bc28e338a09e83031d20d176bde17bb diff --git a/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 b/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 deleted file mode 100644 index 624389dcf8076..0000000000000 --- a/deps/checksums/Pkg-13ed9373de1c6da3952ed6db99b1bac37d8deedc.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -f351e1bdfef8b3cd07aa605e24127898d3f73b819aa16de477bcf351419d26351f304c9695a99ae6f8db2d65962e9ab1143ce05c12aea6fcb50f3e47c86aafd5 diff --git a/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 b/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 new file mode 100644 index 0000000000000..35eda4f473f24 --- /dev/null +++ b/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 @@ -0,0 +1 @@ +77b9bf19937476f9b2120dfbafc3322b diff --git a/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 b/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 new file mode 100644 index 0000000000000..67ec25a15762a --- /dev/null +++ b/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 @@ -0,0 +1 @@ +c9079f0c2b4d6ad34eca479f4db14041ac04f0780feaa1b16de552e55ca862f0d56c9a50437304639b96777a2c941c4b7a5eb0ce23071a456126a5c2da23c2e1 diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index df985ac9d3167..1693797662604 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = release-1.7 -PKG_SHA1 = 13ed9373de1c6da3952ed6db99b1bac37d8deedc +PKG_SHA1 = 81af75b902586919a858f06949b7c9e6121f1629 From b570546b68de16bd208ca76a20c1385919de18d6 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sun, 20 Jun 2021 08:31:15 +0200 Subject: [PATCH 021/146] Set VERSION to 1.7.0-beta2 (#41274) --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 306efb8b1ad43..070cf249531ef 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.0-beta1 +1.7.0-beta2 From ef96e02a11f399b68a9e732a26a243f0d9cff347 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 17 Jun 2021 22:33:07 -0700 Subject: [PATCH 022/146] [buildkite] Implement secrets encryption and sandboxing (#41256) This adds a proof-of-concept demonstration of two new buildkite plugins: * `cryptic` adds secrets management to privileged pipelines. These pipelines cannot be freely modified; their integrity is verified against a signature maintained by committers with a secret key. This allows certain portions of the CI configuration (which are privileged and can decrypt encrypted files/environment variables) to remain public, but read-only to the general populace. * `sandbox` adds a generic sandboxing mechanism that allows CI steps to be run within user-provided rootfs images. We're using these here to provide compiler toolchains for the `llvm-passes` CI steps, and the plan is to eventually provide _all_ compiler toolchains through such rootfs images. (cherry picked from commit 61ae86da895ff0be8a2cd051277a05ad48f91b4a) --- .buildkite/0_webui.yml | 24 ++++ .buildkite/cryptic_repo_keys/README.md | 6 + .../cryptic_repo_keys/repo_key.2297e5e7 | Bin 0 -> 256 bytes .buildkite/llvm_passes.yml | 40 ++++++ .buildkite/pipeline.yml | 43 +++--- .buildkite/rootfs_images/Manifest.toml | 134 ++++++++++++++++++ .buildkite/rootfs_images/Project.toml | 5 + .buildkite/rootfs_images/README.md | 5 + .buildkite/rootfs_images/llvm-passes.jl | 27 ++++ .buildkite/rootfs_images/rootfs_utils.jl | 92 ++++++++++++ .buildkite/signed_pipeline_test.yml | 17 +++ 11 files changed, 367 insertions(+), 26 deletions(-) create mode 100644 .buildkite/0_webui.yml create mode 100644 .buildkite/cryptic_repo_keys/README.md create mode 100644 .buildkite/cryptic_repo_keys/repo_key.2297e5e7 create mode 100644 .buildkite/llvm_passes.yml create mode 100644 .buildkite/rootfs_images/Manifest.toml create mode 100644 .buildkite/rootfs_images/Project.toml create mode 100644 .buildkite/rootfs_images/README.md create mode 100755 .buildkite/rootfs_images/llvm-passes.jl create mode 100644 .buildkite/rootfs_images/rootfs_utils.jl create mode 100644 .buildkite/signed_pipeline_test.yml diff --git a/.buildkite/0_webui.yml b/.buildkite/0_webui.yml new file mode 100644 index 0000000000000..d5ba4e0ea7cf9 --- /dev/null +++ b/.buildkite/0_webui.yml @@ -0,0 +1,24 @@ +# This file represents what is put into the webUI. +# It is purely for keeping track of the changes we make to the webUI configuration; modifying this file has no effect. +# We use the `cryptic` buildkite plugin to provide secrets management, which requires some integration into the WebUI's steps. +agents: + queue: "julia" + sandbox.jl: "true" + +steps: + - label: ":unlock: Unlock secrets, launch pipelines" + plugins: + - staticfloat/cryptic: + # Our list of pipelines that should be launched (but don't require a signature) + # These pipelines can be modified by any contributor and CI will still run. + # 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/pipeline.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/signed_pipeline_test.yml + signature: "U2FsdGVkX18aZgryp6AJTArgD2uOnVWyFFGVOP5qsY4WbGQ/LVAcYiMEp9cweV+2iht+vmEF949CuuGTeQPA1fKlhPwkG3nZ688752DUB6en9oM2nuL31NoDKWHhpygZ" diff --git a/.buildkite/cryptic_repo_keys/README.md b/.buildkite/cryptic_repo_keys/README.md new file mode 100644 index 0000000000000..93ed17ce4757b --- /dev/null +++ b/.buildkite/cryptic_repo_keys/README.md @@ -0,0 +1,6 @@ +## Cryptic repository keys + +This folder contains RSA-encrypted symmetric AES keys. +These are used by buildkite agents to decrypt the secrets embedded within this repository. +Each buildkite agent contains an RSA secret key that is used to unlock the symmetric AES key that was used to encrypt the secrets within this repository. +For more information, see the [`cryptic` buildkite plugin repository](https://github.com/staticfloat/cryptic-buildkite-plugin). diff --git a/.buildkite/cryptic_repo_keys/repo_key.2297e5e7 b/.buildkite/cryptic_repo_keys/repo_key.2297e5e7 new file mode 100644 index 0000000000000000000000000000000000000000..2ab9198b4ce2d7c7a9327935e18aaef5943629d2 GIT binary patch literal 256 zcmV+b0ssE4{g>pIb#Eq&=vC$Qr^8S_O6!cOYE`=}q%}#an@eaJd$RWGY{B`_JI5h4 zkH`Ok?yS%>4AD6gqiiL&E|`(uBGp1*D8z1}bTOSJGyXKmUCrMUN%Q;gJ{M_gVt6DF z#aRD2;iY!|^9jgEcBXhT=jxw2yplIkGkb~?zh)kpuL|wT!R7{E{^jQhsqTt2Woi5X z6&zlfSSPoyKVU`TIJAL8I6(F*9}>v<(M$c2U_*AHb;CSzxbLIaZK0;0gYIZ?hzwB# zq^tZ&SA{ud8h!8dRd!Rzp7pWdE3F(RM#CkMHZoXOfk*SkHmzrDCiOUb@l`xQjdi^f GB)!2VDuP}B literal 0 HcmV?d00001 diff --git a/.buildkite/llvm_passes.yml b/.buildkite/llvm_passes.yml new file mode 100644 index 0000000000000..862f748c18499 --- /dev/null +++ b/.buildkite/llvm_passes.yml @@ -0,0 +1,40 @@ +# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones +# since we need nestable sandboxing. The rootfs images being used here are built from +# the `.buildkite/rootfs_images/llvm-passes.jl` file. +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: "analyzegc" + plugins: + - JuliaCI/julia#v1: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz + rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + commands: | + echo "--- Install in-tree LLVM dependencies" + make -j 6 -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind + echo "+++ run clangsa/analyzegc" + make -j 6 -C test/clangsa + make -j 6 -C src analyzegc + timeout_in_minutes: 60 + + - label: "llvmpasses" + plugins: + - JuliaCI/julia#v1: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz + rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + uid: 1000 + gid: 1000 + commands: | + echo "+++ run llvmpasses" + make -j 6 release + make -j 6 -C src install-analysis-deps + make -j 6 -C test/llvmpasses + timeout_in_minutes: 60 diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index e63431649f897..d76f3fd77bd4f 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,28 +1,19 @@ +# This file launches all the build jobs that _don't_ require secrets access. +# These jobs can pass their output off to jobs that do require secrets access, +# but those privileged steps require signing before they can be run. +# +# Yes, this is creating another layer of indirection; the flow now looks like: +# +# [webui] -> pipeline.yml -> llvm_passes.yml +# +# when we could theoretically just have the `webui` launch `llvm_passes.yml`, +# however this raises the bar for contributors to add new (unsigned) steps to +# our CI configuration, so I'd rather live with an extra layer of indirection +# and only need to touch the webui configuration when we need to alter +# something about the privileged steps. steps: - - label: "analyzegc" - commands: - - echo "--- Install apt-get pre-reqs" - - apt-get update - - apt-get install -y build-essential libatomic1 python python3 gfortran perl wget m4 cmake pkg-config curl - - echo "--- Install in-tree LLVM dependencies" - - make -j 6 -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind - - echo "+++ run clangsa/analyzegc" - - make -j 6 -C test/clangsa - - make -j 6 -C src analyzegc + - label: ":buildkite: Launch unsigned pipelines" + commands: | + buildkite-agent pipeline upload .buildkite/llvm_passes.yml agents: - queue: "juliacpu" # this should be julia -- also in pipeline settings - # os: linux # tag missing for juliacpu queue - timeout_in_minutes: 60 - - label: "llvmpasses" - commands: - - echo "--- Install apt-get pre-reqs" - - apt-get update - - apt-get install -y build-essential libatomic1 python python3 gfortran perl wget m4 cmake pkg-config curl - - echo "+++ run llvmpasses" - - make -j 6 release - - make -j 6 -C src install-analysis-deps - - make -j 6 -C test/llvmpasses - agents: - queue: "juliacpu" # this should be julia -- also in pipeline settings - # os: linux # tag missing for juliacpu queue - timeout_in_minutes: 60 + queue: julia diff --git a/.buildkite/rootfs_images/Manifest.toml b/.buildkite/rootfs_images/Manifest.toml new file mode 100644 index 0000000000000..d24e9a4ee166e --- /dev/null +++ b/.buildkite/rootfs_images/Manifest.toml @@ -0,0 +1,134 @@ +# This file is machine-generated - editing it directly is not advised + +[[ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" + +[[Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[Downloads]] +deps = ["ArgTools", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.3.0" + +[[LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" + +[[LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" + +[[LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" + +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" + +[[MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" + +[[NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" + +[[Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[Preferences]] +deps = ["TOML"] +git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.2.2" + +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[Random]] +deps = ["Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[Scratch]] +deps = ["Dates"] +git-tree-sha1 = "0b4b7f1393cff97c33891da2a0bf69c6ed241fda" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.1.0" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" + +[[Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" + +[[UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" + +[[ghr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f5c8cb306d4fe2d1fff90443a088fc5ba536c134" +uuid = "07c12ed4-43bc-5495-8a2a-d5838ef8d533" +version = "0.13.0+1" + +[[nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" + +[[p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/.buildkite/rootfs_images/Project.toml b/.buildkite/rootfs_images/Project.toml new file mode 100644 index 0000000000000..1dbde5ed9df66 --- /dev/null +++ b/.buildkite/rootfs_images/Project.toml @@ -0,0 +1,5 @@ +[deps] +Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" +SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" +Scratch = "6c6a2e73-6563-6170-7368-637461726353" +ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533" diff --git a/.buildkite/rootfs_images/README.md b/.buildkite/rootfs_images/README.md new file mode 100644 index 0000000000000..1d3962c2bee3e --- /dev/null +++ b/.buildkite/rootfs_images/README.md @@ -0,0 +1,5 @@ +## Rootfs images + +Our CI setup makes use of rootfs images that contain our build tools. +These rootfs images are built using the fairly simple scripts held within this directory. +Most images are based on Debian, making use of `debootstrap` to provide a quick and easy rootfs with packages installed through an initial `apt` invocation. diff --git a/.buildkite/rootfs_images/llvm-passes.jl b/.buildkite/rootfs_images/llvm-passes.jl new file mode 100755 index 0000000000000..17c9588f75c9e --- /dev/null +++ b/.buildkite/rootfs_images/llvm-passes.jl @@ -0,0 +1,27 @@ +#!/usr/bin/env julia + +## This rootfs includes enough of a host toolchain to build the LLVM passes. +## Eventually, this image will probably be replaced with the actual builder image, +## as that will have the necessary toolchains as well, but that image is not built yet. + +include("rootfs_utils.jl") + +# Build debian-based image with the following extra packages: +packages = [ + "build-essential", + "libatomic1", + "python", + "python3", + "gfortran", + "perl", + "wget", + "m4", + "cmake", + "pkg-config", + "curl", + "git", +] +tarball_path = debootstrap("llvm-passes"; packages) + +# Upload it +upload_rootfs_image(tarball_path) diff --git a/.buildkite/rootfs_images/rootfs_utils.jl b/.buildkite/rootfs_images/rootfs_utils.jl new file mode 100644 index 0000000000000..7df224a31f740 --- /dev/null +++ b/.buildkite/rootfs_images/rootfs_utils.jl @@ -0,0 +1,92 @@ +#!/usr/bin/env julia + +# This is an example invocation of `debootstrap` to generate a Debian/Ubuntu-based rootfs +using Scratch, Pkg, Pkg.Artifacts, ghr_jll, SHA, Dates + +# Utility functions +getuid() = ccall(:getuid, Cint, ()) +getgid() = ccall(:getgid, Cint, ()) + +function debootstrap(name::String; release::String="buster", variant::String="minbase", + packages::Vector{String}=String[], force::Bool=false) + if Sys.which("debootstrap") === nothing + error("Must install `debootstrap`!") + end + + tarball_path = joinpath(@get_scratch!("rootfs-images"), "$(name).tar.gz") + if !force && isfile(tarball_path) + @error("Refusing to overwrite tarball without `force` set", tarball_path) + error() + end + + artifact_hash = create_artifact() do rootfs + packages_string = join(push!(packages, "locales"), ",") + @info("Running debootstrap", release, variant, packages) + run(`sudo debootstrap --variant=$(variant) --include=$(packages_string) $(release) "$(rootfs)"`) + + # Remove special `dev` files + @info("Cleaning up `/dev`") + for f in readdir(joinpath(rootfs, "dev"); join=true) + # Keep the symlinks around (such as `/dev/fd`), as they're useful + if !islink(f) + run(`sudo rm -rf "$(f)"`) + end + end + + # take ownership of the entire rootfs + @info("Chown'ing rootfs") + run(`sudo chown $(getuid()):$(getgid()) -R "$(rootfs)"`) + + # Write out rootfs-info to contain a minimally-identifying string + open(joinpath(rootfs, "etc", "rootfs-info"), write=true) do io + write(io, """ + rootfs_type=debootstrap + release=$(release) + variant=$(variant) + packages=$(packages_string) + build_date=$(Dates.now()) + """) + end + + # Write out a reasonable default resolv.conf + open(joinpath(rootfs, "etc", "resolv.conf"), write=true) do io + write(io, """ + nameserver 1.1.1.1 + nameserver 8.8.8.8 + """) + end + + # Remove `_apt` user so that `apt` doesn't try to `setgroups()` + @info("Removing `_apt` user") + open(joinpath(rootfs, "etc", "passwd"), write=true, read=true) do io + filtered_lines = filter(l -> !startswith(l, "_apt:"), readlines(io)) + truncate(io, 0) + seek(io, 0) + for l in filtered_lines + println(io, l) + end + end + + # Set up the one true locale + @info("Setting up UTF-8 locale") + open(joinpath(rootfs, "etc", "locale.gen"), "a") do io + println(io, "en_US.UTF-8 UTF-8") + end + run(`sudo chroot --userspec=$(getuid()):$(getgid()) $(rootfs) locale-gen`) + end + + # Archive it into a `.tar.gz` file + @info("Archiving", tarball_path, artifact_hash) + archive_artifact(artifact_hash, tarball_path) + + return tarball_path +end + +function upload_rootfs_image(tarball_path::String; github_repo::String="JuliaCI/rootfs-images") + # Upload it to `github_repo` + tag_name = "v1" + tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))" + @info("Uploading to $(github_repo)@$(tag_name)", tarball_url) + run(`$(ghr_jll.ghr()) -u $(dirname(github_repo)) -r $(basename(github_repo)) -replace $(tag_name) $(tarball_path)`) + return tarball_url +end diff --git a/.buildkite/signed_pipeline_test.yml b/.buildkite/signed_pipeline_test.yml new file mode 100644 index 0000000000000..fb13ac15a8d65 --- /dev/null +++ b/.buildkite/signed_pipeline_test.yml @@ -0,0 +1,17 @@ +agents: + queue: "julia" + os: "linux" + +## pipeline that showcases decryption of environment variable +steps: + - label: ":lock: :rocket: Signed pipeline test" + plugins: + - staticfloat/cryptic#v1: + variables: + - SECRET_KEY="U2FsdGVkX18tb7st0SuQAvh4Yv4xENxOAu8q9XkmOeDVKBNY4FngEwK3xmiKUqaS" + 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?} From 226514a0612b80d5d39f9ce84b880e29aab84de2 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Fri, 18 Jun 2021 10:10:06 +0200 Subject: [PATCH 023/146] make `statement_costs!` accept IRCode (#41257) I want to use this in Cthulhu, which uses `IRCode` for optimized code instead of `CodeInfo`. (cherry picked from commit 083272b933c783c1d039ee800572c5d153416c38) --- base/compiler/optimize.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/compiler/optimize.jl b/base/compiler/optimize.jl index 353a9ab5b3391..2d4f0d022fd6d 100644 --- a/base/compiler/optimize.jl +++ b/base/compiler/optimize.jl @@ -565,12 +565,14 @@ function inline_worthy(ir::IRCode, return true end -function statement_costs!(cost::Vector{Int}, body::Vector{Any}, src::CodeInfo, sptypes::Vector{Any}, unionpenalties::Bool, params::OptimizationParams) +function statement_costs!(cost::Vector{Int}, body::Vector{Any}, src::Union{CodeInfo, IRCode}, sptypes::Vector{Any}, unionpenalties::Bool, params::OptimizationParams) throw_blocks = params.unoptimize_throw_blocks ? find_throw_blocks(body) : nothing maxcost = 0 for line = 1:length(body) stmt = body[line] - thiscost = statement_or_branch_cost(stmt, line, src, sptypes, src.slottypes, unionpenalties, params, throw_blocks) + thiscost = statement_or_branch_cost(stmt, line, src, sptypes, + src isa CodeInfo ? src.slottypes : src.argtypes, + unionpenalties, params, throw_blocks) cost[line] = thiscost if thiscost > maxcost maxcost = thiscost From 277162752103b59c72905ad5b3b413b6f4578380 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 18 Jun 2021 11:31:36 -0400 Subject: [PATCH 024/146] fix emit_f_is to be safepoint-free, like jl_egal (#41255) (cherry picked from commit 8739df2c03187b0faf503acc29b2bf6fdda19913) --- src/builtins.c | 6 +++ src/cgutils.cpp | 16 +++--- src/codegen.cpp | 96 ++++++++++++++++++++++------------- src/julia.h | 18 ++++--- src/llvm-late-gc-lowering.cpp | 2 +- 5 files changed, 90 insertions(+), 48 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index 1c4a257a13137..b5b4bb4069773 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -198,6 +198,12 @@ JL_DLLEXPORT int (jl_egal)(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value return jl_egal(a, b); } +JL_DLLEXPORT int jl_egal__unboxed(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED, jl_datatype_t *dt) JL_NOTSAFEPOINT +{ + // warning: a,b may NOT have been gc-rooted by the caller + return jl_egal__unboxed_(a, b, dt); +} + int jl_egal__special(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED, jl_datatype_t *dt) JL_NOTSAFEPOINT { if (dt == jl_simplevector_type) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index bb9b3d63f91fb..c5e25466110d0 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1120,6 +1120,15 @@ static bool can_optimize_isa_union(jl_uniontype_t *type) return (_can_optimize_isa(type->a, counter) && _can_optimize_isa(type->b, counter)); } +// a simple case of emit_isa that is obvious not to include a safe-point +static Value *emit_exactly_isa(jl_codectx_t &ctx, const jl_cgval_t &arg, jl_value_t *dt) +{ + assert(jl_is_concrete_type(dt)); + return ctx.builder.CreateICmpEQ( + emit_typeof_boxed(ctx, arg), + track_pjlvalue(ctx, literal_pointer_val(ctx, dt))); +} + static std::pair emit_isa(jl_codectx_t &ctx, const jl_cgval_t &x, jl_value_t *type, const std::string *msg); @@ -1217,12 +1226,7 @@ static std::pair emit_isa(jl_codectx_t &ctx, const jl_cgval_t &x, return std::make_pair(ConstantInt::get(T_int1, 0), false); } } - if (auto val = ((jl_datatype_t*)intersected_type)->instance) { - auto ptr = track_pjlvalue(ctx, literal_pointer_val(ctx, val)); - return {ctx.builder.CreateICmpEQ(boxed(ctx, x), ptr), false}; - } - return std::make_pair(ctx.builder.CreateICmpEQ(emit_typeof_boxed(ctx, x), - track_pjlvalue(ctx, literal_pointer_val(ctx, intersected_type))), false); + return std::make_pair(emit_exactly_isa(ctx, x, intersected_type), false); } jl_datatype_t *dt = (jl_datatype_t*)jl_unwrap_unionall(intersected_type); if (jl_is_datatype(dt) && !dt->name->abstract && jl_subtype(dt->name->wrapper, type)) { diff --git a/src/codegen.cpp b/src/codegen.cpp index f7ac3e45271d8..cba7d1d2d3080 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -628,11 +628,11 @@ static const auto jl_excstack_state_func = new JuliaFunction{ [](LLVMContext &C) { return FunctionType::get(T_size, false); }, nullptr, }; -static const auto jlegal_func = new JuliaFunction{ - "jl_egal", +static const auto jlegalx_func = new JuliaFunction{ + "jl_egal__unboxed", [](LLVMContext &C) { - Type *T = PointerType::get(T_jlvalue, AddressSpace::CalleeRooted); - return FunctionType::get(T_int32, {T, T}, false); }, + Type *T = PointerType::get(T_jlvalue, AddressSpace::Derived); + return FunctionType::get(T_int32, {T, T, T_prjlvalue}, false); }, [](LLVMContext &C) { return AttributeList::get(C, Attributes(C, {Attribute::ReadOnly, Attribute::NoUnwind, Attribute::ArgMemOnly}), AttributeSet(), @@ -2411,10 +2411,10 @@ static Value *emit_box_compare(jl_codectx_t &ctx, const jl_cgval_t &arg1, const Value *nullcheck1, Value *nullcheck2) { if (jl_pointer_egal(arg1.typ) || jl_pointer_egal(arg2.typ)) { + assert((arg1.isboxed || arg1.constant) && (arg2.isboxed || arg2.constant) && + "Expected unboxed cases to be handled earlier"); Value *varg1 = arg1.constant ? literal_pointer_val(ctx, arg1.constant) : arg1.V; Value *varg2 = arg2.constant ? literal_pointer_val(ctx, arg2.constant) : arg2.V; - assert(varg1 && varg2 && (arg1.isboxed || arg1.TIndex) && (arg2.isboxed || arg2.TIndex) && - "Only boxed types are valid for pointer comparison."); varg1 = maybe_decay_tracked(ctx, varg1); varg2 = maybe_decay_tracked(ctx, varg2); if (cast(varg1->getType())->getAddressSpace() != cast(varg2->getType())->getAddressSpace()) { @@ -2426,10 +2426,19 @@ static Value *emit_box_compare(jl_codectx_t &ctx, const jl_cgval_t &arg1, const } return emit_nullcheck_guard2(ctx, nullcheck1, nullcheck2, [&] { - Value *varg1 = mark_callee_rooted(ctx, boxed(ctx, arg1)); - Value *varg2 = mark_callee_rooted(ctx, boxed(ctx, arg2)); - return ctx.builder.CreateTrunc(ctx.builder.CreateCall(prepare_call(jlegal_func), - {varg1, varg2}), T_int1); + Value *varg1 = arg1.constant ? literal_pointer_val(ctx, arg1.constant) : maybe_bitcast(ctx, value_to_pointer(ctx, arg1).V, T_pjlvalue); + Value *varg2 = arg2.constant ? literal_pointer_val(ctx, arg2.constant) : maybe_bitcast(ctx, value_to_pointer(ctx, arg2).V, T_pjlvalue); + varg1 = decay_derived(ctx, varg1); + varg2 = decay_derived(ctx, varg2); + Value *neq = ctx.builder.CreateICmpNE(varg1, varg2); + return emit_guarded_test(ctx, neq, true, [&] { + Value *dtarg = emit_typeof_boxed(ctx, arg1); + Value *dt_eq = ctx.builder.CreateICmpEQ(dtarg, emit_typeof_boxed(ctx, arg2)); + return emit_guarded_test(ctx, dt_eq, false, [&] { + return ctx.builder.CreateTrunc(ctx.builder.CreateCall(prepare_call(jlegalx_func), + {varg1, varg2, dtarg}), T_int1); + }); + }); }); } @@ -2583,6 +2592,7 @@ static Value *emit_bits_compare(jl_codectx_t &ctx, jl_cgval_t arg1, jl_cgval_t a // representing the undef-ness of `arg1` and `arg2`. // This can only happen when comparing two fields of the same time and the result should be // true if both are NULL +// Like the runtime counterpart, this is codegen guaranteed to be non-allocating and to exclude safepoints static Value *emit_f_is(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgval_t &arg2, Value *nullcheck1, Value *nullcheck2) { @@ -2603,46 +2613,45 @@ static Value *emit_f_is(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgva // since it is normalized to `::Type{Union{}}` instead... if (arg1.TIndex) return emit_nullcheck_guard(ctx, nullcheck1, [&] { - return emit_isa(ctx, arg1, rt2, NULL).first; // rt2 is a singleton type + return emit_exactly_isa(ctx, arg1, rt2); // rt2 is a singleton type }); if (arg2.TIndex) return emit_nullcheck_guard(ctx, nullcheck2, [&] { - return emit_isa(ctx, arg2, rt1, NULL).first; // rt1 is a singleton type + return emit_exactly_isa(ctx, arg2, rt1); // rt1 is a singleton type }); + if (!(arg1.isboxed || arg1.constant) || !(arg2.isboxed || arg2.constant)) + // not TIndex && not boxed implies it is an unboxed value of a different type from this singleton + // (which was probably caught above, but just to be safe, we repeat it here explicitly) + return ConstantInt::get(T_int1, 0); + Value *varg1 = arg1.constant ? literal_pointer_val(ctx, arg1.constant) : maybe_bitcast(ctx, arg1.Vboxed, T_pjlvalue); + Value *varg2 = arg2.constant ? literal_pointer_val(ctx, arg2.constant) : maybe_bitcast(ctx, arg2.Vboxed, T_pjlvalue); // rooting these values isn't needed since we won't load this pointer // and we know at least one of them is a unique Singleton // which is already enough to ensure pointer uniqueness for this test // even if the other pointer managed to get garbage collected - return ctx.builder.CreateICmpEQ( - mark_callee_rooted(ctx, boxed(ctx, arg1)), - mark_callee_rooted(ctx, boxed(ctx, arg2))); + // TODO: use emit_pointer_from_objref instead, per comment above + return ctx.builder.CreateICmpEQ(decay_derived(ctx, varg1), decay_derived(ctx, varg2)); } if (jl_type_intersection(rt1, rt2) == (jl_value_t*)jl_bottom_type) // types are disjoint (exhaustive test) return ConstantInt::get(T_int1, 0); - // If both sides are boxed or can be trivially boxed, - // we'll prefer to do a pointer check. - // At this point, we know that at least one of the arguments isn't a constant - // so a runtime content check will involve at least one load from the - // pointer (and likely a type check) - // so a pointer comparison should be no worse than that even in imaging mode - // when the constant pointer has to be loaded. - if ((arg1.V || arg1.constant) && (arg2.V || arg2.constant) && - (jl_pointer_egal(rt1) || jl_pointer_egal(rt2)) && - // jl_pointer_egal returns true for Bool, which is not helpful here - (rt1 != (jl_value_t*)jl_bool_type || rt2 != (jl_value_t*)jl_bool_type)) - return ctx.builder.CreateICmpEQ(boxed(ctx, arg1), boxed(ctx, arg2)); - bool justbits1 = jl_is_concrete_immutable(rt1); bool justbits2 = jl_is_concrete_immutable(rt2); if (justbits1 || justbits2) { // whether this type is unique'd by value return emit_nullcheck_guard2(ctx, nullcheck1, nullcheck2, [&] () -> Value* { jl_value_t *typ = justbits1 ? rt1 : rt2; + if (typ == (jl_value_t*)jl_bool_type) { // aka jl_pointer_egal + // some optimizations for bool, since pointer comparison may be better + if ((arg1.isboxed || arg1.constant) && (arg2.isboxed || arg2.constant)) { // aka have-fast-pointer + Value *varg1 = arg1.constant ? literal_pointer_val(ctx, arg1.constant) : maybe_bitcast(ctx, arg1.Vboxed, T_pjlvalue); + Value *varg2 = arg2.constant ? literal_pointer_val(ctx, arg2.constant) : maybe_bitcast(ctx, arg2.Vboxed, T_pjlvalue); + return ctx.builder.CreateICmpEQ(decay_derived(ctx, varg1), decay_derived(ctx, varg2)); + } + } if (rt1 == rt2) return emit_bits_compare(ctx, arg1, arg2); - Value *same_type = (typ == rt2) ? emit_isa(ctx, arg1, typ, NULL).first : - emit_isa(ctx, arg2, typ, NULL).first; + Value *same_type = emit_exactly_isa(ctx, (typ == rt2 ? arg1 : arg2), typ); BasicBlock *currBB = ctx.builder.GetInsertBlock(); BasicBlock *isaBB = BasicBlock::Create(jl_LLVMContext, "is", ctx.f); BasicBlock *postBB = BasicBlock::Create(jl_LLVMContext, "post_is", ctx.f); @@ -2660,6 +2669,25 @@ static Value *emit_f_is(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgva }); } + // If either sides is boxed or can be trivially boxed, + // we'll prefer to do a pointer check. + // At this point, we know that at least one of the arguments isn't a constant + // so a runtime content check will involve at least one load from the + // pointer (and likely a type check) + // so a pointer comparison should be no worse than that even in imaging mode + // when the constant pointer has to be loaded. + // Note that we ignore nullcheck, since in the case where it may be set, we + // also knew the types of both fields must be the same so there cannot be + // any unboxed values on either side. + if (jl_pointer_egal(rt1) || jl_pointer_egal(rt2)) { + // n.b. Vboxed == isboxed || Tindex + if (!(arg1.Vboxed || arg1.constant) || !(arg2.Vboxed || arg2.constant)) + return ConstantInt::get(T_int1, 0); + Value *varg1 = arg1.constant ? literal_pointer_val(ctx, arg1.constant) : maybe_bitcast(ctx, arg1.Vboxed, T_pjlvalue); + Value *varg2 = arg2.constant ? literal_pointer_val(ctx, arg2.constant) : maybe_bitcast(ctx, arg2.Vboxed, T_pjlvalue); + return ctx.builder.CreateICmpEQ(decay_derived(ctx, varg1), decay_derived(ctx, varg2)); + } + // TODO: handle the case where arg1.typ != arg2.typ, or when one of these isn't union, // or when the union can be pointer if (arg1.TIndex && arg2.TIndex && jl_egal(arg1.typ, arg2.typ) && @@ -3498,8 +3526,7 @@ static jl_cgval_t emit_call_specfun_other(jl_codectx_t &ctx, jl_method_instance_ argvals[idx] = boxed(ctx, arg); } else if (et->isAggregateType()) { - if (!arg.ispointer()) - arg = value_to_pointer(ctx, arg); + arg = value_to_pointer(ctx, arg); // can lazy load on demand, no copy needed assert(at == PointerType::get(et, AddressSpace::Derived)); argvals[idx] = decay_derived(ctx, maybe_bitcast(ctx, @@ -5437,8 +5464,7 @@ static Function* gen_cfun_wrapper( } else if (T->isAggregateType()) { // aggregate types are passed by pointer - if (!inputarg.ispointer()) - inputarg = value_to_pointer(ctx, inputarg); + inputarg = value_to_pointer(ctx, inputarg); arg = maybe_bitcast(ctx, decay_derived(ctx, data_pointer(ctx, inputarg)), T->getPointerTo()); } @@ -7977,7 +8003,7 @@ static void init_jit_functions(void) add_named_global(jlleave_func, &jl_pop_handler); add_named_global(jl_restore_excstack_func, &jl_restore_excstack); add_named_global(jl_excstack_state_func, &jl_excstack_state); - add_named_global(jlegal_func, &jl_egal); + add_named_global(jlegalx_func, &jl_egal__unboxed); add_named_global(jlisa_func, &jl_isa); add_named_global(jlsubtype_func, &jl_subtype); add_named_global(jltypeassert_func, &jl_typeassert); diff --git a/src/julia.h b/src/julia.h index 93bd64bc996bc..faa738913af18 100644 --- a/src/julia.h +++ b/src/julia.h @@ -1320,15 +1320,11 @@ STATIC_INLINE int jl_is_array_zeroinit(jl_array_t *a) JL_NOTSAFEPOINT JL_DLLEXPORT int jl_egal(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED) JL_NOTSAFEPOINT; JL_DLLEXPORT int jl_egal__bits(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED, jl_datatype_t *dt) JL_NOTSAFEPOINT; JL_DLLEXPORT int jl_egal__special(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED, jl_datatype_t *dt) JL_NOTSAFEPOINT; +JL_DLLEXPORT int jl_egal__unboxed(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED, jl_datatype_t *dt) JL_NOTSAFEPOINT; JL_DLLEXPORT uintptr_t jl_object_id(jl_value_t *v) JL_NOTSAFEPOINT; -STATIC_INLINE int jl_egal_(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED) JL_NOTSAFEPOINT +STATIC_INLINE int jl_egal__unboxed_(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED, jl_datatype_t *dt) JL_NOTSAFEPOINT { - if (a == b) - return 1; - jl_datatype_t *dt = (jl_datatype_t*)jl_typeof(a); - if (dt != (jl_datatype_t*)jl_typeof(b)) - return 0; if (dt->name->mutabl) { if (dt == jl_simplevector_type || dt == jl_string_type || dt == jl_datatype_type) return jl_egal__special(a, b, dt); @@ -1336,6 +1332,16 @@ STATIC_INLINE int jl_egal_(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value } return jl_egal__bits(a, b, dt); } + +STATIC_INLINE int jl_egal_(const jl_value_t *a JL_MAYBE_UNROOTED, const jl_value_t *b JL_MAYBE_UNROOTED) JL_NOTSAFEPOINT +{ + if (a == b) + return 1; + jl_datatype_t *dt = (jl_datatype_t*)jl_typeof(a); + if (dt != (jl_datatype_t*)jl_typeof(b)) + return 0; + return jl_egal__unboxed_(a, b, dt); +} #define jl_egal(a, b) jl_egal_((a), (b)) // type predicates and basic operations diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp index 50015045151bc..ca066319d9c33 100644 --- a/src/llvm-late-gc-lowering.cpp +++ b/src/llvm-late-gc-lowering.cpp @@ -1514,7 +1514,7 @@ State LateLowerGCFrame::LocalScan(Function &F) { // Known functions emitted in codegen that are not safepoints if (callee == pointer_from_objref_func || callee == gc_preserve_begin_func || callee == gc_preserve_end_func || callee == typeof_func || - callee == pgcstack_getter || + callee == pgcstack_getter || callee->getName() == "jl_egal__unboxed" || callee->getName() == "jl_lock_value" || callee->getName() == "jl_unlock_value" || callee == write_barrier_func || callee->getName() == "memcmp") { continue; From 6dcb5790389bc82dd03c0c858a19b9dfa5575896 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Fri, 18 Jun 2021 14:18:45 -0400 Subject: [PATCH 025/146] fix #41253, parse error in `function (::T{})` (#41259) (cherry picked from commit dc2befcffc7412768097c2a2a6819724a4745aeb) --- src/julia-parser.scm | 7 +++++-- test/syntax.jl | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 70912c4272c8c..3a5dfad9293bd 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -1329,7 +1329,8 @@ (define (valid-1arg-func-sig? sig) (or (symbol? sig) (and (pair? sig) (eq? (car sig) '|::|) - (symbol? (cadr sig))))) + (or (symbol? (cadr sig)) + (length= sig 2))))) (define (unwrap-where x) (if (and (pair? x) (eq? (car x) 'where)) @@ -1469,7 +1470,9 @@ ;; function foo => syntax error (error (string "expected \"(\" in " word " definition"))) (if (not (valid-func-sig? paren sig)) - (error (string "expected \"(\" in " word " definition")) + (if paren + (error (string "ambiguous signature in " word " definition. Try adding a comma if this is a 1-argument anonymous function.")) + (error (string "expected \"(\" in " word " definition"))) sig))) (body (parse-block s))) (expect-end s word) diff --git a/test/syntax.jl b/test/syntax.jl index 7cee3c0755f65..6e3ec82ca3e81 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2927,3 +2927,6 @@ b'` == `$("a\\\nb")` \\ ``` == `'\'` end + +# issue #41253 +@test (function (::Dict{}); end)(Dict()) === nothing From 7d75619faeb91e6af5bd2235d2a467b6a7629ab2 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 18 Jun 2021 20:04:53 -0400 Subject: [PATCH 026/146] fix handling of MethodTable in precompile files (#41277) This was not an external method table, it is just a normal variable binding. This was causing the precompile files to be corrupted, since we use normal variables that look like this one at https://github.com/JuliaLang/julia/blob/dc2befcffc7412768097c2a2a6819724a4745aeb/base/compiler/utilities.jl#L139-L140 Fixes #41156 (cherry picked from commit e3197af4f34b170a0a1a203c731c711162cd08ca) --- src/dump.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dump.c b/src/dump.c index fff5e78b45cd6..49fa6efa431cd 100644 --- a/src/dump.c +++ b/src/dump.c @@ -981,9 +981,15 @@ static void jl_collect_lambdas_from_mod(jl_array_t *s, jl_module_t *m) JL_GC_DIS jl_collect_lambdas_from_mod(s, (jl_module_t*)b->value); } } - else if (jl_is_mtable(bv)) { - // a module containing an external method table - jl_collect_methtable_from_mod(s, (jl_methtable_t*)bv); + else if (jl_is_mtable(b->value)) { + jl_methtable_t *mt = (jl_methtable_t*)b->value; + if (mt->module == m && mt->name == b->name) { + // this is probably an external method table, so let's assume so + // as there is no way to precisely distinguish them, + // and the rest of this serializer does not bother + // to handle any method tables specially + jl_collect_methtable_from_mod(s, (jl_methtable_t*)bv); + } } } } From 751871588ee7f3a0ad19a386516c27b2341e82b3 Mon Sep 17 00:00:00 2001 From: Julian Samaroo Date: Sun, 20 Jun 2021 08:25:31 -0500 Subject: [PATCH 027/146] Remove cmp argument from replacefield! docstring (#41282) (cherry picked from commit 153f908f147ad1ccf87fdc20b4f2cdd7b2b30461) --- base/docs/basedocs.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/docs/basedocs.jl b/base/docs/basedocs.jl index 35e19e3742cf4..35cf88e269c51 100644 --- a/base/docs/basedocs.jl +++ b/base/docs/basedocs.jl @@ -2005,7 +2005,7 @@ optimized to the appropriate hardware instruction, otherwise it'll use a loop. modifyfield! """ - replacefield!(value, name::Symbol, cmp, expected, desired, + replacefield!(value, name::Symbol, expected, desired, [success_order::Symbol, [fail_order::Symbol=success_order]) => (old, Bool) @@ -2013,14 +2013,14 @@ These atomically perform the operations to get and conditionally set a field to a given value. y = getfield!(value, name, fail_order) - ok = cmp(y, expected) + ok = y === expected if ok setfield!(value, name, desired, success_order) end return y, ok -If the operation is `===` on a supported type, we'll use the relevant processor -instructions, otherwise it'll use a loop. +If supported by the hardware, this may be optimized to the appropriate hardware +instruction, otherwise it'll use a loop. """ replacefield! From 5957ef3d1a48e3b887bbcf0be5bd4645ac58f079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Mon, 21 Jun 2021 18:04:58 +0100 Subject: [PATCH 028/146] [CompilerSupportLibraries_jll] Update to v0.5.0 (#41292) This includes libraries from GCC 11. (cherry picked from commit d68e570f19fac4ea3841b97cfb87096f796ec518) --- deps/checksums/compilersupportlibraries | 184 +++++++++--------- .../CompilerSupportLibraries_jll/Project.toml | 2 +- 2 files changed, 93 insertions(+), 93 deletions(-) diff --git a/deps/checksums/compilersupportlibraries b/deps/checksums/compilersupportlibraries index deacc52a102a3..e351d100cb481 100644 --- a/deps/checksums/compilersupportlibraries +++ b/deps/checksums/compilersupportlibraries @@ -1,92 +1,92 @@ -CompilerSupportLibraries.v0.4.3+0.aarch64-apple-darwin-libgfortran5.tar.gz/md5/36348c1087386681380589f7fdbd383a -CompilerSupportLibraries.v0.4.3+0.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/e3dd3c93a855a85f02190659fdc9f41e96332b74577c67a149f78c35ebc2bb193bb4c156104d4bf24ca278f5b8621e944807a554153721bb5d0f22b8e9069fc1 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-gnu-libgfortran3.tar.gz/md5/b9d432c6639d30f1c63e9a234c1f10b7 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/f208fb24fb34e82a60fc37ae3acfca6a1cac7201b8b8daf29c3ac98e607d9eb94a51fe92c54fde287359a7398b4646e8df98bf359f7acd1eacf25b1b5ea16456 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-gnu-libgfortran4.tar.gz/md5/37ccf8848bdee5445d002b889e54bca5 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/0b29ef79bf8b238d9778d72f0e404145536933d9f9185f2cc1e917b3ec7cb8cfaa33ff664837e9e8e6ec28a3612ebd9cb226c0938954594849b4267514b27be3 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-gnu-libgfortran5.tar.gz/md5/bde8da82e00ed6375716bbcba6b04c3b -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/7d50d91d4b6430154ae037fe54eb8b321e57c4ef1f7740ce0633416d8e39e133d3049a36481fba8ea689fdbf8ee8750c99578f7ef287736476bd39e5b05793e9 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-musl-libgfortran3.tar.gz/md5/b58108feab2a1d546fc2c3184233da69 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-musl-libgfortran3.tar.gz/sha512/4079e9a5548426863bf610a1287f4e0c41fb701af95be66db12a805686cc89b6d3baf9ab203dd6ac7429bff8d1352bcd80dde7adf22bfae20688fd8a17dfe457 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-musl-libgfortran4.tar.gz/md5/00ab7379109240a211f492dbae4d31c8 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-musl-libgfortran4.tar.gz/sha512/d2d5e7165566fcaf38f97fedd78cb7c6df475a01dec262643c79a0d310ebde4b64f670ad92104ae5e7bb8b1004d211c8f7d2bd4df05b87ddd188db62b11325c4 -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-musl-libgfortran5.tar.gz/md5/ee7881127866d50c9d1fc76ef0ac50be -CompilerSupportLibraries.v0.4.3+0.aarch64-linux-musl-libgfortran5.tar.gz/sha512/8f622cbac6777cf14d98a6cfcea38d42296f9f93b7202eee501c9fcf02f112ca2833dc9c034beb0b79aacc85bef9d57a26ee672716ca50b8353e3d17da298ecb -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/fe4c403eedb9dca880961501834bdc8f -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/de829db62f7e28b425ac04d883db62e45f346e2e115d364a6f9ace29681a73422109bab7239014b51e6174cbd6141902ee65868a5cd2c6836d2db43b07c7ec3f -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/670dbd3088ccb46830d80edd4c64143e -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/43a419548597d2624c68504c405da1104007b80f49189dddef5f2abb0a7cbe404af80172d69d7b8b2dea516fa4bf429a73068de2959266f1bc796868ac926682 -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/00a9ea852c32c503e405389cb322827b -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/741c34b253f4c785b1092333d9060aea71b73879bed96da0f964dda1d1367032f133abde335cc7917c2e04c8cae4c3e110a249518d5305d8a4752cdea7d3aada -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/7b4528e842d27c849b6bc0443255f974 -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/8dc362faaded886ca1bf7c48f43847cdc4f6685e29b0468809d254ff44121061c49d962a33e37acde9ab00b258636a77213ded1f8570ad2543dfb0097f3a7cc7 -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/a8d66ecf146c17a5af2f7a6c4c75dc9c -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/4fc7590050d18a3cff6cad29bdaed3ae1aad72a7bed3e69a14b726309cdd5631ba903998ae042a488c815f9668567cbbb2e779eb44c13fca1aee47f93bbaaad0 -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/4405f621357e9bc3178ceb24337385b6 -CompilerSupportLibraries.v0.4.3+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/0c8eeda7d94c551e90cefc6ef5c41fa1d79776abd87f1e739e17b8507ae966c0a6aed10bf466f37c34e29e38fe5bd25d542829e25269adf971c0e8a9d640dfb0 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/2a37fb150af0438cbe768e8c479ff893 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/d0f577f4bfa76c349f188e4573644a82a749f9e5c3293246de0347fda866c9a1610fe9f3383ef54ac1bcee774f2a557aa1c67cbfe76580313cd5f9a231df05fd -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/f7bc21abc374654421385f27d653f3e6 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/fe55de45a99817cbd7a4ac69b87744acd9804d159b9b9144ce24d401742c87b9621a388614da32dac00f6b5e78037cef88d37c2b14308b6c94f951aacb176e94 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/022cb4d36156bf257fc57a50124cdfcd -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/f12af33831b91fff66e5ab2964aa4fe520e3063e148a794d9840ed4f526e6741555350e5d6dffe7857c733d2f405e1db81949d1e24a42425c521b1dd71539ec3 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/b99d07c03c91c9d2186999bc924eb4d3 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/6ded3253561e5fa0c93712a2a86efbc5b1bbdca26f2170876e855400978674910c43dba6dfe992537ce90db66e40b618a7fdc3753abae67940ac46175bbbf9b7 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/c1d701eee76fd974ece928cb3e1a85f2 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/ad338863ddbe47ec579636dc6ce155b47b701b9d47c8f0bca93918af18e8df6da6ddf65a2e2042fb79b335d1df07549addb2e794cf1e8f41d6fb518259a6dcd9 -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/0fa43aa26c3f5a717945659ad00ad96a -CompilerSupportLibraries.v0.4.3+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/387a676e4e79a5f783c3797dab0ab4a9ba3b469b66d008bbe3262751e94316b0f7ae6987db212f763be47e9cb5202b1a6740b3f419818b30c2f1251bf0b305fa -CompilerSupportLibraries.v0.4.3+0.i686-linux-gnu-libgfortran3.tar.gz/md5/e8360ca87e6f9d7e512d20fd0669ea70 -CompilerSupportLibraries.v0.4.3+0.i686-linux-gnu-libgfortran3.tar.gz/sha512/6441bfbd93ae4edad1cc1e7d8adedeff85bc7749bf68b802f4316117e81938fdec35620264627fca367ff2182b503dd97235f7871dc79e70cdb0b86712d570e8 -CompilerSupportLibraries.v0.4.3+0.i686-linux-gnu-libgfortran4.tar.gz/md5/088a85ce5999f373ead5f43e7bece97a -CompilerSupportLibraries.v0.4.3+0.i686-linux-gnu-libgfortran4.tar.gz/sha512/c3d75384c93afabb2eff3f84a13df8b7ecf535e8f786c5fcea78ee1902fb052854acbfdf9fda5d558ca19f285883836e6827acdb042a9d50ca65d5d0823e44e5 -CompilerSupportLibraries.v0.4.3+0.i686-linux-gnu-libgfortran5.tar.gz/md5/97ddfc865ec5218c7d2d092f65de71b1 -CompilerSupportLibraries.v0.4.3+0.i686-linux-gnu-libgfortran5.tar.gz/sha512/2328f3fd706078125badd6294159d860b2349203b85d77f2ecae914f3a41a99951021ab1124a40c358ea82352f6778a87f8094b039679356965fc4c8bb48beb4 -CompilerSupportLibraries.v0.4.3+0.i686-linux-musl-libgfortran3.tar.gz/md5/479a7a80865c38795cc4454dacebead6 -CompilerSupportLibraries.v0.4.3+0.i686-linux-musl-libgfortran3.tar.gz/sha512/cb4c79f6e5e9129b3d99f3f0ac17f395d696b9f354df966faebc27f6ea120a8592548a59e5f7a7ad124583d23c93d621f00069a4af07a4b41a4a1f474bded4e0 -CompilerSupportLibraries.v0.4.3+0.i686-linux-musl-libgfortran4.tar.gz/md5/03e4d7d3189be081e4b56cdfcd439b5f -CompilerSupportLibraries.v0.4.3+0.i686-linux-musl-libgfortran4.tar.gz/sha512/6c3f3b9fcad535a5e071853540b4b8689cde976a375b9406c93734e37d412f86069c8133ef85898efedd3b8fab0477d51f9ae681dabb00a66ec3f213e042bf82 -CompilerSupportLibraries.v0.4.3+0.i686-linux-musl-libgfortran5.tar.gz/md5/6b20e61bf6eef2bd8587d93bcbdf8ac2 -CompilerSupportLibraries.v0.4.3+0.i686-linux-musl-libgfortran5.tar.gz/sha512/2f7b0c63773f7c5e8bad43041ec30e727dffb665f4371c7ec5619648644c9ecc085674a15f0df20e5399d25d84bc8e49ce0cd29a5a438e7a828000395e0928eb -CompilerSupportLibraries.v0.4.3+0.i686-w64-mingw32-libgfortran3.tar.gz/md5/185a1f5582eede2e71bc6664294fe368 -CompilerSupportLibraries.v0.4.3+0.i686-w64-mingw32-libgfortran3.tar.gz/sha512/cc54dc1e1fe10374fd62d7e3a6159024dbb9638b90014e9cf6168ed63ee1b64f7a52f8c851315a340e5327513dfe939b3b04035631cdb251ec2232f8ba381d8a -CompilerSupportLibraries.v0.4.3+0.i686-w64-mingw32-libgfortran4.tar.gz/md5/ec4d496e9c5f3e806d78c30bb92f4324 -CompilerSupportLibraries.v0.4.3+0.i686-w64-mingw32-libgfortran4.tar.gz/sha512/4917f4755c3ccf223491d75baf729677d51abae00a66f7a66439b45169283aa86070bb314ae9256525de4b422b7213de9d087d0dba9a821caa71ec346f1138ed -CompilerSupportLibraries.v0.4.3+0.i686-w64-mingw32-libgfortran5.tar.gz/md5/4080d550f9a31d084c59195a98b6ed7b -CompilerSupportLibraries.v0.4.3+0.i686-w64-mingw32-libgfortran5.tar.gz/sha512/6048b61a476905469e46c4e15a7067f0f39451c7374e981212cc9d2a66bdcbd7f0503d9eef731bfbe10b174d76937d7fa349f079a652587fecdfb2c6d59a1a1e -CompilerSupportLibraries.v0.4.3+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/30bd967c069fbc73dc653f2ac9d55b6c -CompilerSupportLibraries.v0.4.3+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/e16e77c72e3dd3399240bfcd72123da4540016eb91f10bd6015f0e6e58b397677b685c143527f5827423e7abb15abf5e461e3b74fccdb07dfdece2f0cb361912 -CompilerSupportLibraries.v0.4.3+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/073a8be233fae3c6b453684de7e51ea7 -CompilerSupportLibraries.v0.4.3+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/3fda4c515131c75181c662fa4d5fd538a0c8e257673edca7f94c46509c641d4720c130cffa37512bea0a215b6a9952735acbe359fb38e8e341822545021d88dc -CompilerSupportLibraries.v0.4.3+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/4853c451821303959723f541434a7d1c -CompilerSupportLibraries.v0.4.3+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/539a6b7626883d54b7661db6fcad1b7390ce37ab406a88065b8c24786353725f8cd972cbc29d07e71c9fefcb126239c8a63583626a0b8298c04b34de47bb9248 -CompilerSupportLibraries.v0.4.3+0.x86_64-apple-darwin-libgfortran3.tar.gz/md5/889855efa0450aa975166803fa775686 -CompilerSupportLibraries.v0.4.3+0.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/8162aebac8f13264cebdbc8359f4823f25cd28c76812df8687b5801b6e133206b514cbad5d5ff0d6fbb584eecd82038049c5a965637b43a5d12f77ad386addc8 -CompilerSupportLibraries.v0.4.3+0.x86_64-apple-darwin-libgfortran4.tar.gz/md5/ed9f7aee0565904a8cbd5cc26df37a9d -CompilerSupportLibraries.v0.4.3+0.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/e93bd2a9e4e2c358f46f756f15d9765ef5aef44e5ee2adbfb23e971f380052f4ad5e4569fc5932b6250a40e204253e70966a6554c30c0251f1d5406babdac837 -CompilerSupportLibraries.v0.4.3+0.x86_64-apple-darwin-libgfortran5.tar.gz/md5/6757ed75b520bfd1f6edf55f01f7d1af -CompilerSupportLibraries.v0.4.3+0.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/5f50c9df89ebd5a8b2c6a97e99b8340b0e63e4f689e3062a32474fdd6dd33f160647ae1a2ba96a30abac1bfbbd730be9824dcf4b05a4c327c0ad60c9b96f889f -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-gnu-libgfortran3.tar.gz/md5/954ffb60eb3cba5d7d02d3cf31fc3c75 -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/199738c5e226565230368e38183de6af66ac1decc880cb28e072aeba097b8c060a6ee51d755072d66fe955a6621d183f28de364f7d57f372c8ad7585e30cded9 -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-gnu-libgfortran4.tar.gz/md5/02c5342c240220803dea5edaa6aa03c0 -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/c752b742d7aa39b7ac2297c8f4bae066c6c8217cb717cb7f913aa045b402350325e8ac96b0656404e39a891c825c57e18e5dc9325a954c7e64d98ece776293cd -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-gnu-libgfortran5.tar.gz/md5/5b2ca9ee08026e2ab9d24d18bb631ede -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/f98aed5aec767e1145b4f19515c99927e30790f577494e6d439c7f1a24f7e8e2acb977945f616abeceb614776e329f1a1f852edc1ade9de78a0c94f619046e40 -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-musl-libgfortran3.tar.gz/md5/6e5a0d8521b560e79cb5d5caffa4c675 -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-musl-libgfortran3.tar.gz/sha512/7079605d315f45ebbd2a517b2aad38b226b574ee3f892a20efe02b8336654c84139a810820734456fcf6bb5bcc8fdd9408e783d1dfa2aa25168ec3e9b3e57785 -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-musl-libgfortran4.tar.gz/md5/dde75524ca38581b671d21c7ccc12c6d -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-musl-libgfortran4.tar.gz/sha512/ae229ccbb704da44f911704ee0700fe3e01730c9a5e7519dbf41c9e1aaf6d3f594678055845430e9c9d9b3ea974d1437fe2d84ae89f2886512c4569b9659a5dd -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-musl-libgfortran5.tar.gz/md5/1d13546f090e9e068540d5ca42f193f2 -CompilerSupportLibraries.v0.4.3+0.x86_64-linux-musl-libgfortran5.tar.gz/sha512/cd8a4a83a2f09f9b18baa719b0ed13e9eefbee765bce326854e29ca76075e18401b9052d70b13461f16b08219707237aba7e7857aec28d417bd5dddf4eea9dda -CompilerSupportLibraries.v0.4.3+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/6987269d8385d6b5716f075ab51ad5a9 -CompilerSupportLibraries.v0.4.3+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/0b5efa2c22c9be737a1396d10779fbbb91acd8662a6d419ba76d98b380b5c9cef977ac2d60e27c844d3c5f083fe4b59a6419675d09b8bd3e5b2fefc74ac09e0e -CompilerSupportLibraries.v0.4.3+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/d430f7c46b66121833622ed58694368f -CompilerSupportLibraries.v0.4.3+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/fc3c7bbf2c3730b68780950e4055491639d8874dc4b8509898722a4e7a06341cc43dbd7ed371e89f2a0cd11b515b0901a803f93349039b2c21aff6e453bca669 -CompilerSupportLibraries.v0.4.3+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/557985cb8720a3995482e13c319678fc -CompilerSupportLibraries.v0.4.3+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/4d2b6b4431456e8067fd09b092617887277b4da3dc6e030d8091e7a9331c5fa73483f72626f6f06b3a749804b8060fc6ec8e592ecf87a3b1fcef96f5fc267c7d -CompilerSupportLibraries.v0.4.3+0.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/aa27b022d98f489fb21c6d9a05b913a0 -CompilerSupportLibraries.v0.4.3+0.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/13d0f7e243674034b1d41a7020db58df6932a9a3d9a9ba450e1b673f5e56ff984ab68af8a3bf5a14590bfa43661a20d88a781d67009e3af9f60c15bf32e56196 -CompilerSupportLibraries.v0.4.3+0.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/7b381af909065da2da0e8eb035fffb47 -CompilerSupportLibraries.v0.4.3+0.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/c35170eea5174360ebe795ccb79fe4d6c9dca288d8f751e731dcaaf26866172372b5919393a965e18ba1aa553b6f420ca8d8db32b8d38aebd226906e18b7a4d9 -CompilerSupportLibraries.v0.4.3+0.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/8b4d1ee5add108fc05879fd0102cf34b -CompilerSupportLibraries.v0.4.3+0.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/23c7bd53523d8380491b97cd57083956b55273b8d6aebef2e1b5c80ce8593cfe3eab5ff50b6a417b974996673fdfb810ed2fc28798bba42ce59cfe6284b1ef8f +CompilerSupportLibraries.v0.5.0+0.aarch64-apple-darwin-libgfortran5.tar.gz/md5/307711def378e337a999c182aa7e07d8 +CompilerSupportLibraries.v0.5.0+0.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/0dcad5e315e045397320f667b27fc378da898ebfea9b55a2837e68b29434fe2c2ddc9652cc75a4551062ce70a2bfaffa8223c77398aa41fe1a73ccb44952cd8f +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran3.tar.gz/md5/177f2665038919c3f8ed968226ff3b56 +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/ea67c3b9986106aee12e5f22ab3d3c5d71a58759a7d20a7724bbb198e5c71f42fa2034e46f3147006a2d2277b3881f0546030d1040cb9393e58eeae87eb82c4d +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran4.tar.gz/md5/f16db35be9018a5c61eaafaaf7226d10 +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/051b5a0dd2235eaa90557e487c83499b3d7e0b9e921f7b2f14e77c81152c338acd5bac8040bdf6679db656cd8039093db43565f843dede253717425e464e61b0 +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran5.tar.gz/md5/e6082f3e46b627fdaef09f1ef81c1d7b +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/13d0ab1c0e84a65db729ea6bd45a868d9d65e1a0ec95412448846d1044e2bbf11b11d96cfa576dccf3d7eccc4bed4eb9ae4bac0989e9b1b97adad5e404dfe4a4 +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran3.tar.gz/md5/00703177897f8c46a577c2b0518432bc +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran3.tar.gz/sha512/af14ad1303f3918dd691e0b509ea0fd52ac7c9f0c285e8dbb741bd34ce0b1927f89f219fcf8d260315c503b18bf98b3df117810328066a9964917cc34968ce98 +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran4.tar.gz/md5/f823b692319cd370ca59189ad2ba4a3d +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran4.tar.gz/sha512/b0c4131bf4d15c482bbed83fcc570da2f7bb8ef99d507e0e13eb0c8f5519ec73ff234c58d505294be3f8d39b6dd1c7022578db02005ae111c7873243e8ddc8ef +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran5.tar.gz/md5/a9ef1a68518058fe6c945e8b00f8400f +CompilerSupportLibraries.v0.5.0+0.aarch64-linux-musl-libgfortran5.tar.gz/sha512/6aa53edf48a17ec8515cad5c79a15ab0e40cc44c9ffb188fd57fc560dde7a99d6487ead6e4caafaa9912c6590c6a391f914016fd4342589da09d56c657ad2c07 +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/d3aaf50955ad671917e941e0dcf3803f +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/72983b2272300c2332cfe6864b5dd5249bbbb181bd65b10bf6bfb3a37e5e582bb9c159db0b63a077066a325899a2864717f28c60c85027be3b637bb80f994e52 +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/e221d51df9b18b2562a0f3e8dc8012cd +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/758b07b4a559dda747574649926333a70355e2d80acb2ea37bb39777c0b1cecf8f308a5f8062110c378db2230ec8baf23385ae313d1c58de8bfc651573c64c1f +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/96f7feef9b1dd7944130de2e9cda68b8 +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/8b4aaff1388cd506bef7f3a9edd42ed8ee1db468a18d34cd5d58d7da305853dbf48d4665e99c06c6fb0115e421d19dba5c36e947cb06defe7f479a05b547f112 +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/a1e3642a7ce2b7834aa2f1b695a9977c +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/9d22b1fa8fa8eaaa5316cb494eb223e0fe73660aa5ca7518180e40d296d6d07a9863938501e5d5350bf79e79d975d7d66dca12768a0a69527d2c17baf7aaf345 +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/d897098fd98928c2d644ed5ee26c3faa +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/4aad051f4f1e3d744825c650363a49f39e04cbd44dad25197ddee1890339e9441aa872f893478a2d8ff556c9a70a89c2885cd779ba3efd3c0f7193c386b820b7 +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/c36bfd4c5b90d55c55bc18feaf51b134 +CompilerSupportLibraries.v0.5.0+0.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/ab16c638780a0118b930ac587df81fa74d2731bf1af402266106e1ecb791df353c1f368a8e7fc9147d390825ff8624e600aae45f1f6ccfc0015ce131368452d7 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/feb76551e6f7407de3006a3d363cee7a +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/976f8e34e72231b013ea0418feff9c3c9efa7b9c34688aca115a03f2bade8760ca9f259f8f502ef5012fbb389f4bf365fd7639b066daca16fb7ec1d32b5cd789 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/560ca43fa6dbd3f2e9052401477df165 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/333c7f4fbc172e7fd3d99e2673dbed1d9c699a5bb29a20095a255fadc89ded05abda755fc167aa8a16a4e93f524390c9c817df7b67fccdca88754d0301259977 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/d3ac5f871599ab225a1128c302486345 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/adb706882e923978b6e18c7134578bc86ed4e031a7a0120222018cd1b8efcf530854e426b6442dbd80b8c77c3677f1906aedb12c0ddeb33efcdd3bcd2c4a109a +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/58774aa398a63479af3f4c69678d0191 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/fe9307e6fb0b54522495fc9cc48756a60fc79af27d9e73bfb3ee49cbb366dddec1beedca03614f15761b308bc28014205f174f673fa258e76d5947446b87b039 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/af1a8ce693ba307e61184f4023d73d67 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/2ea581bb44408fc789ac306734736f6eb6cf0a15b234f43a6f50ae8f10014b5689f5aa8356112c2b54a86b9a7734ace3479c4e4aba1e5df636dda3dcd09b7e28 +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/20d62064f495877f12b7e87e684ad43a +CompilerSupportLibraries.v0.5.0+0.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/31b1c7c9fe3378e8bb788c897bbac0505a5ae70f500f3b1457325dbbb149c14224a88d17fbcf453465d8a572f33157766bb0e815cce7c8a2aa8a44422d34a365 +CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran3.tar.gz/md5/fd4035aef1c83be0b865d70aa35e770b +CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran3.tar.gz/sha512/a72047e7071838899d75896b4dcbdc102bca884507f4758b4e0dd62f50c9ce584f2b2b86d8b67dfc4fce9864faf9723056820e464bbab1a6173be47ad941d6da +CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran4.tar.gz/md5/89715bfa0e69528d4d294ed449ef0e09 +CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran4.tar.gz/sha512/6eb7947c72ec32d189221de42d5a76423a1fb5745db0812d88afe7f961d8f42669c7cf487235c1dcc81fbe73106b785c906bd6741e98f60e9931f4083be0e9ce +CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran5.tar.gz/md5/5c1c73dc72029781847f74bcb1189c4b +CompilerSupportLibraries.v0.5.0+0.i686-linux-gnu-libgfortran5.tar.gz/sha512/642d35ed41a65c7a2d7f4f127f936d3cb1665c207aa5feef25cce09cc11e733d7ec129673fea873403567c35cf16122ed1635c303ba13bb3349be44585f3ca82 +CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran3.tar.gz/md5/f91c962e7bc3ffb825c7e5fb1e099ba6 +CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran3.tar.gz/sha512/f89df221ff80bcbb1e6edc2f9cc28dc138d7d6ae99ac018a3cdc9a09ba637f1a9938b1f0876086f4f822fb911853286dd4f1776d603a403190bee052431ae572 +CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran4.tar.gz/md5/d2a81da3371a638f76087629ae0a6507 +CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran4.tar.gz/sha512/67941af15a0f032a853cdea180e4f87249bed2dfd09ade6fca9760f5a44b26fc94a0d6932803edbd27b75aa8d26e64c377af2d64ddcba3206562be1427a64c80 +CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran5.tar.gz/md5/cec9f3b9d4924a49a34c632efd167752 +CompilerSupportLibraries.v0.5.0+0.i686-linux-musl-libgfortran5.tar.gz/sha512/9320eee2b6dbadd4e0ed3f8763d58854eb179b1d1661c8f1dba75c22af2330812040507944b0ab20b7a7cb233c9953a1d3a4b27937e7b7a858aed2255ad0fbbc +CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran3.tar.gz/md5/c36411b24c8bec4805230bd4fe0f2391 +CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran3.tar.gz/sha512/839b447efa46caffa699258ec8ae5e0a55d7f98a7fc037b48e6a6c29193e3d8bf48397575cc518716f41e2e9344daa670693df605a1b9d4a23d3f454ec5ab399 +CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran4.tar.gz/md5/d2e392edff3525afff6734fdf47c9ab1 +CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran4.tar.gz/sha512/1816c7ed409acc1435c7fcfd550b7664a08b31ecf433a906d8903a60ed458dab0fa712bd0d1590a0dc8506763a617446ba402efc78a2c010562c45e8eca66a88 +CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran5.tar.gz/md5/2cfeb5cd0a7e2400c9be3e846a1875d2 +CompilerSupportLibraries.v0.5.0+0.i686-w64-mingw32-libgfortran5.tar.gz/sha512/ca620dd8542ffe9a177b0f95712e77e59b0fc1044e0186dd7468a86aba4d2b92931a1d6f980e75cceb26c6c5f9dab427f4ce32e0f77998b9a827b3ce9151041c +CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/8ba0e4070358839909934d8a1bc9e0bf +CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/8750769ca321f863fbb354f6e4e76b1241f7e24e5f4ea14ea511486dc5bc4fe8274740f1500149c5ac85a8214a0193c9a09332f35eb47e6222bef9070eecc6c8 +CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/50554a092af3a4a651b53e3ce3cf8a2d +CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/53ec765d4de3b0bae9727b3b2a27437b184f2072aecda5d0b22d648a95fbba777bb89da823bc851d7242cd3f8c212e3fdaea8e5af11db21c578c2e12db51991d +CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/b09a5913b537b26aa7f8996b1877c748 +CompilerSupportLibraries.v0.5.0+0.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/b68020c1b1acf4a1c51822bccc1eb67574ceffae3c133e7efe22ec0cc3a674a7c056c01be02c1c681f469fe1443d76baf4b0e305bec8181e57c3ce5a446a5c22 +CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran3.tar.gz/md5/1e4c5d2084f76eacb4419214668c6594 +CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/696155b560bfaf592bf7024ba0e6f084382dd269cdd25416fa8840387c101132901e94709c8d0534f038666a6f6849c3d55e8bed4223b5be499e099b49610e77 +CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran4.tar.gz/md5/63b386e59f3732d03459c59000fc1382 +CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/f6c7e0611df7fd86cc9ca63b380e112561d10b489bc8fbfe911c441ef5e87776761d3c161ff5f6aade479f7e96456084c6939d7eff175ced4f42b3b9ee29426a +CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran5.tar.gz/md5/07e22a4b58aaaf145e52b36602c5b08d +CompilerSupportLibraries.v0.5.0+0.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/8a047b0098e8504e2dde0113170416686bc70f9d685fcb19bf3eb76afe30dc16a3b0d2023eb704c25025bbef87e99603dbd2a2708b1a3df908747b06cbfc92ee +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran3.tar.gz/md5/23048b3be33f184ffc9be42ca914aa3a +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/4573b21e34f4d8127a86c18f95065039da92eeb9ade4058bd8459034bb4a003ceefe29e865089126fdc36cffd95a9c12bcb72ed74bff5987a9d1f4b300ecfe45 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran4.tar.gz/md5/3314ec0668abf069c900558de0690b65 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/d012c4674401773000f0de831cb8b4b6c454d0ab68d51fbbe970504e76c693211086a24a7df34de2390eaeb438ab23f63c68b480a408ab2136f442aba5094bd7 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran5.tar.gz/md5/e7768c00909613b8f29f6a5860ff4247 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/43c29456a0fc74c4fda42d088903651c6bbac6b842f2aa600e3019b391b04158ee97f884e6962bd9e7a9cf337dbb1cdb2151d103e1dee5214ba798b167b1ed32 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran3.tar.gz/md5/b2a30e92ba8e40ef070e3ec7c16b97f0 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran3.tar.gz/sha512/64a4029dd1e84922728b2c93a455d7d6b262c979dddf59301ff96e9c28980fbd9c1db57e81afaece96ccb51b9751e5a0180b84e412427430487280c56d8da266 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran4.tar.gz/md5/b0610d32a80b3f87baebf0250b0f92d6 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran4.tar.gz/sha512/3b7098fbb82e4a7a903b82f942303b248e0e35be13a47e4839a036085c4a33925f1f78fe941b852331cc52de80f32bcdb9a64ccff0386e1070a6ca4600c08eb8 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran5.tar.gz/md5/3f905dd4e8b3cfd2cc3f8efcaa50a407 +CompilerSupportLibraries.v0.5.0+0.x86_64-linux-musl-libgfortran5.tar.gz/sha512/22af14d245e3c062131dd274afa6d9c7cde9a11ee2455e27ae2f7725a025fc2cd6cdb3a1a3c899988c6c3412a714c1f0763f4e08924726212405938c3cf66da5 +CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/2c56a22c935dda76831f36c713cca099 +CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/6bd9bd6ec8b6b18013b3c6de344de134835c9281d39bc5e6e31928970c60b584fa625df18efbce3ea571dee53011dec73e9aae9159e812f219692fbb4dd86a2d +CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/e483c3e85b4d4b2685ee4e8f09951ac1 +CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/47c2f305237ccd55ed2ba445cbcd599c23f9c1392388017506f9d61a4dc8fec4ba4136be81a0e82de4f161f6788c4a62acc9d71efe6cf90b766e5339950ed337 +CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/41c25d9cf7545721b8d4dd2386e95ead +CompilerSupportLibraries.v0.5.0+0.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/173570bbf4eb60d678472058ec2c18732cd27ad2911457c83f47a1d97c1c0028d91005cf56539e51d4a04178544ac0bba47ea27e74b6b4e8d3310551ad3167fe +CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/f124c93580a038ce806f479568b46597 +CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/c313390dbcffaea6cb5202645b5304134a1ce6aac5a3835696f45316c8170b237c04f13166694eee0f31903ac1e5c3cd73ad8974ba19b44289da3504d3436f8c +CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/050fe7a6bdf980c198f4c201629d15e0 +CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/211e435f5e2b7209aedaf4a81b5e0d5e615b9144de248c06e43dc61b31890dbde80d718e74454b489bd1f77476d34bd01d3f9a25355bc50fca0dc07df0264cad +CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/3566d0f714c1503b92160b486a4eaa4a +CompilerSupportLibraries.v0.5.0+0.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/b2f29c1c6dc35e1002021f8f15a20a72a57c346b33a6d045ff7a261e88767738a4da1dd88aa71a20514bdf6376099979c9d938173fa3ae28641c40372c94db60 diff --git a/stdlib/CompilerSupportLibraries_jll/Project.toml b/stdlib/CompilerSupportLibraries_jll/Project.toml index 95366df955720..ac78369b12602 100644 --- a/stdlib/CompilerSupportLibraries_jll/Project.toml +++ b/stdlib/CompilerSupportLibraries_jll/Project.toml @@ -1,6 +1,6 @@ name = "CompilerSupportLibraries_jll" uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "0.4.3+0" +version = "0.5.0+0" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 86caa5882e19ad289dc1827401ed2d6bb9755fc1 Mon Sep 17 00:00:00 2001 From: Rogerluo Date: Mon, 21 Jun 2021 13:18:39 -0400 Subject: [PATCH 029/146] fix preference loading (#41294) (cherry picked from commit 7553ca13cc54852513b7c1eb07c9167833a55b91) --- base/loading.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/loading.jl b/base/loading.jl index 95909608d861d..851ebf17cc3b9 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1765,9 +1765,9 @@ function get_preferences_hash(uuid::Union{UUID, Nothing}, prefs_list::Vector{Str # Walk through each name that's called out as a compile-time preference for name in prefs_list - prefs_name = get(prefs, name, nothing)::Union{String, Nothing} - if prefs_name !== nothing - h = hash(prefs_name, h) + prefs_value = get(prefs, name, nothing) + if prefs_value !== nothing + h = hash(prefs_value, h) end end # We always return a `UInt64` so that our serialization format is stable From 6356c475d321b657f8cb1c286816b0a1686a97f1 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Tue, 22 Jun 2021 09:06:38 +0200 Subject: [PATCH 030/146] Fix typeassert in worker-worker connection, fixes #41155. (#41305) (cherry picked from commit a4dd5e5338ebebd0913d53befe092e282a68e217) --- stdlib/Distributed/src/cluster.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Distributed/src/cluster.jl b/stdlib/Distributed/src/cluster.jl index f485384aa1fec..ebe4cac0f3bbe 100644 --- a/stdlib/Distributed/src/cluster.jl +++ b/stdlib/Distributed/src/cluster.jl @@ -351,7 +351,7 @@ end function parse_connection_info(str) m = match(r"^julia_worker:(\d+)#(.*)", str) if m !== nothing - (m.captures[2], parse(UInt16, m.captures[1])) + (String(m.captures[2]), parse(UInt16, m.captures[1])) else ("", UInt16(0)) end From a43da1ee8245145c87ed1f259d32b43755502ee4 Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Mon, 21 Jun 2021 18:05:57 -0400 Subject: [PATCH 031/146] Fix inability to find support/{platform,dirpath}.h from julia_fasttls.h. (cherry picked from commit 1b20d2b3aa6dedfba875895adcde86cb668253e5) --- src/julia_fasttls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/julia_fasttls.h b/src/julia_fasttls.h index 0dc0c05c82e10..3930a6d8a2d3c 100644 --- a/src/julia_fasttls.h +++ b/src/julia_fasttls.h @@ -10,8 +10,8 @@ extern "C" { #endif /* Bring in definitions for `_OS_X_`, `PATH_MAX` and `PATHSEPSTRING`, `jl_ptls_t`, etc... */ -#include "support/platform.h" -#include "support/dirpath.h" +#include "platform.h" +#include "dirpath.h" typedef struct _jl_gcframe_t jl_gcframe_t; From 6e49d1476e0a400e331b4629a9d4cdd51b77789e Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Mon, 21 Jun 2021 18:41:31 -0400 Subject: [PATCH 032/146] Drop parens from JULIA_DEFINE_FAST_TLS in embedding.{c,md} to match recent redefinition. (cherry picked from commit 7366c3962e4419a10a96ab8a674b3f05aa2b34e5) --- doc/src/manual/embedding.md | 2 +- test/embedding/embedding.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/manual/embedding.md b/doc/src/manual/embedding.md index fcc9f06536ab3..22c2f66f9b8b0 100644 --- a/doc/src/manual/embedding.md +++ b/doc/src/manual/embedding.md @@ -16,7 +16,7 @@ We start with a simple C program that initializes Julia and calls some Julia cod ```c #include -JULIA_DEFINE_FAST_TLS() // only define this once, in an executable (not in a shared library) if you want fast code. +JULIA_DEFINE_FAST_TLS // only define this once, in an executable (not in a shared library) if you want fast code. int main(int argc, char *argv[]) { diff --git a/test/embedding/embedding.c b/test/embedding/embedding.c index 205b8a7450211..d1816947f3856 100644 --- a/test/embedding/embedding.c +++ b/test/embedding/embedding.c @@ -4,7 +4,7 @@ #include #include -JULIA_DEFINE_FAST_TLS() // only define this once, in an executable +JULIA_DEFINE_FAST_TLS // only define this once, in an executable #ifdef _OS_WINDOWS_ __declspec(dllexport) __cdecl From 096afe9883f14a5f6d18396a2a4b8d01dd751b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 23 Jun 2021 13:01:20 +0100 Subject: [PATCH 033/146] [OpenBLAS_jll] Bump to `v0.3.13+6` (#41322) * [OpenBLAS_jll] Bump to `v0.3.13+6` This version backports a fix for a `SIGILL` error on some CPUs. * [deps] Bundle backported OpenBLAS patches (cherry picked from commit ab567be6a3dba08e8a2e279aaa31d841b95329ea) --- deps/checksums/openblas | 186 ++++++++------- deps/openblas.mk | 12 +- ...-Only-filter-out-mavx-on-Sandybridge.patch | 221 ++++++++++++++++++ ...ilter-out-mavx-flag-on-zgemm-kernels.patch | 162 +++++++++++++ stdlib/OpenBLAS_jll/Project.toml | 2 +- 5 files changed, 487 insertions(+), 96 deletions(-) create mode 100644 deps/patches/openblas-Only-filter-out-mavx-on-Sandybridge.patch create mode 100644 deps/patches/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch diff --git a/deps/checksums/openblas b/deps/checksums/openblas index ad67b3b6a2fc6..4b4d477ddc3d2 100644 --- a/deps/checksums/openblas +++ b/deps/checksums/openblas @@ -1,94 +1,92 @@ -openblas-d2b11c47774b9216660e76e2fc67e87079f26fa1.tar.gz/md5/d50510c8b60b477b1ece4abafe66bf4d -openblas-d2b11c47774b9216660e76e2fc67e87079f26fa1.tar.gz/sha512/95ce349353bea5e9c30455410b92fa9ebc833e58163a53a65b396c76fddf19147a323a3c69eea5892354488c67b027e20dc9b03754a0988f3bc8a4e9ad446b8b -OpenBLAS.v0.3.13+5.aarch64-apple-darwin-libgfortran5.tar.gz/md5/bd8b87e018af8cf4da8440d9c2d7ea4b -OpenBLAS.v0.3.13+5.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/b066b590037a2ac6e8cd859ec642a330b4d058b60da2d071353c6dbe7691a8bb31a13fe36a03be3f1db5066ddd636c39911cb827aecb3811b5ff47de6ba3d3d3 -OpenBLAS.v0.3.13+5.aarch64-linux-gnu-libgfortran3.tar.gz/md5/0bfab1cdeab001382fbc6216a509532f -OpenBLAS.v0.3.13+5.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/6137d4e861e61ad4ec6e871e7d24bf30979f701e27517b4b93cfea6230f34b70860d2bad8c8adadf426efce49d3348c1970d3bc85072c99aa255fcd6032450c0 -OpenBLAS.v0.3.13+5.aarch64-linux-gnu-libgfortran4.tar.gz/md5/ca0a14f775d18ef9313fc5a3d1ba36ad -OpenBLAS.v0.3.13+5.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/74eb80e9f81519c514ddc09940c3ac6d79788ee0de3384e10039f836b806a7d4e521b25095606c366af1b84ef05aea47f6a6e9fb437b3297a4594c3507b36fc3 -OpenBLAS.v0.3.13+5.aarch64-linux-gnu-libgfortran5.tar.gz/md5/ad2976c0c5e7d5aa9b8d87cc23e9650d -OpenBLAS.v0.3.13+5.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/2eda1e20468ea51d8196e8d2063cd709579aef33dd180957adf749e6a460330d47561b368885444be8a5eaca8c711058769fb8ebdcb9d7e5d7f55649e74c3677 -OpenBLAS.v0.3.13+5.aarch64-linux-musl-libgfortran3.tar.gz/md5/9f102704c8730df892ca4cb75d78d2a7 -OpenBLAS.v0.3.13+5.aarch64-linux-musl-libgfortran3.tar.gz/sha512/07345f12b03c004ec84e92ba2e4685478e09e13348b6a6c4faf41ddea7ec2bc11e9fbb2234865b931be880ff5a056f4ffa21d01706af46ce983597bddb56f340 -OpenBLAS.v0.3.13+5.aarch64-linux-musl-libgfortran4.tar.gz/md5/3d6132e2ec95f7c5d952e512b095abeb -OpenBLAS.v0.3.13+5.aarch64-linux-musl-libgfortran4.tar.gz/sha512/b7b4c62ae8040b9290487f3399fdf6fff40c5172e8830d46e7c2d35f1eeae90c54d3a93d297d8e3bb70c8e251cb7ab83fee454b3876443d97cedd8c566325d88 -OpenBLAS.v0.3.13+5.aarch64-linux-musl-libgfortran5.tar.gz/md5/8a6e784e1194eee29bc0077b9d9c431d -OpenBLAS.v0.3.13+5.aarch64-linux-musl-libgfortran5.tar.gz/sha512/732cfbf3663717aedb70b9b14041b520a0281e3a8597018205a0dd96d89fc8f307bcb9ed1158da50bf643af6f1518e1cb7c1734ac7966611a4a6e181f1f3ec80 -OpenBLAS.v0.3.13+5.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/64ef9d054ac9090d44c250d5ac773a71 -OpenBLAS.v0.3.13+5.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/92cace617a0ca6c06fea90848a1b8d5719e5f7ef62112b2c0ffdd34199e3153759a57c8cdd3f26893d880ddb5db2cf9e57963d758a9dc2d8cad3346cf6b5caae -OpenBLAS.v0.3.13+5.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/d9d069d165541e1717e0f4bd2cd7018f -OpenBLAS.v0.3.13+5.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/6b640b432ff56495610555f6f4cec897c25898e8625f8028dc11e3400bf099533e4a88628de85a852c6c10e76e8defd69cd3b6b5b53a072362fab38dfafebd08 -OpenBLAS.v0.3.13+5.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/d557c68c9d6e619f240239c1e3bdda6f -OpenBLAS.v0.3.13+5.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/a9ee8ed000eb862bc10578526f311cd578d2cb59976b404d370150b97e84348b094852fae000dba4aa83d88b45bd50129da661cde7a1f8120dd1e29db66342cd -OpenBLAS.v0.3.13+5.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/7570b2ae804f57605715f31ca5144ce2 -OpenBLAS.v0.3.13+5.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/87f169e260093a9652a299ae9b042fab015a21b67bae285bd425bd02471ebe41634f843be18bb4d8cb2fbe2f2ffb062b7de63148ed64fe66f4ba48dd622dd615 -OpenBLAS.v0.3.13+5.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/d2959f5bcb95f9ce759da9941b89dafc -OpenBLAS.v0.3.13+5.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/dd4b0572c5165e511537f223e2bd2ff9b9c3f9ea241e8fe5c2863064f9dde37245c0e6cb331cd3ac6f02f15b4708bf53dcdd98daeb17f50eecb3abfbfb17a954 -OpenBLAS.v0.3.13+5.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/aa42183091223699052c4011b546f399 -OpenBLAS.v0.3.13+5.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/b465abdcf5e876f2faa091927bd40da8a3c99a64d13ebbb1154a9c5d73652791db1b58564ea7bb0b0801af0ff239c8f3530c7784b91c6e2d770258108458c9fc -OpenBLAS.v0.3.13+5.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/9ddcfad4d2a2678acad7af0bd802ab94 -OpenBLAS.v0.3.13+5.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/6803844189ae00891559ad0dc624e8253c05c0a27b8bf589539164dacb5251f22e6829fade408d1f64e39dd0979fb0be0993da4c96ae91e76e962e9f0f023de2 -OpenBLAS.v0.3.13+5.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/91d4df8a78d2f6295cdd597ff6f3beea -OpenBLAS.v0.3.13+5.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/670d8bd3e49fc53d68dba3675f1962a01bbb396fe4e36b5169016f61fe4f8528876d0ed88ed4830714029e73e62b49cafbae2ad384eebf90eee1e6f558abd514 -OpenBLAS.v0.3.13+5.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/d08af1ab6eac6b37a9565080d9179616 -OpenBLAS.v0.3.13+5.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/12f2e08fa4c5d040f0992ba99fd19342d27999ffbdd3df4a1b2981a852caf7148b9b6d17747a61a961da427840f77c8867ed82df6a8fe395e54e92f68739afd0 -OpenBLAS.v0.3.13+5.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/db725dfb473c4cda573950b955415102 -OpenBLAS.v0.3.13+5.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/d9be3863df5dd3ea5282a52489814db24f1a53fc76aaf323aaf6034637053b490dd927b37e71f29ad68cc4a825982d7e846ebe7fc5206d68ba2a74e411afb493 -OpenBLAS.v0.3.13+5.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/8668cfc1158871e4815fc0e169cabcf3 -OpenBLAS.v0.3.13+5.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/6b345f776f853df1c69f73afeb67e35dc7c928ade07b24b561d238fdde2270c054083b7a3e216ec20071f34fa945141fc5b38af84ce42e57cf9e3a0f1bfea4cd -OpenBLAS.v0.3.13+5.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/00a1d20c390ea1eb8d1005ec9c26e809 -OpenBLAS.v0.3.13+5.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/2d0e0880e36be4761f61b27da16b644cb097012ed2b03141b1646f0b1ceed6176030cfb31a45e7a0d5ded99a2d6a8e472bf2e2c5f5e4260ed997e9e88cdc1b70 -OpenBLAS.v0.3.13+5.i686-linux-gnu-libgfortran3.tar.gz/md5/8d67cca00f231c01330b993f1c2b9b39 -OpenBLAS.v0.3.13+5.i686-linux-gnu-libgfortran3.tar.gz/sha512/abbd1b89f7a40b1b72aa9b0a9d57688e5d6d385029e7e2016d31eda866898c42686f1ad1a47d69213c7e79e0e85c1ab74dc5eb467eb07c286ef3153a7dd33113 -OpenBLAS.v0.3.13+5.i686-linux-gnu-libgfortran4.tar.gz/md5/9473d3d6bd2ff41ce7a9bd70077aa884 -OpenBLAS.v0.3.13+5.i686-linux-gnu-libgfortran4.tar.gz/sha512/3a3da3b01dad7b0171e1ecc18bf274a2c9043c756b06da0f140db68342d8fcbd9afcfd1b1b05aa9d3f3c8fa4ce1915ed25dc38671adcf98fef969a106e49470c -OpenBLAS.v0.3.13+5.i686-linux-gnu-libgfortran5.tar.gz/md5/d64ccb11a8ea4c4dba5778f754e3e8f5 -OpenBLAS.v0.3.13+5.i686-linux-gnu-libgfortran5.tar.gz/sha512/8b4759484d705aae68d65a0785af9788c86d3766285c6fe3985837b9320f864be32f09e98707fa6d8614a702d44154019818fa4c44bafb9c54828e25555a4ac2 -OpenBLAS.v0.3.13+5.i686-linux-musl-libgfortran3.tar.gz/md5/02c1652b95583156ea798d0e0241b979 -OpenBLAS.v0.3.13+5.i686-linux-musl-libgfortran3.tar.gz/sha512/c9c7ed980170e5b4c23684d3979a972c47ed06c19ef582cbee7130b84511ca110af3408ae5b161162552a55611d7de6007c2a1d6adb4f872f1ccec4f6a3d38cd -OpenBLAS.v0.3.13+5.i686-linux-musl-libgfortran4.tar.gz/md5/92a0082208291ead889f38ee4eeda56e -OpenBLAS.v0.3.13+5.i686-linux-musl-libgfortran4.tar.gz/sha512/68cab863ca08fcde9aa75ccf8f34c49bdc4ff48089c982f2c00506765c7d37beaeddfb65e7d31847f1c61ef6390f6ce6fe307c7cf069ef7189ec55d38a56ddd3 -OpenBLAS.v0.3.13+5.i686-linux-musl-libgfortran5.tar.gz/md5/60e2bb9badf6121387d87bd8b88a63e9 -OpenBLAS.v0.3.13+5.i686-linux-musl-libgfortran5.tar.gz/sha512/13f7aaa870e9d7811ee79f1b8133345e0aa0d0bf4ad20d39acb43723b2bda1b11efaa2c6fec3cd8e2bc83b411be926fa74b39a8fcab1af92ccd0665435b22007 -OpenBLAS.v0.3.13+5.i686-w64-mingw32-libgfortran3.tar.gz/md5/f9e29157a222ec195f5d42dbe0472f8d -OpenBLAS.v0.3.13+5.i686-w64-mingw32-libgfortran3.tar.gz/sha512/a3b0875554a063a966e03d4a2f3d2dfecd44b049b93a9b627aa0491b70fbe4d1ba04f8b939dd402e22fa6f650cc1d0bf0d5375c4453bf3b8f6a097ec8faf3993 -OpenBLAS.v0.3.13+5.i686-w64-mingw32-libgfortran4.tar.gz/md5/ada7c84a9ba17f2af1e54afb65d51790 -OpenBLAS.v0.3.13+5.i686-w64-mingw32-libgfortran4.tar.gz/sha512/0ca3f30c5c56c1d3da850f2c077ed76ea27782013d3a5b5253879ed55078a2435d862278bb5021def8d52e4bc2cbd202ba9d8a8f676afef14bac56cd2d5a6f5a -OpenBLAS.v0.3.13+5.i686-w64-mingw32-libgfortran5.tar.gz/md5/42944f897776c8f0034fc31d74d1babe -OpenBLAS.v0.3.13+5.i686-w64-mingw32-libgfortran5.tar.gz/sha512/bb3823fc50440a4a3b6624bfd12b9c1018220345ee3a3d7a7f7b84c75812c8f97bd1403aa88754155b3aa52fa0e70435eebea171969f8c4a79b76c582266a764 -OpenBLAS.v0.3.13+5.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/238e8a32a24c6ffb6881866182588846 -OpenBLAS.v0.3.13+5.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/9da4452924a8513f5f40c1c9350fdda30833a7ac9755421363e74f557944a5022df98881ccb1f9c468481550f8e4cc894d3963df57371a4d8c0dd0ee8cb1de70 -OpenBLAS.v0.3.13+5.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/6d27131cf20d9172ee8486776a768ec1 -OpenBLAS.v0.3.13+5.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/a10ecd91b98cf33e5541b64a5e4cd26cb7738d751f7c40c8e0ad337214ac9c15101f012c37ac9724c5414bea8f1bec5342c33e9ed1f7ae5f3e3a90e29cada89d -OpenBLAS.v0.3.13+5.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/35d5f8477ea0ac0ce609785811d04164 -OpenBLAS.v0.3.13+5.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/77148afb919ece259c35e383e432cebabb65651fdcce00f8f15ec9d8f8805ea0a5615258b400f7ce73ed44405cd9f671b87c8aa015df4c7d417f9b2ee89e06dc -OpenBLAS.v0.3.13+5.x86_64-apple-darwin-libgfortran3.tar.gz/md5/5b8910928fdf38f2dca382a3ca583414 -OpenBLAS.v0.3.13+5.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/65303a748366432ac1723009abdcd51674af2e6452522a813b32bd928bbae44de96c9e7279b9cf8e403fdb5adc8a323b1e383275ec5162aaca957fa9e7983116 -OpenBLAS.v0.3.13+5.x86_64-apple-darwin-libgfortran4.tar.gz/md5/a62af36a018e5e695476bedeb189db4c -OpenBLAS.v0.3.13+5.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/594cd0536a3200bc452a7c1e26e0f179ba75f86f0ccd17ebc0816ff6bdd70ef4d367c6e68d173fa220cb092c4c65f0ceceaf55aa783032e28c465c060ead63d5 -OpenBLAS.v0.3.13+5.x86_64-apple-darwin-libgfortran5.tar.gz/md5/aedbf36e1e5e4aff51c7188c9d52c7f6 -OpenBLAS.v0.3.13+5.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/504afca82f8f30b7a93f0fc9fd9fdb2dbcb74b058fde3c3633b2462deb8b45f4c2f4caca5abf644196ac534799e07e1b7b55ce92ba395ff8e851c27d26113a42 -OpenBLAS.v0.3.13+5.x86_64-linux-gnu-libgfortran3.tar.gz/md5/9fc6ee1c8399a399dc5e6039bd99a3be -OpenBLAS.v0.3.13+5.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/83896931f1e1f21a3c46a420238d4db2d633402cd72bb15f24d00359d7ff27cfd21f1e51a2e1e1cc95c90cf14ca6181060681784e14ae41d06857e5c732427fe -OpenBLAS.v0.3.13+5.x86_64-linux-gnu-libgfortran4.tar.gz/md5/e2c0cf837ba543048e66563f339ba674 -OpenBLAS.v0.3.13+5.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/e63eb5501daadf460288aaab8d75ecfe4c321f775c25bf77836a0fb20cdd98f81adb8660e2b9465278fb0f002ed397f07399a93299b4373d571017511f474637 -OpenBLAS.v0.3.13+5.x86_64-linux-gnu-libgfortran5.tar.gz/md5/3301d928cce10270fe57dd9e1a83b9cc -OpenBLAS.v0.3.13+5.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/2e2db27c44ca65b428cb081a0f6ad441cba91ac67e7309007870e4811398038bd0fc6db494d200cfa14b624797835fdf4f08fb21a34e3a61ca013e64e259fc9a -OpenBLAS.v0.3.13+5.x86_64-linux-musl-libgfortran3.tar.gz/md5/384fbb41d82460762349990c60900fc2 -OpenBLAS.v0.3.13+5.x86_64-linux-musl-libgfortran3.tar.gz/sha512/05dceac3d28ab52d5becf51bca4b6696848902e70c44cbc3cc237fe761dea92b44d82b463671cd656ea0b82628c4c4eb7f2cf136f9c653e594bb8f349b46850f -OpenBLAS.v0.3.13+5.x86_64-linux-musl-libgfortran4.tar.gz/md5/04e92d94fa5190e6915ff739a723ab54 -OpenBLAS.v0.3.13+5.x86_64-linux-musl-libgfortran4.tar.gz/sha512/c49f57d5d35adae65db8a5bb6829b2d3fa806c2232698796d1a7769845f122b1d34a5aa409199fd514364a99d854fa8f8369b0f7445a3a22a828d997a8d9e487 -OpenBLAS.v0.3.13+5.x86_64-linux-musl-libgfortran5.tar.gz/md5/26f0bb722acde07d05ea1c35cd976781 -OpenBLAS.v0.3.13+5.x86_64-linux-musl-libgfortran5.tar.gz/sha512/29ba655390118eadd760c2e46a0ad4dd8ed6776a8185e3a6acb5b3fa3542b454f7caf3d3b183ec04ad8cecde774e182d4400be875ff349b00880352a4e4dcc32 -OpenBLAS.v0.3.13+5.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/0d08d7b22e4d6d6a844653718a6beb35 -OpenBLAS.v0.3.13+5.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/08625e91f84243317e881a798e5c0c9f59ac19ec46c592d15ea105d1c24634fa17e66cfb9ac98a87a1bef14d3f550d278cde31e2cc62855288eb027778044a6f -OpenBLAS.v0.3.13+5.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/5a2484aaedea160beafa0ae928f98bce -OpenBLAS.v0.3.13+5.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/c5561a01275430fa6361da34f11f0478b343946c08428617d106e36e8ba1514b59628ad2fd798fdd78c0ed79e0d0014da8b08166182bcf88044dedd3357c5026 -OpenBLAS.v0.3.13+5.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/c6f17657a15f180dfe9d911c0b41a244 -OpenBLAS.v0.3.13+5.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/3dc411b0914734ec10d89d6acbb5ed70fc80ad8fc48fbdfa8c56dd209cb4c1251060b441d420bf2deb9cc81dc07605fc4036d7ae37d786a1069716f9bbb5870d -OpenBLAS.v0.3.13+5.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/5e1451e34917819fa100a92dffeafea5 -OpenBLAS.v0.3.13+5.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/eea215ae37897fd03e0acd7b32547d33ee880ee000836632be637d503159bce5d8093a34d588ad4e9b9fa9b75ecebfeb09f633a8266db202076a4eda57be954b -OpenBLAS.v0.3.13+5.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/a34a631f7c912ef84ac9a53720b8f2b4 -OpenBLAS.v0.3.13+5.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/78ceb1b14d89fb8ada27a1ce195d9e011a592c41079a7790df8cb9c88df57c798883967ee47ecd633d1eb281d3b751e3e41e4a0394b37d9ef511ec032d2ce299 -OpenBLAS.v0.3.13+5.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/fbfdf0d564cb892aa7d62f9874aad2d7 -OpenBLAS.v0.3.13+5.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/361d1e38445cad0ccd15bb886c7c3a45655ccd83b621cb8d7a50cc5061a05ade9d797f9011894ceede9c782f210c8f320eb1803b4d4620db6087d1bb6e192160 +OpenBLAS.v0.3.13+6.aarch64-apple-darwin-libgfortran5.tar.gz/md5/db35f9fcf744a3d86c0a20b8ab39c7c1 +OpenBLAS.v0.3.13+6.aarch64-apple-darwin-libgfortran5.tar.gz/sha512/45ffdac8aa4150e96981cdc3d32242ebf7b7987fed5408d6cd6a9a6518cf7b7f204ca2a4226a0837cae76c2d4d4822d4ae93d2de1164428830c04e2147976341 +OpenBLAS.v0.3.13+6.aarch64-linux-gnu-libgfortran3.tar.gz/md5/aecd6bc6356314108c4ef2bfd768d006 +OpenBLAS.v0.3.13+6.aarch64-linux-gnu-libgfortran3.tar.gz/sha512/1f5e861d3e14d64d0574a4dde4909f21cc0c22d1bfe052aae93a7ba3b3a9e564e01a7e1c921cb6175ba251a8aadfb0c4fce345803966dd7452db3d289bf144d3 +OpenBLAS.v0.3.13+6.aarch64-linux-gnu-libgfortran4.tar.gz/md5/7d20f2dd20459cee45adb024adb43efd +OpenBLAS.v0.3.13+6.aarch64-linux-gnu-libgfortran4.tar.gz/sha512/b06dcbf820f74e3e3cda4cfdf76113e7f518639642f141dac13ca19b05fec09160c3728fb4f7b001a9aa63300f6e289cd2126da1179ef4efce18e814d8c32bbf +OpenBLAS.v0.3.13+6.aarch64-linux-gnu-libgfortran5.tar.gz/md5/5f0a683b55fc2f5a4dcd134a0d03c175 +OpenBLAS.v0.3.13+6.aarch64-linux-gnu-libgfortran5.tar.gz/sha512/89c25976dd89e2e1c856790aaa4d0951f912fd7ded92223952316e40b08e4b9d9218b25a35cf9ab19021b356ccbb72c8bab2237bc62b8dac37317abe31edff6d +OpenBLAS.v0.3.13+6.aarch64-linux-musl-libgfortran3.tar.gz/md5/5a7815b5981d30b89cb48a3e3bbf8f4d +OpenBLAS.v0.3.13+6.aarch64-linux-musl-libgfortran3.tar.gz/sha512/358b7d25a069d50434b6621d1831903b88f6e120f10b5978235cc82f795da4d31ca4e6d02eb5eb1fd5587085828e95835e2ad84b2042865c552c5493cc272227 +OpenBLAS.v0.3.13+6.aarch64-linux-musl-libgfortran4.tar.gz/md5/02062032841900e941cfc66a0ef94dae +OpenBLAS.v0.3.13+6.aarch64-linux-musl-libgfortran4.tar.gz/sha512/86f3072c3b8e36f3b33d90da755bf9d2a95ba0317852eaf1c74deb8a0f62a2b5c19a3b1d551c054536277da50865ef341c5e05fbab195edc4cd1fb160b4203b8 +OpenBLAS.v0.3.13+6.aarch64-linux-musl-libgfortran5.tar.gz/md5/ec50a9a3e5078726d6e3dd011b7a4713 +OpenBLAS.v0.3.13+6.aarch64-linux-musl-libgfortran5.tar.gz/sha512/548d4b893648de6c1a3d6b24f4531c4b190afc338887d1b8eb9040a9aae72cf846127e9c545841568a2f358f090451e13cf12a191456d4c27431661ca41f6e10 +OpenBLAS.v0.3.13+6.armv6l-linux-gnueabihf-libgfortran3.tar.gz/md5/15cb058e906a1f042d51e8dcc44dac90 +OpenBLAS.v0.3.13+6.armv6l-linux-gnueabihf-libgfortran3.tar.gz/sha512/d74ba1d83199259b07787424832318e31013384d4f7217f6d7adb47dcbfe0836147997c044c8ca7a27b5a5eea435948a42d7f81a38014b7f7b3f4fb049e3578b +OpenBLAS.v0.3.13+6.armv6l-linux-gnueabihf-libgfortran4.tar.gz/md5/14b991b59eb27538331fae0544130d8a +OpenBLAS.v0.3.13+6.armv6l-linux-gnueabihf-libgfortran4.tar.gz/sha512/d2c194692265325f9e5b6c09c23d7dcb45f1f2ce88edf2fbe6f9b021bfedf6b0c7c4b94a7ff5aa7095b7a131870759cd81ec80369e315660f5cbb0ac1c133e76 +OpenBLAS.v0.3.13+6.armv6l-linux-gnueabihf-libgfortran5.tar.gz/md5/161a6506630eb035bc6afae69aea91dd +OpenBLAS.v0.3.13+6.armv6l-linux-gnueabihf-libgfortran5.tar.gz/sha512/f64ce6bbaac4e16d5956b6298204628648b35e76f14a528aa8df815b0021053e4e1963438edc7e5f66fd82ea1e1d7bc38b14c52ad0ea7b90eeb1ee59d0927fd8 +OpenBLAS.v0.3.13+6.armv6l-linux-musleabihf-libgfortran3.tar.gz/md5/b4d102165aff04f4a3ff583c754ec90c +OpenBLAS.v0.3.13+6.armv6l-linux-musleabihf-libgfortran3.tar.gz/sha512/f488da922deaac3fa42f5637003c9dbfd943aa267104e6fce46b77fd9f10dfc580191bd5aa4c97bf5b41ad6a92fd669daca8b11479a3a7e28f41047826f0e6bd +OpenBLAS.v0.3.13+6.armv6l-linux-musleabihf-libgfortran4.tar.gz/md5/9411f83736cbcef0b840914ace71d869 +OpenBLAS.v0.3.13+6.armv6l-linux-musleabihf-libgfortran4.tar.gz/sha512/3b0c9077255fa639d8798193fb1c5fd8ad7824f58889d0c99b388b3ddc7622122387acc49fc29f7c5b5a62ff7dd2335a47b6e60c14d613ba37e11b79faddf7d2 +OpenBLAS.v0.3.13+6.armv6l-linux-musleabihf-libgfortran5.tar.gz/md5/1222f66dbd5eb8dc910efe04d37fb763 +OpenBLAS.v0.3.13+6.armv6l-linux-musleabihf-libgfortran5.tar.gz/sha512/a747df8a04d50ef4a4b90bb66e682cd7414b6d2f0cd9577e25b18c80d36b599e9506e8fcf24729a8bc0f5ef464c57d86a87e1e74140597466dbd862eeb9a0b18 +OpenBLAS.v0.3.13+6.armv7l-linux-gnueabihf-libgfortran3.tar.gz/md5/35fd828c77d3e1817bebef49aa045f02 +OpenBLAS.v0.3.13+6.armv7l-linux-gnueabihf-libgfortran3.tar.gz/sha512/fd4ce90ea21f64abde4497d3d6518c341383eae4c8f5052951b5c1469c87f1464cc1c57f7047bd4881b55d70d6453ef558e6d6e1986fe463a98a0567bbb876a5 +OpenBLAS.v0.3.13+6.armv7l-linux-gnueabihf-libgfortran4.tar.gz/md5/deaa63f74369dbf358946c6796e8bd6b +OpenBLAS.v0.3.13+6.armv7l-linux-gnueabihf-libgfortran4.tar.gz/sha512/7b16a7f5b5710de0b38122af6ed9e4a6b3ede4cd9c18c79314fbde366ca92c2dae17d1ab9e43213b5a6f80470455afbb06d54ff326e0404d60f5454164f2c62a +OpenBLAS.v0.3.13+6.armv7l-linux-gnueabihf-libgfortran5.tar.gz/md5/450506080f49538628dc2407461b894d +OpenBLAS.v0.3.13+6.armv7l-linux-gnueabihf-libgfortran5.tar.gz/sha512/95dc7f14c1b1f450de59a3f95673dc510bcd0e38b6d82a8657d4dbdd97158d2095002a61ecb4a4c514e530c0a9879afd232f24a71561e8516683c564406a0a55 +OpenBLAS.v0.3.13+6.armv7l-linux-musleabihf-libgfortran3.tar.gz/md5/cadda67c770ea3835170c63cf5c1a93f +OpenBLAS.v0.3.13+6.armv7l-linux-musleabihf-libgfortran3.tar.gz/sha512/ccd326df1d3ce8e138fc22db37880a0f15b3b5740b75f4d6e54c6496735dea48d1011c31d0fbf6fcaf7f4ccc565cb2aa59bac473b9b12251da1adaa992998373 +OpenBLAS.v0.3.13+6.armv7l-linux-musleabihf-libgfortran4.tar.gz/md5/e89c9935ed19d9b6bedd1b70cbe1ea27 +OpenBLAS.v0.3.13+6.armv7l-linux-musleabihf-libgfortran4.tar.gz/sha512/d537e954d424240315280fe632bfa83088825dd770042a750448e1553b2887a8c3d4edf193c89d2bccb7b0c3eae560937156eb989373accca1dbecee47e32cc4 +OpenBLAS.v0.3.13+6.armv7l-linux-musleabihf-libgfortran5.tar.gz/md5/7072bd88910ce5402e18527f178dcd56 +OpenBLAS.v0.3.13+6.armv7l-linux-musleabihf-libgfortran5.tar.gz/sha512/0e4e038f317faa7a14cc29267202ad781a2551ef444b27f841ad2a39f5fb5032d20d50749d1b5a925e6552247aca40d84a1464c268022d8b9560c6e6fcf9a9bd +OpenBLAS.v0.3.13+6.i686-linux-gnu-libgfortran3.tar.gz/md5/261636c2b2b3a734e0d054b67fc0e617 +OpenBLAS.v0.3.13+6.i686-linux-gnu-libgfortran3.tar.gz/sha512/0777c0cccb6f688024756e12f8a09ca107cf6f2408d04fb1efeae67299eb8de834de158b9ada232e3e50d4bb0481810181c54f6b63238ba8d4f1a779bf30ceab +OpenBLAS.v0.3.13+6.i686-linux-gnu-libgfortran4.tar.gz/md5/af9998d911a0919bbc611279f6957d8f +OpenBLAS.v0.3.13+6.i686-linux-gnu-libgfortran4.tar.gz/sha512/639d0d837dd62f4eff32071e2ef5d95d3d1a80995dc9da0a97e0a2f8bedf4637e3082acec309744d0d36dca8e82b3f7bf792ffb9ba47c18d8b9a44aa0f368adf +OpenBLAS.v0.3.13+6.i686-linux-gnu-libgfortran5.tar.gz/md5/7bee1a7c3470c32c10e3776289ce730f +OpenBLAS.v0.3.13+6.i686-linux-gnu-libgfortran5.tar.gz/sha512/ff76d5fc5ff2432dfcd9a36cfb95943fecab3e75153c12260b729a89c6bc2269f7f0ad256f6334d58445de27d32f6073e830cee4a59e9196a0b7395c3a3b7ab0 +OpenBLAS.v0.3.13+6.i686-linux-musl-libgfortran3.tar.gz/md5/362e299c65ed4011563caf8555f55738 +OpenBLAS.v0.3.13+6.i686-linux-musl-libgfortran3.tar.gz/sha512/45eeae6bc817e8d78c0daa69ca2add3c32d714766e1e1341d14c445a1beb5a5a7ae93e88649c9a62f07c5463b6ee300b60acc06d9d29974cc6725d08d9df66d9 +OpenBLAS.v0.3.13+6.i686-linux-musl-libgfortran4.tar.gz/md5/791075ccd19280d58209f48b487ec42b +OpenBLAS.v0.3.13+6.i686-linux-musl-libgfortran4.tar.gz/sha512/44b9bf0b5d31048fe05f78a71fe9ddee799bd70f7586061fdd9a1390a894701eb96678ad9c332a21f2c2b079896924bee14d64ea89f6314babae1faac289d6eb +OpenBLAS.v0.3.13+6.i686-linux-musl-libgfortran5.tar.gz/md5/712e9c7ef4640dbc150371ef3a10e249 +OpenBLAS.v0.3.13+6.i686-linux-musl-libgfortran5.tar.gz/sha512/3407fab09ae6e2b12c2b586915557d121bfa345a4bf66597bec2d5850ce33ad70dddb45ad08a975097e2a428e65abffdbd9747f1b46fa944bc52218798fd2e34 +OpenBLAS.v0.3.13+6.i686-w64-mingw32-libgfortran3.tar.gz/md5/93d7254e1e03f4ef1acb6b4e8d63c813 +OpenBLAS.v0.3.13+6.i686-w64-mingw32-libgfortran3.tar.gz/sha512/198d4d0455f981345f20ff4a196cca056fbd7c5fd4d6a2b11e0ec6ba695c362d309947b9fcc13a6c51a44cc3ea73e559c0246a98b26fd6baa6cf07a055f5c972 +OpenBLAS.v0.3.13+6.i686-w64-mingw32-libgfortran4.tar.gz/md5/728d9f80b9e6b5ecce0ffab86b7e1c52 +OpenBLAS.v0.3.13+6.i686-w64-mingw32-libgfortran4.tar.gz/sha512/1b8fc2e3e14fb172ec7d99d5beef54bcabdc807318f1b0415f1bdf7bb97a1e49c20168a9bfc0e89f4f9367dfbd1011e3cffe74b515da53fce00f06896387ca72 +OpenBLAS.v0.3.13+6.i686-w64-mingw32-libgfortran5.tar.gz/md5/b989478ab0496a27daf87f8ebb396316 +OpenBLAS.v0.3.13+6.i686-w64-mingw32-libgfortran5.tar.gz/sha512/c56ae711ecc9c6fe9e65e7610011f7189ecda4c0e94cfdd6bb150a32eac6f3d2343c671005f4008873e2f026fa312ce0257716a47fb4e91f82a6d29013dfc303 +OpenBLAS.v0.3.13+6.powerpc64le-linux-gnu-libgfortran3.tar.gz/md5/194ec8e4078fc6624acfefb29a9a1177 +OpenBLAS.v0.3.13+6.powerpc64le-linux-gnu-libgfortran3.tar.gz/sha512/ecdd5b17232ae08e76f6822ec52cc96e4b5cde0748baf799799aa7946966b61f83c5b1d8a70e4f14b4e074e13e0cc72f2261f2a304ab8d8be15e68a004210be1 +OpenBLAS.v0.3.13+6.powerpc64le-linux-gnu-libgfortran4.tar.gz/md5/f08aad57a0d92ba7811b40deb7c40e5a +OpenBLAS.v0.3.13+6.powerpc64le-linux-gnu-libgfortran4.tar.gz/sha512/f5759dfce2854f929a73e11253edd37e100b9437829eca893f97a2c08a7ebc7af4815f588466cc8230985932f47b150e671d3a822e8463c1461bc3ce698f222d +OpenBLAS.v0.3.13+6.powerpc64le-linux-gnu-libgfortran5.tar.gz/md5/bf291c76d9c9642e6964141eb541e4e0 +OpenBLAS.v0.3.13+6.powerpc64le-linux-gnu-libgfortran5.tar.gz/sha512/0792f5d3c4c7f1ff5f43bcf6aafc8547c742e969ef4fc056f098649f7d99470538827349e5f39f0ce81ac15ec992f11d93a78f1ea9673a67ec076787b6d7b9c5 +OpenBLAS.v0.3.13+6.x86_64-apple-darwin-libgfortran3.tar.gz/md5/9a1979528b2b54df3012e2182b834bbd +OpenBLAS.v0.3.13+6.x86_64-apple-darwin-libgfortran3.tar.gz/sha512/1752e0ee45107eec916a42370e19b6091b41423eb0f9443f23f78c3e8dd8db5fa0b8b72f5edf2d26e759e0f44056034dde1bce38b9c12f58d6c931ec873bd67c +OpenBLAS.v0.3.13+6.x86_64-apple-darwin-libgfortran4.tar.gz/md5/1b30b010ee8ecf949d83d98be7cd59a0 +OpenBLAS.v0.3.13+6.x86_64-apple-darwin-libgfortran4.tar.gz/sha512/bab954ecbc2e9ece41807409bfef66063dc98cc7fbdbb0bbce24a331d5b121b0c63432a13cea935c5c27090f790e9fba599e1c129e0005656952805260732da6 +OpenBLAS.v0.3.13+6.x86_64-apple-darwin-libgfortran5.tar.gz/md5/da031443b1bd5ed8abb8e956a05c616c +OpenBLAS.v0.3.13+6.x86_64-apple-darwin-libgfortran5.tar.gz/sha512/0009d10265ff16603c8552663b3c71ab619905b18fe87119a3203fe24d531148b8b18f727260fc125362c58a6226d1dca98a6517e9b7a93418a2cdbb2c66806e +OpenBLAS.v0.3.13+6.x86_64-linux-gnu-libgfortran3.tar.gz/md5/133b638a2efa22381cd70abe871e6ebe +OpenBLAS.v0.3.13+6.x86_64-linux-gnu-libgfortran3.tar.gz/sha512/98067cbaf1f5cf4a6ba01cf09ec9de044c04007f3a1953e51a75439cfb7215caa5b1a7f1b848b216926231a9511c45e78ba78abd39da06c6fbec4ce9542890f2 +OpenBLAS.v0.3.13+6.x86_64-linux-gnu-libgfortran4.tar.gz/md5/3590e16f503a615a8c8886af39d3fd14 +OpenBLAS.v0.3.13+6.x86_64-linux-gnu-libgfortran4.tar.gz/sha512/b7f3fd487e44a4f6cbbf035bc9fb433aa761f05bc1cf0c5351e6f9a9e5b80450ffbd11f86f904477c89aadbe24e22780ce108e228585e701d92141a735b454fd +OpenBLAS.v0.3.13+6.x86_64-linux-gnu-libgfortran5.tar.gz/md5/05472a418ff1d7f6bedb58894d6f5356 +OpenBLAS.v0.3.13+6.x86_64-linux-gnu-libgfortran5.tar.gz/sha512/fc8a84b28db834b93a0c9a9c96ba22dfc6018cba90c0d43f4e1db7fcbda73c0aec04d7347db02b94df5375e785d447b3aeb993bf0ded69e5d43c2486c13b2aa5 +OpenBLAS.v0.3.13+6.x86_64-linux-musl-libgfortran3.tar.gz/md5/22200029744717079b3b8663d683273a +OpenBLAS.v0.3.13+6.x86_64-linux-musl-libgfortran3.tar.gz/sha512/664bc2e95f10ac5668d51a2ffae488ad002f00995e5e7b620dd894e816bcaeeb7ccffb45f448365484f97f7aa5ac7b237ca1767e2a9421fd5c5fa39098c9fcb4 +OpenBLAS.v0.3.13+6.x86_64-linux-musl-libgfortran4.tar.gz/md5/b9fb6101fa172dd0f1a00c07673b308e +OpenBLAS.v0.3.13+6.x86_64-linux-musl-libgfortran4.tar.gz/sha512/cf49792da8bc3e3a971b0361f2bdd835db46764c308d4ad0e20215c8bba5d6bd9b96e9e8fe2cdfb835bba4f21e62287f7b67245ff1d00a9ef3f9e44201b53412 +OpenBLAS.v0.3.13+6.x86_64-linux-musl-libgfortran5.tar.gz/md5/17c0ab204c65b252988bf873226f003d +OpenBLAS.v0.3.13+6.x86_64-linux-musl-libgfortran5.tar.gz/sha512/02f493a6cb20c51c38203928a5a9e4890fc9285ce1907a552b61bd96bc64bc50a1932236d7617e83edc5ae1c40da84cc1d8db80c190605676869a8d1a57c4d7e +OpenBLAS.v0.3.13+6.x86_64-unknown-freebsd-libgfortran3.tar.gz/md5/24e787f88452b2f304c269061ad07b0a +OpenBLAS.v0.3.13+6.x86_64-unknown-freebsd-libgfortran3.tar.gz/sha512/d45272120a6e15431b9a08afe5648afa903b588e2d65541f80ce123117dfc0e6d3b620ce4063211a420f1cfd398e969be69eb6a6302211fc368c4af3c9d6d3ef +OpenBLAS.v0.3.13+6.x86_64-unknown-freebsd-libgfortran4.tar.gz/md5/9aa8cd86c2de41ed2ed47bccc315f19f +OpenBLAS.v0.3.13+6.x86_64-unknown-freebsd-libgfortran4.tar.gz/sha512/1c42e55fef774a34d3b0e0b0f899418a501cc9d56c4d38cfa0b4823a7622c7eb594f4ab222bd6994ba1c1eb7b69a37b10ec78b206a24d54276b03f69133b7b40 +OpenBLAS.v0.3.13+6.x86_64-unknown-freebsd-libgfortran5.tar.gz/md5/e09d926e41b3a52188cac7efe9d9aeed +OpenBLAS.v0.3.13+6.x86_64-unknown-freebsd-libgfortran5.tar.gz/sha512/eddc11f4b5535e629af6fe2705f24b142e457fd7721d6f9892e1c951d2722e996f32a59d05df803bc7a77c15ae011cc5f36a88709a7ebc9e6be00cd52789083b +OpenBLAS.v0.3.13+6.x86_64-w64-mingw32-libgfortran3.tar.gz/md5/5f09322a961185e965f8914b87fb769c +OpenBLAS.v0.3.13+6.x86_64-w64-mingw32-libgfortran3.tar.gz/sha512/531860456a4604d7743b52632ca1562448e3b34015e0a7082935a12fe7537c3824fd6eca29813b8b28043c85db4c748ca2e42dfb443149e225b2ae1ebf641ece +OpenBLAS.v0.3.13+6.x86_64-w64-mingw32-libgfortran4.tar.gz/md5/68bf07ec07fab8eb000742f5b34a297a +OpenBLAS.v0.3.13+6.x86_64-w64-mingw32-libgfortran4.tar.gz/sha512/5cf754e09737a9ccf67998a0dd64a6eb836784489b337bd9cd3379773ccc0d8261f6eb91ae6811dc45f3dd13480c6e0abc603f13add94bc5505ed4aa41e82951 +OpenBLAS.v0.3.13+6.x86_64-w64-mingw32-libgfortran5.tar.gz/md5/d30d1b10c1a98ecbed686a1d133f4abc +OpenBLAS.v0.3.13+6.x86_64-w64-mingw32-libgfortran5.tar.gz/sha512/6a61cd1eb2b20f33bb6370d760cf98c8c3af2f323b3c83c866ab8d2e3010771da7345fccbbb94880ca0c0956b711d3127566f040bbb79166e281b9ea6d14b2c7 diff --git a/deps/openblas.mk b/deps/openblas.mk index e555e613c2ebc..d86663efcbde7 100644 --- a/deps/openblas.mk +++ b/deps/openblas.mk @@ -108,7 +108,17 @@ $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-exshift.patch-applied: $(BUILDDIR)/$(OP patch -p1 -f < $(SRCDIR)/patches/openblas-exshift.patch echo 1 > $@ -$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-exshift.patch-applied +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-openblas-exshift.patch-applied + cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ + patch -p1 -f < $(SRCDIR)/patches/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch + echo 1 > $@ + +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-Only-filter-out-mavx-on-Sandybridge.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch + cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ + patch -p1 -f < $(SRCDIR)/patches/openblas-Only-filter-out-mavx-on-Sandybridge.patch + echo 1 > $@ + +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-Only-filter-out-mavx-on-Sandybridge.patch-applied echo 1 > $@ $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-compiled: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured diff --git a/deps/patches/openblas-Only-filter-out-mavx-on-Sandybridge.patch b/deps/patches/openblas-Only-filter-out-mavx-on-Sandybridge.patch new file mode 100644 index 0000000000000..10ba3b4a5c6b5 --- /dev/null +++ b/deps/patches/openblas-Only-filter-out-mavx-on-Sandybridge.patch @@ -0,0 +1,221 @@ +From c4da892ba0798f8697e7b3219fd631651647e45f Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Fri, 14 May 2021 23:19:10 +0200 +Subject: [PATCH 2/2] Only filter out -mavx on Sandybridge ZGEMM/ZTRMM kernels + +--- + kernel/Makefile.L3 | 86 ++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 68 insertions(+), 18 deletions(-) + +diff --git a/kernel/Makefile.L3 b/kernel/Makefile.L3 +index be10ee01..2d9e3ec3 100644 +--- a/kernel/Makefile.L3 ++++ b/kernel/Makefile.L3 +@@ -818,8 +818,10 @@ ifeq ($(OS), AIX) + m4 zgemm_kernel_n.s > zgemm_kernel_n_nomacros.s + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNN zgemm_kernel_n_nomacros.s -o $@ + rm zgemm_kernel_n.s zgemm_kernel_n_nomacros.s +-else ++else ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DNN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNN $< -o $@ + endif + + $(KDIR)zgemm_kernel_l$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) $(ZGEMMDEPEND) +@@ -828,8 +830,10 @@ ifeq ($(OS), AIX) + m4 zgemm_kernel_l.s > zgemm_kernel_l_nomacros.s + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCN zgemm_kernel_l_nomacros.s -o $@ + rm zgemm_kernel_l.s zgemm_kernel_l_nomacros.s +-else ++else ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DCN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCN $< -o $@ + endif + + $(KDIR)zgemm_kernel_r$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) $(ZGEMMDEPEND) +@@ -838,8 +842,10 @@ ifeq ($(OS), AIX) + m4 zgemm_kernel_r.s > zgemm_kernel_r_nomacros.s + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNC zgemm_kernel_r_nomacros.s -o $@ + rm zgemm_kernel_r.s zgemm_kernel_r_nomacros.s +-else ++else ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DNC $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNC $< -o $@ + endif + + $(KDIR)zgemm_kernel_b$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) $(ZGEMMDEPEND) +@@ -848,8 +854,10 @@ ifeq ($(OS), AIX) + m4 zgemm_kernel_b.s > zgemm_kernel_b_nomacros.s + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCC zgemm_kernel_b_nomacros.s -o $@ + rm zgemm_kernel_b.s zgemm_kernel_b_nomacros.s +-else ++else ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DCC $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCC $< -o $@ + endif + + $(KDIR)xgemm_kernel_n$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(XGEMMKERNEL) $(XGEMMDEPEND) +@@ -1044,8 +1052,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_ln.s > ztrmm_kernel_ln_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN ztrmm_kernel_ln_nomacros.s -o $@ + rm ztrmm_kernel_ln.s ztrmm_kernel_ln_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_LT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1054,8 +1064,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_lt.s > ztrmm_kernel_lt_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN ztrmm_kernel_lt_nomacros.s -o $@ + rm ztrmm_kernel_lt.s ztrmm_kernel_lt_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_LR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1064,8 +1076,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_lr.s > ztrmm_kernel_lr_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN ztrmm_kernel_lr_nomacros.s -o $@ + rm ztrmm_kernel_lr.s ztrmm_kernel_lr_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_LC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1074,8 +1088,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_lc.s >ztrmm_kernel_lc_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN ztrmm_kernel_lc_nomacros.s -o $@ + rm ztrmm_kernel_lc.s ztrmm_kernel_lc_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RN$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1084,8 +1100,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_rn.s > ztrmm_kernel_rn_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN ztrmm_kernel_rn_nomacros.s -o $@ + rm ztrmm_kernel_rn.s ztrmm_kernel_rn_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1094,8 +1112,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_rt.s > ztrmm_kernel_rt_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN ztrmm_kernel_rt_nomacros.s -o $@ + rm ztrmm_kernel_rt.s ztrmm_kernel_rt_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1104,8 +1124,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_rr.s > ztrmm_kernel_rr_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC ztrmm_kernel_rr_nomacros.s -o $@ + rm ztrmm_kernel_rr.s ztrmm_kernel_rr_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1114,8 +1136,10 @@ ifeq ($(OS), AIX) + m4 ztrmm_kernel_rc.s > ztrmm_kernel_rc_nomacros.s + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC ztrmm_kernel_rc_nomacros.s -o $@ + rm ztrmm_kernel_rc.s ztrmm_kernel_rc_nomacros.s +-else ++else ifeq ($(CORE), SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ + endif + + else +@@ -1187,28 +1211,54 @@ $(KDIR)ctrmm_kernel_RC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(CGEMMKERNEL) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -UDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ + + $(KDIR)ztrmm_kernel_LN$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ ++endif + + $(KDIR)ztrmm_kernel_LT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ +- ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ ++endif + $(KDIR)ztrmm_kernel_LR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ +- ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ ++endif + $(KDIR)ztrmm_kernel_LC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ +- ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ ++endif + $(KDIR)ztrmm_kernel_RN$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ +- ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ ++endif + $(KDIR)ztrmm_kernel_RT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ +- ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ ++endif + $(KDIR)ztrmm_kernel_RR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ +- ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ ++endif + $(KDIR)ztrmm_kernel_RC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) ++ifeq ($(CORE),SANDYBRIDGE) + $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ ++else ++ $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ ++endif + endif + + +-- +2.31.1 + diff --git a/deps/patches/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch b/deps/patches/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch new file mode 100644 index 0000000000000..5c9fa4aaa59e9 --- /dev/null +++ b/deps/patches/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch @@ -0,0 +1,162 @@ +From bd60fb6ffc9d14834ed03bed0f7e6e44126c6c05 Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Thu, 13 May 2021 23:05:00 +0200 +Subject: [PATCH 1/2] filter out -mavx flag on zgemm kernels as it can cause + problems with older gcc + +--- + kernel/Makefile.L3 | 40 ++++++++++++++++++++-------------------- + 1 file changed, 20 insertions(+), 20 deletions(-) + +diff --git a/kernel/Makefile.L3 b/kernel/Makefile.L3 +index d8d73996..be10ee01 100644 +--- a/kernel/Makefile.L3 ++++ b/kernel/Makefile.L3 +@@ -819,7 +819,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNN zgemm_kernel_n_nomacros.s -o $@ + rm zgemm_kernel_n.s zgemm_kernel_n_nomacros.s + else +- $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DNN $< -o $@ + endif + + $(KDIR)zgemm_kernel_l$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) $(ZGEMMDEPEND) +@@ -829,7 +829,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCN zgemm_kernel_l_nomacros.s -o $@ + rm zgemm_kernel_l.s zgemm_kernel_l_nomacros.s + else +- $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DCN $< -o $@ + endif + + $(KDIR)zgemm_kernel_r$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) $(ZGEMMDEPEND) +@@ -839,7 +839,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNC zgemm_kernel_r_nomacros.s -o $@ + rm zgemm_kernel_r.s zgemm_kernel_r_nomacros.s + else +- $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DNC $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DNC $< -o $@ + endif + + $(KDIR)zgemm_kernel_b$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) $(ZGEMMDEPEND) +@@ -849,7 +849,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCC zgemm_kernel_b_nomacros.s -o $@ + rm zgemm_kernel_b.s zgemm_kernel_b_nomacros.s + else +- $(CC) $(CFLAGS) -c -DDOUBLE -DCOMPLEX -DCC $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DDOUBLE -DCOMPLEX -DCC $< -o $@ + endif + + $(KDIR)xgemm_kernel_n$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(XGEMMKERNEL) $(XGEMMDEPEND) +@@ -1045,7 +1045,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN ztrmm_kernel_ln_nomacros.s -o $@ + rm ztrmm_kernel_ln.s ztrmm_kernel_ln_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_LT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1055,7 +1055,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN ztrmm_kernel_lt_nomacros.s -o $@ + rm ztrmm_kernel_lt.s ztrmm_kernel_lt_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_LR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1065,7 +1065,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN ztrmm_kernel_lr_nomacros.s -o $@ + rm ztrmm_kernel_lr.s ztrmm_kernel_lr_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_LC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1075,7 +1075,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN ztrmm_kernel_lc_nomacros.s -o $@ + rm ztrmm_kernel_lc.s ztrmm_kernel_lc_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RN$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1085,7 +1085,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN ztrmm_kernel_rn_nomacros.s -o $@ + rm ztrmm_kernel_rn.s ztrmm_kernel_rn_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1095,7 +1095,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN ztrmm_kernel_rt_nomacros.s -o $@ + rm ztrmm_kernel_rt.s ztrmm_kernel_rt_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1105,7 +1105,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC ztrmm_kernel_rr_nomacros.s -o $@ + rm ztrmm_kernel_rr.s ztrmm_kernel_rr_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ + endif + + $(KDIR)ztrmm_kernel_RC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZTRMMKERNEL) +@@ -1115,7 +1115,7 @@ ifeq ($(OS), AIX) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC ztrmm_kernel_rc_nomacros.s -o $@ + rm ztrmm_kernel_rc.s ztrmm_kernel_rc_nomacros.s + else +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ + endif + + else +@@ -1187,28 +1187,28 @@ $(KDIR)ctrmm_kernel_RC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(CGEMMKERNEL) + $(CC) $(CFLAGS) -c -DTRMMKERNEL -UDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ + + $(KDIR)ztrmm_kernel_LN$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -UCONJ -DNN $< -o $@ + + $(KDIR)ztrmm_kernel_LT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -UCONJ -DNN $< -o $@ + + $(KDIR)ztrmm_kernel_LR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -UTRANSA -DCONJ -DCN $< -o $@ + + $(KDIR)ztrmm_kernel_LC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -DLEFT -DTRANSA -DCONJ -DCN $< -o $@ + + $(KDIR)ztrmm_kernel_RN$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -UCONJ -DNN $< -o $@ + + $(KDIR)ztrmm_kernel_RT$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -UCONJ -DNN $< -o $@ + + $(KDIR)ztrmm_kernel_RR$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -UTRANSA -DCONJ -DNC $< -o $@ + + $(KDIR)ztrmm_kernel_RC$(TSUFFIX).$(SUFFIX) : $(KERNELDIR)/$(ZGEMMKERNEL) +- $(CC) $(CFLAGS) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ ++ $(CC) $(filter-out -mavx,$(CFLAGS)) -c -DTRMMKERNEL -DDOUBLE -DCOMPLEX -ULEFT -DTRANSA -DCONJ -DNC $< -o $@ + endif + + +-- +2.31.1 + diff --git a/stdlib/OpenBLAS_jll/Project.toml b/stdlib/OpenBLAS_jll/Project.toml index b236ed0809eec..f7d4dcce97cd7 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+5" +version = "0.3.13+6" [deps] CompilerSupportLibraries_jll = "e66e0078-7015-5450-92f7-15fbd957f2ae" From cb312e84719c2b76a95221c6dd923f435e5b3a69 Mon Sep 17 00:00:00 2001 From: GregPlowman Date: Thu, 24 Jun 2021 12:52:01 +1000 Subject: [PATCH 034/146] change doc for seed! thread-local -> task-local (#41341) default rng is task-local not thread-local? (cherry picked from commit ba5fffca7bb661031d3e17c6ed8ae378ada125c4) --- stdlib/Random/src/Random.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 53dbe38238bbc..45aa6442eed7e 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -392,7 +392,7 @@ After the call to `seed!`, `rng` is equivalent to a newly created object initialized with the same seed. If `rng` is not specified, it defaults to seeding the state of the -shared thread-local generator. +shared task-local generator. # Examples ```julia-repl From d011977d764e377e53d942a4150f94f7a6004c94 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 23 Jun 2021 22:47:57 -0400 Subject: [PATCH 035/146] inference: Add some basic inference for PhiNode (#41115) PhiNode isn't really supported in lowered IR, but it is convenient to be able to emit it, particularly for code that is designed to perform transformations both on typed and on lowered IR (such as Diffractor). Moreover, we do actually supported phinodes in untyped IR both in the interpreter and in the compiler. At the moment, inference assumes that PhiNodes get treated as embedded constants, which is just not what the actual implementation does. At the very least, it should just leave PhiNodes alone in case they accidentally end up in lowered IR (rather than causing crashes), but we might as well give them some basic support. (cherry picked from commit bb52621dfad3acba5168688ceccb74841fb41483) --- base/compiler/abstractinterpretation.jl | 7 +++++ base/compiler/optimize.jl | 39 +++++++++++++++++++++---- base/compiler/typeinfer.jl | 4 +-- base/compiler/utilities.jl | 10 +++++++ src/codegen.cpp | 8 +++-- test/compiler/inference.jl | 32 ++++++++++++++++++++ 6 files changed, 89 insertions(+), 11 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index db68fe721642c..7c804c80ae262 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1413,6 +1413,13 @@ end function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e), vtypes::VarTable, sv::InferenceState) if !isa(e, Expr) + if isa(e, PhiNode) + rt = Union{} + for val in e.values + rt = tmerge(rt, abstract_eval_special_value(interp, val, vtypes, sv)) + end + return rt + end return abstract_eval_special_value(interp, e, vtypes, sv) end e = e::Expr diff --git a/base/compiler/optimize.jl b/base/compiler/optimize.jl index 2d4f0d022fd6d..6d059247a43ea 100644 --- a/base/compiler/optimize.jl +++ b/base/compiler/optimize.jl @@ -593,14 +593,23 @@ function renumber_ir_elements!(body::Vector{Any}, changemap::Vector{Int}) return renumber_ir_elements!(body, changemap, changemap) end -function renumber_ir_elements!(body::Vector{Any}, ssachangemap::Vector{Int}, labelchangemap::Vector{Int}) - for i = 2:length(labelchangemap) - labelchangemap[i] += labelchangemap[i - 1] +function cumsum_ssamap!(ssamap::Vector{Int}) + rel_change = 0 + for i = 1:length(ssamap) + rel_change += ssamap[i] + if ssamap[i] == -1 + # Keep a marker that this statement was deleted + ssamap[i] = typemin(Int) + else + ssamap[i] = rel_change + end end +end + +function renumber_ir_elements!(body::Vector{Any}, ssachangemap::Vector{Int}, labelchangemap::Vector{Int}) + cumsum_ssamap!(labelchangemap) if ssachangemap !== labelchangemap - for i = 2:length(ssachangemap) - ssachangemap[i] += ssachangemap[i - 1] - end + cumsum_ssamap!(ssachangemap) end if labelchangemap[end] == 0 && ssachangemap[end] == 0 return @@ -621,6 +630,24 @@ function renumber_ir_elements!(body::Vector{Any}, ssachangemap::Vector{Int}, lab end elseif isa(el, SSAValue) body[i] = SSAValue(el.id + ssachangemap[el.id]) + elseif isa(el, PhiNode) + i = 1 + edges = el.edges + values = el.values + while i <= length(edges) + was_deleted = ssachangemap[edges[i]] == typemin(Int) + if was_deleted + deleteat!(edges, i) + deleteat!(values, i) + else + edges[i] += ssachangemap[edges[i]] + val = values[i] + if isa(val, SSAValue) + values[i] = SSAValue(val.id + ssachangemap[val.id]) + end + i += 1 + end + end elseif isa(el, Expr) if el.head === :(=) && el.args[2] isa Expr el = el.args[2]::Expr diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 3fa2f20006fec..4ad96ae2e72f0 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -672,9 +672,7 @@ function type_annotate!(sv::InferenceState, run_optimizer::Bool) deleteat!(src.codelocs, i) deleteat!(sv.stmt_info, i) nexpr -= 1 - if oldidx < length(changemap) - changemap[oldidx + 1] = -1 - end + changemap[oldidx] = -1 continue else body[i] = Const(expr) # annotate that this statement actually is dead diff --git a/base/compiler/utilities.jl b/base/compiler/utilities.jl index 4e9d2b74cf40c..3b84395c676d2 100644 --- a/base/compiler/utilities.jl +++ b/base/compiler/utilities.jl @@ -267,6 +267,8 @@ function find_ssavalue_uses(body::Vector{Any}, nvals::Int) push!(uses[e.id], line) elseif isa(e, Expr) find_ssavalue_uses(e, uses, line) + elseif isa(e, PhiNode) + find_ssavalue_uses(e, uses, line) end end return uses @@ -287,6 +289,14 @@ function find_ssavalue_uses(e::Expr, uses::Vector{BitSet}, line::Int) end end +function find_ssavalue_uses(e::PhiNode, uses::Vector{BitSet}, line::Int) + for val in e.values + if isa(val, SSAValue) + push!(uses[val.id], line) + end + end +end + function is_throw_call(e::Expr) if e.head === :call f = e.args[1] diff --git a/src/codegen.cpp b/src/codegen.cpp index cba7d1d2d3080..4eba89badbd8e 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4087,9 +4087,13 @@ static void emit_vi_assignment_unboxed(jl_codectx_t &ctx, jl_varinfo_t &vi, Valu static void emit_phinode_assign(jl_codectx_t &ctx, ssize_t idx, jl_value_t *r) { jl_value_t *ssavalue_types = (jl_value_t*)ctx.source->ssavaluetypes; - assert(jl_is_array(ssavalue_types)); + jl_value_t *phiType = NULL; + if (jl_is_array(ssavalue_types)) { + phiType = jl_array_ptr_ref(ssavalue_types, idx); + } else { + phiType = (jl_value_t*)jl_any_type; + } jl_array_t *edges = (jl_array_t*)jl_fieldref_noalloc(r, 0); - jl_value_t *phiType = jl_array_ptr_ref(ssavalue_types, idx); BasicBlock *BB = ctx.builder.GetInsertBlock(); auto InsertPt = BB->getFirstInsertionPt(); if (phiType == jl_bottom_type) { diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 52602a58c517b..d5bad34e38322 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3323,3 +3323,35 @@ end |> first === Tuple{Int, String} primitive type UInt24ish 24 end f34288(x) = Core.Intrinsics.checked_sdiv_int(x, Core.Intrinsics.trunc_int(UInt24ish, 0)) @test Base.return_types(f34288, (UInt24ish,)) == Any[UInt24ish] + +# Inference of PhiNode showing up in lowered AST +function f_convert_me_to_ir(b, x) + a = b ? sin(x) : cos(x) + return a +end + +let + # Test the presence of PhiNodes in lowered IR by taking the above function, + # running it through SSA conversion and then putting it into an opaque + # closure. + mi = Core.Compiler.specialize_method(first(methods(f_convert_me_to_ir)), + Tuple{Bool, Float64}, Core.svec()) + ci = Base.uncompressed_ast(mi.def) + ci.ssavaluetypes = Any[Any for i = 1:ci.ssavaluetypes] + sv = Core.Compiler.OptimizationState(mi, Core.Compiler.OptimizationParams(), + Core.Compiler.NativeInterpreter()) + ir = Core.Compiler.convert_to_ircode(ci, Core.Compiler.copy_exprargs(ci.code), + false, 2, sv) + ir = Core.Compiler.slot2reg(ir, ci, 2, sv) + ir = Core.Compiler.compact!(ir) + Core.Compiler.replace_code_newstyle!(ci, ir, 3) + ci.ssavaluetypes = length(ci.code) + @test any(x->isa(x, Core.PhiNode), ci.code) + oc = @eval b->$(Expr(:new_opaque_closure, Tuple{Bool, Float64}, false, Any, Any, + Expr(:opaque_closure_method, nothing, 2, LineNumberNode(0, nothing), ci)))(b, 1.0) + @test Base.return_types(oc, Tuple{Bool}) == Any[Float64] + + oc = @eval ()->$(Expr(:new_opaque_closure, Tuple{Bool, Float64}, false, Any, Any, + Expr(:opaque_closure_method, nothing, 2, LineNumberNode(0, nothing), ci)))(true, 1.0) + @test Base.return_types(oc, Tuple{}) == Any[Float64] +end From 1bb99efba17f52da0b032f5659ab75fd9054648c Mon Sep 17 00:00:00 2001 From: Atsushi Sakai Date: Sun, 27 Jun 2021 23:38:35 +0900 Subject: [PATCH 036/146] more links for distributed computing docs (#41378) (cherry picked from commit 1e3ae2308d5f3ac8fe0c2e47f967e5566edcf0cd) --- doc/src/manual/distributed-computing.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/src/manual/distributed-computing.md b/doc/src/manual/distributed-computing.md index bfcfb883e8228..e0f373233c723 100644 --- a/doc/src/manual/distributed-computing.md +++ b/doc/src/manual/distributed-computing.md @@ -1,6 +1,6 @@ # Multi-processing and Distributed Computing -An implementation of distributed memory parallel computing is provided by module `Distributed` +An implementation of distributed memory parallel computing is provided by module [`Distributed`](@ref man-distributed) as part of the standard library shipped with Julia. Most modern computers possess more than one CPU, and several computers can be combined together @@ -45,11 +45,11 @@ computation is running on the worker. Let's try this out. Starting with `julia -p n` provides `n` worker processes on the local machine. Generally it makes sense for `n` to equal the number of CPU threads (logical cores) on the machine. Note that the `-p` -argument implicitly loads module `Distributed`. +argument implicitly loads module [`Distributed`](@ref man-distributed). ```julia -$ ./julia -p 2 +$ julia -p 2 julia> r = remotecall(rand, 2, 2, 2) Future(2, 1, 4, nothing) @@ -198,7 +198,7 @@ loaded ``` As usual, this does not bring `DummyModule` into scope on any of the process, which requires -`using` or `import`. Moreover, when `DummyModule` is brought into scope on one process, it +[`using`](@ref) or [`import`](@ref). Moreover, when `DummyModule` is brought into scope on one process, it is not on any other: ```julia-repl @@ -236,7 +236,7 @@ like a process providing an interactive prompt. Finally, if `DummyModule.jl` is not a standalone file but a package, then `using DummyModule` will _load_ `DummyModule.jl` on all processes, but only bring it into scope on -the process where `using` was called. +the process where [`using`](@ref) was called. ## Starting and managing worker processes @@ -262,7 +262,7 @@ julia> addprocs(2) 3 ``` -Module `Distributed` must be explicitly loaded on the master process before invoking [`addprocs`](@ref). +Module [`Distributed`](@ref man-distributed) must be explicitly loaded on the master process before invoking [`addprocs`](@ref). It is automatically made available on the worker processes. Note that workers do not run a `~/.julia/config/startup.jl` startup script, nor do they synchronize @@ -322,8 +322,8 @@ is replaced with a more expensive operation. Then it might make sense to add ano statement just for this step. ## Global variables -Expressions executed remotely via `@spawnat`, or closures specified for remote execution using -`remotecall` may refer to global variables. Global bindings under module `Main` are treated +Expressions executed remotely via [`@spawnat`](@ref), or closures specified for remote execution using +[`remotecall`](@ref) may refer to global variables. Global bindings under module `Main` are treated a little differently compared to global bindings in other modules. Consider the following code snippet: @@ -335,7 +335,7 @@ remotecall_fetch(()->sum(A), 2) In this case [`sum`](@ref) MUST be defined in the remote process. Note that `A` is a global variable defined in the local workspace. Worker 2 does not have a variable called `A` under `Main`. The act of shipping the closure `()->sum(A)` to worker 2 results in `Main.A` being defined -on 2. `Main.A` continues to exist on worker 2 even after the call `remotecall_fetch` returns. Remote calls +on 2. `Main.A` continues to exist on worker 2 even after the call [`remotecall_fetch`](@ref) returns. Remote calls with embedded global references (under `Main` module only) manage globals as follows: - New global bindings are created on destination workers if they are referenced as part of a remote call. @@ -1205,12 +1205,12 @@ requirements for the inbuilt `LocalManager` and `SSHManager`: Securing and encrypting all worker-worker traffic (via SSH) or encrypting individual messages can be done via a custom `ClusterManager`. - * If you specify `multiplex=true` as an option to `addprocs`, SSH multiplexing is used to create + * If you specify `multiplex=true` as an option to [`addprocs`](@ref), SSH multiplexing is used to create a tunnel between the master and workers. If you have configured SSH multiplexing on your own and the connection has already been established, SSH multiplexing is used regardless of `multiplex` option. If multiplexing is enabled, forwarding is set by using the existing connection (`-O forward` option in ssh). This is beneficial if your servers require password authentication; - you can avoid authentication in Julia by logging in to the server ahead of `addprocs`. The control + you can avoid authentication in Julia by logging in to the server ahead of [`addprocs`](@ref). The control socket will be located at `~/.ssh/julia-%r@%h:%p` during the session unless the existing multiplexing connection is used. Note that bandwidth may be limited if you create multiple processes on a node and enable multiplexing, because in that case processes share a single multiplexing TCP connection. @@ -1236,7 +1236,7 @@ For example, cookies can be pre-shared and hence not specified as a startup argu ## Specifying Network Topology (Experimental) -The keyword argument `topology` passed to `addprocs` is used to specify how the workers must be +The keyword argument `topology` passed to [`addprocs`](@ref) is used to specify how the workers must be connected to each other: * `:all_to_all`, the default: all workers are connected to each other. From 5dccb0958aedad1c48c84c8488aeca361dfd0901 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Mon, 28 Jun 2021 10:28:40 +0200 Subject: [PATCH 037/146] fix equality of QRCompactWY (#41363) Equality for `QRCompactWY` did not ignore the subdiagonal entries of `T` leading to nondeterministic behavior. This is pulled out from #41228, since this change should be less controversial than the other changes there and this particular bug just came up in ChainRules again. (cherry picked from commit 74fab49ffba4913fd93edb742ed53c5728bc4c42) --- stdlib/LinearAlgebra/src/LinearAlgebra.jl | 3 +- stdlib/LinearAlgebra/src/qr.jl | 34 ++++++++++++ stdlib/LinearAlgebra/test/factorization.jl | 60 ++++++++++++++++++++++ stdlib/LinearAlgebra/test/testgroups | 1 + 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 stdlib/LinearAlgebra/test/factorization.jl diff --git a/stdlib/LinearAlgebra/src/LinearAlgebra.jl b/stdlib/LinearAlgebra/src/LinearAlgebra.jl index 8dfed4b5c89b9..eb8d22e55a1e8 100644 --- a/stdlib/LinearAlgebra/src/LinearAlgebra.jl +++ b/stdlib/LinearAlgebra/src/LinearAlgebra.jl @@ -16,7 +16,8 @@ import Base: USE_BLAS64, abs, acos, acosh, acot, acoth, acsc, acsch, adjoint, as setindex!, show, similar, sin, sincos, sinh, size, sqrt, strides, stride, tan, tanh, transpose, trunc, typed_hcat, vec using Base: IndexLinear, promote_op, promote_typeof, - @propagate_inbounds, @pure, reduce, typed_vcat, require_one_based_indexing + @propagate_inbounds, @pure, reduce, typed_vcat, require_one_based_indexing, + splat using Base.Broadcast: Broadcasted, broadcasted import Libdl diff --git a/stdlib/LinearAlgebra/src/qr.jl b/stdlib/LinearAlgebra/src/qr.jl index d0ec430347193..2982da339dd17 100644 --- a/stdlib/LinearAlgebra/src/qr.jl +++ b/stdlib/LinearAlgebra/src/qr.jl @@ -127,6 +127,40 @@ Base.iterate(S::QRCompactWY) = (S.Q, Val(:R)) Base.iterate(S::QRCompactWY, ::Val{:R}) = (S.R, Val(:done)) Base.iterate(S::QRCompactWY, ::Val{:done}) = nothing +# returns upper triangular views of all non-undef values of `qr(A).T`: +# +# julia> sparse(qr(A).T .== qr(A).T) +# 36×100 SparseMatrixCSC{Bool, Int64} with 1767 stored entries: +# ⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ +# ⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ +# ⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿ +# ⠀⠀⠀⠀⠀⠂⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿ +# ⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⢀⠐⠙⢿⣿⣿⣿⣿ +# ⠀⠀⠐⠀⠀⠀⠀⠀⠀⢀⢙⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠁⠀⡀⠀⠙⢿⣿⣿ +# ⠀⠀⠐⠀⠀⠀⠀⠀⠀⠀⠄⠀⠙⢿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⡀⠀⠀⢀⠀⠀⠙⢿ +# ⠀⡀⠀⠀⠀⠀⠀⠀⠂⠒⠒⠀⠀⠀⠙⢿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⡀⠀⠀ +# ⠀⠀⠀⠀⠀⠀⠀⠀⣈⡀⠀⠀⠀⠀⠀⠀⠙⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠂⠀⢀⠀ +# +function _triuppers_qr(T) + blocksize, cols = size(T) + return Iterators.map(0:div(cols - 1, blocksize)) do i + n = min(blocksize, cols - i * blocksize) + return UpperTriangular(view(T, 1:n, (1:n) .+ i * blocksize)) + end +end + +function Base.hash(F::QRCompactWY, h::UInt) + return hash(F.factors, foldr(hash, _triuppers_qr(F.T); init=hash(QRCompactWY, h))) +end +function Base.:(==)(A::QRCompactWY, B::QRCompactWY) + return A.factors == B.factors && all(splat(==), zip(_triuppers_qr.((A.T, B.T))...)) +end +function Base.isequal(A::QRCompactWY, B::QRCompactWY) + return isequal(A.factors, B.factors) && all(zip(_triuppers_qr.((A.T, B.T))...)) do (a, b) + isequal(a, b)::Bool + end +end + """ QRPivoted <: Factorization diff --git a/stdlib/LinearAlgebra/test/factorization.jl b/stdlib/LinearAlgebra/test/factorization.jl new file mode 100644 index 0000000000000..6a9226d80cdf6 --- /dev/null +++ b/stdlib/LinearAlgebra/test/factorization.jl @@ -0,0 +1,60 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +module TestFactorization +using Test, LinearAlgebra + +@testset "equality for factorizations - $f" for f in Any[ + bunchkaufman, + cholesky, + x -> cholesky(x, Val(true)), + eigen, + hessenberg, + lq, + lu, + qr, + x -> qr(x, ColumnNorm()), + svd, + schur, +] + A = randn(3, 3) + A = A * A' # ensure A is pos. def. and symmetric + F, G = f(A), f(A) + + @test F == G + @test isequal(F, G) + @test hash(F) == hash(G) + + f === hessenberg && continue + + # change all arrays in F to have eltype Float32 + F = typeof(F).name.wrapper(Base.mapany(1:nfields(F)) do i + x = getfield(F, i) + return x isa AbstractArray{Float64} ? Float32.(x) : x + end...) + # round all arrays in G to the nearest Float64 representable as Float32 + G = typeof(G).name.wrapper(Base.mapany(1:nfields(G)) do i + x = getfield(G, i) + return x isa AbstractArray{Float64} ? Float64.(Float32.(x)) : x + end...) + + @test F == G broken=!(f === eigen || f === qr) + @test isequal(F, G) broken=!(f === eigen || f === qr) + @test hash(F) == hash(G) +end + +@testset "equality of QRCompactWY" begin + A = rand(100, 100) + F, G = qr(A), qr(A) + + @test F == G + @test isequal(F, G) + @test hash(F) == hash(G) + + G.T[28, 100] = 42 + + @test F != G + @test !isequal(F, G) + @test hash(F) != hash(G) +end + +end diff --git a/stdlib/LinearAlgebra/test/testgroups b/stdlib/LinearAlgebra/test/testgroups index b33dfecaa82ee..de082d8e7dce0 100644 --- a/stdlib/LinearAlgebra/test/testgroups +++ b/stdlib/LinearAlgebra/test/testgroups @@ -25,3 +25,4 @@ givens structuredbroadcast addmul ldlt +factorization From 9fbc0dcd1b9f77766ea3db18749e82c814558af7 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Mon, 28 Jun 2021 21:42:13 +0200 Subject: [PATCH 038/146] fix #41330: backslash not escaping `\r\n` (#41333) (cherry picked from commit 96b3c5d733592ff1523a7c75db32d016761d7757) --- base/shell.jl | 7 +++++-- src/julia-parser.scm | 7 +++++-- test/syntax.jl | 7 +++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/base/shell.jl b/base/shell.jl index a5b25fc63ea44..475a0871d8355 100644 --- a/base/shell.jl +++ b/base/shell.jl @@ -88,9 +88,12 @@ function shell_parse(str::AbstractString, interpolate::Bool=true; in_double_quotes = !in_double_quotes i = consume_upto!(arg, s, i, j) elseif !in_single_quotes && c == '\\' - if !isempty(st) && peek(st)[2] == '\n' + if !isempty(st) && peek(st)[2] in ('\n', '\r') i = consume_upto!(arg, s, i, j) + 1 - _ = popfirst!(st) + if popfirst!(st)[2] == '\r' && peek(st)[2] == '\n' + i += 1 + popfirst!(st) + end elseif in_double_quotes isempty(st) && error("unterminated double quote") k, c′ = peek(st) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index 3a5dfad9293bd..fb29cb5005fba 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -2365,8 +2365,11 @@ (loop (read-char p) b e 0)))) (let ((nxch (not-eof-for delim (read-char p)))) (write-char #\\ b) - (write-char nxch b) - (loop (read-char p) b e 0)))) + (if (eqv? nxch #\return) + (loop nxch b e 0) + (begin + (write-char nxch b) + (loop (read-char p) b e 0)))))) ((and (eqv? c #\$) (not raw)) (let* ((ex (parse-interpolate s)) diff --git a/test/syntax.jl b/test/syntax.jl index 6e3ec82ca3e81..9ef8c033c14ad 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2930,3 +2930,10 @@ end # issue #41253 @test (function (::Dict{}); end)(Dict()) === nothing + +@testset "issue #41330" begin + @test Meta.parse("\"a\\\r\nb\"") == "ab" + @test Meta.parse("\"a\\\rb\"") == "ab" + @test eval(Meta.parse("`a\\\r\nb`")) == `ab` + @test eval(Meta.parse("`a\\\rb`")) == `ab` +end From 49961fb8828a0b73aa1a324df1e40f6c58965591 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 28 Jun 2021 16:09:01 -0400 Subject: [PATCH 039/146] fix `threadcall` for new ccall lookup strategy (#41345) (cherry picked from commit 5f182852e86c02c6371c913741376cc21c886e25) --- base/threadcall.jl | 15 ++++++++------- src/jl_uv.c | 8 +++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/base/threadcall.jl b/base/threadcall.jl index 2267e4ea2228c..f0e5f336ec0ca 100644 --- a/base/threadcall.jl +++ b/base/threadcall.jl @@ -30,7 +30,7 @@ macro threadcall(f, rettype, argtypes, argvals...) argvals = map(esc, argvals) # construct non-allocating wrapper to call C function - wrapper = :(function (args_ptr::Ptr{Cvoid}, retval_ptr::Ptr{Cvoid}) + wrapper = :(function (fptr::Ptr{Cvoid}, args_ptr::Ptr{Cvoid}, retval_ptr::Ptr{Cvoid}) p = args_ptr # the rest of the body is created below end) @@ -42,18 +42,19 @@ macro threadcall(f, rettype, argtypes, argvals...) push!(body, :(p += Core.sizeof($T))) push!(args, arg) end - push!(body, :(ret = ccall($f, $rettype, ($(argtypes...),), $(args...)))) + push!(body, :(ret = ccall(fptr, $rettype, ($(argtypes...),), $(args...)))) push!(body, :(unsafe_store!(convert(Ptr{$rettype}, retval_ptr), ret))) push!(body, :(return Int(Core.sizeof($rettype)))) # return code to generate wrapper function and send work request thread queue wrapper = Expr(Symbol("hygienic-scope"), wrapper, @__MODULE__) - return :(let fun_ptr = @cfunction($wrapper, Int, (Ptr{Cvoid}, Ptr{Cvoid})) - do_threadcall(fun_ptr, $rettype, Any[$(argtypes...)], Any[$(argvals...)]) + return :(let fun_ptr = @cfunction($wrapper, Int, (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid})) + # use cglobal to look up the function on the calling thread + do_threadcall(fun_ptr, cglobal($f), $rettype, Any[$(argtypes...)], Any[$(argvals...)]) end) end -function do_threadcall(fun_ptr::Ptr{Cvoid}, rettype::Type, argtypes::Vector, argvals::Vector) +function do_threadcall(fun_ptr::Ptr{Cvoid}, cfptr::Ptr{Cvoid}, rettype::Type, argtypes::Vector, argvals::Vector) # generate function pointer c_notify_fun = @cfunction( function notify_fun(idx) @@ -86,8 +87,8 @@ function do_threadcall(fun_ptr::Ptr{Cvoid}, rettype::Type, argtypes::Vector, arg GC.@preserve args_arr ret_arr roots begin # queue up the work to be done ccall(:jl_queue_work, Cvoid, - (Ptr{Cvoid}, Ptr{UInt8}, Ptr{UInt8}, Ptr{Cvoid}, Cint), - fun_ptr, args_arr, ret_arr, c_notify_fun, idx) + (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{UInt8}, Ptr{UInt8}, Ptr{Cvoid}, Cint), + fun_ptr, cfptr, args_arr, ret_arr, c_notify_fun, idx) # wait for a result & return it wait(thread_notifiers[idx]) diff --git a/src/jl_uv.c b/src/jl_uv.c index a2dce926a924f..18733926e8c54 100644 --- a/src/jl_uv.c +++ b/src/jl_uv.c @@ -966,12 +966,13 @@ JL_DLLEXPORT int jl_tty_set_mode(uv_tty_t *handle, int mode) return uv_tty_set_mode(handle, mode_enum); } -typedef int (*work_cb_t)(void *, void *); +typedef int (*work_cb_t)(void *, void *, void *); typedef void (*notify_cb_t)(int); struct work_baton { uv_work_t req; work_cb_t work_func; + void *ccall_fptr; void *work_args; void *work_retval; notify_cb_t notify_func; @@ -985,7 +986,7 @@ struct work_baton { void jl_work_wrapper(uv_work_t *req) { struct work_baton *baton = (struct work_baton*) req->data; - baton->work_func(baton->work_args, baton->work_retval); + baton->work_func(baton->ccall_fptr, baton->work_args, baton->work_retval); } void jl_work_notifier(uv_work_t *req, int status) @@ -995,12 +996,13 @@ void jl_work_notifier(uv_work_t *req, int status) free(baton); } -JL_DLLEXPORT int jl_queue_work(work_cb_t work_func, void *work_args, void *work_retval, +JL_DLLEXPORT int jl_queue_work(work_cb_t work_func, void *ccall_fptr, void *work_args, void *work_retval, notify_cb_t notify_func, int notify_idx) { struct work_baton *baton = (struct work_baton*)malloc_s(sizeof(struct work_baton)); baton->req.data = (void*) baton; baton->work_func = work_func; + baton->ccall_fptr = ccall_fptr; baton->work_args = work_args; baton->work_retval = work_retval; baton->notify_func = notify_func; From bafa35cbff167e273b662b6d405375380c9ba291 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 28 Jun 2021 18:30:55 -0400 Subject: [PATCH 040/146] make `Task` smaller by rearranging fields (#41351) This makes jl_task_t 8 bytes smaller, moving it into the next-smallest pool, which drops the effective size from 400 to 368 bytes. (cherry picked from commit af4bbfdaa4d89d6d214f3f4351cda31aa2cf6b2c) --- src/jltypes.c | 16 ++++++++-------- src/julia.h | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/jltypes.c b/src/jltypes.c index f6200daf65023..f9f60f1227b9a 100644 --- a/src/jltypes.c +++ b/src/jltypes.c @@ -2539,13 +2539,13 @@ void jl_init_types(void) JL_GC_DISABLED "result", "logstate", "code", - "_state", - "sticky", - "_isexception", "rngState0", "rngState1", "rngState2", - "rngState3"), + "rngState3", + "_state", + "sticky", + "_isexception"), jl_svec(14, jl_any_type, jl_any_type, @@ -2554,13 +2554,13 @@ void jl_init_types(void) JL_GC_DISABLED jl_any_type, jl_any_type, jl_any_type, - jl_uint8_type, - jl_bool_type, - jl_bool_type, jl_uint64_type, jl_uint64_type, jl_uint64_type, - jl_uint64_type), + jl_uint64_type, + jl_uint8_type, + jl_bool_type, + jl_bool_type), jl_emptysvec, 0, 1, 6); jl_value_t *listt = jl_new_struct(jl_uniontype_type, jl_task_type, jl_nothing_type); diff --git a/src/julia.h b/src/julia.h index faa738913af18..3455817cf1a92 100644 --- a/src/julia.h +++ b/src/julia.h @@ -1829,24 +1829,24 @@ typedef struct _jl_task_t { jl_value_t *result; jl_value_t *logstate; jl_function_t *start; - uint8_t _state; - uint8_t sticky; // record whether this Task can be migrated to a new thread - uint8_t _isexception; // set if `result` is an exception to throw or that we exited with uint64_t rngState0; // really rngState[4], but more convenient to split uint64_t rngState1; uint64_t rngState2; uint64_t rngState3; + uint8_t _state; + uint8_t sticky; // record whether this Task can be migrated to a new thread + uint8_t _isexception; // set if `result` is an exception to throw or that we exited with // hidden state: + // id of owning thread - does not need to be defined until the task runs + int16_t tid; + // multiqueue priority + int16_t prio; // saved gc stack top for context switches jl_gcframe_t *gcstack; size_t world_age; // quick lookup for current ptls jl_tls_states_t *ptls; // == jl_all_tls_states[tid] - // id of owning thread - does not need to be defined until the task runs - int16_t tid; - // multiqueue priority - int16_t prio; // saved exception stack jl_excstack_t *excstack; // current exception handler From 2b41b769f90d45f67f500a966b58465d23f5ad79 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Tue, 29 Jun 2021 17:31:39 +0200 Subject: [PATCH 041/146] strip spaces after backslash-escaped newline (#41245) This was discussed on Slack with @StefanKarpinski and @BioTurboNick and the general consensus was that stripping all spaces following a backslash-escaped newline would make more sense than the current behavior. Stripping the newline and spaces after a backslash now happens before detenting for triple-quoted srings, so in cases like ```julia """ a\ b c""" ``` the `b` doesn't affect detenting and the spaces before `a` and `c` are removed. (cherry picked from commit be08627b0d2d4f61fb2d1c7b0a379f5faec982ba) --- base/shell.jl | 4 ++++ src/julia-parser.scm | 25 +++++++++++++++++-------- test/syntax.jl | 10 +++++----- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/base/shell.jl b/base/shell.jl index 475a0871d8355..2efe61f4bbfdb 100644 --- a/base/shell.jl +++ b/base/shell.jl @@ -94,6 +94,10 @@ function shell_parse(str::AbstractString, interpolate::Bool=true; i += 1 popfirst!(st) end + while !isempty(st) && peek(st)[2] in (' ', '\t') + i = nextind(str, i) + _ = popfirst!(st) + end elseif in_double_quotes isempty(st) && error("unterminated double quote") k, c′ = peek(st) diff --git a/src/julia-parser.scm b/src/julia-parser.scm index fb29cb5005fba..a22e714135822 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -2188,8 +2188,13 @@ (define (unescape-parsed-string-literal strs) (map-at even? unescape-string strs)) +(define (strip-escaped-newline s raw) + (if raw s (map (lambda (s) + (if (string? s) (strip-escaped-newline- s) s)) + s))) + ;; remove `\` followed by a newline -(define (strip-escaped-newline s) +(define (strip-escaped-newline- s) (let ((in (open-input-string s)) (out (open-output-string))) (define (loop preceding-backslash?) @@ -2197,7 +2202,10 @@ (cond ((eof-object? c)) (preceding-backslash? (if (not (eqv? c #\newline)) - (begin (write-char #\\ out) (write-char c out))) + (begin (write-char #\\ out) (write-char c out)) + ((define (loop-) + (if (memv (peek-char in) '(#\space #\tab)) + (begin (take-char in) (loop-)))))) (loop #f)) ((eqv? c #\\) (loop #t)) (else (write-char c out) (loop #f))))) @@ -2210,13 +2218,14 @@ (if (eqv? (peek-char (take-char p)) delim) (map-first strip-leading-newline (dedent-triplequoted-string - (parse-string-literal- 2 (take-char p) s delim raw))) + (strip-escaped-newline + (parse-string-literal- 2 (take-char p) s delim raw) + raw))) (list "")) - (parse-string-literal- 0 p s delim raw)))) - (if raw str (unescape-parsed-string-literal - (map (lambda (s) - (if (string? s) (strip-escaped-newline s) s)) - str))))) + (strip-escaped-newline + (parse-string-literal- 0 p s delim raw) + raw)))) + (if raw str (unescape-parsed-string-literal str)))) (define (strip-leading-newline s) (let ((n (sizeof s))) diff --git a/test/syntax.jl b/test/syntax.jl index 9ef8c033c14ad..707437096ef14 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2837,7 +2837,7 @@ end @test "a\ b" == "ab" @test "a\ - b" == "a b" + b" == "ab" @test raw"a\ b" == "a\\\nb" @test "a$c\ @@ -2851,10 +2851,10 @@ b" == "acb" b""" == "ab" @test """ a\ - b""" == "a b" + b""" == "ab" @test """ a\ - b""" == " ab" + b""" == "ab" @test raw""" a\ b""" == "a\\\nb" @@ -2894,7 +2894,7 @@ b" == "acb" @test `a\ b` == `ab` @test `a\ - b` == `a b` + b` == `ab` @test `a$c\ b` == `acb` @test `"a\ @@ -2910,7 +2910,7 @@ b'` == `$("a\\\nb")` b``` == `ab` @test ``` a\ - b``` == `a b` + b``` == `ab` @test ``` a\ b``` == ` ab` From 921b3a3851194a46dd03e9765f166dfc64a89a33 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 29 Jun 2021 18:37:40 -0400 Subject: [PATCH 042/146] fix #41346, update Random docs for Xoshiro256++ (#41353) (cherry picked from commit 7c566b1564cc9ee8cc7060329147b444f5113de1) --- doc/src/manual/documentation.md | 3 +-- stdlib/Random/docs/src/index.md | 32 ++++++++++++++++++-------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/doc/src/manual/documentation.md b/doc/src/manual/documentation.md index 8c68e409b7b5b..7089672ec27b1 100644 --- a/doc/src/manual/documentation.md +++ b/doc/src/manual/documentation.md @@ -128,8 +128,7 @@ As in the example above, we recommend following some simple conventions when wri Calling `rand` and other RNG-related functions should be avoided in doctests since they will not produce consistent outputs during different Julia sessions. If you would like to show some random number generation related functionality, one option is to explicitly construct and seed your own - [`MersenneTwister`](@ref) (or other pseudorandom number generator) and pass it to the functions you are - doctesting. + RNG object (see [`Random`](@ref Random-Numbers)) and pass it to the functions you are doctesting. Operating system word size ([`Int32`](@ref) or [`Int64`](@ref)) as well as path separator differences (`/` or `\`) will also affect the reproducibility of some doctests. diff --git a/stdlib/Random/docs/src/index.md b/stdlib/Random/docs/src/index.md index facb18bbdd8d5..f5508781ef27b 100644 --- a/stdlib/Random/docs/src/index.md +++ b/stdlib/Random/docs/src/index.md @@ -4,20 +4,22 @@ DocTestSetup = :(using Random) ``` -Random number generation in Julia uses the [Mersenne Twister library](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/#dSFMT) -via `MersenneTwister` objects. Julia has a global RNG, which is used by default. Other RNG types -can be plugged in by inheriting the `AbstractRNG` type; they can then be used to have multiple -streams of random numbers. Besides `MersenneTwister`, Julia also provides the `RandomDevice` RNG -type, which is a wrapper over the OS provided entropy. - -Most functions related to random generation accept an optional `AbstractRNG` object as first argument, -which defaults to the global one if not provided. Moreover, some of them accept optionally -dimension specifications `dims...` (which can be given as a tuple) to generate arrays of random -values. In a multi-threaded program, you should generally use different RNG objects from different threads -in order to be thread-safe. However, the default global RNG is thread-safe as of Julia 1.3 (because -it internally corresponds to a per-thread RNG). - -A `MersenneTwister` or `RandomDevice` RNG can generate uniformly random numbers of the following types: +Random number generation in Julia uses the [Xoshiro256++](https://prng.di.unimi.it/) algorithm +by default, with per-`Task` state. +Other RNG types can be plugged in by inheriting the `AbstractRNG` type; they can then be used to +obtain multiple streams of random numbers. +Besides the default `TaskLocalRNG` type, the `Random` package also provides `MersenneTwister`, +`RandomDevice` (which exposes OS-provided entropy), and `Xoshiro` (for explicitly-managed +Xoshiro256++ streams). + +Most functions related to random generation accept an optional `AbstractRNG` object as first argument. +Some also accept dimension specifications `dims...` (which can also be given as a tuple) to generate +arrays of random values. +In a multi-threaded program, you should generally use different RNG objects from different threads +or tasks in order to be thread-safe. However, the default RNG is thread-safe as of Julia 1.3 +(using a per-thread RNG up to version 1.6, and per-task thereafter). + +The provided RNGs can generate uniform random numbers of the following types: [`Float16`](@ref), [`Float32`](@ref), [`Float64`](@ref), [`BigFloat`](@ref), [`Bool`](@ref), [`Int8`](@ref), [`UInt8`](@ref), [`Int16`](@ref), [`UInt16`](@ref), [`Int32`](@ref), [`UInt32`](@ref), [`Int64`](@ref), [`UInt64`](@ref), [`Int128`](@ref), [`UInt128`](@ref), @@ -67,6 +69,8 @@ Random.shuffle! ```@docs Random.seed! Random.AbstractRNG +Random.TaskLocalRNG +Random.Xoshiro Random.MersenneTwister Random.RandomDevice ``` From b57ea7694c00fb210e0e24539cb601023f6034ab Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Wed, 30 Jun 2021 10:34:40 +0900 Subject: [PATCH 043/146] inference: enable constant propagation for `invoke`d calls, fixes #41024 (#41383) * inference: enable constant propagation for `invoke`d calls, fixes #41024 Especially useful for defining mixins with typed interface fields, e.g. ```julia abstract type AbstractInterface end # mixin, which expects common field `x::Int` function Base.getproperty(x::AbstractInterface, sym::Symbol) if sym === :x return getfield(x, sym)::Int # inferred field else return getfield(x, sym) # fallback end end abstract type AbstractInterfaceExtended <: AbstractInterface end # extended mixin, which expects additional common field `y::Rational{Int}` function Base.getproperty(x::AbstractInterfaceExtended, sym::Symbol) if sym === :y return getfield(x, sym)::Rational{Int} end return Base.@invoke getproperty(x::AbstractInterface, sym::Symbol) end ``` As a bonus, inliner is able to use `InferenceResult` as a fast inlining pass for constant-prop'ed `invoke`s * improve compile-time latency * Update base/compiler/abstractinterpretation.jl * Update base/compiler/abstractinterpretation.jl (cherry picked from commit bc6da9353cb25f0d975c8ebe6e56a9047fc1a104) --- base/compiler/abstractinterpretation.jl | 51 ++++++++++++++++++------- base/compiler/ssair/inlining.jl | 16 ++++++-- base/compiler/stmtinfo.jl | 1 + test/compiler/inference.jl | 40 +++++++++++++++++++ 4 files changed, 91 insertions(+), 17 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 7c804c80ae262..0de1f45460be0 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1127,7 +1127,8 @@ function abstract_call_unionall(argtypes::Vector{Any}) end function abstract_invoke(interp::AbstractInterpreter, argtypes::Vector{Any}, sv::InferenceState) - ft = widenconst(argtype_by_index(argtypes, 2)) + ft′ = argtype_by_index(argtypes, 2) + ft = widenconst(ft′) ft === Bottom && return CallMeta(Bottom, false) (types, isexact, isconcrete, istype) = instanceof_tfunc(argtype_by_index(argtypes, 3)) types === Bottom && return CallMeta(Bottom, false) @@ -1141,15 +1142,30 @@ function abstract_invoke(interp::AbstractInterpreter, argtypes::Vector{Any}, sv: nargtype = Tuple{ft, nargtype.parameters...} argtype = Tuple{ft, argtype.parameters...} result = findsup(types, method_table(interp)) - if result === nothing - return CallMeta(Any, false) - end + result === nothing && return CallMeta(Any, false) method, valid_worlds = result update_valid_age!(sv, valid_worlds) (ti, env::SimpleVector) = ccall(:jl_type_intersection_with_env, Any, (Any, Any), nargtype, method.sig)::SimpleVector - rt, edge = typeinf_edge(interp, method, ti, env, sv) + (; rt, edge) = result = abstract_call_method(interp, method, ti, env, false, sv) edge !== nothing && add_backedge!(edge::MethodInstance, sv) - return CallMeta(rt, InvokeCallInfo(MethodMatch(ti, env, method, argtype <: method.sig))) + match = MethodMatch(ti, env, method, argtype <: method.sig) + # try constant propagation with manual inlinings of some of the heuristics + # since some checks within `abstract_call_method_with_const_args` seem a bit costly + const_prop_entry_heuristic(interp, result, sv) || return CallMeta(rt, InvokeCallInfo(match, nothing)) + argtypes′ = argtypes[4:end] + const_prop_argument_heuristic(interp, argtypes′) || const_prop_rettype_heuristic(interp, rt) || return CallMeta(rt, InvokeCallInfo(match, nothing)) + pushfirst!(argtypes′, ft) + # # typeintersect might have narrowed signature, but the accuracy gain doesn't seem worth the cost involved with the lattice comparisons + # for i in 1:length(argtypes′) + # t, a = ti.parameters[i], argtypes′[i] + # argtypes′[i] = t ⊑ a ? t : a + # end + const_rt, const_result = abstract_call_method_with_const_args(interp, result, argtype_to_function(ft′), argtypes′, match, sv, false) + if const_rt !== rt && const_rt ⊑ rt + return CallMeta(const_rt, InvokeCallInfo(match, const_result)) + else + return CallMeta(rt, InvokeCallInfo(match, nothing)) + end end # call where the function is known exactly @@ -1283,17 +1299,12 @@ function abstract_call(interp::AbstractInterpreter, fargs::Union{Nothing,Vector{ sv::InferenceState, max_methods::Int = InferenceParams(interp).MAX_METHODS) #print("call ", e.args[1], argtypes, "\n\n") ft = argtypes[1] - if isa(ft, Const) - f = ft.val - elseif isconstType(ft) - f = ft.parameters[1] - elseif isa(ft, DataType) && isdefined(ft, :instance) - f = ft.instance - elseif isa(ft, PartialOpaque) + f = argtype_to_function(ft) + if isa(ft, PartialOpaque) return abstract_call_opaque_closure(interp, ft, argtypes[2:end], sv) elseif isa(unwrap_unionall(ft), DataType) && unwrap_unionall(ft).name === typename(Core.OpaqueClosure) return CallMeta(rewrap_unionall(unwrap_unionall(ft).parameters[2], ft), false) - else + elseif f === nothing # non-constant function, but the number of arguments is known # and the ft is not a Builtin or IntrinsicFunction if typeintersect(widenconst(ft), Union{Builtin, Core.OpaqueClosure}) != Union{} @@ -1305,6 +1316,18 @@ function abstract_call(interp::AbstractInterpreter, fargs::Union{Nothing,Vector{ return abstract_call_known(interp, f, fargs, argtypes, sv, max_methods) end +function argtype_to_function(@nospecialize(ft)) + if isa(ft, Const) + return ft.val + elseif isconstType(ft) + return ft.parameters[1] + elseif isa(ft, DataType) && isdefined(ft, :instance) + return ft.instance + else + return nothing + end +end + function sp_type_rewrap(@nospecialize(T), linfo::MethodInstance, isreturn::Bool) isref = false if T === Bottom diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 0420d137da69e..b54beb2c8e8d9 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -1049,12 +1049,12 @@ is_builtin(s::Signature) = isa(s.f, Builtin) || s.ft ⊑ Builtin -function inline_invoke!(ir::IRCode, idx::Int, sig::Signature, info::InvokeCallInfo, +function inline_invoke!(ir::IRCode, idx::Int, sig::Signature, (; match, result)::InvokeCallInfo, state::InliningState, todo::Vector{Pair{Int, Any}}) stmt = ir.stmts[idx][:inst] calltype = ir.stmts[idx][:type] - if !info.match.fully_covers + if !match.fully_covers # TODO: We could union split out the signature check and continue on return nothing end @@ -1064,7 +1064,17 @@ function inline_invoke!(ir::IRCode, idx::Int, sig::Signature, info::InvokeCallIn atypes = atypes[4:end] pushfirst!(atypes, atype0) - result = analyze_method!(info.match, atypes, state, calltype) + if isa(result, InferenceResult) + item = InliningTodo(result, atypes, calltype) + validate_sparams(item.mi.sparam_vals) || return nothing + if argtypes_to_type(atypes) <: item.mi.def.sig + state.mi_cache !== nothing && (item = resolve_todo(item, state)) + handle_single_case!(ir, stmt, idx, item, true, todo) + return nothing + end + end + + result = analyze_method!(match, atypes, state, calltype) handle_single_case!(ir, stmt, idx, result, true, todo) return nothing end diff --git a/base/compiler/stmtinfo.jl b/base/compiler/stmtinfo.jl index ad7e8886b6cce..a6ffee299c4f5 100644 --- a/base/compiler/stmtinfo.jl +++ b/base/compiler/stmtinfo.jl @@ -108,6 +108,7 @@ method being processed. """ struct InvokeCallInfo match::MethodMatch + result::Union{Nothing,InferenceResult} end struct OpaqueClosureCallInfo diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index d5bad34e38322..008e6ff0d6997 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3355,3 +3355,43 @@ let Expr(:opaque_closure_method, nothing, 2, LineNumberNode(0, nothing), ci)))(true, 1.0) @test Base.return_types(oc, Tuple{}) == Any[Float64] end + +@testset "constant prop' on `invoke` calls" begin + m = Module() + + # simple cases + @eval m begin + f(a::Any, sym::Bool) = sym ? Any : :any + f(a::Number, sym::Bool) = sym ? Number : :number + end + @test (@eval m Base.return_types((Any,)) do a + Base.@invoke f(a::Any, true::Bool) + end) == Any[Type{Any}] + @test (@eval m Base.return_types((Any,)) do a + Base.@invoke f(a::Number, true::Bool) + end) == Any[Type{Number}] + @test (@eval m Base.return_types((Any,)) do a + Base.@invoke f(a::Any, false::Bool) + end) == Any[Symbol] + @test (@eval m Base.return_types((Any,)) do a + Base.@invoke f(a::Number, false::Bool) + end) == Any[Symbol] + + # https://github.com/JuliaLang/julia/issues/41024 + @eval m begin + # mixin, which expects common field `x::Int` + abstract type AbstractInterface end + Base.getproperty(x::AbstractInterface, sym::Symbol) = + sym === :x ? getfield(x, sym)::Int : + return getfield(x, sym) # fallback + + # extended mixin, which expects additional field `y::Rational{Int}` + abstract type AbstractInterfaceExtended <: AbstractInterface end + Base.getproperty(x::AbstractInterfaceExtended, sym::Symbol) = + sym === :y ? getfield(x, sym)::Rational{Int} : + return Base.@invoke getproperty(x::AbstractInterface, sym::Symbol) + end + @test (@eval m Base.return_types((AbstractInterfaceExtended,)) do x + x.x + end) == Any[Int] +end From 7846aeb3ed2ac3a0be6808fbfb291c166a0df2d3 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 29 Jun 2021 22:29:30 -0400 Subject: [PATCH 044/146] fix excess array object alignment (#41287) (cherry picked from commit 61572a6c0e7b0282b23ac485aed915ac7b4e7c86) --- src/array.c | 21 ++++++++++++--------- src/julia_internal.h | 1 + src/options.h | 8 ++++++-- src/staticdata.c | 45 ++++++++++++++++++++++++++++---------------- test/arrayops.jl | 2 +- test/cmdlineargs.jl | 12 ++++++++++-- 6 files changed, 59 insertions(+), 30 deletions(-) diff --git a/src/array.c b/src/array.c index d8ecf73c8dadf..258b80948bf28 100644 --- a/src/array.c +++ b/src/array.c @@ -114,20 +114,23 @@ static jl_array_t *_new_array_(jl_value_t *atype, uint32_t ndims, size_t *dims, } int ndimwords = jl_array_ndimwords(ndims); - int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords*sizeof(size_t), JL_CACHE_BYTE_ALIGNMENT); + int tsz = sizeof(jl_array_t) + ndimwords*sizeof(size_t); if (tot <= ARRAY_INLINE_NBYTES) { - if (isunboxed && elsz >= 4) - tsz = JL_ARRAY_ALIGN(tsz, JL_SMALL_BYTE_ALIGNMENT); // align data area + // align data area + if (tot >= ARRAY_CACHE_ALIGN_THRESHOLD) + tsz = JL_ARRAY_ALIGN(tsz, JL_CACHE_BYTE_ALIGNMENT); + else if (isunboxed && elsz >= 4) + tsz = JL_ARRAY_ALIGN(tsz, JL_SMALL_BYTE_ALIGNMENT); size_t doffs = tsz; tsz += tot; - tsz = JL_ARRAY_ALIGN(tsz, JL_SMALL_BYTE_ALIGNMENT); // align whole object + // jl_array_t is large enough that objects will always be aligned 16 a = (jl_array_t*)jl_gc_alloc(ct->ptls, tsz, atype); + assert(((size_t)a & 15) == 0); // No allocation or safepoint allowed after this a->flags.how = 0; data = (char*)a + doffs; } else { - tsz = JL_ARRAY_ALIGN(tsz, JL_CACHE_BYTE_ALIGNMENT); // align whole object data = jl_gc_managed_malloc(tot); // Allocate the Array **after** allocating the data // to make sure the array is still young @@ -223,7 +226,7 @@ JL_DLLEXPORT jl_array_t *jl_reshape_array(jl_value_t *atype, jl_array_t *data, assert(jl_types_equal(jl_tparam0(jl_typeof(data)), jl_tparam0(atype))); int ndimwords = jl_array_ndimwords(ndims); - int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords * sizeof(size_t) + sizeof(void*), JL_SMALL_BYTE_ALIGNMENT); + int tsz = sizeof(jl_array_t) + ndimwords * sizeof(size_t) + sizeof(void*); a = (jl_array_t*)jl_gc_alloc(ct->ptls, tsz, atype); // No allocation or safepoint allowed after this a->flags.pooled = tsz <= GC_MAX_SZCLASS; @@ -304,7 +307,7 @@ JL_DLLEXPORT jl_array_t *jl_string_to_array(jl_value_t *str) jl_array_t *a; int ndimwords = jl_array_ndimwords(1); - int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords*sizeof(size_t) + sizeof(void*), JL_SMALL_BYTE_ALIGNMENT); + int tsz = sizeof(jl_array_t) + ndimwords*sizeof(size_t) + sizeof(void*); a = (jl_array_t*)jl_gc_alloc(ct->ptls, tsz, jl_array_uint8_type); a->flags.pooled = tsz <= GC_MAX_SZCLASS; a->flags.ndims = 1; @@ -351,7 +354,7 @@ JL_DLLEXPORT jl_array_t *jl_ptr_to_array_1d(jl_value_t *atype, void *data, "unsafe_wrap: pointer %p is not properly aligned to %u bytes", data, align); int ndimwords = jl_array_ndimwords(1); - int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords*sizeof(size_t), JL_CACHE_BYTE_ALIGNMENT); + int tsz = sizeof(jl_array_t) + ndimwords*sizeof(size_t); a = (jl_array_t*)jl_gc_alloc(ct->ptls, tsz, atype); // No allocation or safepoint allowed after this a->flags.pooled = tsz <= GC_MAX_SZCLASS; @@ -418,7 +421,7 @@ JL_DLLEXPORT jl_array_t *jl_ptr_to_array(jl_value_t *atype, void *data, "unsafe_wrap: pointer %p is not properly aligned to %u bytes", data, align); int ndimwords = jl_array_ndimwords(ndims); - int tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords*sizeof(size_t), JL_CACHE_BYTE_ALIGNMENT); + int tsz = sizeof(jl_array_t) + ndimwords*sizeof(size_t); a = (jl_array_t*)jl_gc_alloc(ct->ptls, tsz, atype); // No allocation or safepoint allowed after this a->flags.pooled = tsz <= GC_MAX_SZCLASS; diff --git a/src/julia_internal.h b/src/julia_internal.h index 2f14e3ad6832b..e6bb2ae8602d3 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -323,6 +323,7 @@ STATIC_INLINE uint8_t JL_CONST_FUNC jl_gc_szclass(unsigned sz) // JL_HEAP_ALIGNMENT is the maximum alignment that the GC can provide #define JL_HEAP_ALIGNMENT JL_SMALL_BYTE_ALIGNMENT #define GC_MAX_SZCLASS (2032-sizeof(void*)) +static_assert(ARRAY_CACHE_ALIGN_THRESHOLD > GC_MAX_SZCLASS, ""); STATIC_INLINE jl_value_t *jl_gc_alloc_(jl_ptls_t ptls, size_t sz, void *ty) { diff --git a/src/options.h b/src/options.h index 5ea220900b5eb..bb56e0c41c7c0 100644 --- a/src/options.h +++ b/src/options.h @@ -12,10 +12,14 @@ // object layout options ------------------------------------------------------ -// how much space we're willing to waste if an array outgrows its -// original object +// The data for an array this size or below will be allocated within the +// Array object. If the array outgrows that space, it will be wasted. #define ARRAY_INLINE_NBYTES (2048*sizeof(void*)) +// Arrays at least this size will get larger alignment (JL_CACHE_BYTE_ALIGNMENT). +// Must be bigger than GC_MAX_SZCLASS. +#define ARRAY_CACHE_ALIGN_THRESHOLD 2048 + // codegen options ------------------------------------------------------------ // (Experimental) Use MCJIT ELF, even where it's not the native format diff --git a/src/staticdata.c b/src/staticdata.c index 2425e8bc44450..d70e35542de2a 100644 --- a/src/staticdata.c +++ b/src/staticdata.c @@ -782,14 +782,23 @@ static void jl_write_values(jl_serializer_state *s) #define JL_ARRAY_ALIGN(jl_value, nbytes) LLT_ALIGN(jl_value, nbytes) jl_array_t *ar = (jl_array_t*)v; jl_value_t *et = jl_tparam0(jl_typeof(v)); + size_t alen = jl_array_len(ar); + size_t datasize = alen * ar->elsize; + size_t tot = datasize; + int isbitsunion = jl_array_isbitsunion(ar); + if (isbitsunion) + tot += alen; + else if (ar->elsize == 1) + tot += 1; int ndimwords = jl_array_ndimwords(ar->flags.ndims); - size_t tsz = JL_ARRAY_ALIGN(sizeof(jl_array_t) + ndimwords * sizeof(size_t), JL_CACHE_BYTE_ALIGNMENT); + size_t headersize = sizeof(jl_array_t) + ndimwords*sizeof(size_t); // copy header - ios_write(s->s, (char*)v, tsz); + ios_write(s->s, (char*)v, headersize); + size_t alignment_amt = JL_SMALL_BYTE_ALIGNMENT; + if (tot >= ARRAY_CACHE_ALIGN_THRESHOLD) + alignment_amt = JL_CACHE_BYTE_ALIGNMENT; // make some header modifications in-place jl_array_t *newa = (jl_array_t*)&s->s->buf[reloc_offset]; - size_t alen = jl_array_len(ar); - size_t tot = alen * ar->elsize; if (newa->flags.ndims == 1) newa->maxsize = alen; newa->offset = 0; @@ -799,8 +808,7 @@ static void jl_write_values(jl_serializer_state *s) // write data if (!ar->flags.ptrarray && !ar->flags.hasptr) { - uintptr_t data = LLT_ALIGN(ios_pos(s->const_data), 16); - // realign stream to max(data-align(array), sizeof(void*)) + uintptr_t data = LLT_ALIGN(ios_pos(s->const_data), alignment_amt); write_padding(s->const_data, data - ios_pos(s->const_data)); // write data and relocations newa->data = NULL; // relocation offset @@ -815,22 +823,27 @@ static void jl_write_values(jl_serializer_state *s) write_pointer(s->const_data); } else { - int isbitsunion = jl_array_isbitsunion(ar); - if (ar->elsize == 1 && !isbitsunion) - tot += 1; - ios_write(s->const_data, (char*)jl_array_data(ar), tot); - if (isbitsunion) + if (isbitsunion) { + ios_write(s->const_data, (char*)jl_array_data(ar), datasize); ios_write(s->const_data, jl_array_typetagdata(ar), alen); + } + else { + ios_write(s->const_data, (char*)jl_array_data(ar), tot); + } } } else { - newa->data = (void*)tsz; // relocation offset + size_t data = LLT_ALIGN(ios_pos(s->s), alignment_amt); + size_t padding_amt = data - ios_pos(s->s); + write_padding(s->s, padding_amt); + headersize += padding_amt; + newa->data = (void*)headersize; // relocation offset arraylist_push(&s->relocs_list, (void*)(reloc_offset + offsetof(jl_array_t, data))); // relocation location arraylist_push(&s->relocs_list, (void*)(((uintptr_t)DataRef << RELOC_TAG_OFFSET) + item)); // relocation target if (ar->flags.hasptr) { // copy all of the data first const char *data = (const char*)jl_array_data(ar); - ios_write(s->s, data, tot); + ios_write(s->s, data, datasize); // the rewrite all of the embedded pointers to null+relocation uint16_t elsz = ar->elsize; size_t j, np = ((jl_datatype_t*)et)->layout->npointers; @@ -840,12 +853,12 @@ static void jl_write_values(jl_serializer_state *s) size_t offset = i * elsz + jl_ptr_offset(((jl_datatype_t*)et), j) * sizeof(jl_value_t*); jl_value_t *fld = *(jl_value_t**)&data[offset]; if (fld != NULL) { - arraylist_push(&s->relocs_list, (void*)(uintptr_t)(reloc_offset + tsz + offset)); // relocation location + arraylist_push(&s->relocs_list, (void*)(uintptr_t)(reloc_offset + headersize + offset)); // relocation location arraylist_push(&s->relocs_list, (void*)backref_id(s, fld)); // relocation target - memset(&s->s->buf[reloc_offset + tsz + offset], 0, sizeof(fld)); // relocation offset (none) + memset(&s->s->buf[reloc_offset + headersize + offset], 0, sizeof(fld)); // relocation offset (none) } else { - assert(*(jl_value_t**)&s->s->buf[reloc_offset + tsz + offset] == NULL); + assert(*(jl_value_t**)&s->s->buf[reloc_offset + headersize + offset] == NULL); } } } diff --git a/test/arrayops.jl b/test/arrayops.jl index 27e366f1ce3cc..7823fce7a6175 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -2660,7 +2660,7 @@ let TT = Union{UInt8, Int8} resize!(b, 1) @assert pointer(a) == pa @assert pointer(b) == pb - unsafe_store!(pa, 0x1, 2) # reset a[2] to 1 + unsafe_store!(Ptr{UInt8}(pa), 0x1, 2) # reset a[2] to 1 @test length(a) == length(b) == 1 @test a[1] == b[1] == 0x0 @test a == b diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 13e7251ba3a95..fbf60acdbc848 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -324,7 +324,11 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` rm(memfile) @test popfirst!(got) == " 0 g(x) = x + 123456" @test popfirst!(got) == " - function f(x)" - @test popfirst!(got) == " 80 []" + if Sys.WORD_SIZE == 64 + @test popfirst!(got) == " 48 []" + else + @test popfirst!(got) == " 32 []" + end if Sys.WORD_SIZE == 64 # P64 pools with 64 bit tags @test popfirst!(got) == " 16 Base.invokelatest(g, 0)" @@ -337,7 +341,11 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` @test popfirst!(got) == " 8 Base.invokelatest(g, 0)" @test popfirst!(got) == " 32 Base.invokelatest(g, x)" end - @test popfirst!(got) == " 80 []" + if Sys.WORD_SIZE == 64 + @test popfirst!(got) == " 48 []" + else + @test popfirst!(got) == " 32 []" + end @test popfirst!(got) == " - end" @test popfirst!(got) == " - f(1.23)" @test isempty(got) || got From fd2d0c9addcd7e2c92ed57e035f935401cff07a2 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 30 Jun 2021 04:43:55 +0200 Subject: [PATCH 045/146] [Tasks] Mark parent as sticky if we use `@async` (#41334) Fixes #41324 for 1.7 (cherry picked from commit 75858d73322e29a665bd06947c20dc2b9d996f9f) --- base/task.jl | 6 ++++++ test/threads_exec.jl | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/base/task.jl b/base/task.jl index 1ed68f70f7ab7..bfb105accef14 100644 --- a/base/task.jl +++ b/base/task.jl @@ -621,6 +621,12 @@ function enq_work(t::Task) # 3. The multiq is full (can be fixed by making it growable). if t.sticky || Threads.nthreads() == 1 if tid == 0 + # Issue #41324 + # t.sticky && tid == 0 is a task that needs to be co-scheduled with + # the parent task. If the parent (current_task) is not sticky we must + # set it to be sticky. + # XXX: Ideally we would be able to unset this + current_task().sticky = true tid = Threads.threadid() ccall(:jl_set_task_tid, Cvoid, (Any, Cint), t, tid-1) end diff --git a/test/threads_exec.jl b/test/threads_exec.jl index b7e4c37631d83..f3d2dc9577c64 100644 --- a/test/threads_exec.jl +++ b/test/threads_exec.jl @@ -840,6 +840,19 @@ fib34666(x) = end @test fib34666(25) == 75025 +# issue #41324 +@testset "Co-schedule" begin + parent = Threads.@spawn begin + @test current_task().sticky == false + child = @async begin end + @test current_task().sticky == true + @test Threads.threadid() == Threads.threadid(child) + wait(child) + end + wait(parent) + @test parent.sticky == true +end + function jitter_channel(f, k, delay, ntasks, schedule) x = Channel(ch -> foreach(i -> put!(ch, i), 1:k), 1) y = Channel(k) do ch From d49c6f2fcafa23685327176ec147186acf73c61b Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 29 Jun 2021 23:53:31 -0400 Subject: [PATCH 046/146] fix #41347, better checks for `yield` and `yieldto` with finished tasks (#41410) (cherry picked from commit e2d5f52a01f10dd1062940b61a26d21ebc5ca01c) --- base/task.jl | 8 ++++++++ src/task.c | 8 ++------ test/misc.jl | 11 +++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/base/task.jl b/base/task.jl index bfb105accef14..e84c344c28d17 100644 --- a/base/task.jl +++ b/base/task.jl @@ -721,6 +721,7 @@ A fast, unfair-scheduling version of `schedule(t, arg); yield()` which immediately yields to `t` before calling the scheduler. """ function yield(t::Task, @nospecialize(x=nothing)) + (t._state === task_state_runnable && t.queue === nothing) || error("yield: Task not runnable") t.result = x enq_work(current_task()) set_next_task(t) @@ -736,6 +737,13 @@ call to `yieldto`. This is a low-level call that only switches tasks, not consid or scheduling in any way. Its use is discouraged. """ function yieldto(t::Task, @nospecialize(x=nothing)) + # TODO: these are legacy behaviors; these should perhaps be a scheduler + # state error instead. + if t._state === task_state_done + return x + elseif t._state === task_state_failed + throw(t.result) + end t.result = x set_next_task(t) return try_yieldto(identity) diff --git a/src/task.c b/src/task.c index be08deca63fc1..1acdb4d4e9794 100644 --- a/src/task.c +++ b/src/task.c @@ -475,12 +475,8 @@ JL_DLLEXPORT void jl_switch(void) if (t == ct) { return; } - if (t->_state != JL_TASK_STATE_RUNNABLE || (t->started && t->stkbuf == NULL)) { - ct->_isexception = t->_isexception; - ct->result = t->result; - jl_gc_wb(ct, ct->result); - return; - } + if (t->started && t->stkbuf == NULL) + jl_error("attempt to switch to exited task"); if (ptls->in_finalizer) jl_error("task switch not allowed from inside gc finalizer"); if (ptls->in_pure_callback) diff --git a/test/misc.jl b/test/misc.jl index 2305b78250ef2..37c5397b4948f 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -182,6 +182,17 @@ end @test_throws ErrorException("deadlock detected: cannot wait on current task") wait(current_task()) +# issue #41347 +let t = @async 1 + wait(t) + @test_throws ErrorException yield(t) +end + +let t = @async error(42) + Base._wait(t) + @test_throws ErrorException("42") yieldto(t) +end + # test that @sync is lexical (PR #27164) const x27164 = Ref(0) From b4c34141e30faf77c3815b30289105be8451462c Mon Sep 17 00:00:00 2001 From: Rashid Rafeek Date: Wed, 30 Jun 2021 13:48:36 +0530 Subject: [PATCH 047/146] Added `edit(::Method)`, fixes #41408 (#41414) (cherry picked from commit 71bf60858ee2dcf219f6de568f712a0ab3756549) --- stdlib/InteractiveUtils/src/editless.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/InteractiveUtils/src/editless.jl b/stdlib/InteractiveUtils/src/editless.jl index cc3de27e9a4d9..7a96323c9cdeb 100644 --- a/stdlib/InteractiveUtils/src/editless.jl +++ b/stdlib/InteractiveUtils/src/editless.jl @@ -229,6 +229,7 @@ function edit(@nospecialize f) length(ms) == 0 && functionloc(f) # throws nothing end +edit(m::Method) = edit(functionloc(m)...) edit(@nospecialize(f), idx::Integer) = edit(methods(f).ms[idx]) edit(f, t) = (@nospecialize; edit(functionloc(f, t)...)) edit(file::Nothing, line::Integer) = error("could not find source file for function") From 9bb1633e125ad61dc99569a3e1768e513204a545 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 24 Jun 2021 12:36:54 -0400 Subject: [PATCH 048/146] Fix #41299 - Dropped error case in :> special case inliner (#41315) We have custom inference for :>, which prevents the :> method itself from being inferred. As a result, it needs to be inlined manually. However, this inlining was overeager and was dropping an error check when the result was inferred to `Const`. Fix that by verifying that the inlined <: call would have been nothrow. (cherry picked from commit d0bbd4c931ba877022dd5fe7a35d0be214a926f4) --- base/compiler/ssair/inlining.jl | 2 +- test/compiler/inline.jl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index b54beb2c8e8d9..78edef88439e9 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -1420,7 +1420,7 @@ function late_inline_special_case!(ir::IRCode, sig::Signature, idx::Int, stmt::E elseif params.inlining && length(atypes) == 3 && istopfunction(f, :(>:)) # special-case inliner for issupertype # that works, even though inference generally avoids inferring the `>:` Method - if isa(typ, Const) + if isa(typ, Const) && _builtin_nothrow(<:, Any[atypes[3], atypes[2]], typ) ir[SSAValue(idx)] = quoted(typ.val) return true end diff --git a/test/compiler/inline.jl b/test/compiler/inline.jl index 1ffd012acb755..eb1c3ddd2a963 100644 --- a/test/compiler/inline.jl +++ b/test/compiler/inline.jl @@ -380,3 +380,7 @@ end using Base.Experimental: @opaque f_oc_getfield(x) = (@opaque ()->x)() @test fully_eliminated(f_oc_getfield, Tuple{Int}) + +# 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) From d55c25bc99f48134a6c72034ccc141cb0ec906f5 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 1 Jul 2021 13:31:04 +0200 Subject: [PATCH 049/146] Update Pkg for 1.7.0. (#41432) --- .../Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 | 1 - .../Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 | 1 - .../Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/md5 | 1 + .../Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/sha512 | 1 + stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/md5 create mode 100644 deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/sha512 diff --git a/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 b/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 deleted file mode 100644 index 35eda4f473f24..0000000000000 --- a/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -77b9bf19937476f9b2120dfbafc3322b diff --git a/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 b/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 deleted file mode 100644 index 67ec25a15762a..0000000000000 --- a/deps/checksums/Pkg-81af75b902586919a858f06949b7c9e6121f1629.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -c9079f0c2b4d6ad34eca479f4db14041ac04f0780feaa1b16de552e55ca862f0d56c9a50437304639b96777a2c941c4b7a5eb0ce23071a456126a5c2da23c2e1 diff --git a/deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/md5 b/deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/md5 new file mode 100644 index 0000000000000..c44d4e836688b --- /dev/null +++ b/deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/md5 @@ -0,0 +1 @@ +c848e464b9643d5396cd51ffe492f0b3 diff --git a/deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/sha512 b/deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/sha512 new file mode 100644 index 0000000000000..e5c06cafc4e8f --- /dev/null +++ b/deps/checksums/Pkg-df2476a01c01cdadd553dbf010b21fabe7e211d3.tar.gz/sha512 @@ -0,0 +1 @@ +4ceb13b64bf66ae50fb0ee87e3dc3e57a52dbdf68592226d36c8d37aaa6179d205de269073fc08be137430deb6c06c6cda65f3e0215f9a32854f1ea07be7ca26 diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 1693797662604..937bae89a12d2 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = release-1.7 -PKG_SHA1 = 81af75b902586919a858f06949b7c9e6121f1629 +PKG_SHA1 = df2476a01c01cdadd553dbf010b21fabe7e211d3 From ff5d62327497ae051904eeb08185c56d3592988f Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 23 Jun 2021 14:40:31 -0400 Subject: [PATCH 050/146] Export jl_get_pgcstack from libjulia (#41320) The pgcstack symbol is special because embedders are supposed to define it themselves in localexec tls, and then access it that way. However, there is another case of of libraries that link against julia, but are not embedders, but rather plugins to be loaded later (e.g. CxxWrap). These do need access to the pgcstack, but do not have a priori access to the localexec of the embedder. Thus, re-export the `jl_get_pgcstack` function that provides access to our internal getter for the pgcstack. (cherry picked from commit e469a1e4da7e7356257107d174b63fb5206bee04) --- src/jl_exported_funcs.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index 82611bfb50dfa..85c6e79ad27a8 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -540,4 +540,5 @@ XX(jl_vprintf) \ XX(jl_wakeup_thread) \ XX(jl_yield) \ - XX(jl_print_backtrace) + XX(jl_print_backtrace) \ + XX(jl_get_pgcstack) From a7a7e645609ce04454e54fa449dc711e98fc6a8b Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 29 Jun 2021 17:48:21 -0400 Subject: [PATCH 051/146] threads: move safepoint into loop Fixes #41407 (cherry picked from commit a9412439c37fa6f68ab618fdcd67fa6d48668a74) --- src/partr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partr.c b/src/partr.c index bfe1f29fa4d1b..c3de56b80cc92 100644 --- a/src/partr.c +++ b/src/partr.c @@ -159,6 +159,7 @@ static inline jl_task_t *multiq_deletemin(void) int16_t prio1, prio2; jl_task_t *task; retry: + jl_gc_safepoint(); for (i = 0; i < heap_p; ++i) { rn1 = cong(heap_p, cong_unbias, &ptls->rngseed); rn2 = cong(heap_p, cong_unbias, &ptls->rngseed); @@ -397,7 +398,6 @@ static jl_task_t *get_next_task(jl_value_t *trypoptask, jl_value_t *q) jl_set_task_tid(task, self); return task; } - jl_gc_safepoint(); return multiq_deletemin(); } From 4c2294a5d441c2feb02b9072efec9b72520676af Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 30 Jun 2021 18:03:17 +0200 Subject: [PATCH 052/146] restrict getindex on `MethodList` to `Integer` (#41419) (cherry picked from commit 47955e383549263d46baaf0e1b0d982dfdbad383) --- base/reflection.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/reflection.jl b/base/reflection.jl index db1e2bb1caafd..29a4b5f4a66ca 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -925,7 +925,7 @@ mutable struct MethodList <: AbstractArray{Method,1} end size(m::MethodList) = size(m.ms) -getindex(m::MethodList, i) = m.ms[i] +getindex(m::MethodList, i::Integer) = m.ms[i] function MethodList(mt::Core.MethodTable) ms = Method[] From 7b36b7162f40817d398b84d7bc3282c86308dc39 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 30 Jun 2021 09:45:55 -0700 Subject: [PATCH 053/146] `dlopen()` our `libblas` and `liblapack` within `libjulia-internal` (#41412) When loading our `libblas` and `liblapack` for the first time, we may need to rely upon an `RPATH` that has been embedded within `libjulia-internal`. If we use `libblastrampoline` to perform the actual `dlopen()`, however, we don't have that `RPATH` at hand. To fix this, we instead `dlopen()` the library first, to force the proper loading of the library (which loads the library and its `SONAME` into our process), which allows `libblastrampoline`'s `dlopen()` to immediately succeed, along the happy path of finding the library already loaded. (cherry picked from commit 97a62dd4f1e60185518fa9e3dc6a5b0b8e36710d) --- stdlib/LinearAlgebra/src/LinearAlgebra.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdlib/LinearAlgebra/src/LinearAlgebra.jl b/stdlib/LinearAlgebra/src/LinearAlgebra.jl index eb8d22e55a1e8..d9466b3764fc2 100644 --- a/stdlib/LinearAlgebra/src/LinearAlgebra.jl +++ b/stdlib/LinearAlgebra/src/LinearAlgebra.jl @@ -526,8 +526,13 @@ function __init__() try libblas_path = find_library_path(Base.libblas_name) liblapack_path = find_library_path(Base.liblapack_name) + # We manually `dlopen()` these libraries here, so that we search with `libjulia-internal`'s + # `RPATH` and not `libblastrampoline's`. Once it's been opened, when LBT tries to open it, + # it will find the library already loaded. + libblas_path = Libdl.dlpath(Libdl.dlopen(libblas_path)) BLAS.lbt_forward(libblas_path; clear=true) if liblapack_path != libblas_path + liblapack_path = Libdl.dlpath(Libdl.dlopen(liblapack_path)) BLAS.lbt_forward(liblapack_path) end BLAS.check() From be4f2c928c63a0268c4f8c40a6441e0e425775f3 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 30 Jun 2021 23:14:32 +0200 Subject: [PATCH 054/146] Remove the LLVMExtra api (cherry picked from commit 286f024f4aa70e3f284b6adbb0db935b54d6021c) --- src/Makefile | 2 +- src/llvm-api.cpp | 291 ----------------------------------------------- 2 files changed, 1 insertion(+), 292 deletions(-) delete mode 100644 src/llvm-api.cpp diff --git a/src/Makefile b/src/Makefile index 15543ff11b8e9..bb38a848ab12f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -55,7 +55,7 @@ SRCS += codegen llvm-ptls RUNTIME_SRCS += jitlayers aotcompile debuginfo disasm llvm-simdloop llvm-muladd \ llvm-final-gc-lowering llvm-pass-helpers llvm-late-gc-lowering \ llvm-lower-handlers llvm-gc-invariant-verifier llvm-propagate-addrspaces \ - llvm-multiversioning llvm-alloc-opt cgmemmgr llvm-api llvm-remove-addrspaces \ + llvm-multiversioning llvm-alloc-opt cgmemmgr llvm-remove-addrspaces \ llvm-remove-ni llvm-julia-licm llvm-demote-float16 FLAGS += -I$(shell $(LLVM_CONFIG_HOST) --includedir) LLVM_LIBS := all diff --git a/src/llvm-api.cpp b/src/llvm-api.cpp deleted file mode 100644 index 56ec131556f98..0000000000000 --- a/src/llvm-api.cpp +++ /dev/null @@ -1,291 +0,0 @@ -// This file is a part of Julia. License is MIT: https://julialang.org/license - -// Extensions of the LLVM C API for LLVM.jl -// -// These are part of the Julia repository as they need to be -// built with the same C++ toolchain Julia & LLVM are built with -// -// They are not to be considered a stable API, and will be removed -// when better package build systems are available - -#include "llvm-version.h" -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#if JL_LLVM_VERSION < 120000 -#include -#endif -#include - -#include "julia.h" - -using namespace llvm::legacy; - -namespace llvm { - - -// Initialization functions -// -// The LLVMInitialize* functions and friends are defined `static inline` - -extern "C" JL_DLLEXPORT void LLVMExtraInitializeAllTargetInfos() -{ - InitializeAllTargetInfos(); -} - -extern "C" JL_DLLEXPORT void LLVMExtraInitializeAllTargets() -{ - InitializeAllTargets(); -} - -extern "C" JL_DLLEXPORT void LLVMExtraInitializeAllTargetMCs() -{ - InitializeAllTargetMCs(); -} - -extern "C" JL_DLLEXPORT void LLVMExtraInitializeAllAsmPrinters() -{ - InitializeAllAsmPrinters(); -} - -extern "C" JL_DLLEXPORT void LLVMExtraInitializeAllAsmParsers() -{ - InitializeAllAsmParsers(); -} - -extern "C" JL_DLLEXPORT void LLVMExtraInitializeAllDisassemblers() -{ - InitializeAllDisassemblers(); -} - -extern "C" JL_DLLEXPORT LLVMBool LLVMExtraInitializeNativeTarget() -{ - return InitializeNativeTarget(); -} - -extern "C" JL_DLLEXPORT LLVMBool LLVMExtraInitializeNativeAsmParser() -{ - return InitializeNativeTargetAsmParser(); -} - -extern "C" JL_DLLEXPORT LLVMBool LLVMExtraInitializeNativeAsmPrinter() -{ - return InitializeNativeTargetAsmPrinter(); -} - -extern "C" JL_DLLEXPORT LLVMBool LLVMExtraInitializeNativeDisassembler() -{ - return InitializeNativeTargetDisassembler(); -} - -// Various missing passes (being upstreamed) - -extern "C" JL_DLLEXPORT void LLVMExtraAddBarrierNoopPass(LLVMPassManagerRef PM) -{ - unwrap(PM)->add(createBarrierNoopPass()); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAddDivRemPairsPass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createDivRemPairsPass()); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAddLoopDistributePass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createLoopDistributePass()); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAddLoopFusePass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createLoopFusePass()); -} - -extern "C" JL_DLLEXPORT void LLVMExtraLoopLoadEliminationPass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createLoopLoadEliminationPass()); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAddLoadStoreVectorizerPass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createLoadStoreVectorizerPass()); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAddVectorCombinePass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createVectorCombinePass()); -} - -// Can be removed in LLVM 12 -extern "C" JL_DLLEXPORT void LLVMExtraAddInstructionSimplifyPass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createInstSimplifyLegacyPass()); -} - - -// Infrastructure for writing LLVM passes in Julia - -typedef struct LLVMOpaquePass *LLVMPassRef; -DEFINE_STDCXX_CONVERSION_FUNCTIONS(Pass, LLVMPassRef) - -extern "C" JL_DLLEXPORT void -LLVMExtraAddPass(LLVMPassManagerRef PM, LLVMPassRef P) -{ - unwrap(PM)->add(unwrap(P)); -} - -typedef LLVMBool (*LLVMPassCallback)(void* Ref, void* Data); - -StringMap PassIDs; -char &CreatePassID(const char *Name) -{ - std::string NameStr(Name); - if (PassIDs.find(NameStr) != PassIDs.end()) - return *PassIDs[NameStr]; - else - return *(PassIDs[NameStr] = new char); -} - -class JuliaModulePass : public ModulePass { -public: - JuliaModulePass(const char *Name, LLVMPassCallback Callback, void* Data) - : ModulePass(CreatePassID(Name)), Callback(Callback), Data(Data) - { - } - - bool runOnModule(Module &M) - { - void *Ref = (void*)wrap(&M); - bool Changed = Callback(Ref, Data); - return Changed; - } - -private: - LLVMPassCallback Callback; - void* Data; -}; - -extern "C" JL_DLLEXPORT LLVMPassRef -LLVMExtraCreateModulePass2(const char *Name, LLVMPassCallback Callback, void *Data) -{ - return wrap(new JuliaModulePass(Name, Callback, Data)); -} - -class JuliaFunctionPass : public FunctionPass { -public: - JuliaFunctionPass(const char *Name, LLVMPassCallback Callback, void* Data) - : FunctionPass(CreatePassID(Name)), Callback(Callback), Data(Data) - { - } - - bool runOnFunction(Function &Fn) - { - void *Ref = (void*)wrap(&Fn); - bool Changed = Callback(Ref, Data); - return Changed; - } - -private: - LLVMPassCallback Callback; - void* Data; -}; - -extern "C" JL_DLLEXPORT LLVMPassRef -LLVMExtraCreateFunctionPass2(const char *Name, LLVMPassCallback Callback, void *Data) -{ - return wrap(new JuliaFunctionPass(Name, Callback, Data)); -} - - -// Various missing functions - -extern "C" JL_DLLEXPORT unsigned int LLVMExtraGetDebugMDVersion() -{ - return DEBUG_METADATA_VERSION; -} - -extern "C" JL_DLLEXPORT LLVMContextRef LLVMExtraGetValueContext(LLVMValueRef V) -{ - return wrap(&unwrap(V)->getContext()); -} - -extern "C" JL_DLLEXPORT void -LLVMExtraAddTargetLibraryInfoByTiple(const char *T, LLVMPassManagerRef PM) -{ - unwrap(PM)->add(new TargetLibraryInfoWrapperPass(Triple(T))); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAddInternalizePassWithExportList( - LLVMPassManagerRef PM, const char **ExportList, size_t Length) -{ - auto PreserveFobj = [=](const GlobalValue &GV) { - for (size_t i = 0; i < Length; i++) { - if (strcmp(ExportList[i], GV.getName().data()) == 0) - return true; - } - return false; - }; - unwrap(PM)->add(createInternalizePass(PreserveFobj)); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAppendToUsed(LLVMModuleRef Mod, - LLVMValueRef* Values, - size_t Count) { - SmallVector GlobalValues; - for (auto *Value : makeArrayRef(Values, Count)) - GlobalValues.push_back(cast(unwrap(Value))); - appendToUsed(*unwrap(Mod), GlobalValues); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAppendToCompilerUsed(LLVMModuleRef Mod, - LLVMValueRef* Values, - size_t Count) { - SmallVector GlobalValues; - for (auto *Value : makeArrayRef(Values, Count)) - GlobalValues.push_back(cast(unwrap(Value))); - appendToCompilerUsed(*unwrap(Mod), GlobalValues); -} - -extern "C" JL_DLLEXPORT void LLVMExtraAddGenericAnalysisPasses(LLVMPassManagerRef PM) { - unwrap(PM)->add(createTargetTransformInfoWrapperPass(TargetIRAnalysis())); -} - - -// Awaiting D46627 - -extern "C" JL_DLLEXPORT int LLVMExtraGetSourceLocation(LLVMValueRef V, int index, - const char** Name, - const char** Filename, - unsigned int* Line, - unsigned int* Column) -{ - if (auto I = dyn_cast(unwrap(V))) { - const DILocation* DIL = I->getDebugLoc(); - if (!DIL) - return 0; - - for (int i = index; i > 0; i--) { - DIL = DIL->getInlinedAt(); - if (!DIL) - return 0; - } - - *Name = DIL->getScope()->getName().data(); - *Filename = DIL->getScope()->getFilename().data(); - *Line = DIL->getLine(); - *Column = DIL->getColumn(); - - return 1; - - } else { - jl_exceptionf(jl_argumenterror_type, "Can only get source location information of instructions"); - } -} - -} // namespace llvm From 370ca6ab6c5d9f736367359706513e97695baa46 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 30 Jun 2021 15:04:40 +0200 Subject: [PATCH 055/146] [LLVM] Add patches for eh_frame emission on AArch64/Darwin (cherry picked from commit 8016ca90a4f2fba4ebe38ea7ece44c8fb9944ec1) --- deps/Versions.make | 8 +- deps/checksums/clang | 116 ++--- deps/checksums/llvm | 472 +++++++++--------- deps/llvm.mk | 2 + .../patches/llvm-12-fde-symbols-aarch64.patch | 158 ++++++ .../llvm-12-force-eh_frame-aarch64.patch | 31 ++ stdlib/libLLVM_jll/Project.toml | 2 +- 7 files changed, 494 insertions(+), 295 deletions(-) create mode 100644 deps/patches/llvm-12-fde-symbols-aarch64.patch create mode 100644 deps/patches/llvm-12-force-eh_frame-aarch64.patch diff --git a/deps/Versions.make b/deps/Versions.make index cb41d43622aed..770828e28d93c 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -15,7 +15,7 @@ CSL_JLL_NAME := CompilerSupportLibraries # Clang (paired with LLVM, only here as a JLL download) CLANG_JLL_NAME := Clang -CLANG_JLL_VER := 12.0.0+0 +CLANG_JLL_VER := 12.0.0+1 # DSFMT DSFMT_VER := 2.2.4 @@ -45,13 +45,13 @@ LIBUV_JLL_NAME := LibUV # LLVM LLVM_VER := 12.0.0 -LLVM_ASSERT_JLL_VER := 12.0.0+0 +LLVM_ASSERT_JLL_VER := 12.0.0+1 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.0+0 -LLVM_TOOLS_ASSERT_JLL_VER := 12.0.0+0 +LLVM_TOOLS_JLL_VER := 12.0.0+1 +LLVM_TOOLS_ASSERT_JLL_VER := 12.0.0+1 # LLVM libunwind LLVMUNWIND_VER := 11.0.1 diff --git a/deps/checksums/clang b/deps/checksums/clang index 7dec72fad1db5..125b200da0a36 100644 --- a/deps/checksums/clang +++ b/deps/checksums/clang @@ -1,58 +1,58 @@ -Clang.v12.0.0+0.aarch64-apple-darwin.tar.gz/md5/980c74812ecb2910ce5ff89f50adeb4e -Clang.v12.0.0+0.aarch64-apple-darwin.tar.gz/sha512/3d732de9268f4ee3550cb8cd25547025f0c3c2b42733da68570ba40906aac590c51de8819f1643d40f3c2310f666eb1d5adff6beaf1a811e1358f71a2b2e693e -Clang.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/md5/4cb0061a62021a9f2e8c4c38cc116a32 -Clang.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/628844979ab97b7e95578cc6a2f01be4853e2e451321baa209d8ef80a3a77f58403f8c905e89ac48570daeae72b10a5dd21de948cc3e886918eec67f87168d2c -Clang.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/md5/98216114af0c5080f2054012986df84a -Clang.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/8f615879985a7840b0c1dec53aaa4f77025464cc32594e3dfd7148ce36201cf0221641fc6de867f605b784d98a2ab360c1aabf1bb98d77363e35d6225f4bce17 -Clang.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/md5/f9ac91da205acb64c95dace753035a45 -Clang.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/sha512/91739206d79d6c75586289205a40c71b922cd42c96564c174b0707a7cc136e77cfbeadbee820ec7ab0e0bfc36f481b88818d3579a205b2d6ae65d7701eb817e6 -Clang.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/md5/7679a6f941daada0225667c017fe50c6 -Clang.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/sha512/aa1532188095bb73dfcea86dc5965302b6a3099c4c95787c0b3ab01ca5c53c7a533325308af6c109d1aa50f69153c57fd5e502f41f2af41dbcf3b039d5f1defa -Clang.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/01056c4c0a86f8684643a06fefa92f27 -Clang.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/bff88b75e7214135cd6c9e797c47cc5dc2d3f2b9bd8e3cf9f1c7ade3bcb205ca916b63b5c6f2067f4de306dddc4efef36c9089a49562c8d656b95d45c957cfd9 -Clang.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/88e9b5fde388021ef88896d39968b3fe -Clang.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/aa5ab4375f532629b22a81d927a23bab60c819ae16982a1dc797a043fd3622d2b5a9c0e4f3195d2974df3383438a844c276efe3a60fee1c99ec7d3a10064cd45 -Clang.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/4415d5e19f1e4bf2719b4851ca428ea1 -Clang.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/200d43017d05ca59374950b557eadb5f2630bf70378a2970dbac4da2ada8e2428c786b9f3c1a2774ed863baf34d8ac667c294c2bb46e51125c40a3aa0125b596 -Clang.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/c8b618d1fb0685f0023c3440918923a0 -Clang.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/4b85961d98cd47105cb88a187ac52072af7af27c81defa35b2bbf36a0841c0d7745a294373fde503989bfc22245ba45a1c9d253e7bda5a28381dd6ab9b677238 -Clang.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/d6d6a8fb56ca4e44304310f5ce7e14cd -Clang.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/dd3a039d3a3099fd8e0f135443ed9145891179437dcc1cd851da3b54d4815058190e2f6ede97d2f0357629e0d173395a86537732b0354bc87ae5815638d402ca -Clang.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/f0431cd3ad402d8faec1efcddd7f7fef -Clang.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/0d5e7b96a15db5bd09457aa27aefd05b8f530ff348956ce1699503a03adfd6abec84fee080aa5cac54a7d4eca42730f7f9cd6b13c23e3b13f4d2392f08fcf688 -Clang.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/1579ee70c12a5c38f84e9c52610b196b -Clang.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/91841937b8c1e3dc4c223a4dae48e7d4fa307df2cc692e512c469994bfabcba897078bc95c4141e5384f53be31d160ee750b60382005d7e5acf99532f47b4566 -Clang.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/75aaeadab3001679561ebd56193cd90c -Clang.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/7096f0bdb478c2cd76cee8f3ea47ecf8565af0702901f5c6351233458d2c66d3ea61e3f065ae9e90960dc7e0bd6fa1a0c6d160934fe409a663e4eefa23e6c5d6 -Clang.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/md5/987c4b1b50d9bb56e598839e383f79b9 -Clang.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/sha512/e3b827ce6f250a2264700991720585b154bba9c6713da7fa619a5e9e0829c7b02b909e3f73ab9149f58de2e27566a7d47723043d6de5fd027b1233452bd1d2f9 -Clang.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/md5/e8297a60b87199cab225418ec49503ae -Clang.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/sha512/9b341cdd57982d269df2d8158a5101f451f09031e1e784b593c78aa272c392eb7328b1c328a2f29d494b5ad4ef1e1ef96d01772f176be6395a8503f983e18d56 -Clang.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/md5/46f27859be1f7e162499e846d9532a37 -Clang.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/sha512/5173beba0ba2423c978cc3663e3b6673752efaef34547efe1e1015a18bc5cb1129ebdec3dacbe9894832601d87efffbebb263790d88ae198cd985636cba3fdfe -Clang.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/md5/00ef76971a4783c7e63a86ccae8b15b3 -Clang.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/sha512/f5e5f89f541df4b1da164392da0ea5397be62138e203f321b0b771942646530acdc621ca36a6e6c15df32c0d722fe9b0b5845c7ac58bf24966ae503979a6e8c8 -Clang.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/md5/8761cdd4810ffe1b3eb3537fb3e03218 -Clang.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/sha512/e5f011a2f74a032ef0ac429acc615b02d3d6bc07271acf2279afd947c1151914533456cf5b111ae7f4c868f7ee739ccd9623ce3ca2850b3cda3db53bfddc8aac -Clang.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/md5/0048f8c3014f9baf26e9d4e10ea2a893 -Clang.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/sha512/9ac2b0e47d86877bb47f5ff1bb7cfef3c0dcbeb813c770c29e2fac232cab0c06f39b5b2fad15d975d50a9590e9cce3c251e3a3c6ebd87b0656c93ed14a08c901 -Clang.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/b5833c865313b442da0b8bbe47a7ec51 -Clang.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/ef2c7cef9703248a0d09ae0a2b1d09496575411d6a846557a47628c9471824ec6f8b9ec361bb0c6bfe1ad5c27c1160900638b185cd46f21ad0eaf341e9caf600 -Clang.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/e76c4776341d23d2f87d87f2f9b32acd -Clang.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/e855521dfa1fb07fdbfb3afec0bf27d346bcf316c68dd0b3898ecee9d2e79f02d7bae9763e1c046b9ef6730458b40bdf35f737d0bece9a965c68223c6e1ada96 -Clang.v12.0.0+0.x86_64-apple-darwin.tar.gz/md5/d2522f901fe5fc2f1dc4c9d3c0a82e29 -Clang.v12.0.0+0.x86_64-apple-darwin.tar.gz/sha512/3efb4423573861ecdeaf0a82e7c15c1cc767016ceb9e9a5132a7ecdc2075bc0d8e8326d6bf9e02b649b6c324319fcea471d0e1727e595515488be7b39cfd07d1 -Clang.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/md5/88488b8e890dc41c7c6ac19d1b405a6f -Clang.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/dff87a31cc19147c9105ecff15cc0cc671a0f683b6dd3d86446b6a53c745256ebd1a951d0b83e26ad2e29aef6bb044b6c00d30c4647a3eaa0cad45fc1fb70f20 -Clang.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/md5/1b5bde42bd922cbcc06ffaa5c96f3664 -Clang.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/af499fc2aa6b35cb67414782a9cdb9e21dfafb2d5678c7ba9f95bbd92650c8b7f90879f86ba55b445ce4a42947ec495c1a6fdd6e768742bf8c3cba7552e2bd4e -Clang.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/md5/a3922ad0741b490daa6e21b91056324f -Clang.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/sha512/257732327901f32d3baa7e1fc202f266e578b5bb9d929949a900505b664213c9c8c132b109ee93f96c37bde3c4d2c7b806a45f44e93f55af1973fbe45c47c621 -Clang.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/md5/42a813253b2f820bfc4328c55687b096 -Clang.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/sha512/ab4843e2d252f1ad6435d506483c29c752573b6be70c363a3207e8a45d09850f2cec5381ac5491694e69ede5cf0b102f61e5f54d7bce81b049bfce9b6552e194 -Clang.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/md5/b17ec22a9dbb88dcf956ccfbb62f6609 -Clang.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/sha512/d885e4a50e6f57b8314752a590d5ae72b78eec3feb838ad1a66116cc2fb1b4254b77ab36bb86de416ad93e58dc2d60086eaed27ed29399f200355191daf43123 -Clang.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/819b09f861dde64cde72c061feeb1baf -Clang.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/4f2e8c402e2a184f115311f129fe731b6445422cfcf7ffb9b1ae577e9588f5d0de040ba6c3eac3263fd3d51cbf10ab822bed24be0a3d8766084adc23c04b082b -Clang.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/080587a6f5a463efc06362d40730334e -Clang.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/46e47a06c996094b385b5939e73ac831a0c08da7e113683433e0e559a5627c43242311be0d6f2ba992d65bc3b5edfab3045b1d06ef26f6b87045c14111845260 +Clang.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/465b3375db7ab6b93fbe465ed76a275d +Clang.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/a39faf3bb411612da5cb29be70a3b200dac3a4bfd7eb58e4f68edfd09923819f7f465dab4dde4caa0335d8fc392b2f55db762de0e93642ff49a466b68f0fd383 +Clang.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/162a2ee947742b9d0c01c95725b98d96 +Clang.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/ead804d78ab42d3e1ca6cb7f12ff7544525772badce779eaef5cf973e23966f1398343d3c3148b58195eef7d4e9c7ee897e8bfb30a24c095685cece46344671e +Clang.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/563e93b82893c8257c23878135de6687 +Clang.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/ce8103e409790b5d4993ef4259524096617ee27b82b5d1f6c55880814211da6cefb4645a9c5de4ec44f9c961d1ec62da8cde0977d8af4be6e25a638891efc372 +Clang.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/d3eac2234c6fa736c3c8e8a4a7e9eb0c +Clang.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/0a7f414dd22d34184c47695b5ad40e57286527a16fe32e90eaccad11d72192679985a9ffd6f9616564ff87de1d189726c3049100269648115f0f983d80400400 +Clang.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/23cdec7b732c13313c897593c40bce2a +Clang.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/616fcd76d887cb3188b5dab8a2a15f276f3cc7d73ebdc13e1e12d1d4eaf0a3722ee288b5531bd24ab825a463112052399ab75d839e9df1c98987313fe731a2ef +Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/f2d3d99ae67b8435021b20bd77aaf433 +Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/7cb4ac7392501a849058822f88aac49f9a0a03496a5fb39b8a8fcfeecf86f004b466e9fbfe2bfdaaed6d9cbe33e61b42d89c03ffddbfc4d8015790f64ca3623b +Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/3c43e3cbbea5c8f2f197bf6c505a98c4 +Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/31107abd43a3ad43a3df424e9d35739d646c955923c08ca3cc405b7677deacc0cf9aaaf29b29fdd4fd53a434087620317e1f4d91c3bcb2932716a87804388d0b +Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/dd2eecb77a209c088ad81dec1f4d9610 +Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/7a5a13ed5e046fb05cba3cd7aa55cdef741a7d76274e71d2b2fa194f132bb98c40d200fb04dc111cda7d901babd4f1f5d4e9bdf1dfd635f0492c386971878b5a +Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/74684a3dfdecad109aa1cb3e5eb1f24b +Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/e1dae1ae3bd5b82d21401cbc9c6ca2281a05bb1039fffe0d94e7d5ef482a09bedbb5c512aae52873ec7ca471e543c334ff37b1e8429da79724b6b131b0502bf5 +Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/32284100f6a57f5e4b32d0e6d35dff9c +Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/201cff5571219df602ea2f63d9559e8345aacc8c8691b30614fe6b6f5d0b7692f670b17366185f0e16cd1119bc49cdd1184247b32826bcc0a3a1d026c48e538b +Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/c854231dcdd3816078ffaf435b152a3c +Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/082760f1dcb39cccffd5fa0a096ff0c6d823355d22d8cc2b69aa90092fb6157c87070d932fa736e3ddf4de0199c7f06cdca91bb354ee0cc125b505e66f5df068 +Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/5c909ab9d88334058e99be60e0330711 +Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/abb39baac59aff579603870a31dbbbfebae3eea91caa203dbb3409d49cccd81dd96aa82a098c20265ee5f5fd851a0621c11b1a8837952a329c699b909e2c83a1 +Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/5c275a64299c0d4fc51d35f53c3dab00 +Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/05c167d371dc5fa0226f0505ea1339ffcec8563c76adbc1450098ec7aa096fe04d855595d3cee290c2b6dc0843d8fc1c5215c84d3b3095d2cf0d93711dd4acec +Clang.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/f27a08b7004c4a5eeb35d22198d72c82 +Clang.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/9fdcadb0d2bb56eb0e880a7b7a0c7660d614670209f76dfd5aae70ef0d3c437d6b56171b542d608784f7c4f7ef7bc5a4844baffae4fa95c25094c630ac39bfdb +Clang.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/748c1efc36a70910fb3d3fea537c3b4e +Clang.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/bf70ba1a1576039210978488050890d6ee049fdab076a9a8498058b732c1c05d47861146aa48262a304f7dd8b24529e1a3425d0afc42c69843eac4b1317327a2 +Clang.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/5233ddc66968db6bd00bcc9e2aed7f12 +Clang.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/bb9aea78c78c6cbb613b4c3eac6f08776dfafcc5402e6bf1a6670ac8d707de29b0ff8ad654d1d586f3e0b2a324c8fff49524033277f3cceb08c826243dd8a519 +Clang.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/f448936531ab804b56b0d8b63a2b7cb9 +Clang.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/5ccdaad4623ec17eb72f806bea432fbe62584b512159771cb295bd273771b168f502a3a8f15588e0e9df65024271a8edb891fc48c2535e45a31289b4c3469a28 +Clang.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/2e68b66d9d607414d69bf2b11609ce5d +Clang.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/fec58abebab5d632fbfaef8335737a54d83804a823ca6aa8ab9031aa3c2a8afd5c342d6d989d7918352c241b7d7cb8f9802a1422a44316ad0f8760998e2e02ae +Clang.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/1ab89ec9072eb7d871b3a0eff78d56ac +Clang.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/9878561bbf405ca29e1f32049c753215ecac1bbcbb62f66dc573da3826bbdfb5f4e5630273595d611c2aa315d54fdfa35a954f71ba8781e5eb659658a9157886 +Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/4b8045175ede4b934e2ccc8a28920910 +Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/38c952d0ed7e63c52e013e303f77c4d779ca8682926a32705402f5a275358fdd5d7f59188c0f43d994b8c2ea31939c23d0dff9a4b7312ed39574cc39c27691ea +Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/53ce55e158860afa17cc653f4fc0b500 +Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/15738783329bca1720278526a306d230917d64d6ec6c9542a248953f5c1a071316de6bb80cd1d0498926ce876fd541d939023fda7b234ae9517f4583a2b6aa8c +Clang.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/aefdcf918b508ba66cba11abd0d99ef7 +Clang.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/c7ef9af9bbb5a1e2fe022c3996566fe774903bee67c15dd6ae304e89fc93e5080f177ea074f9736d6959edecae415586db4dfff8328e8fdfd643019ca7d41131 +Clang.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/490a63fadd41b10c425c1e87170b63eb +Clang.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/14ad28afecad4a60d0a978af75b3db68feed71badb271dee0b29bb4cb471f5e69ce85b6cc990b63a2f9db24ca87e897ee935beca532451b2ffc020d80e3cc827 +Clang.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/9056064168e01462aae83721a670fc7e +Clang.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/aa0340efa8106acf92c2528c6cd5ac8b6bfd0ca0b8041e22534db4178364467dd8c46f4c77f365fa0ddeb5aefc6ed01e4a4416e1326173a255e18cc890dfc0ef +Clang.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/b4edd5baae3b1f9b18eae365d7969621 +Clang.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/abe5ada1bfb6d69ff28fd1d16f5de3e2b12c36730f04d3fb4c9e332d4947438530f4d5a677d3dfc973769a381ec7dd1944c3ce2213bf2177d263b47b4903d186 +Clang.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/d3176f49c216d11f2113caa10020745e +Clang.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/8585c40983ab7c401bc6537cfc3ebb7a44e52738576155855db5c51fa9c0dfbec3b5c12f63575b09c038c9f047d9941a192082ba7572489b55d5bcba2e3fb27b +Clang.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/1d3bb2c77b0a3473697ca2a63de35b89 +Clang.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/de8922979ad7158fa72d0e152670ad3be75fabdb22a1e91d187e6847e9b6cbc905ca09a476dac651a52c775192b3bada333e68e38e6ba7101a472755bb7ad79f +Clang.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/ecaf6c8831e8c6de8b8e74f95f04dbf4 +Clang.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/aec6626dd02fc6a0f82e05783dbce19d69a2fd9eec53189a1086393134ce1f972a1b0ef286b06f19be192fc4575d6e9f5f09984444cd3bd50c66c2fcabe23b73 +Clang.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/23c8b1d208dde43fe2b48f143f2108ea +Clang.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/75118203f3ba67ca99279100e9b31eaff165f70af5a487bd9ad6dbf70da8041a374d9953b807739258be6e493a5422a2e5e1ba00b8ebd746b706de3915375c1e diff --git a/deps/checksums/llvm b/deps/checksums/llvm index aa0124f257b44..71b445c82f00c 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -1,234 +1,242 @@ -libLLVM_assert.v12.0.0+0.aarch64-apple-darwin.tar.gz/md5/1e5a6d26e657b2900c9c3914dfbad9e9 -libLLVM_assert.v12.0.0+0.aarch64-apple-darwin.tar.gz/sha512/e2846fa7e2503309dfb57159acbf8ca5836fffb1a2a81fc60e88743d13eb67491c5a8977bc3dce7d75de799ff9bb963029abb23dec5450085e480940bd3f4bbb -libLLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/md5/9b6a0cf448686b657caffe308a8512fa -libLLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/151f3c29ea0f21f6a4d4be8b127aad2cdfd0b97ed3f8cf8d518be28f2b3fdaaff29eac04b57b5a5ce0aa3ce137e1afc2fec2e619ea2dd119520ae815e0e064c1 -libLLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/md5/8b4eab1d6ec21bf412a3ca8eaba04f3d -libLLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/13009a160683ab073a0a3e089f17d006b1d74273a65b51d16f4e731b47352c972ea0487a79e02084c4f4f72f61bbd1f169b7bbdacb6974e5fa53944d444ec290 -libLLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/md5/d1e35884644357a76dd4fa6f7429bccf -libLLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/sha512/d0918e7886c9ff6771d3ff809a25a56a7a2154b4713ed2f47f3e0b75748524f5465fa742c771e1fb954e3757a3341ca3f5e8f659225e0edb49f0c50b9dec995f -libLLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/md5/ab814bef54de513926548605795ee56b -libLLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/sha512/18aa8f235963f24ff15854708418640eae32c061b663574391d8c70880926a9ea6038cd2d875ee616fc5b247aae6503c6bbe09738d5fd0b65ca92e976057c8f6 -libLLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/6fd292d8e348f895efc567a566a36a98 -libLLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/1b03e5de348c9f563fc31c2325817380df6b995a5f352effd434f786f760612ea53efbae2ddc37251b3dcef73eea88c71869a197006ecd0ec6f860ffdacca5ec -libLLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/7377e0370c12506893231c4d8e1a28bd -libLLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/c91aa4226f065c62cf16f9815b0cd34548dfff38cb1a05e0e122ff659c3db2ad6d28d83d9d7ec4d28227b2a5de1d2b48812e50f6af838e69eedbbd8cc153f131 -libLLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/faa491409f4e9d822e9e34f6f2db36ad -libLLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/a07245c310755567e9e33b26c0f0282eae40abf1a1a1c22a77b6412709b191433ec497e16662f229558e49089d68a1c904cd282c548c02370ed902f544eb5cd5 -libLLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/b42b08d46b64df98e3ab493341ac015a -libLLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/da2bd53fab48f8b46971639d6ed81b9e57467a6c4a7a3a63984c08f1b799f7352352ba28892a7789811879e3740073487b885d9974b6285fd03da16edca24f2b -libLLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/52e678465021c06611f86411a8f41e9e -libLLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/01964e97bb231899b6064734f756d8099bf141674ed6d231108dbb6c901f3079444cd620493b0ea7e8bf1fbd2899f288ed02df3c855e5af87d7db93a9fd60108 -libLLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/c5a5977de4429a0a38e4cf025d57660a -libLLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/a5e4aed882ca2cbf0a8a8ff5b0c8e4eaadeaf7491ea1887ee5fae628a5d46906e7d480b784b1d1fd190c921cecebcaa243ff39df5a1776a82abcfe4095bf3d07 -libLLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/bb83098ced1081fa0c06ddb84b6cf0fa -libLLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/e217bb8fe434954191b2b2f0a00d6e32e39557b9ff95a2417a13f3a6a25f2266c180e66c98495b1946171d1652ca62689140814d5337e0e00b4abc15179f2879 -libLLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/77161f57a346fc7f6b9aa1d36db55879 -libLLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/e53440cacd74eb6eb48e4de0b720df177bb9b8c90e682685efcf65f98bc4bc6f990c60ccdb426e85a80db8005dbad1efa5be69e2dc326953d1c0177734f6a84b -libLLVM_assert.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/md5/33deaff11953a1f1f78658461010b258 -libLLVM_assert.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/sha512/61383ed8e872e21c3419d64928e29c3f1e074c03973ee456062ef774b71cb27785afa47c641ce9db14a144fb66a7f8c53215448721c49ebf3b37674ed04a75e7 -libLLVM_assert.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/md5/65f47baee13c6e2cd9f0f3cd95bd724d -libLLVM_assert.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/sha512/6f814647393445c5a6ec05cd8c89a3ad106bde4a2197ee0a8bd8e64f1575245d695a01bcfb02861ad452f7d881114a5fb4ab145aa2211b42fc34b07ffec2ccbe -libLLVM_assert.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/md5/107c0e969aac6bc376588481f3ab4748 -libLLVM_assert.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/sha512/aaf8677bdf4fdf5751a0133c00dfefb28cdf5076d62d749d9bb81f29af2a3f35438b3c4c0aa71fc87214670bb63a2428712a1c07fc46dae217cdef27b9b0c550 -libLLVM_assert.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/md5/b6f7084de25b6b49631a2f2aba8da96e -libLLVM_assert.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/sha512/75f91fd66da8d1e041c9ed0e8fd69ece5601d909caf10eaf30992b6eb5b743653d97648766fe0782862dc0891a234f3aef05df3b6c04848d4371addbae8bb419 -libLLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/md5/c36270a831b06d5b3654ec7a9fd35b09 -libLLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/sha512/25a095c12ac43dc36fd32b0ceacf9bc10b240a360a45fa0b0fdde367a40dc22a83bb3a6267426c0c02f14f221046c0b453417eae4cc0539ca116149f8ea480ef -libLLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/md5/8f0c51901b55ff5374c25a0e9bdeae99 -libLLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/sha512/a1387d07d63d0e33632bf77702271bf624fa29bd8e689054d3f71734451d39ef09abb9fb63f78cb6aa1f6f5bbe54737f72740aeb63a94fc6876a600ede5ed159 -libLLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/9a456e2d31115b296b212305988cbf0a -libLLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/9c93bbdf9b9d11654aa134cdd7b50198a7b49e86148ba3257cf6cb1003fe9d22f568e45ed5b26f4e0db7fb3128f57dadbef9f4494827c66b2957988305aa9b20 -libLLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/efe3eec267a6224e5e8f1458be4fcda6 -libLLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/d5e90b29242b6aeab8b4ec6d37938a5ab15e1b1546f87f795d45b8f9a1520d24408e8b2c3a26cfb4b61c6d3228f98d490e2a0abf375b8afec0fd0e866a833197 -libLLVM_assert.v12.0.0+0.x86_64-apple-darwin.tar.gz/md5/475530f8b87ac033069c4073ba25f62c -libLLVM_assert.v12.0.0+0.x86_64-apple-darwin.tar.gz/sha512/ae46db3687de3bca657968624d95ec3afed99fc3d07271681ae9cc587baed2b391c17b4b0905cb4da3727a44c7698b248dced4b44c688242042c096f9b2c2a46 -libLLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/md5/888d7bd8ceb30a482438d0fa7526d6a5 -libLLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/b494736aa3c4378bccc5f72db20fdbc488bb383ec4f569be18848fe1aa712aa6dcd00df1a8c651ed266981e70f4f1e9ba2bf04cc410ef02140f988c21dc9730c -libLLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/md5/7fb8dee0396a2ef772612de81c4ce222 -libLLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/ce1bcc5465e61944c4720f615de3bc234d2d2a3d8fed986aa919ba1840c0fa9a8ff4b7e5fd1f8e063bbd153ca1977718a91ac2e1ab2623a4b744d8ca98c3191a -libLLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/md5/ae631966f7a9f28ff105ae2c5c9b45e2 -libLLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/sha512/da3c1b1335f891b1121fa5f1f8fa4d9705c2bfcc3d98f80ef86f453e4db2d7e4c391b462ff471a87a01403558f81241aff7fbb8f7a05d815b5e15099877f9f3c -libLLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/md5/a4f21af04ce1407eb8d16e9b4704bfd5 -libLLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/sha512/bc6ada66aecb448f28f61f261d0e7cc009643ec0582c46ab7756e09bb4ba2ffecea8883213e6605144084abbeb1e12ccaf6e2a15b1797151a6aa0522453c0af5 -libLLVM_assert.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/md5/0fee3ab691bab69b30f3ce5721c871db -libLLVM_assert.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/sha512/4b9adee9596d37b336434a74e3aa007f83afeeeccbeaa16c942dc117f2990d1485887860eae7eee74aec2b4bea0f674aa3c6abbe621ddc26a76697e7ab1be986 -libLLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/2dcc9f9c8e8ea1c96b19d48e9c4da039 -libLLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/86a518a72558cae62e2b393503bf34e768d5999d2b773b22ae5cffdd6a413780fd8afcb88d8862a62529f3f3238eb50dd5d1210814d417beb01814bbdc029540 -libLLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/0392a6e2b4d2ea9177d57ed1c6758344 -libLLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/e0306b68650e758121a577133321d07fe42d6e1ff5a1b4fa5ae91d522e0a196f63d0a8465005e8d49a39c3182c1f86be8f79ae3c5da1943b1c5ad3b45dbb90a7 -libLLVM.v12.0.0+0.aarch64-apple-darwin.tar.gz/md5/758342103dc72bef1e97045b61326c12 -libLLVM.v12.0.0+0.aarch64-apple-darwin.tar.gz/sha512/38632deb61b0bdcc509b6781ee8981697e2ed68ddf9c874328b8de613621fbdc04dcd8e8f7e839812ff3b553c8ace00c32bf391b1cd7bd01359df0223400b49f -libLLVM.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/md5/e46e23c1cb0116a64d4c6c362f36c273 -libLLVM.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/2f3a8870ccc0a2b9f8a0a1a46a1e3add68e412ca63b5dd2f3179d5c3f20c1c387d93493b4e3523fa1ecfaf676ec13fe8b97908e26d079ee140e24a03ae4138e3 -libLLVM.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/md5/6b29c384991d030f0192cc21d8ba6b07 -libLLVM.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/c4f90df89d6315b93f574f0149c8b66185252770d7580a96728dabf9b4a3a66abf6f534b528540ddde791e6719e97857069c8b5154bcb134369253be3d51c052 -libLLVM.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/md5/d00dd86e4a94b22976c8674d42eb9830 -libLLVM.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/sha512/7bc5e67ddc45a481ed3349098e581eb8db65b4408478db44b053850b9e534b9ffde27674ec22f3600a794a7a5d334d649907205d58016e6984ae2b8ec675959c -libLLVM.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/md5/f44c529d8c9afb2c6a5c555bb6a38177 -libLLVM.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/sha512/1c6c7320495d822f4e9ef209f726ef9793d130b28416b8ca7b60d124e5ea54d6a92d73596ae33078b00e863026196177f9ae291a338d00378169f4f0199f8fb3 -libLLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/a49912cfcf61750103f740d60de921bc -libLLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/3f4d803d5eb62ec23558c739d3afa8bcaa7cf371171019950548d46a07e2e9be771ed1a135995960d7e8b344cd149abe4f50b547889a5b7d30a5fc97a80e6f33 -libLLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/18b0841f11b5d3b8bd30c6a6711f3e84 -libLLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/e891c7d7188593b1c99b8e84ed8b0d9430367886eb1e06923675f666bb206649f570b818080598cca21603693241b8f8474e268a3ddbc5e85cf2640a7648a57a -libLLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/d0f7682d75992f21e9f4583632af01e5 -libLLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/8f14d78b55a923e497fc72866850ec227ced1f600eae5b1f8060adf25dcc8382ebb4992474a1557b411f010e2fcd356168f2ada79b867ed5afeb82ec4a3fc30e -libLLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/4b4030175961593cea3d63219cb2a5bc -libLLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/d3348b34db7e51c66c29e7ec835c5b8287a7f6f4abed97cbd2cae0b9ce6f975aee1e1eadea7e281cb6ac180de209deee277e1b7c2553b67dbf3faf5b0c00d96e -libLLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/25a752523cef3c8a0630ca80bc612251 -libLLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/ea8257ca590509ff1fe3c1b8379305be067c257e812269ee4af5df35cca1176400e85502b17cedab20e879e082f4bdfb8fe1dd34d83e786afe1c9914931c61df -libLLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/09971322fd89c0b1102fdfffaec53721 -libLLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/6b5b7169c96e7b7510a6b084af0d36b893a46a1c2c4a966e89f23878ac2e9eafbe3c21c062eed818f200c9eb2083261ba4ee76786af5ceb5f05621f79548ee7d -libLLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/a7dd5765f7e530a40b72f44b5dfb8b38 -libLLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/c4b119dd79a810001b81b4eb103013b8d7fb8443c060becc3900e6f7379b91e38b70aedeab980062ee53ddec04592aa6790c62bfc59c556423edf9b94218d060 -libLLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/f61a1d6e04a4c5c00bb0d31e997184bf -libLLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/831dbd3e5e16d4fe6c38fef6f2656f54b3532fac1c1c05121d0d35d6c9de328cd06329ab85f100975097211586bd1fcc3249f8e77661941c9746843d2adb0a6b -libLLVM.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/md5/4e368d4b4901825f115a3e58483036e1 -libLLVM.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/sha512/0211a7213e1d5dddc64be17c39b330b12d7361613e0a798d007bde9d3f4f3fb7259df8212c1809a45759118ab36af4bae0c1f35a66e88a4195c899a6341c21ba -libLLVM.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/md5/cacce4ec7289a2a86e9bcc91580a4a5f -libLLVM.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/sha512/04d71994344fdbf60f01128e8c8fe3c5f940ea3bd72a5eff154d913298893bb73b399eeef1240bab779ba477a02b8ddb647068c76946fcb35f9a530d7fecccea -libLLVM.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/md5/c242c47e4047bad01c15142eb6623fa6 -libLLVM.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/sha512/225b9ea08454ebd5b24ac1d4442023d21f4727072baa16730b23d71d0dfd1be713bb992868038f8e982af590f499bf6d2b4e64bd3cbff537fa41c1f8d271eb32 -libLLVM.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/md5/7843fcb202beb55d6aa87600a6d60342 -libLLVM.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/sha512/d8c9f6f865e2f1058bd0d3f5b04a799483f1a94336ec82161a8c26e8bf5070b714663cf5d62733c9d4006b9a6e145873a31198e780632f039dc43a980216407e -libLLVM.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/md5/ea045ca69935f5035071be6ae719ee7d -libLLVM.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/sha512/06a9b4f762bc08c827ec2d8bc6ff26ebe7af6c8d049bd1015f5d006d7927f7c6ec5d1310b0e74da59994b10c866d2e3358717e36d398d3c01a53455f5f94eaee -libLLVM.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/md5/cbb10916045594f8c509d158bc9eba2d -libLLVM.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/sha512/7ae2b3dc6e54bff8db71ab3208cf7d28a4c35819528d6cde17530e8a5509501d7aff18a75e851d93cb2682b0996d78f00e09db6ac11c2bd9bd57d349af8a3c14 -libLLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/f59fa032a3f5d8fda741a7fb2c7908ea -libLLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/bac6f46e34660cf8b231a1d68eeaedc82f77518296cad4aa6d54ed3661c45c02b3d442e30c37c8b4b8cd0e0701a5ba49b080ffc842e6b58f6f19375250978231 -libLLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/92f7fc40a1ffb473046d5493b329fa69 -libLLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/1f0256620164ee67b6936fc2005a66dba889dae4c0f92b16fa33fc6a3b4146ad1b119db8569a50b1716e2464b0e4def09cc68cb81aff96c234717e507d64b3ac -libLLVM.v12.0.0+0.x86_64-apple-darwin.tar.gz/md5/de7a0f428a9d6c53feb42cf1224744d1 -libLLVM.v12.0.0+0.x86_64-apple-darwin.tar.gz/sha512/f9f7adb7e80d2192692fae80909bd2a87d5a471cfbcab6e335750011b77abae89dbb2b5a81151bbc34739ee3828e3e84a844b46fbc63c279710f3e12c0369642 -libLLVM.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/md5/38dec37c1b969bd38739dcc88c795ede -libLLVM.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/9b0afbe6119925a6a2d7f03208ef4676209e6c6532c78f0badd87564636bc417058097c2038108d6aecf399ae5ed3a8629d75a00f36277a7e97483da92a5c963 -libLLVM.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/md5/68ef2be45e6228a974215cf76c630a8f -libLLVM.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/a8e48578b6ccdce02b3e03d7c20de8df90ab40ac99a029169c8dd15907e41b917579bcb0f677dafcf039f95c9be0395b2ee5503ac6e20d9ef62517b5a213f521 -libLLVM.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/md5/8422319066043fc91f69795c10e085ac -libLLVM.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/sha512/e072e786f4ed2a891b251e43f6b62f6916c3f2d88afdde12a132a468f77281fe6b52438862cec25726a501ae76ee5d9e920fd5a2a8c2ede91999958c157134b8 -libLLVM.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/md5/1251650b38740bcf2203ef52a9dc07fe -libLLVM.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/sha512/afa9b543a1930440b7e82aec6ff82549de6e1fcf88fa24c20e541ca66843bbf471f30fecc6af5e4e514cf383e91834c0cbbf231f0d97f2af9a99122ba13a6477 -libLLVM.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/md5/673870380f49f24097e9aa040bbae2b2 -libLLVM.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/sha512/88ba49a5063fe67bc91906d2b7d2044238faaa7a1ff52e10625f49d79a9d986de3b3a09b32e76f38f8bdeefadadab233ad8510881ed6ea7c4925b5d6c7396ed1 -libLLVM.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/6ff0f20bad03e04ea511fbe99a4a8c87 -libLLVM.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/b0496090fe91b7d8485883b3643f170c4a5533bd6bd388ddbb04e189d0073e44ccb31caa2cdbdff49f430c1180dd8c0d1fbffdd2fee83e5be52aaf362c0cd178 -libLLVM.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/1de026b6896ee464493d0b760c938faf -libLLVM.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/113ff6c2a706bbd334fd6882f56d1238fe0decd3e80b528166500ac5f831bb321d078b48ebb1883ed0ca5ea22516a9b3ca49fb32cc21b03fa985ddf69208deaa +libLLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/9b6a02cdb753464998c2108401321c8c +libLLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/4986a37bdfebb17a2c70f3e24dc104a2b9c48fda5149e1e8f0df1b7139689e09bc6f5438f34e3fb6ca1ccbae57792959e2ca6fe66b267a2081df6a999cc11d35 +libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/4e6d298d5680c3a063739f508561e357 +libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/c70ef95a4e3c571b119f8d623b17d98591d268f7242c024e33b87ff80dc6cf96a7589c5e4e528d4f3b54fb8c7b1b6653873b4ec7a94b297524b9fda31dded006 +libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/941d910dbfa4f7339c942f547596daa3 +libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/486a01f9c8f632b6f84d802b00c443cf9a5fbcca61ea7cc392c9211c71243e39f50ae8812dde7f5347965e0aa9a8dbd73a4988d780ae77dfa04fe329359c50dd +libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/ab8f2a3167d192a933c86214c275d1e9 +libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/fec5e2ea1398c226cc9a3c31c5041f9b4e111793039f7cc373ff47e86e72685a4cc254ef3d42db7cee239a7422f56fdba513f572f5156f8dd6c286c799547636 +libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/dce59160064ef20720e2b97e903dc829 +libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/704d2007d0074a87a2c780e6b9f38117cee75a9e3e7a84edb9915962d7d5dc92453dc8ad3f2a73404173b7cdce5759f7764011452b9dd0da71053fa87bf89be4 +libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/e8e483bea9effe1a43cb14eb32d2edce +libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/709e10ae71641ac285380a73457988df8745d9baaa1584ef67871daa42ef16b568aa93633f774a9d4541ed1cefe49c7614b295f16da6fab91e493a2a58ff7143 +libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/2ef8f91e7df587e2bd8c73140c29d771 +libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/6b16d86a6636b070924d251581ec01df759197e642f8703111869c2510194b40e3dd6d56e605208d9e4d1a0fbe96709d56a9d065f3111979c989cda9c44093f4 +libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/7ae9c70790aca9cc9ed2dc6504f44348 +libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/4d5aaedf590343bb788d6a8cfd714d3d659a82e44c411d93bcd8f524bd0563dc8ac2ddfafe87b2c762e7d9f22a1bc6cf7a331343738e7a38c246f41a8bf24d64 +libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/2be0d9c87322bf63d3081e434b3b5eda +libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/45bc193f86093e479710455ac7bbd4e853537e2d22946a4c30d942a3f2f1946b2156fd80282f05a3fc73a65835d06d372b76ce90685cb4f1ca31606d2481b1d6 +libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/7009d45f00f0ce67ffca15a59ae0b682 +libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/5030c05e5b91d1fcaa866522ebabe0f112493fae9aa64cd3a003266939093bb422320f2cad31c19ee1989f5beb84781b1b54090b6a4c2a8fda3e80809ae65160 +libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/cd92d0ea3f9aa34c834f6ba9c5d6b199 +libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/b79e5f42890712e2ced99e80e1827aef0824568c34f029ed94142a29b925375a8e85d305411e42d05bee1959863906f1958485b3fb982b022cf567871005e20e +libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/406cc9431dde64b98b7c2cf0d44b8528 +libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/426a99f9b4eac3835de4a1ae3f49a23c342f773af5a3c4c6354cb27a120f8d83513ac9dbdcd1040b018ffdf6f5092de66fb37a8eacb07b9eed67a1f6da411fe1 +libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/c6d6c5e91e33fa326763034b58c9c306 +libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/7b2557c766371fc12172ac6469624fd7452e2be49c0ee4e0658018e1e779122d89cdb81fddf8df1374ad17286b96e299320d076b2527137680423bcd3a88e5ae +libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/8f3acc592c604ea386488a28c12a69f6 +libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/049d11ea4d44a60037c25c8893a336358f2422a4ed7d350f0212736b040b7af2d50fb80681d20ff58c220f9bc4559cc2b70ead1efa923cd0a36b12f3673f343d +libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/9727f0bd0663847095a8f4574a87c318 +libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/0d3a344b37cc4345d31612964f95674b18d2d41dfb6314d12c88290772bc9ed5d15dd90c2e8940710c1accefa368046c626d12c42297de162e24f08653ef2a6b +libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/9bb55b1d0e0e52443296b96b2117b6cd +libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/02450ebbd012aeac1e86ce22ce699dc0ebe75748335ab37ef854d3ff27d08e5762a1addf400e51aa26dda44f16c93e7b16199cc6d8e4019736bb0138044693cf +libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/f7bc96ec83a87233c3eaab79f117f9b3 +libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/c398b9684ea06e1cf4595c30eea69bce0623f858647ff686a6592d6d062479cd1ae4bb01367f7ef156ed75457454e6f4df7bcaceaa2f3f50ebdbfe2777f326d0 +libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/b495bf59b53148178937ead404f887f2 +libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/ec5e2316b846e436024c16aec6a271f23ad7879119660488509e3a88e8012e1b1592f492696d645b7ec5b2d710c9524100a186df836ff03ed9b8728b009a381f +libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/57e237b29d01266c97c2dc716f8648a7 +libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/742eeba173b2ad95b8ac9ba3b21afc49a081aee6ed12607d1e17e648310372dc95c5f839cac8db74a49a0eed8b82700922176b55a57b3dc9ee4a820da9816283 +libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/5d1c3f5cbf94df631b7f1a73a0a2063a +libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/8072be35d0ab07d853815ccc84013f76895603297bb4f4b77b22fe538467b273a6e6918486db8170f7e2ba2507b5e36ef42f9f321c797ac5e871618d3372ce66 +libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/5d1ea307a7481ca0393f88f3929de53b +libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/c62e3f7807390144f65cf9081b3f6710c1022f260a2ffda0d7e72583224cac638e87655d472de2490ce465279d79edea18a6fea99b6afbbdd9a427ef5d6439ad +libLLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/f7764a7eb7bb79439bcc8a853dff5b22 +libLLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/b1cdc7f1078eb07e2d37482c96b14c288f6c0d5c0860854e02c3c1a407fcb66d4f03abccf1b74b7ee9a6eb503b3c60e67e7ed75ece765b385f17c6f502a5d489 +libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/99a5965cc849e3dd79878a7c6b29b6df +libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/9b138f955de9266ff364022f53b6b8641670a8221e0bb6b61d5bbc9151e8c4ce08c61fcb90d6572c51853723f53c6b6afebc5c4e17e6e33e39590c53c5206f91 +libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/2a27b02a388679164b58dbd853f5145a +libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/febee5224a7e4499509105c59365eca340526e002f12395bfb2a31c944fdaf89345fec971c67874356c8235abd14bdff3d7485c13bb4af944105dbb43b2d665c +libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/f23b627174133dd8e94733c6bef0ac89 +libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/b7b2fdc4d154b2e1aa805a98d6b15c6a88a1dd59812dba1030ca0628192b993c965ccc7e0aefb723ce6ce8ecd3a6788fdd0cdcdc5c966bef55f67834b056e52b +libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/0dbab594b2066ffdcf4c1fe47612cab1 +libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/86e4d06a6c52d04175d8751cd84cfe1896ac66614aa92c7d60674a3ba49aa6a68e9700cc8150abecc7acdae4786d9899eb052a015a902a2459858156b0ffc2cd +libLLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/5b39f69421ab3c5a234436a7b8430c82 +libLLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/2dc735103c4c4eed676a149ddb8d4959ed8c6c00698683b5213d22661d5a1c079fdaf2c21196bf5d4e3841692bc09dfc4c8b723d808b33b94bb06a407a8ad809 +libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/21bd6a1e696b015a880efd795fa0e136 +libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/218bf452d5336d1ed69879b33f50f92f0118fefe21366733746cf50d6accd7b0ce71659233470f1f3eff26180a5245550b2c53b2678ded317bfd0a5c2a4fc2df +libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/cdce26125c4f37ee3c9f92cdd7598da5 +libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/9bed9f8b1fc7f94f67aa5d2496a5081ab594d3210b93e5ee1f71e32bb053e87229afd783d34c8d048afbd396451c75c82b7c7d5f60d018b7325f703687eaa07f +libLLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/4ac10ba89a464473457448f2f697abc0 +libLLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/ee80c94d8a4c89910d170a9781f72bc53e0b3e3b853157d0830b16626ba7d188d4a3c1c7b723c4c4d428676e4f8c3120928dc7b59a5f950d096d25b5d488ed31 +libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/95500f6f9eef53d670fd77a6949d43b0 +libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/e3099e8587aa36785fc48d05691236c62c7121c953f645ac5fc7d9068127c8bc7e3aa48f0a1ec8a994c3729f75ae3bf155baaa4f1c7e761860e38d7f89d29117 +libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/a900d9889fc22a19e005e550f0154709 +libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/acc1bc5338d8ded0898818fac5b3a1e0528df3902ae9e4062ce2db3a769ead7168ee152262ad98cfada19941f9c49a72fad7e356d1b7f046bf0a05db83af3f9d +libLLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/4d62b2d7e0de328a8f1d497acd9dec4c +libLLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/6c199d25f038bb619e8c7449d65dd61be4d264109acfe5e694881bd7ae7d207cc714bf3350442c27a73a0d3702a5ab386c90ac6c7147b3b0b7de862f28584e74 +libLLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/52af995cd60019b0fc607f7d89d1db73 +libLLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/98c412b6ef5d12f6a0fbf2b9a848a3e26ec98f9eaafa9c7048d52164df69716aa2ce172e546c56627d208e9aff03f1fd0b011eeed842cbc92280bda5c42e1e5c +libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/ba0a2f3e9ba09b2081062437d12c3b58 +libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/a4f5a47a876b660c1d08805ce296ae59ec65dfa89334542cbbdd696909b2be8697b104006f365ea404c2967928dd5580bd2c7d9a03f3894952742456f450415a +libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/d2c4da0530fea40e082404886e86caf7 +libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/a66ec214d80023110e281b2029d9dc8ad61a1a3be9bba96ed7d5bbfcacba76d7359c152982036d317d383a390e27a6eea969d6bd5fc50ef7b879dccac5dd320c +libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/abd5d1cd535566f61ff0138ca852b771 +libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/f247d4127798576e0a39cb2b78c359c30679b2f5ade08a39973989fbd72387a06ef35b3421c4ebde564240776a4be9b3a24f78eebc22ea192e72941558264093 +libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/abbe7e449a3a0d78ba320b0cf9b98534 +libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/8b2b50d972d76b18938856546f7fa13b243cffb348f64f0c528668c1ad6e28bb03f3af05fa5af8ca01a4cb12062719665fdce6018c6141ae7bdeef1cb876351a +libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a5d0b33472dc32278cacc0b5904aa569 +libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/501f6a43cd75f33056723781becc40fa1babab2a0e720700bcf4708782cecff20140d753141de8a2bf06fa8d97360b9e7533a3947a5eb39453fca5ba6d94fd15 +libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/b9f62938d21eef15bf58b799d06f049e +libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/6430c18e13c7f97c2b12594d6ec0afee9ffc8fdd0e1608a40df79345932b9739bfd8f7d15b494bd576784b12b4a1400c9fdaaeb350f74bf2f15a3dd66bea4d4c +libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/c87fd44a812346a6c471a7992c1898fb +libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/f00d6caafc3298ac8fd7ecff937e453c97e41167dc2e0f43abf83cf6b899380d1db70e74245ebcb1bba8022e0f86d30dfae214005dc6b02232b0bba6045ddbca +libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/260f3e0ed2bcea0122f4c104cf115661 +libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/3a853ca386e8cf578d92ec55c824e0e1b6ef8551dfbd4bd042f81e3063fc9a1bd25a3a3b182444e178e34c4a477bc4293a3b4ab1eea1915f9c063c396c548ee4 +libLLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/eedcb1470ba914c6df43d41aab2f336e +libLLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/4634c7bdcb1a7ec31d7f629da1418dbf7c2da8ef35c59daa8acde5ddfb04acf617e60368c1ddf21d7ce3684f0d091471264107a3674ac7cb8eccf05e8d7ef82f +libLLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/26854ac7b1d8b5cc516310c6f0603e28 +libLLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/2579b123cbfd7f306747ea0eb9830228b330c2443153dcee3d97388465c974cc1b67ad729a5be8519c31e90a85221c03c56dc244a202a190cc9b54b1e9b4bf09 +libLLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/844eb964e50bdcca7c7c046bc3f7be99 +libLLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/da0f995f96f060933f828a38c1d1b586ee5ec9a97f22626fb6297d1da7c9be4a79fb17b5207f51e96b0454c9684bd7c371a0f43585e135ccc28d873ca9215649 +libLLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/b3ab85c5a4d2aee0aa07d75e49d35f88 +libLLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/b1656422f172685ebd8ef090ecf4c06f7364612f4b195820d2782d5252dc965322b66ae3f0d42817685a12ba2460e66ea201bf2bf5e48199156c4f124862097f +libLLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/619ef68aad7d051b32777551b6465432 +libLLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/fdedb19322bd216d6aa4908afbc99b0789424c6b27d6be7769c9b1b80e35ae04b3da290d7a5002bf95bee725684d5c8303b3fb762807cde5b5451b5a107a6e5d +libLLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/9a62570aaafc78a52bfd0799ef27d38e +libLLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/3b629bb4611f6ec388c4ffd03f2456780f41528f6f99446f2a0adb35c1953921641d2fffed5224817dfe76a6faad832a11267e57b01469959242ab34d1b1823f +libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/fea7ed9b9d20e76d2fe31ca3e5cfcd3a +libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/5448b21d8746f15c8c496b2123963c4bab271770003bad45150e93d6dd69651b604720bfadd5fe95a9034cf5bceb41c2f85efb0bd3420bc2ff0c0e100a51f10b +libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/04700344e64312cf3d8e0cac982e8a33 +libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/f89b350716508a9278ebc64cadc6cac0f7bcf76e966facfa6e8713103554806d8d788d2a8bc8ad7f8c21d5ddb3e943fa11db9cf51aa24f92302d4f592fa5a601 +libLLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/37dd7c11c6533af26774c8d60f47b944 +libLLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/793b04f255546fc76158b21c1e8018700416341199c2681a14a3bd28f9799fe2e7bab40b05421e6bbd9bd08608af3db705e14d1fa52f213821a8a80c69d2ccdb +libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/88b02af758c3373c026f6c727431a1aa +libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/eb29edd8b35417adcbd400fa5c0327d5c03ca014e6699330d08488c4d83d10aeeb21b60acfc51f5fc05c9fe46a048edd12702790cbd731db653d06b1746e5650 +libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/c3c759d8706cc339077d2f084f36d6c7 +libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/595edb80d42b47835ae435526711ec3fae39d12fcad28e1c2abdfb3dd414f71c7ac3e1ac5ac16c25e7e1c0885c6591358ed066d9be0d701c17d155fbc0f9f701 +libLLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/5e297c6897cf1bc9e0d5627a31295473 +libLLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/3a18eb2fb891071516fec4340809eb511369f70674c96db02558ea07f3819680f4f63cf20fd57a76293ed9c18746b3c2572cbd1b1621721142e7c4526294baf8 +libLLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/a3f0facc8ffe1a806f38a7441e307be5 +libLLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/751a55ac5ecbe328097998c6a9c57198cf326bd5bbbadcdfc3abdcdbf6802b4a039df8a6a5020fea911fabff7eb113207e87d4fa1a7debef59832d5aa9e10846 +libLLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/2728fc4d132e5f6e955ca684c75dc021 +libLLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/64b28ec60e564d815f3554f363e70770cec9936264ec5c3022a422acfff836aafce0d7bd3a83819735fec203f62af43e84f8770b89784f3a8e71890d1bc900a3 +libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/82abd763588375fa58700085edf4d1b8 +libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/89de803c913967c087851197d18f2ae9d6ea10c653b3988ab77edd1a90b94073fe2477f4291f10fb9496dd5c77c952e7358f68788d487989fb164001b6522d41 +libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/6805ae4e8276b1e774decc8d755b518a +libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/002bf892daa13ce1200996035ad7159d90c5f5974989c5c20a4ebc74c0f82553a2d0198459dc4ee7f7363cc3d10e5b11bf7088bd1288af9fac0cce707de8452c llvm-12.0.0.src.tar.xz/md5/ceab21c9081e122a88d82216a80d0dc0 llvm-12.0.0.src.tar.xz/sha512/ec17153ef774a1e08085763bda7d0dfce6802fbaa17e89831695ce1b2eb015a6c2aebfaa9fe7985a83b9c51bd75d40bb4f1fc706dc16d4c0dc2b2722a1d8a24e -LLVM_assert.v12.0.0+0.aarch64-apple-darwin.tar.gz/md5/9c1db1cec729fc7f9b65a135290ba820 -LLVM_assert.v12.0.0+0.aarch64-apple-darwin.tar.gz/sha512/684f8fb95bb99fc672d9ecbac831f3d6a68e906c8f0050bdeaac522f8b3ccedf8e54dd23667de3fd0c03f241471df221cd0a965036411b523b0e4016be89e896 -LLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/md5/1e84cba3d675739d2064ace317e8852a -LLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/2bd3cac963c0b54d23b1471f26b892c95400c2adea45be4a40dace6a0a456297c44c5edc2aba7d977c6afee1b8ca41c43171b8d99e04fa223ba9df877b8ec614 -LLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/md5/16a1d1b3006b5181e3b27c01775865b2 -LLVM_assert.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/6c34f0d2d30965a1b826edf98031cbe96cb480998816d351eb2e361acd868d35c11249da0a9273469aadb7f55851e97cbfdd1f5536fc9d7310410c192a592a23 -LLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/md5/b43babd0f88939f70f24d6ba6c42d93f -LLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/sha512/5aa5c686ed1d75bfff26deed4975eee7eeace2516c93e2d2a88c86d2f88e67f894f24d777d3891dcf962281794143eaca720eaa8dd9c774da3b69346beb50a04 -LLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/md5/ad72b54cbca417fb2fcbc22885315c51 -LLVM_assert.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/sha512/f2d7ddbecc040c8ceb4fffe0240a15a8b18b697ad605fc8c29e16f8502e72e9e8281bac4634e84f95d86ea5cc3abd4fd0fc437b3ee986027bfca6b6efbf39d54 -LLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/176daaa135bdae4140cd64699500af7a -LLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/c08598773fdb8cbfeeb4e8b6802f90b0139b89e50d7434a7976c36416a2378db7873f49f81810204291c9edae72d82f3716b61df36411b0639b148fc838095fe -LLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/68c15927b4db3e2507b89e82f3332757 -LLVM_assert.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/e8598844215ed87fe6a1be05465e80100f433d649b4fabeace1de111626577a5747fc27b109de532c024cbd3f3e8261df0d4bd0eeffdc1928354f1ebf501ebcb -LLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/94cb1baaef471aaa4e07a2a0367caca9 -LLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/bb440e622e2da9f194a2804933131cdc4c084dd27567276e90a6638d6bb15d726abbb40bfbcb81d9934ae2472f1267068bf4f40043e7c928d12316eda66e4806 -LLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/1fb3a0ac1d0511ebd20f9520050a5f1e -LLVM_assert.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/5453dd469aaaee937d2a89c03fc382c52dcc1742070e6310f2394d4753fdde32bf91fc51e078d2aa00f3bf78cb73ba4e5721e008f84428e1269549af04689368 -LLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/c6c7d20f7bae0e4dd52b538bdb0ab1ce -LLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/cc1f792fa7dbb91470106d84c168c3d5e3c519079c8514039fbda8692f987ac994b1cf8d6b96995f47ab32ff55cff42bf53d278a78b21378ebea9c03f1b53d43 -LLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/c2fe748bb8e95fc1c22585109c372a37 -LLVM_assert.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/f94a13e0da4a51b4e3f3697ce88ff2ab7d41918e2d25894cb6e41622be9f3c888d6715574e8cbafc3a20bfcc2164a1c9b417c2c66bc420b445e11c5265a96f7f -LLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/ad087a60c33f5eda018ab8e2966bbfa8 -LLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d0a4d1eb39491eff08c2991f8876a4e097071b337c4a5ddc783c51a1fa109810db67c5edd2e9b6dbef7e7fadc78224ab45864bee8e9b9e35f0325e49bfdcb6b5 -LLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/0015dc719aed7ac0ce2bd16f11bcf53c -LLVM_assert.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/de224f36068bce30adb7472e40d0b3ba3e3fe739fe9ed62ddec825fa922bdd075dc081401cd55abd14a303551ff5a047cc98b2a077f367c105953c8e27764d86 -LLVM_assert.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/md5/f9ed12bd7fe3e616016b81bd3c56caa7 -LLVM_assert.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/sha512/9287a724fc4b0a0c098a71c4ff4aaf50c3ca79120e13b3ce718c206a0dab1f239137175e6e8b46559fecb373650ddd8224e04194042eb62c974ebce84ace6ebd -LLVM_assert.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/md5/04dd433225feb65b499bee9b93698265 -LLVM_assert.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/sha512/2e1d1d9f5ded294890f37dc8c2449d9d66541d242d3aea76f3f170cb319be20b3f7d5a296c0631b6a8b713627c8f952c07de9151e88e1ef4ecb9a6f622595cb6 -LLVM_assert.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/md5/2cbf070301e7ca4a54ddfbd4420f18ae -LLVM_assert.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/sha512/5a7a2212d0e99130b9f2dca5311e2ac14622976f8d129b120754df9c130047369e2bc57757e8b0bd48430c0637dd886fc85b2143e233d503cb4c92b6bf9735b5 -LLVM_assert.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/md5/ec1eefe92eb1a0ffc08c2761f6bd0ac3 -LLVM_assert.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/sha512/6e54c1eaa55aef60c8a98e3870c1e18392a862b79cb482cc92e7346918cbf886f0845c6bcb0e75dade163bdf60b86d6888dbba30eb088ff0d4cac04624abb2db -LLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/md5/9b282bc5b379138b634613dc27451588 -LLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/sha512/7969075ec1f8a367bf14cc19185bd1ac66631ddfe8faec955969600cc5e3548a82f2775271cdac71807df7f0fe38106bc6ba28b60514c9461513e9cb9e39de59 -LLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/md5/c2af10728a4cdca9223f2769a5b41572 -LLVM_assert.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/sha512/4ed5303b5bb58fc6fba82c260f368398ba7df17ec9cec8e1ce9fe5f608e19c67cecb62043cc8e20599210d6c438e2d29381ec9d3a8bcdeb11b7676022f21664e -LLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/b8d7c5bc69c532251738e123124a046f -LLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/82bff8f8afe76ab38300a9e7fcba93ee07191230c1b2a0ee5bc98c6a1c94899a3da6eafd113ce7d938c27881f2af571534586e4adcdd1ca51ecd399fe56cd484 -LLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/defb081814ccc0cd6732ae3e3cde034d -LLVM_assert.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/5dd21608cc271d9a4d065bb336301d0e797cc40ed7fdae3a4370b7ef0f93d868e784e8c79ef37ec33b057a2eb86d07720bd0d7c178c9c28f4368724a5d0783d2 -LLVM_assert.v12.0.0+0.x86_64-apple-darwin.tar.gz/md5/212f317b4d01dd033e1eaada7076bfb2 -LLVM_assert.v12.0.0+0.x86_64-apple-darwin.tar.gz/sha512/19a222b4d1a239219498d5a4d67142047e00746ff6548c7adaac40196cc1b3088e320f26fc8c12b2ad41eed37d6dc3738af61a1dcbb81ac42f28e6bba0da1d54 -LLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/md5/5afaaaba76df2d7d5a1c50d51ef45ef2 -LLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/2bf44283938600faa845b0b8b48f08d1826f80e48264fdc95ec828593afa8e592e0e697cd5b9e4ef959200a776ef3f85cf9c35e98fc908f526e082d4c4b4b340 -LLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/md5/aa41affb6459858a9beabf583842134b -LLVM_assert.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/3b35ed3bad9c7e88c3d937548bf9af24b270c1faf4aae9ecaaaef8000b02ef17f90d425f7506a9716c1aaf3c7247472d2098ab7ecbdb4010f478602a2ba9c5ff -LLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/md5/0429e7474dc3d250b0fc8772beed5b5e -LLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/sha512/13c180d03d337e911769793bd4624b75be846fb67d71aa0f0ff837c232e14d5d016aaa2fa2b986676297f3bbcc2599f104ebf4877e7110f92888e5c4d95f9ee9 -LLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/md5/e4403471e47034e849cc66610724cd50 -LLVM_assert.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/sha512/957df75539a723b680173d823bf96e542dc4cffb4b05b64783a9d60f0f0bafc1b0d1113fb9c4ae25ffe7e36c4764804a2f98fd9cc2468e2af3f1fa0e77929788 -LLVM_assert.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/md5/070bd8e25a76b980564f9160bdaa66f3 -LLVM_assert.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/sha512/c7c03229c34dbb715e2c59ce3c9d404f5b6a337506952bbee594c2109a0824c4962575f8ae9801a89a30d5569a85f05e4c1c4fd231ecdfe36d3ca7488799d3c5 -LLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/1b7726c382c08e3e24fc1ec35b8c015c -LLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/029c084d83ee049f45b1026757d631751cd2edc6c7e10deeec398baab792e8cce366fad5c971a120154ed2b6cd28b6659090dee7402e8f904bf43371b4170048 -LLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/2c6d5945a5ee5b4d216acc6fdf22b54a -LLVM_assert.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/f086e0c58eff5560c23bb9444270005407e66afeb969b4e5bfb1eb041a3479939ada7014c696e1dc50b0aa2717928887d434941d5266bf16264375dd3acfb67d -LLVM.v12.0.0+0.aarch64-apple-darwin.tar.gz/md5/8837684991656303d1ccd1da16cef6ab -LLVM.v12.0.0+0.aarch64-apple-darwin.tar.gz/sha512/de2a74fc6c305a8353168ab7e5849706e29fd4b66936bf4a8b6b9cf9dbaa2b7c30a30c118cf59f1421eaa399e7b5a7efa52ccb9ee4c2ce55c7afb9ceb2050a23 -LLVM.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/md5/4597b32ca87cbab6ca3de44ad0ff33d9 -LLVM.v12.0.0+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/648233efb5037da8928e6d584ce7c0176fd41fd3ab66ffc36bc15fa0829bf4b19d554fdbfe7ad6d1fce28be5d66ee3e650871f4ca0973afeebb19ca4aa0cc596 -LLVM.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/md5/fa65be0be8c747801bf518e036d6b87e -LLVM.v12.0.0+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/cb9d926450b9e2d805ed3cde63db738eb4bfa2073382f52acdece2ca46019da0205b305db10af8feb96832016b0d10ad766e37b7f986541ef07b3877526a745c -LLVM.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/md5/d8ada1b149428e1b363a3776208778c0 -LLVM.v12.0.0+0.aarch64-linux-musl-cxx03.tar.gz/sha512/5cbb49cfa03aef5f455a282dd76a7943d0a791bc3e2818d0e8bdebe3b072202a35d1a37119bf2fbb8082f18af99c1aa935b1f07b7a8a6ec3d0fdf05d7d7d0f1d -LLVM.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/md5/f7af27355d90e71ed8d3b643ea058801 -LLVM.v12.0.0+0.aarch64-linux-musl-cxx11.tar.gz/sha512/27043b1229ae05e4502eff589a04469ede3f4b701aa62d33f69c9cb57ec5c84ecd1c1a312a3853b27a6f32281c41b62098b623a6a592671a7f53947eac7d955f -LLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/0f19ff6eb5d6874f386a55dd903a3808 -LLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/fc57dc902c574701555a86b404fa07ba676252b405cfc130fe253adc7bba7518ebeb6e984846f1a75fc192292fb5f546c3269960419351991aef74adfe6ce30b -LLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/bb054c404683edecdcaa8b4e6c5d1969 -LLVM.v12.0.0+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/10de5dbad00bd92e47c6a77d249e45ceae2cb790893c6472e91a8ce9d8f3f03f736f598d9930bf6bb53411f490f971559b281ef38b0cc953ff3aab766ff20cbc -LLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/81c6b866133c044922149e8da3330234 -LLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/b56ba063e89320a72e4db45e1ea31ea5f2238d3f317f3c8ea042a36b312f9c4a02eeb9da722cf34aac0e7d703c66d996b0f2c0c8b0e61b38e1e10d7c6a872270 -LLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/0cf3669c60ccb6304566a612ec84dd96 -LLVM.v12.0.0+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/a9b91abbcb1130e3bf83ffffa7c74e74a663f12fd79c1429f804af5d2a6dc71863bd387a080153fb241488baf9d0c9a3c317c92c7c95553fafb6714463b65e4e -LLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/971bdc3c1e5f200d6d5e0791de47fc8c -LLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/71d50e5852892a8777076022dbe615c49363bd2321975a0fe93202a93518a9064c805966eb2b09783fb2679b589059e8673072fccbcf2110584b25e4174db365 -LLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/2352473188a90f6b1df3613ff9f162ee -LLVM.v12.0.0+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/6f0e5a8eaf0d7976d31648370423caf9518f44182cd45fe7732d918d4cb2fcf302a5e1deb0856beed3064230e41581441a2ca339db7412a636c930e20bc8fefd -LLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/6e9d5b4cda3fc8faf5d3b82d384e69c5 -LLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/ea0ebee79f685ea25d2be85656ae21cf18dac72874342ff960b6fbdc89c60383a2d6af8f36d14621cbc9bd534cbeb0f8a58c791c724e5469aa48d50606c2c08c -LLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/4ab6e621226d158701368af6af0b8c1b -LLVM.v12.0.0+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/3ead9d5227bfae81251d5327c98e28a4f888206176835626e24603fa2638354f4bd0f9880fdd14919091c756a9ee5d0901d76af8555b67094cdf7b6094fb2afa -LLVM.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/md5/799676b765c76572ec4217fea32a569f -LLVM.v12.0.0+0.i686-linux-gnu-cxx03.tar.gz/sha512/6a712ae86de5bacacbf805f9f53e7274a9f25c8b0dec28cbad756e6ac3e190ff1e6576a1d132659208f114cd36703bff0f049180b5e1ae7a49e05175db1689a4 -LLVM.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/md5/a14269eaee410d35904760ee26029a13 -LLVM.v12.0.0+0.i686-linux-gnu-cxx11.tar.gz/sha512/bc5208ed6d365da10e7c9f9b4a771cab0ec7f2d340e8c35184e80ab093b7b79fc8e2735e6baf7fde6e7f4910d0fa893012c3635291528a0575ccfeae5a2baece -LLVM.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/md5/8c01b166aeddb75916a24b5bc4a5288d -LLVM.v12.0.0+0.i686-linux-musl-cxx03.tar.gz/sha512/51b6436452cc3dafdd0bdd03852a3ba131740b8bc701abd50d5123d08ff04b8be03051192fff26ccc4c446a3d1b08981fb66619c080d9450e52071dde62fa31a -LLVM.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/md5/b95bf3b5d2a0db37ff16fa6dceb4c55f -LLVM.v12.0.0+0.i686-linux-musl-cxx11.tar.gz/sha512/9fe5a3c4fc758c25eae7fa8886607e8cd926f6d15d65fa1dd2f745a38d885eaf248c2c199cee73bfd25bd98e65392dfde2004a9c63c061aa2c7d8a465b469b0c -LLVM.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/md5/f714f857ac90c159a390d6f5d761e067 -LLVM.v12.0.0+0.i686-w64-mingw32-cxx03.tar.gz/sha512/4befbb7f17f717669eb670cb18b9e60026c84722e0b8d7b4cc91e27c8c05b27d7b04b50b2ef20ffaf30cfb785f951836d08ec824f6b8fa95ff6b30d21c252212 -LLVM.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/md5/9648a00d069ed91628d0214366df6477 -LLVM.v12.0.0+0.i686-w64-mingw32-cxx11.tar.gz/sha512/a5fa4c4015e1ad450767f694cf0ce701aff5c3a20916745f60ad788f933029418b8303dccfe818be482862fb59bc889d8c4c0ffa3f8104a1f957a8f5578bb442 -LLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/1b05656cd5ea85d90c0ff7e0f3d2bb09 -LLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/070628a05d0beb3efb12831725db2da0b55910180290842b63373a39a73e305a6c87b91615ef7f31dd771813e32d6d93b6260a2200ed62ca14c04bf713d775c3 -LLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/0c41e6d77cea62b37d2b04cea3e3e865 -LLVM.v12.0.0+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/ec6c2a9e4de3921a2237ae0deefeef084713a0e8afdac63bc82a6ec4954ded1935696ada3e452d8c3929320d33a7ee6a861f3ad969e740e313639f72eaa33678 -LLVM.v12.0.0+0.x86_64-apple-darwin.tar.gz/md5/d716a03e7300f2c8b6cfd157baf82841 -LLVM.v12.0.0+0.x86_64-apple-darwin.tar.gz/sha512/be4bc5164d80db972cd4c0ce7e4325ad058243cc27850ca288635d191c0ac3b3428217623a01a312cfe4700a2af014eca03e06f4a345f52b5308185a38a2de65 -LLVM.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/md5/c4ef15b188097912a8893395e079d6fa -LLVM.v12.0.0+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/2f06bfddbb907de527517b4a455bb7398b36a7bf9f72fcad778f2586425cbe90be9b3eb9d1cc03ff6b7e5fa6d04a0a06988aa9d2003e748163a7e7460102ced7 -LLVM.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/md5/3ec8ed370b0995c3fb3062768d9211c1 -LLVM.v12.0.0+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/6e2414c5c4cc2696c951b928253bbed88b576d207772c2f14e483aa4f84fe16d0b8731c955ba7680596d29b5339f4ef90d1a2f8edac1a196b22923af09f6cbd1 -LLVM.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/md5/a186e057c1141e7efe465be3c07a167a -LLVM.v12.0.0+0.x86_64-linux-musl-cxx03.tar.gz/sha512/5e88b8a5a79889a7d402af9c49a1b7743dafc3572161b3137060066c5de18d48f7e6f6abc837ec1e794e22bb6dee3dd1663526c31b852be48c2c3f9d0ab85505 -LLVM.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/md5/ae4a90d5826c5b3db4085c90f91a42f5 -LLVM.v12.0.0+0.x86_64-linux-musl-cxx11.tar.gz/sha512/5bf3edbd72f86401d0f63803dbb0ef0ba9a835bd8cb9cece09e54807c0966d75b0ba68b6a0b337e40f8f754c04e0b6e95565baa4320a47a2b7f9d69c1e45de61 -LLVM.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/md5/1f3679db43d3b4b2fd2b2a4a8f92ddce -LLVM.v12.0.0+0.x86_64-unknown-freebsd.tar.gz/sha512/5ae1316d5327177975fcb7d4342760b66ba6bf7f38b90cdc04f77a00cb5d924b2dd041c1f354b9855001fae01b8cb301b486ee16db7daf4d0c41fcdf3e78fe39 -LLVM.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/441c0fc39bd0db777bf1c4a05a00d7eb -LLVM.v12.0.0+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/7cd2556e0a7d6a9ee93cc23ee5e755d7f777edad22b838867d25c00c742e4591dcad40496388a149b54df25aa5697aa025d49a061614ea6d20c67f29ac66a484 -LLVM.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/62f73d2ba5ccae272f6d85c6477d78e9 -LLVM.v12.0.0+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/a0f47a38994632c36502ec2f1b1d32f3f3c487062c7d47c38318ec6e85eb802a0e9d331b9743611eac86ef6d90c02960a6604f892aa295a88688905af6907b34 +LLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/a6ac9c9c1831bf01edf1bcb526e7c62d +LLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/4473ba37065329cf91192c0496136f161030da03a9a7e72106f41403e5b49debe7f0c203839f7deac7ca0b61b3d136404bf442b4f044f10e636a994e34994a40 +LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/0ccdf2fadf185c90e1938d946a6542e3 +LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/d35e314b2928ce16b0369c1b7b38682d42d1443e0ca72f77e1b32d2231af5dc5a66eaee1881832ade8777566a0447319805e8fc1f2b702b19097240ac36da1fb +LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/3acde3cd87feb3984f45f0ef323002e1 +LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/be8d40794a5eee7ea775e33c8173deb3a775e5eaebfdc20341ad66a6d12d48692e0838e872245c74a8bea46ca085f8f3e7995f6ba33df2444fdf79d251ee272b +LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/760edd92d241365409c59ca9ba46ce6c +LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/45b52ec2f516a7098f89f6ca6027d677329780ce61886821478d6889b1b1624d7f43e6f23daa2037c4fdbb25a71f97ef5a1ad9e0574760f0f304a2eb01cf6793 +LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/907174cef57551c44825034487417b31 +LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/5abac8be17a83108ce3bf0c6d48342cc5db506049623c35859045758a3c31829bf388fc9c6ecc2ad1438e464930d9e1870cadc895eb7dbc72bdafd04666f60d7 +LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/f90b16fffb796299a4e061d302a9855d +LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/cc3f019f88f167ee45638e3bf23f04ec8e4b021000e53342189bd75a2145f99523aa501e60457fc5cbbf5d35e1f8fd17a97fa9b18ebed5a04c2366333094e440 +LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/3aa7211a765fe31a56d48151b7ec820d +LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/1e4e6a1a91ff1093b6441b43e50dd2cffa14d8cacecb6d812fde94164961e44569c17d74c65feccd613dee14311478bda112088d245e89bb307a3453e4d4d378 +LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/0155f81732916dcad2aa40b14d9db752 +LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/7521fb007a0d589c9e70f7434afdc9e12867b6f82e6b7bc4c1f59fa337149648d6ea0367ae9dc7bb88840f6db05734d921f8da86633776a48529a0d6838feeee +LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/90095ad6a9506c7e83b195becc9f9cf4 +LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/15d34c652513a25d967d2721b4ab196f570fa80e02f17a905240ae838aafeb4fc88c99810c26558babf35ef2b478b067126d76f1e4c9366a143b139640a14939 +LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/0384e43e079b05f8cc2bbc23012794be +LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/c599404cfc5b78342ce8f4790b6f9b1d7e7cc0e26e674040d1538d676e11c1c95734bfec7a7869a5eeef20641ac3c4b510bc40f2c6a1ef40dfd196d975c0d596 +LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/7d1c3fd8fe1458ad5e8996dd282087e8 +LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/c5b378c395be0339639baf8f10918ca2c6eed59a8fa8a34601e26c2433c6b543e92f71b73ceda254fa41f5b73796062758df26fe46335882c70c31c97ec128b5 +LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/6b42ab461336ea90274db8d059b7eec6 +LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/3cb43d785825705567cb2b557a19486c75810d223e8ae828bfa9502de38f4bf76a3913634402529bda9f4a7525cc04fc33ab2a152c5dabb5adbbfd2497ade3fd +LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/8fa56521559c7bc15c52e3282b75e377 +LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/9632ff9a34cb92527eda6b3904f3444dfc79577a30d047062d1a1320fb0b91fa8bd2ff061ef075b2a7340db330800e9ca14f26090ede82707e92f6bb449be3ad +LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/b93efe32fa26b868a37b698d27aff94b +LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/fc3d05bea5f40ae893585314f6f7fbf92eebd58676489760c8dc3e5a7bba1963fc251a87d685c3fa1922f9d5e63cb59645b2126b3746258bc01acaeeb425796a +LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/01cb79e3c4d4d198f53fe0f79223ad03 +LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/8620f2339e270c3cb5f455cc95acaa11bd9539475e64786c1869cd8582442812e732b903cda89a06bca8abf2aad3ff111f320fdd54e52d96ece6d57b35da3678 +LLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/84948b34ac2d1a3d3e5011df423070a9 +LLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/df02613ed334d9d1d59daeb99e346e824e2cb0a35f092be5521e520ef0255c90a1d80b3b65db05162be2ae9707b7655da048f958b3dbcb7b57302a4105a57ada +LLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/d2e047b04a3a7aa8006b310f105f6503 +LLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/3f574b15d3341e2897986a1cab9a883582c1eff594b4d952550ac4753b2ee795f8f2c6947cfd8dc1ee2dd2a5ed4414a11675dd86f53088274aa6d5c71111dd32 +LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/1bc857bdf2d143fdf808a956ca528f05 +LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/0c2357fa990b20f247487a22a2d73289b7288a23269d7212c4066dd86ba02a18eff59be86e77b6cd50cd20ef05cc50bba8ed7fb7cddcae7c61603ff556e01fd0 +LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/baed06cea973e29804f05ed77c6974fa +LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/b119901a524211cab7fd5eff962722fe5768975775267134094990a682d68779dafc9a9fba0b011e6927fca65e2cd52bee3e80fc505eb9571f32ccf41dbc1bb4 +LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/be94db30f358856a1e246be7355be7cf +LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/de63c33dec3440626315457a93a860230cce3c8cb0bd967459ffc12af9bd0684fdf3c81edf7440ce2dcd02367dd3e5679238c588ca52daa870308bb6b3e56fce +LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/df5844b2dd49fe0eb4eac58fb22b7f8d +LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/ef4a99aa6957d11aaa8a94027f6a7c2b7800f9b8f3fd8f7a7e9762383ac0064245e695c7040d9189a47ad7f95b1a0760fa6b655aa0f44e95d7ba684b9ccf174e +LLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/bdb347aa9b67ce6d24aba48d34299f0b +LLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/527164a4db3e146f72eee0f2972209cf9eb705c3d614f0e505e0b503ef2a0e7986eeacdbf3e1197631454c90bfdc6f55dfc80c85a1537c3791ea0360610ffe19 +LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/a900923c8800c1860d5c98f9172b4c75 +LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/04732d78b628b8fb06b2368d1ed48d21a3aefd5def2566f7fa17ab279b99e9fb0c0cb7f1d65933cbc6ff473c4e566034066666838644f9792eaa1d4ed0a8122e +LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/7669055a5e43049fc14282d9a37bd39d +LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/71a8daba8baae164a6af16353d49a3f5bcb4b41714813659d8d488d7c8d26ffd8fbec92c6b53b98f05a4234224df81eebe7006e0ec5567518d7b42fa285be1a3 +LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/1c38ee7ccb6dcbe22698f2eb08ffa627 +LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/dcd059ac9121f59507391657baf4c8eaaea7f531adc0ca02ea688d09643ada9e10a74e6441755014914f3f1764b90f99299ed4a3af5b234ec64cb5ed84934cb0 +LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/a98e8304dd300af4b14211fd5f5c8a68 +LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/2a4a567d681a42cb6b05059dd68646f85841ba431eecfa36d0b8d0d0a9290d3aa9a628317050711e6c3a599e48b77d1988cfa9e4429b07e9f371741aa8d6f841 +LLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/9c92e5737faf62609844983f1603f75f +LLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/dfe1f1836d74693f4061a07d834f622c6c9142ce8c949c07a5ca9a0976feecc67a483edcb1ff4dfab04fd54f063c0890655e855f55734d81fa3d595fcfc23109 +LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/578f4ab4fd290342f3290e5b182af9c4 +LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/f8d23c8b994f8e503d041322dbd68b0d5682d8939480afab620ee861799000ba91571f59832f148dcd97cb0ab2bac9691eaa83107b98b8dbdf99569bc1b77432 +LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/818b94c89b0af9f9e1dbfc98db278d03 +LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/672853d70cd25b13249479c1c831ba121e164a1aefbf46d6b9647501bf746b0925538bf126c552317482b9729fc9653800246ff25206775f5f5c6fb4196bffe9 +LLVM_full_assert.v9.0.1-1.x86_64-linux-gnu-cxx11.tar.gz/md5/1faea42ae449b43c9f3119ccc0c1b375 +LLVM_full_assert.v9.0.1-1.x86_64-linux-gnu-cxx11.tar.gz/sha512/c99baba5a831405d4ad4d8636eefbc260fcffcb8026fa1537cf63dc79d71dea7e57b52acf6815cbbc0aec8ae8c9aadfb1349791b0b31cfa8418529faa494195e +LLVM_full.v10.0.1-0.i686-linux-gnu-cxx03.tar.gz/md5/68d90f435664d4fef450eff70539dca9 +LLVM_full.v10.0.1-0.i686-linux-gnu-cxx03.tar.gz/sha512/65b07bc5f6145b063d7bc8d35fd22a2d578cd972c74b08ec827b9980e4ceb1fd77ce5ba921cd0d907643594fe73d67a7b56c699d3e64f9ac6b2b6953972a4179 +LLVM_full.v10.0.1-0.i686-linux-gnu-cxx11.tar.gz/md5/2128286984b014f41e1449e884a8f7c4 +LLVM_full.v10.0.1-0.i686-linux-gnu-cxx11.tar.gz/sha512/d8e99a78e29a7eec99bf5924c8f095b82fd7b020c19f8f41401eec514e468c48e489fd047401d751c8273f264fafd13964d1dd160d2be1e19d50f48133a7da9b +LLVM_full.v10.0.1-0.x86_64-linux-gnu-cxx11.tar.gz/md5/7718b789700c0f6f5329efabf6b0bfd0 +LLVM_full.v10.0.1-0.x86_64-linux-gnu-cxx11.tar.gz/sha512/94d6a951e5f6d6b9a2399a80b9cae5a52d37145956e4752f0bf2fb9b8b9e43e16987ed3833126efacef32831a200925f040fc2eeaf7b1f83817ed17954a993c2 +LLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/e438402bcff0a77f20510badbb1f3c0f +LLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/14cafe77b353fbede64c736052032db77ced2757bb53696925899b79037a3b5a72d75f1ad8972a191e216a25a83f26517b0291fd246e0aad7a1ca040bdc7011d +LLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/8ff58f44d6f27d3dfb2b3670533a472c +LLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/b9738d4b4f00c08cc06b3f1d73bdcaec96e578e02de08f14e2e084eabba934c24f9c4e65758e102515e3c9a1527612c468d8b178f2e87ca667f2e7a62343b1f2 +LLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/f4994c8abfd4fe71004b499bd95140bc +LLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/fa01e3d6f154b695e9230c13365098af60ca5f6077d63e3cbc6c410a89615eb7634413532db4f93661289c590f4576c18488cae20ec5dfabe1c273cd97c18f7e +LLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/52066c3a492d69cc0da23f0861f1f6a9 +LLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/db60079a09654f00a452c70862d1453c2ca8bf9b5ef055b66e99edfcc35a52a94245e21b0cd6acd88f556dd99c492b6f057dd48e3047286af0ed612493e895c7 +LLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/b02a6d93f190aff2de4f03a1cd121a30 +LLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/3c0c9a3753b8e709361f1faceb02b3d19cc8e0c7a183601be528283c8871c92a234c3805206c37e1ec04577a53f57282b4874e4175e2ffb83b4b1ead744b9c0b +LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/88858237d7941887f27af62b7e249a62 +LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/342d4bd418547f3b6543182a5593e21fd4af84eaab0b91ae04723e485b48accb2a119c7c89d766fcee2fa13af9ec3454da310d452e1262aa0e97fab9aa498422 +LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/1cdef3420fc7fba9e74765c839742350 +LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/d7af8ec5abdc1ff75efa3f4f0546efa7d2328893b11533cde68a515a0d117272efa5e8bb1e821996ad12214668644bdf7a9a3f5e7578b24a174b5b04bc0cf1db +LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/3ee4b9db085916dc73aa4131ff6a73a5 +LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/b456e096bbe2964f678f09edcfd49e0e8b4922984cfb1fc47358868eb099b82655ba8d5209ac31452af511d7c773de2a2f56a24ad0b36841d9f557ddb2c09a88 +LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/bcfe6505477413c52c3193dd8d0c22fc +LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/50a2af7655acaa0e13f15cfcf490b334e104cdc847ddd5900fae04b322ecdecc69d85bd3b15b6170f584fe364dedea140e1fbd9a8835499067da59f4b665f849 +LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/c11d635651c82dbd5f0038f24afdcb03 +LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/da3676b598851f07a875fb3282f2a1c078d0f447213049dac6e33bb07b5334d332df6f26b1e0e851f85bba20a72e65e158f848c67563be9a6e23c9d06b1a7f19 +LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/a299db2b5337c8b79bb0f37a39929c13 +LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/46c7f0737dd3f46cbd30173d39c268a4606b169d80b146070fd2c61f32eb31b1cc8ef509bd1bc7f0c197a4b7b4a6e3d45a320b4a11a27d6a0233bbc1d79dd90b +LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/3f8c17f38d47008ef26457ca29cd626e +LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/265dad34a231c55b07f9fcc059dde0ef72c156374d7334372f0ee486f9c1ebe95e8ec187cc4b07623dc94b8f8def7d3235fba0ee11a1b8419d9b7a7182a91d5e +LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/5e49fc12546f4b1deaefa249f7e1f77f +LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/85940dac65199307fe6a571b7f369b02430c4ac980c7fe35c1ca4dae6d29a1e5ceaa72151ecc4d8fd29116b82e1d1d4b9054fc0fdc1de31becbdef1365164ecc +LLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/74c5e7b4e2bb44879f8a907d54c57398 +LLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/41124a32c83e19e0fbd0f0c870bdda7d9a8f59ae51ec1017eba203e01e7fbc33b43334e12154ab0be57892f5bf85faf0c76c375da77e7c9097caf54b45a0d19b +LLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/6ff76e552a78453ac1e149a85179d7e8 +LLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/8623d31b9bcc59ef3565db310e323e8b165c9c35a0ce170f5f5e2d58ff218974d2ad35ce1781a9558556a33247bcba2bcb1e1171254838fdc3780e9408df7525 +LLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/8e097ffb90dfb3786ae1d9074314632c +LLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/96291e3c1620a358594be1dfd99354dcae76b9c7536ffb93bac93bf6523f323dc44d55b1faec85a763f1579f9ce0f1ae220f2943100d2f286dcb4cbd043ec088 +LLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/bc19a91fcca8d8aad83f5b38c8db2a0c +LLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/ce5914eaa76e9eb21a218755211d613c4261ae284773222e40b383c20c5e7c6ef00be2836750cb1e85d2b1f6e65869e016d49f365d554ce845486fdd352c1b7c +LLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/67f319faa58c136910cc6497eb73b234 +LLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/e5697c29f54bae9d9e551084ca702aafb09ff11f6de60aa723d90cad9675d18846c1cf2fc093ec1eb54c5db7f2328aa05555bf453f798cc3e96f79f2afebb283 +LLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/e5d38ab0e686a0cc9452c1f1c81c21a7 +LLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/9cdfd778255faed49a53fcbc691a3a1c234b0649b13ba8499a90a61ffe7ee864ace982fd33e6e736f4466fc11d5a2c0b735bd68f7e5ac4eca5892ee76a5f0bd6 +LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/c300da4c0c1a26115756d5b34583b0c2 +LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/1ef72ad1007363f25a410733efd5ce8c69d47718bd3df8d3e00e8cf22fd8ec3dbc4a19d4211a72877f90767a9b5d46318d5c059642de21a32072dd8099225add +LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/32863e5fc4dbc7003326474e3b057412 +LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/2f3b726d787a6bb7cf92e7e4e91a9f72eac0da7fbf61b5cb94a49de812ec07b05b2cdb37800fce556071b410328dd7db1ed375961684e141fc54bc632ff10df8 +LLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/0bd322858942def11a7a331211782917 +LLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/a33160fdee69ca06bcc1fc6843d19f306dacbf88037108c9fe5a0c57e2e4176c9ec108bd286486029312617a86da4791e123e89407a2ae71cae6f1726f44e9b3 +LLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/3efdba4e35e0c76b3d60bf8ad03fc321 +LLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/0018caf8c878b482a7621d950687018586b5c0aaaa08a68d26855b40bc9b2ba60600e83d6bfd729b69d25eee3f0e4126afab9f7f523b41d5532400f6289508f8 +LLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/4ed4c4245ead0905cece3c5ac4c48886 +LLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/609fba22a5d438d039f77fbb8c726766e71da9c768df83033d9b7cc8f178d2b25175427a5adfa6a004d61b610e4303f2a301e4ff5af51cf90296b883bd33c824 +LLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/d78fe12460c99fc47f9139325c19d377 +LLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/698fd57da10afef2c5c43915292a4e9778bb9a005694391273cd2c2184aa792f914bf3f9e37bc31bb541054ddbe75122d01d34a4ac688a8b87ea22c795369fd6 +LLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/49855ae6aaa48f3b6d55cf6a8c354449 +LLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/06bec6da4dba5956b35571dec54f81ccbd55a0e88aafa4d2d4477f50ca8f4c875853ce25db5fee236a2cd8be9f4b98528d051690db61efafb51c964e1953f159 +LLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/f2362ea7f927839c1a12724e11c721da +LLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/e42248a84d8bc52d3cb23cb8c5b5d51560480333ff367d95ba5390e956bc78b8a48d5d7f70809aaa9288997db4b99a13e0e99f484f97713da9b167666c2fa284 +LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/4115b1aed76cfab64e6327593be41e2e +LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/0c184e7e788dd5b9e76a10a6a0ca367eb0df76608d1d773abeec4583fcc8c59014eaf09ff9af67815c935a29816e055f9c4cf8d9c1ab5c98840bb24515f6ec22 +LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/2e663337eecbd7745e9decd60030f12d +LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/198c8340de6ea5f01347d1465e0059ac6f83e23ab603c5789ed12a5a85eb738544cd490cf42a7799b44203fa19d55034c65b5a3f8e85eb2eade188d2bd32d43b diff --git a/deps/llvm.mk b/deps/llvm.mk index c436a1a08a78c..b6f6455f88255 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -512,6 +512,8 @@ $(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 endif # LLVM_VER 12.0 # Add a JL prefix to the version map. DO NOT REMOVE diff --git a/deps/patches/llvm-12-fde-symbols-aarch64.patch b/deps/patches/llvm-12-fde-symbols-aarch64.patch new file mode 100644 index 0000000000000..c62e65765ae21 --- /dev/null +++ b/deps/patches/llvm-12-fde-symbols-aarch64.patch @@ -0,0 +1,158 @@ +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 new file mode 100644 index 0000000000000..aff55f35e7bd8 --- /dev/null +++ b/deps/patches/llvm-12-force-eh_frame-aarch64.patch @@ -0,0 +1,31 @@ +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/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml index 5db781e86a88c..1321496e0695f 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.0+0" +version = "12.0.0+1" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From bf84b5e749763e7d495cceb35aa1a542ba225dde Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 1 Jul 2021 03:51:12 -0400 Subject: [PATCH 056/146] fix #41416, splatted default argument lost with keyword argument (#41427) (cherry picked from commit ebc8f3c61701f271f5fac33e3dac56eed786679c) --- src/ast.scm | 6 +++++- src/julia-syntax.scm | 17 ++++++++--------- test/keywordargs.jl | 7 +++++++ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/ast.scm b/src/ast.scm index 005afb4647f5f..bc8d847279fc9 100644 --- a/src/ast.scm +++ b/src/ast.scm @@ -319,7 +319,7 @@ (bad-formal-argument v)) (else (case (car v) - ((... kw) + ((...) (arg-name (cadr v)) ;; to check for errors (decl-var (cadr v))) ((|::|) @@ -330,6 +330,8 @@ (if (nospecialize-meta? v #t) (arg-name (caddr v)) (bad-formal-argument v))) + ((kw) + (arg-name (cadr v))) (else (bad-formal-argument v)))))) (define (arg-type v) @@ -349,6 +351,8 @@ (if (nospecialize-meta? v #t) (arg-type (caddr v)) (bad-formal-argument v))) + ((kw) + (arg-type (cadr v))) (else (bad-formal-argument v)))))) ;; convert a lambda list into a list of just symbols diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index d80c6a5052c85..420eeaf51f747 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -442,9 +442,12 @@ ;; 1-element list of vararg argument, or empty if none (vararg (let* ((l (if (null? pargl) '() (last pargl))) ;; handle vararg with default value - (l (if (kwarg? l) (cadr l) l))) - (if (or (vararg? l) (varargexpr? l)) + (l- (if (kwarg? l) (cadr l) l))) + (if (or (vararg? l-) (varargexpr? l-)) (list l) '()))) + ;; expression to forward varargs to another call + (splatted-vararg (if (null? vararg) '() + (list `(... ,(arg-name (car vararg)))))) ;; positional args with vararg (pargl-all pargl) ;; positional args without vararg @@ -520,8 +523,7 @@ ,@(if ordered-defaults keynames vals) ,@(if (null? restkw) '() `((call (top pairs) (call (core NamedTuple))))) ,@(map arg-name pargl) - ,@(if (null? vararg) '() - (list `(... ,(arg-name (car vararg))))))))) + ,@splatted-vararg)))) (if ordered-defaults (scopenest keynames vals ret) ret)))) @@ -579,16 +581,13 @@ ,@(if (null? restkw) `((if (call (top isempty) ,rkw) (null) - (call (top kwerr) ,kw ,@(map arg-name pargl) - ,@(if (null? vararg) '() - (list `(... ,(arg-name (car vararg)))))))) + (call (top kwerr) ,kw ,@(map arg-name pargl) ,@splatted-vararg))) '()) (return (call ,mangled ;; finally, call the core function ,@keynames ,@(if (null? restkw) '() (list rkw)) ,@(map arg-name pargl) - ,@(if (null? vararg) '() - (list `(... ,(arg-name (car vararg))))))))))) + ,@splatted-vararg)))))) ;; return primary function ,(if (not (symbol? name)) '(null) name))))) diff --git a/test/keywordargs.jl b/test/keywordargs.jl index 348eaea2ee4c3..9cbae2b1a0b19 100644 --- a/test/keywordargs.jl +++ b/test/keywordargs.jl @@ -380,3 +380,10 @@ f40964(xs::Int...=1; k = 2) = (xs, k) @test f40964() === ((1,), 2) @test f40964(7, 8) === ((7,8), 2) @test f40964(7, 8, k=0) === ((7,8), 0) +# issue #41416 +@test f40964(; k = 1) === ((1,), 1) +f41416(a...="a"; b=true) = (b, a) +@test f41416() === (true, ("a",)) +@test f41416(;b=false) === (false, ("a",)) +@test f41416(33) === (true, (33,)) +@test f41416(3; b=false) === (false, (3,)) From a81b4f8a7b31226f0425192de0b3a35e88c7318d Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Thu, 1 Jul 2021 10:08:27 +0200 Subject: [PATCH 057/146] make "Add information to passing tests" a bit more backwards compatible (#41424) (cherry picked from commit d09c8e09ac2b8e14e4b9300bf632ee8d7c229209) --- stdlib/Test/src/Test.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index 260f6e33bac7d..461c48026944e 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -86,7 +86,7 @@ struct Pass <: Result data value source::Union{Nothing,LineNumberNode} - function Pass(test_type::Symbol, orig_expr, data, thrown, source) + function Pass(test_type::Symbol, orig_expr, data, thrown, source=nothing) return new(test_type, orig_expr, data, thrown isa String ? "String" : thrown, source) end end From ad9476f9d2835effb37ddb3871734f3735289b9a Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Sun, 4 Jul 2021 08:45:34 -0400 Subject: [PATCH 058/146] codegen: complete handling for partial-layout objects (#41438) Fixes #41425 (cherry picked from commit 7ffc10bf4ee13d0d0669a6a2315907a2361c38df) --- src/ccall.cpp | 2 +- src/cgutils.cpp | 20 +++++++------------- src/codegen.cpp | 22 ++++++++++----------- src/datatype.c | 41 +++++++++++++++++++++++++--------------- src/jltypes.c | 28 +++++++++++++-------------- src/julia_internal.h | 3 ++- test/compiler/codegen.jl | 13 +++++++++++++ 7 files changed, 74 insertions(+), 55 deletions(-) diff --git a/src/ccall.cpp b/src/ccall.cpp index 15f51cf9d6897..c7853ccc2a8d8 100644 --- a/src/ccall.cpp +++ b/src/ccall.cpp @@ -493,7 +493,7 @@ static Value *julia_to_native( assert(!byRef); // don't expect any ABI to pass pointers by pointer return boxed(ctx, jvinfo); } - assert(jl_is_datatype(jlto) && julia_struct_has_layout((jl_datatype_t*)jlto)); + assert(jl_is_datatype(jlto) && jl_struct_try_layout((jl_datatype_t*)jlto)); typeassert_input(ctx, jvinfo, jlto, jlto_env, argn); if (!byRef) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index c5e25466110d0..5f4ef560c83ce 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -321,7 +321,7 @@ static size_t dereferenceable_size(jl_value_t *jt) // Array has at least this much data return sizeof(jl_array_t); } - else if (jl_is_datatype(jt) && ((jl_datatype_t*)jt)->layout) { + else if (jl_is_datatype(jt) && jl_struct_try_layout((jl_datatype_t*)jt)) { return jl_datatype_size(jt); } return 0; @@ -339,7 +339,7 @@ static unsigned julia_alignment(jl_value_t *jt) // and this is the guarantee we have for the GC bits return 16; } - assert(jl_is_datatype(jt) && ((jl_datatype_t*)jt)->layout); + assert(jl_is_datatype(jt) && jl_struct_try_layout((jl_datatype_t*)jt)); unsigned alignment = jl_datatype_align(jt); if (alignment > JL_HEAP_ALIGNMENT) return JL_HEAP_ALIGNMENT; @@ -555,16 +555,10 @@ static Type *bitstype_to_llvm(jl_value_t *bt, bool llvmcall = false) } static bool jl_type_hasptr(jl_value_t* typ) -{ // assumes that jl_stored_inline(typ) is true +{ // assumes that jl_stored_inline(typ) is true (and therefore that layout is defined) return jl_is_datatype(typ) && ((jl_datatype_t*)typ)->layout->npointers > 0; } -// return whether all concrete subtypes of this type have the same layout -static bool julia_struct_has_layout(jl_datatype_t *dt) -{ - return dt->layout || jl_has_fixed_layout(dt); -} - static unsigned jl_field_align(jl_datatype_t *dt, size_t i) { unsigned al = jl_field_offset(dt, i); @@ -588,11 +582,8 @@ static Type *_julia_struct_to_llvm(jl_codegen_params_t *ctx, jl_value_t *jt, boo bool isTuple = jl_is_tuple_type(jt); jl_svec_t *ftypes = jl_get_fieldtypes(jst); size_t i, ntypes = jl_svec_len(ftypes); - if (!julia_struct_has_layout(jst)) + if (!jl_struct_try_layout(jst)) return NULL; // caller should have checked jl_type_mappable_to_c already, but we'll be nice - if (jst->layout == NULL) - jl_compute_field_offsets(jst); - assert(jst->layout); if (ntypes == 0 || jl_datatype_nbits(jst) == 0) return T_void; Type *_struct_decl = NULL; @@ -1640,6 +1631,9 @@ static bool emit_getfield_unknownidx(jl_codectx_t &ctx, return true; } if (nfields == 1) { + if (jl_has_free_typevars(jl_field_type(stt, 0))) { + return false; + } (void)idx0(); *ret = emit_getfield_knownidx(ctx, strct, 0, stt, order); return true; diff --git a/src/codegen.cpp b/src/codegen.cpp index 4eba89badbd8e..5a4bc9fec6b4b 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -931,12 +931,12 @@ static MDNode *best_tbaa(jl_value_t *jt) { // note that this includes jl_isbits, although codegen should work regardless static bool jl_is_concrete_immutable(jl_value_t* t) { - return jl_is_immutable_datatype(t) && ((jl_datatype_t*)t)->layout; + return jl_is_immutable_datatype(t) && ((jl_datatype_t*)t)->isconcretetype; } static bool jl_is_pointerfree(jl_value_t* t) { - if (!jl_is_immutable_datatype(t)) + if (!jl_is_concrete_immutable(t)) return 0; const jl_datatype_layout_t *layout = ((jl_datatype_t*)t)->layout; return layout && layout->npointers == 0; @@ -3070,9 +3070,9 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, return true; } - if (jl_is_datatype(utt) && utt->layout) { + if (jl_is_datatype(utt) && jl_struct_try_layout(utt)) { ssize_t idx = jl_field_index(utt, name, 0); - if (idx != -1) { + if (idx != -1 && !jl_has_free_typevars(jl_field_type(utt, idx))) { *ret = emit_getfield_knownidx(ctx, obj, idx, utt, order); return true; } @@ -3100,14 +3100,16 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } if (jl_is_datatype(utt)) { - if (jl_is_structtype(utt) && utt->layout) { + if (jl_struct_try_layout(utt)) { size_t nfields = jl_datatype_nfields(utt); // integer index size_t idx; if (fld.constant && (idx = jl_unbox_long(fld.constant) - 1) < nfields) { - // known index - *ret = emit_getfield_knownidx(ctx, obj, idx, utt, order); - return true; + if (!jl_has_free_typevars(jl_field_type(utt, idx))) { + // known index + *ret = emit_getfield_knownidx(ctx, obj, idx, utt, order); + return true; + } } else { // unknown index @@ -3152,8 +3154,6 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } } } - // TODO: attempt better codegen for approximate types, if the types - // and offsets of some fields are independent of parameters. // TODO: generic getfield func with more efficient calling convention return false; } @@ -3177,7 +3177,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } jl_datatype_t *uty = (jl_datatype_t*)jl_unwrap_unionall(obj.typ); - if (jl_is_structtype(uty) && uty->layout) { + if (jl_is_datatype(uty) && jl_struct_try_layout(uty)) { ssize_t idx = -1; if (fld.constant && fld.typ == (jl_value_t*)jl_symbol_type) { idx = jl_field_index(uty, (jl_sym_t*)fld.constant, 0); diff --git a/src/datatype.c b/src/datatype.c index 9bad2bc3d3bd8..a321b417d91c0 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -220,27 +220,36 @@ unsigned jl_special_vector_alignment(size_t nfields, jl_value_t *t) return next_power_of_two(size); } -STATIC_INLINE int jl_is_datatype_make_singleton(jl_datatype_t *d) +STATIC_INLINE int jl_is_datatype_make_singleton(jl_datatype_t *d) JL_NOTSAFEPOINT { return (!d->name->abstract && jl_datatype_size(d) == 0 && d != jl_symbol_type && d->name != jl_array_typename && d->isconcretetype && !d->name->mutabl); } -STATIC_INLINE void jl_maybe_allocate_singleton_instance(jl_datatype_t *st) +STATIC_INLINE void jl_maybe_allocate_singleton_instance(jl_datatype_t *st) JL_NOTSAFEPOINT { if (jl_is_datatype_make_singleton(st)) { // It's possible for st to already have an ->instance if it was redefined - if (!st->instance) { - jl_task_t *ct = jl_current_task; - st->instance = jl_gc_alloc(ct->ptls, 0, st); - jl_gc_wb(st, st->instance); - } + if (!st->instance) + st->instance = jl_gc_permobj(0, st); } } +// return whether all concrete subtypes of this type have the same layout +int jl_struct_try_layout(jl_datatype_t *dt) +{ + if (dt->layout) + return 1; + else if (!jl_has_fixed_layout(dt)) + return 0; + jl_compute_field_offsets(dt); + assert(dt->layout); + return 1; +} + int jl_datatype_isinlinealloc(jl_datatype_t *ty, int pointerfree) JL_NOTSAFEPOINT { - if (ty->name->mayinlinealloc && ty->layout) { + if (ty->name->mayinlinealloc && (ty->isconcretetype || ((jl_datatype_t*)jl_unwrap_unionall(ty->name->wrapper))->layout)) { // TODO: use jl_struct_try_layout(dt) (but it is a safepoint) if (ty->layout->npointers > 0) { if (pointerfree) return 0; @@ -348,9 +357,6 @@ void jl_compute_field_offsets(jl_datatype_t *st) if (st->name->wrapper == NULL) return; // we got called too early--we'll be back jl_datatype_t *w = (jl_datatype_t*)jl_unwrap_unionall(st->name->wrapper); - assert(st->types && w->types); - size_t i, nfields = jl_svec_len(st->types); - assert(st->name->n_uninitialized <= nfields); if (st == w && st->layout) { // this check allows us to force re-computation of the layout for some types during init st->layout = NULL; @@ -358,6 +364,7 @@ void jl_compute_field_offsets(jl_datatype_t *st) st->zeroinit = 0; st->has_concrete_subtype = 1; } + int isbitstype = st->isconcretetype && st->name->mayinlinealloc; // If layout doesn't depend on type parameters, it's stored in st->name->wrapper // and reused by all subtypes. if (w->layout) { @@ -365,11 +372,16 @@ void jl_compute_field_offsets(jl_datatype_t *st) st->size = w->size; st->zeroinit = w->zeroinit; st->has_concrete_subtype = w->has_concrete_subtype; - if (jl_is_layout_opaque(st->layout)) { // e.g. jl_array_typename - return; + if (!jl_is_layout_opaque(st->layout)) { // e.g. jl_array_typename + st->isbitstype = isbitstype && st->layout->npointers == 0; + jl_maybe_allocate_singleton_instance(st); } + return; } - else if (nfields == 0) { + assert(st->types && w->types); + size_t i, nfields = jl_svec_len(st->types); + assert(st->name->n_uninitialized <= nfields); + if (nfields == 0) { // if we have no fields, we can trivially skip the rest if (st == jl_symbol_type || st == jl_string_type) { // opaque layout - heap-allocated blob @@ -404,7 +416,6 @@ void jl_compute_field_offsets(jl_datatype_t *st) } } - int isbitstype = st->isconcretetype && st->name->mayinlinealloc; for (i = 0; isbitstype && i < nfields; i++) { jl_value_t *fld = jl_field_type(st, i); isbitstype = jl_isbits(fld); diff --git a/src/jltypes.c b/src/jltypes.c index f9f60f1227b9a..886abadb046e0 100644 --- a/src/jltypes.c +++ b/src/jltypes.c @@ -223,7 +223,9 @@ int jl_has_fixed_layout(jl_datatype_t *dt) { if (dt->layout || dt->isconcretetype) return 1; - if (jl_is_tuple_type(dt)) + if (dt->name->abstract) + return 0; + if (jl_is_tuple_type(dt) || jl_is_namedtuple_type(dt)) return 0; // TODO: relax more? jl_svec_t *types = jl_get_fieldtypes(dt); size_t i, l = jl_svec_len(types); @@ -242,9 +244,10 @@ int jl_type_mappable_to_c(jl_value_t *ty) assert(!jl_is_typevar(ty) && jl_is_type(ty)); if (jl_is_structtype(ty)) { jl_datatype_t *jst = (jl_datatype_t*)ty; - return jst->layout || jl_has_fixed_layout(jst); + return jl_has_fixed_layout(jst); } - if (jl_is_tuple_type(jl_unwrap_unionall(ty))) + ty = jl_unwrap_unionall(ty); + if (jl_is_tuple_type(ty) || jl_is_namedtuple_type(ty)) return 0; // TODO: relax some? return 1; // as boxed or primitive } @@ -1437,7 +1440,7 @@ static jl_value_t *inst_datatype_inner(jl_datatype_t *dt, jl_svec_t *p, jl_value jl_gc_wb(ndt, ndt->parameters); ndt->types = NULL; // to be filled in below if (istuple) { - ndt->types = p; + ndt->types = p; // TODO: this may need to filter out certain types } else if (isnamedtuple) { jl_value_t *names_tup = jl_svecref(p, 0); @@ -1463,19 +1466,16 @@ static jl_value_t *inst_datatype_inner(jl_datatype_t *dt, jl_svec_t *p, jl_value jl_gc_wb(ndt, ndt->types); } else { - ndt->types = jl_emptysvec; + ndt->types = jl_emptysvec; // XXX: this is essentially always false } } - ndt->size = 0; - jl_precompute_memoized_dt(ndt, cacheable); - - if (jl_is_primitivetype(dt)) { - ndt->size = dt->size; - ndt->layout = dt->layout; - ndt->isbitstype = ndt->isconcretetype; - } jl_datatype_t *primarydt = ((jl_datatype_t*)jl_unwrap_unionall(tn->wrapper)); + jl_precompute_memoized_dt(ndt, cacheable); + ndt->size = 0; + if (primarydt->layout) + jl_compute_field_offsets(ndt); + if (istuple || isnamedtuple) { ndt->super = jl_any_type; } @@ -1516,7 +1516,7 @@ static jl_value_t *inst_datatype_inner(jl_datatype_t *dt, jl_svec_t *p, jl_value // leading to incorrect layouts and data races (#40050: the A{T} should be // an isbitstype singleton of size 0) if (cacheable) { - if (!jl_is_primitivetype(dt) && ndt->types != NULL && ndt->isconcretetype) { + if (dt->layout == NULL && !jl_is_primitivetype(dt) && ndt->types != NULL && ndt->isconcretetype) { jl_compute_field_offsets(ndt); } jl_cache_type_(ndt); diff --git a/src/julia_internal.h b/src/julia_internal.h index e6bb2ae8602d3..11eb24330c638 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -370,7 +370,7 @@ STATIC_INLINE jl_gc_tracked_buffer_t *jl_gc_alloc_buf(jl_ptls_t ptls, size_t sz) return jl_gc_alloc(ptls, sz, (void*)jl_buff_tag); } -STATIC_INLINE jl_value_t *jl_gc_permobj(size_t sz, void *ty) +STATIC_INLINE jl_value_t *jl_gc_permobj(size_t sz, void *ty) JL_NOTSAFEPOINT { const size_t allocsz = sz + sizeof(jl_taggedvalue_t); unsigned align = (sz == 0 ? sizeof(void*) : (allocsz <= sizeof(void*) * 2 ? @@ -521,6 +521,7 @@ jl_datatype_t *jl_mk_builtin_func(jl_datatype_t *dt, const char *name, jl_fptr_a int jl_obviously_unequal(jl_value_t *a, jl_value_t *b); JL_DLLEXPORT jl_array_t *jl_find_free_typevars(jl_value_t *v); int jl_has_fixed_layout(jl_datatype_t *t); +int jl_struct_try_layout(jl_datatype_t *dt); int jl_type_mappable_to_c(jl_value_t *ty); jl_svec_t *jl_outer_unionall_vars(jl_value_t *u); jl_value_t *jl_type_intersection_env_s(jl_value_t *a, jl_value_t *b, jl_svec_t **penv, int *issubty); diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index b8fa5536865bb..df29a339d5a85 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -580,3 +580,16 @@ g40612(a, b) = a[]|a[] === b[]|b[] @test g40612(Union{Bool,Missing}[missing], Union{Bool,Missing}[missing]) @test g40612(Union{Bool,Missing}[true], Union{Bool,Missing}[true]) @test g40612(Union{Bool,Missing}[false], Union{Bool,Missing}[false]) + +# issue #41438 +struct A41438{T} + x::Ptr{T} +end +struct B41438{T} + x::T +end +f41438(y) = y[].x +@test A41438.body.layout != C_NULL +@test B41438.body.layout === C_NULL +@test f41438(Ref{A41438}(A41438(C_NULL))) === C_NULL +@test f41438(Ref{B41438}(B41438(C_NULL))) === C_NULL From 585536fd9be63732d2061695155ea88c57984325 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sun, 4 Jul 2021 23:16:47 +0200 Subject: [PATCH 059/146] remove dependency of Pkg from libblastrampoline_jll (#41460) (cherry picked from commit 5faad5fee902b8654880d97ed0d9e533083bded2) --- stdlib/libblastrampoline_jll/Project.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/stdlib/libblastrampoline_jll/Project.toml b/stdlib/libblastrampoline_jll/Project.toml index d44c420b56332..5eb555f4f326b 100644 --- a/stdlib/libblastrampoline_jll/Project.toml +++ b/stdlib/libblastrampoline_jll/Project.toml @@ -3,7 +3,6 @@ uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" version = "3.0.4+0" [deps] -Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" OpenBLAS_jll = "4536629a-c528-5b80-bd46-f80d51c5b363" From c00da173df59ddf97a549af44641b84dbf6f44ce Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 5 Jul 2021 10:06:35 +0200 Subject: [PATCH 060/146] Export jl_field_index from libjulia (cherry picked from commit 18f41425eb12e089a15890ac695fd8a814a01be2) --- 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 85c6e79ad27a8..81e68f3b78ee7 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -149,6 +149,7 @@ XX(jl_expand_with_loc) \ XX(jl_expand_with_loc_warn) \ XX(jl_extern_c) \ + XX(jl_field_index) \ XX(jl_gc_add_finalizer) \ XX(jl_gc_add_finalizer_th) \ XX(jl_gc_add_ptr_finalizer) \ From f4a3ec8f73e53d0ec5ec9a77d9017c6543cb84af Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 5 Jul 2021 19:19:16 -0400 Subject: [PATCH 061/146] MPFR tests: skip the `log2(x) == log2(42)` test (#41473) * MPFR tests: mark the `log2(x) == log2(42)` test as broken on Windows * Apply suggestions from code review Co-authored-by: Simeon Schaub Co-authored-by: Simeon Schaub (cherry picked from commit fee57110d517e01b7018303f550e686275e92676) --- test/mpfr.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mpfr.jl b/test/mpfr.jl index a4fac9c93c79a..0b6ff30e372dc 100644 --- a/test/mpfr.jl +++ b/test/mpfr.jl @@ -606,7 +606,8 @@ end @test log(x) == log(42) @test isinf(log(BigFloat(0))) @test_throws DomainError log(BigFloat(-1)) - @test log2(x) == log2(42) + # issue #41450 + @test_skip log2(x) == log2(42) @test isinf(log2(BigFloat(0))) @test_throws DomainError log2(BigFloat(-1)) @test log10(x) == log10(42) From e5b3e4fa144e09fd24bbac7daeea1b2960d5d230 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 5 Jul 2021 20:58:41 -0400 Subject: [PATCH 062/146] Remove mentions of `USE_INTEL_MKL` from the build docs (#41474) (cherry picked from commit bd665cf48976bcd13bd8d6fcf5691deaa73a56e5) --- doc/build/build.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/doc/build/build.md b/doc/build/build.md index 3d351bd83e71c..89b293a57df30 100644 --- a/doc/build/build.md +++ b/doc/build/build.md @@ -250,21 +250,6 @@ Julia uses a custom fork of libuv. It is a small dependency, and can be safely b As a high-performance numerical language, Julia should be linked to a multi-threaded BLAS and LAPACK, such as OpenBLAS or ATLAS, which will provide much better performance than the reference `libblas` implementations which may be default on some systems. -### Intel MKL - -**Note:** If you are building Julia for the sole purpose of incorporating Intel MKL, it may be beneficial to first try [MKL.jl](https://github.com/JuliaComputing/MKL.jl). This package will automatically download MKL and rebuild Julia's system image against it, sidestepping the need to set up a working build environment just to add MKL functionality. MKL.jl replaces OpenBLAS with MKL for dense linear algebra functions called directly from Julia, but SuiteSparse and other C/Fortran libraries will continue to use the BLAS they were linked against at build time. If you want SuiteSparse to use MKL, you will need to build from source. - -For a 64-bit architecture, the environment should be set up as follows: -```sh -# bash -source /path/to/intel/bin/compilervars.sh intel64 -``` -Add the following to the `Make.user` file: - - USE_INTEL_MKL = 1 - -It is highly recommended to start with a fresh clone of the Julia repository. - ## Source distributions of releases Each pre-release and release of Julia has a "full" source distribution and a "light" source From 4bda75ca0c67b3a42a23da05e865f64987e0b202 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 6 Jul 2021 09:48:28 +0200 Subject: [PATCH 063/146] put back Any16 and All16 since some packges seem to rely on it (#41469) (cherry picked from commit 261906c2094c155ba4891721c26cfdcd960ea145) --- base/deprecated.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/deprecated.jl b/base/deprecated.jl index d60cc3393662c..c2a717a403a90 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -240,6 +240,12 @@ end @deprecate cat_shape(dims, shape::Tuple{}, shapes::Tuple...) cat_shape(dims, shapes) false cat_shape(dims, shape::Tuple{}) = () # make sure `cat_shape(dims, ())` do not recursively calls itself +# these were internal type aliases, but some pacakges seem to be relying on them +const Any16{N} = Tuple{Any,Any,Any,Any,Any,Any,Any,Any, + Any,Any,Any,Any,Any,Any,Any,Any,Vararg{Any,N}} +const All16{T,N} = Tuple{T,T,T,T,T,T,T,T, + T,T,T,T,T,T,T,T,Vararg{T,N}} + # END 1.6 deprecations # BEGIN 1.7 deprecations From 8b6a7ea096e5824d2e07ea3a4e02f75a149835de Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 24 Jun 2021 11:14:23 -0400 Subject: [PATCH 064/146] codegen: add optimizations for swapfield and replacefield (#41275) (cherry picked from commit 5650c93f1aa45a17c10c9482e5d3e0042cf4cc6b) --- src/builtins.c | 6 +- src/cgutils.cpp | 423 ++++++++++++++++++++++++----- src/codegen.cpp | 155 +++++------ src/intrinsics.cpp | 3 +- src/llvm-gc-invariant-verifier.cpp | 32 ++- src/llvm-late-gc-lowering.cpp | 31 ++- src/llvm-propagate-addrspaces.cpp | 34 ++- test/atomics.jl | 16 +- 8 files changed, 510 insertions(+), 190 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index b5b4bb4069773..f40d694d23529 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -967,7 +967,9 @@ JL_CALLABLE(jl_f_replacefield) JL_TYPECHK(replacefield!, symbol, args[5]); failure_order = jl_get_atomic_order_checked((jl_sym_t*)args[5], 1, 0); } - // TODO: filter more invalid ordering combinations + if (failure_order > success_order) + jl_atomic_error("invalid atomic ordering"); + // TODO: filter more invalid ordering combinations? jl_value_t *v = args[0]; jl_datatype_t *st = (jl_datatype_t*)jl_typeof(v); size_t idx = get_checked_fieldindex("replacefield!", st, v, args[1], 1); @@ -978,8 +980,6 @@ JL_CALLABLE(jl_f_replacefield) if (isatomic == (failure_order == jl_memory_order_notatomic)) jl_atomic_error(isatomic ? "replacefield!: atomic field cannot be accessed non-atomically" : "replacefield!: non-atomic field cannot be accessed atomically"); - if (failure_order > success_order) - jl_atomic_error("invalid atomic ordering"); v = replace_nth_field(st, v, idx, args[2], args[3], isatomic); // always seq_cst, if isatomic needed at all return v; } diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 5f4ef560c83ce..f715abb3b490b 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1064,6 +1064,7 @@ static Value *null_pointer_cmp(jl_codectx_t &ctx, Value *v) return ctx.builder.CreateICmpNE(v, Constant::getNullValue(v->getType())); } + // If `nullcheck` is not NULL and a pointer NULL check is necessary // store the pointer to be checked in `*nullcheck` instead of checking it static void null_pointer_check(jl_codectx_t &ctx, Value *v, Value **nullcheck = nullptr) @@ -1076,6 +1077,62 @@ static void null_pointer_check(jl_codectx_t &ctx, Value *v, Value **nullcheck = literal_pointer_val(ctx, jl_undefref_exception)); } +template +static Value *emit_guarded_test(jl_codectx_t &ctx, Value *ifnot, Value *defval, Func &&func) +{ + if (auto Cond = dyn_cast(ifnot)) { + if (Cond->isZero()) + return defval; + return func(); + } + BasicBlock *currBB = ctx.builder.GetInsertBlock(); + BasicBlock *passBB = BasicBlock::Create(jl_LLVMContext, "guard_pass", ctx.f); + BasicBlock *exitBB = BasicBlock::Create(jl_LLVMContext, "guard_exit", ctx.f); + ctx.builder.CreateCondBr(ifnot, passBB, exitBB); + ctx.builder.SetInsertPoint(passBB); + auto res = func(); + passBB = ctx.builder.GetInsertBlock(); + ctx.builder.CreateBr(exitBB); + ctx.builder.SetInsertPoint(exitBB); + if (defval == nullptr) + return nullptr; + PHINode *phi = ctx.builder.CreatePHI(defval->getType(), 2); + phi->addIncoming(defval, currBB); + phi->addIncoming(res, passBB); + return phi; +} + +template +static Value *emit_guarded_test(jl_codectx_t &ctx, Value *ifnot, bool defval, Func &&func) +{ + return emit_guarded_test(ctx, ifnot, ConstantInt::get(T_int1, defval), func); +} + +template +static Value *emit_nullcheck_guard(jl_codectx_t &ctx, Value *nullcheck, Func &&func) +{ + if (!nullcheck) + return func(); + return emit_guarded_test(ctx, null_pointer_cmp(ctx, nullcheck), false, func); +} + +template +static Value *emit_nullcheck_guard2(jl_codectx_t &ctx, Value *nullcheck1, + Value *nullcheck2, Func &&func) +{ + if (!nullcheck1) + return emit_nullcheck_guard(ctx, nullcheck2, func); + if (!nullcheck2) + return emit_nullcheck_guard(ctx, nullcheck1, func); + nullcheck1 = null_pointer_cmp(ctx, nullcheck1); + nullcheck2 = null_pointer_cmp(ctx, nullcheck2); + // If both are NULL, return true. + return emit_guarded_test(ctx, ctx.builder.CreateOr(nullcheck1, nullcheck2), true, [&] { + return emit_guarded_test(ctx, ctx.builder.CreateAnd(nullcheck1, nullcheck2), + false, func); + }); +} + static void emit_type_error(jl_codectx_t &ctx, const jl_cgval_t &x, Value *type, const std::string &msg) { Value *msg_val = stringConstPtr(ctx.emission_context, ctx.builder, msg); @@ -1398,6 +1455,19 @@ Value *extract_first_ptr(jl_codectx_t &ctx, Value *V) return ctx.builder.CreateExtractValue(V, path); } + +static void emit_lockstate_value(jl_codectx_t &ctx, Value *strct, bool newstate) +{ + Value *v = mark_callee_rooted(ctx, strct); + ctx.builder.CreateCall(prepare_call(newstate ? jllockvalue_func : jlunlockvalue_func), v); +} +static void emit_lockstate_value(jl_codectx_t &ctx, const jl_cgval_t &strct, bool newstate) +{ + assert(strct.isboxed); + emit_lockstate_value(ctx, boxed(ctx, strct), newstate); +} + + // If `nullcheck` is not NULL and a pointer NULL check is necessary // store the pointer to be checked in `*nullcheck` instead of checking it static jl_cgval_t typed_load(jl_codectx_t &ctx, Value *ptr, Value *idx_0based, jl_value_t *jltype, @@ -1461,18 +1531,24 @@ static jl_cgval_t typed_load(jl_codectx_t &ctx, Value *ptr, Value *idx_0based, j return mark_julia_type(ctx, load, isboxed, jltype); } -static void typed_store(jl_codectx_t &ctx, - Value *ptr, Value *idx_0based, const jl_cgval_t &rhs, +static jl_cgval_t typed_store(jl_codectx_t &ctx, + Value *ptr, Value *idx_0based, const jl_cgval_t &rhs, const jl_cgval_t &cmp, jl_value_t *jltype, MDNode *tbaa, MDNode *aliasscope, Value *parent, // for the write barrier, NULL if no barrier needed - bool isboxed, AtomicOrdering Order, unsigned alignment = 0) + bool isboxed, AtomicOrdering Order, AtomicOrdering FailOrder, unsigned alignment, + bool needlock, bool issetfield, bool isreplacefield, bool maybe_null_if_boxed) { + assert(!needlock || parent != nullptr); + jl_cgval_t oldval = rhs; Type *elty = isboxed ? T_prjlvalue : julia_type_to_llvm(ctx, jltype); if (type_is_ghost(elty)) - return; + return oldval; + Value *intcast = nullptr; if (!isboxed && Order != AtomicOrdering::NotAtomic && !elty->isIntOrPtrTy() && !elty->isFloatingPointTy()) { const DataLayout &DL = jl_data_layout; unsigned nb = DL.getTypeSizeInBits(elty); + if (!issetfield) + intcast = ctx.builder.CreateAlloca(elty); elty = Type::getIntNTy(jl_LLVMContext, nb); } Value *r; @@ -1489,18 +1565,206 @@ static void typed_store(jl_codectx_t &ctx, alignment = sizeof(void*); else if (!alignment) alignment = julia_alignment(jltype); - StoreInst *store = ctx.builder.CreateAlignedStore(r, ptr, Align(alignment)); - store->setOrdering(Order); - if (aliasscope) - store->setMetadata("noalias", aliasscope); - if (tbaa) - tbaa_decorate(tbaa, store); + Instruction *instr = nullptr; + Value *Compare = nullptr; + Value *Success = nullptr; + BasicBlock *DoneBB = issetfield || (!isreplacefield && !isboxed) ? nullptr : BasicBlock::Create(jl_LLVMContext, "done_xchg", ctx.f); + if (needlock) + emit_lockstate_value(ctx, parent, true); + if (issetfield || Order == AtomicOrdering::NotAtomic) { + if (!issetfield) { + instr = ctx.builder.CreateAlignedLoad(elty, ptr, Align(alignment)); + if (aliasscope) + instr->setMetadata("noalias", aliasscope); + if (tbaa) + tbaa_decorate(tbaa, instr); + } + if (isreplacefield) { + oldval = mark_julia_type(ctx, instr, isboxed, jltype); + Value *first_ptr = nullptr; + if (maybe_null_if_boxed) + first_ptr = isboxed ? instr : extract_first_ptr(ctx, instr); + Success = emit_nullcheck_guard(ctx, first_ptr, [&] { + return emit_f_is(ctx, oldval, cmp); + }); + BasicBlock *BB = BasicBlock::Create(jl_LLVMContext, "xchg", ctx.f); + ctx.builder.CreateCondBr(Success, BB, DoneBB); + ctx.builder.SetInsertPoint(BB); + } + StoreInst *store = ctx.builder.CreateAlignedStore(r, ptr, Align(alignment)); + store->setOrdering(Order); + if (aliasscope) + store->setMetadata("noalias", aliasscope); + if (tbaa) + tbaa_decorate(tbaa, store); + if (DoneBB) + ctx.builder.CreateBr(DoneBB); + } + else if (isboxed || isreplacefield) { + // we have to handle isboxed here as a workaround for really bad LLVM design issue: plain Xchg only works with integers + bool needloop; + PHINode *Succ = nullptr, *Current = nullptr; + if (isreplacefield) { + if (!isboxed) { + needloop = ((jl_datatype_t*)jltype)->layout->haspadding; + Value *SameType = emit_isa(ctx, cmp, jltype, nullptr).first; + if (SameType != ConstantInt::getTrue(jl_LLVMContext)) { + BasicBlock *SkipBB = BasicBlock::Create(jl_LLVMContext, "skip_xchg", ctx.f); + BasicBlock *BB = BasicBlock::Create(jl_LLVMContext, "xchg", ctx.f); + ctx.builder.CreateCondBr(SameType, BB, SkipBB); + ctx.builder.SetInsertPoint(SkipBB); + LoadInst *load = ctx.builder.CreateAlignedLoad(elty, ptr, Align(alignment)); + load->setOrdering(FailOrder); + if (aliasscope) + load->setMetadata("noalias", aliasscope); + if (tbaa) + tbaa_decorate(tbaa, load); + instr = load; + ctx.builder.CreateBr(DoneBB); + ctx.builder.SetInsertPoint(DoneBB); + Succ = ctx.builder.CreatePHI(T_int1, 2); + Succ->addIncoming(ConstantInt::get(T_int1, 0), SkipBB); + Current = ctx.builder.CreatePHI(instr->getType(), 2); + Current->addIncoming(instr, SkipBB); + ctx.builder.SetInsertPoint(BB); + } + Compare = emit_unbox(ctx, elty, cmp, jltype); + } + else if (cmp.isboxed) { + Compare = boxed(ctx, cmp); + needloop = !jl_is_mutable_datatype(jltype); + } + else { + Compare = V_rnull; + needloop = true; + } + } + else { + LoadInst *Current = ctx.builder.CreateAlignedLoad(elty, ptr, Align(alignment)); + Current->setOrdering(AtomicOrdering::Monotonic); + if (aliasscope) + Current->setMetadata("noalias", aliasscope); + if (tbaa) + tbaa_decorate(tbaa, Current); + Compare = Current; + needloop = true; + } + BasicBlock *BB; + if (needloop) { + BasicBlock *From = ctx.builder.GetInsertBlock(); + BB = BasicBlock::Create(jl_LLVMContext, "xchg", ctx.f); + ctx.builder.CreateBr(BB); + ctx.builder.SetInsertPoint(BB); + PHINode *Cmp = ctx.builder.CreatePHI(r->getType(), 2); + Cmp->addIncoming(Compare, From); + Compare = Cmp; + } + if (Order == AtomicOrdering::Unordered) + Order = AtomicOrdering::Monotonic; + if (!isreplacefield) + FailOrder = AtomicOrdering::Monotonic; + else if (FailOrder == AtomicOrdering::Unordered) + FailOrder = AtomicOrdering::Monotonic; +#if JL_LLVM_VERSION >= 130000 + auto *store = ctx.builder.CreateAtomicCmpXchg(ptr, Compare, r, Align(alignment), Order, FailOrder); +#else + auto *store = ctx.builder.CreateAtomicCmpXchg(ptr, Compare, r, Order, FailOrder); + store->setAlignment(Align(alignment)); +#endif + if (aliasscope) + store->setMetadata("noalias", aliasscope); + if (tbaa) + tbaa_decorate(tbaa, store); + instr = ctx.builder.Insert(ExtractValueInst::Create(store, 0)); + Success = ctx.builder.CreateExtractValue(store, 1); + Value *Done = Success; + if (needloop) { + if (isreplacefield) { + if (intcast) { + ctx.builder.CreateStore(instr, ctx.builder.CreateBitCast(intcast, instr->getType()->getPointerTo())); + oldval = mark_julia_slot(intcast, jltype, NULL, tbaa_stack); + } + else { + oldval = mark_julia_type(ctx, instr, isboxed, jltype); + } + Done = emit_guarded_test(ctx, ctx.builder.CreateNot(Success), false, [&] { + Value *first_ptr = nullptr; + if (maybe_null_if_boxed) + first_ptr = isboxed ? instr : extract_first_ptr(ctx, instr); + return emit_nullcheck_guard(ctx, first_ptr, [&] { + return emit_f_is(ctx, oldval, cmp); + }); + }); + Done = ctx.builder.CreateNot(Done); + } + cast(Compare)->addIncoming(instr, ctx.builder.GetInsertBlock()); + } + if (Succ != nullptr) { + Current->addIncoming(instr, ctx.builder.GetInsertBlock()); + instr = Current; + Succ->addIncoming(Success, ctx.builder.GetInsertBlock()); + Success = Succ; + } + if (needloop) + ctx.builder.CreateCondBr(Done, DoneBB, BB); + else + ctx.builder.CreateBr(DoneBB); + } + else { +#if JL_LLVM_VERSION >= 130000 + instr = ctx.builder.CreateAtomicRMW(AtomicRMWInst::Xchg, ptr, r, Align(alignment), Order); +#else + auto *store = ctx.builder.CreateAtomicRMW(AtomicRMWInst::Xchg, ptr, r, Order); + store->setAlignment(Align(alignment)); + instr = store; +#endif + if (aliasscope) + instr->setMetadata("noalias", aliasscope); + if (tbaa) + tbaa_decorate(tbaa, instr); + assert(DoneBB == nullptr); + } + if (DoneBB) + ctx.builder.SetInsertPoint(DoneBB); + if (needlock) + emit_lockstate_value(ctx, parent, false); if (parent != NULL) { + BasicBlock *DoneBB; + if (isreplacefield) { + // TOOD: avoid this branch if we aren't making a write barrier + BasicBlock *BB = BasicBlock::Create(jl_LLVMContext, "xchg_wb", ctx.f); + DoneBB = BasicBlock::Create(jl_LLVMContext, "done_xchg_wb", ctx.f); + ctx.builder.CreateCondBr(Success, BB, DoneBB); + ctx.builder.SetInsertPoint(BB); + } if (!isboxed) emit_write_multibarrier(ctx, parent, r, rhs.typ); else if (!type_is_permalloc(rhs.typ)) emit_write_barrier(ctx, parent, r); + if (isreplacefield) { + ctx.builder.CreateBr(DoneBB); + ctx.builder.SetInsertPoint(DoneBB); + } + } + if (!issetfield) { + if (intcast) { + ctx.builder.CreateStore(instr, ctx.builder.CreateBitCast(intcast, instr->getType()->getPointerTo())); + instr = ctx.builder.CreateLoad(intcast); + } + if (maybe_null_if_boxed) { + Value *first_ptr = isboxed ? instr : extract_first_ptr(ctx, instr); + if (first_ptr) + null_pointer_check(ctx, first_ptr, nullptr); + } + oldval = mark_julia_type(ctx, instr, isboxed, jltype); + if (isreplacefield) { + // TODO: do better here + jl_cgval_t argv[2] = {oldval, mark_julia_type(ctx, Success, false, jl_bool_type)}; + instr = emit_jlcall(ctx, jltuple_func, V_rnull, argv, 2, JLCALL_F_CC); + oldval = mark_julia_type(ctx, instr, true, jl_any_type); + } } + return oldval; } // --- convert boolean value to julia --- @@ -1754,11 +2018,22 @@ static bool emit_getfield_unknownidx(jl_codectx_t &ctx, return false; } -static void emit_lockstate_value(jl_codectx_t &ctx, const jl_cgval_t &strct, bool newstate) +static jl_cgval_t emit_unionload(jl_codectx_t &ctx, Value *addr, Value *ptindex, jl_value_t *jfty, size_t fsz, size_t al, MDNode *tbaa, bool mutabl) { - assert(strct.isboxed); - Value *v = mark_callee_rooted(ctx, boxed(ctx, strct)); - ctx.builder.CreateCall(prepare_call(newstate ? jllockvalue_func : jlunlockvalue_func), v); + Instruction *tindex0 = tbaa_decorate(tbaa_unionselbyte, ctx.builder.CreateAlignedLoad(T_int8, ptindex, Align(1))); + //tindex0->setMetadata(LLVMContext::MD_range, MDNode::get(jl_LLVMContext, { + // ConstantAsMetadata::get(ConstantInt::get(T_int8, 0)), + // ConstantAsMetadata::get(ConstantInt::get(T_int8, union_max)) })); + Value *tindex = ctx.builder.CreateNUWAdd(ConstantInt::get(T_int8, 1), tindex0); + if (mutabl) { + // move value to an immutable stack slot (excluding tindex) + Type *ET = IntegerType::get(jl_LLVMContext, 8 * al); + AllocaInst *lv = emit_static_alloca(ctx, ET); + lv->setOperand(0, ConstantInt::get(T_int32, (fsz + al - 1) / al)); + emit_memcpy(ctx, lv, tbaa, addr, tbaa, fsz, al); + addr = lv; + } + return mark_julia_slot(addr, jfty, tindex, tbaa); } // If `nullcheck` is not NULL and a pointer NULL check is necessary @@ -1839,20 +2114,7 @@ static jl_cgval_t emit_getfield_knownidx(jl_codectx_t &ctx, const jl_cgval_t &st else { ptindex = emit_struct_gep(ctx, cast(lt), staddr, byte_offset + fsz); } - Instruction *tindex0 = tbaa_decorate(tbaa_unionselbyte, ctx.builder.CreateAlignedLoad(T_int8, ptindex, Align(1))); - //tindex0->setMetadata(LLVMContext::MD_range, MDNode::get(jl_LLVMContext, { - // ConstantAsMetadata::get(ConstantInt::get(T_int8, 0)), - // ConstantAsMetadata::get(ConstantInt::get(T_int8, union_max)) })); - Value *tindex = ctx.builder.CreateNUWAdd(ConstantInt::get(T_int8, 1), tindex0); - if (jt->name->mutabl) { - // move value to an immutable stack slot (excluding tindex) - Type *ET = IntegerType::get(jl_LLVMContext, 8 * al); - AllocaInst *lv = emit_static_alloca(ctx, ET); - lv->setOperand(0, ConstantInt::get(T_int32, (fsz + al - 1) / al)); - emit_memcpy(ctx, lv, tbaa, addr, tbaa, fsz, al); - addr = lv; - } - return mark_julia_slot(addr, jfty, tindex, tbaa); + return emit_unionload(ctx, addr, ptindex, jfty, fsz, al, tbaa, jt->name->mutabl); } assert(jl_is_concrete_type(jfty)); if (!jt->name->mutabl && !(maybe_null && (jfty == (jl_value_t*)jl_bool_type || @@ -2877,49 +3139,76 @@ static void emit_write_multibarrier(jl_codectx_t &ctx, Value *parent, Value *agg } -static void emit_setfield(jl_codectx_t &ctx, +static jl_cgval_t emit_setfield(jl_codectx_t &ctx, jl_datatype_t *sty, const jl_cgval_t &strct, size_t idx0, - const jl_cgval_t &rhs, bool checked, bool wb, AtomicOrdering Order) -{ - if (sty->name->mutabl || !checked) { - assert(strct.ispointer()); - size_t byte_offset = jl_field_offset(sty, idx0); - Value *addr = data_pointer(ctx, strct); - if (byte_offset > 0) { - addr = ctx.builder.CreateInBoundsGEP( - T_int8, - 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); - if (!jl_field_isptr(sty, idx0) && jl_is_uniontype(jfty)) { - int fsz = jl_field_size(sty, idx0) - 1; - // compute tindex from rhs - jl_cgval_t rhs_union = convert_julia_type(ctx, rhs, jfty); - if (rhs_union.typ == jl_bottom_type) - return; - Value *tindex = compute_tindex_unboxed(ctx, rhs_union, jfty); - tindex = ctx.builder.CreateNUWSub(tindex, ConstantInt::get(T_int8, 1)); - Value *ptindex = ctx.builder.CreateInBoundsGEP(T_int8, emit_bitcast(ctx, maybe_decay_tracked(ctx, addr), T_pint8), ConstantInt::get(T_size, fsz)); - tbaa_decorate(tbaa_unionselbyte, ctx.builder.CreateAlignedStore(tindex, ptindex, Align(1))); - // copy data - if (!rhs.isghost) { - emit_unionmove(ctx, addr, strct.tbaa, rhs, nullptr); - } - } - else { - unsigned align = jl_field_align(sty, idx0); - bool isboxed = jl_field_isptr(sty, idx0); - typed_store(ctx, addr, NULL, rhs, jfty, strct.tbaa, nullptr, - wb ? maybe_bitcast(ctx, data_pointer(ctx, strct), T_pjlvalue) : nullptr, - isboxed, Order, align); - } - } - else { + const jl_cgval_t &rhs, const jl_cgval_t &cmp, + bool checked, bool wb, AtomicOrdering Order, AtomicOrdering FailOrder, + bool needlock, bool issetfield, bool isreplacefield) +{ + if (!sty->name->mutabl && checked) { std::string msg = "setfield!: immutable struct of type " + std::string(jl_symbol_name(sty->name->name)) + " cannot be changed"; emit_error(ctx, msg); + return jl_cgval_t(); + } + assert(strct.ispointer()); + size_t byte_offset = jl_field_offset(sty, idx0); + Value *addr = data_pointer(ctx, strct); + if (byte_offset > 0) { + addr = ctx.builder.CreateInBoundsGEP( + T_int8, + 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); + if (!jl_field_isptr(sty, idx0) && jl_is_uniontype(jfty)) { + size_t fsz = 0, al = 0; + bool isptr = !jl_islayout_inline(jfty, &fsz, &al); + assert(!isptr && fsz == jl_field_size(sty, idx0) - 1); (void)isptr; + // compute tindex from rhs + jl_cgval_t rhs_union = convert_julia_type(ctx, rhs, jfty); + if (rhs_union.typ == jl_bottom_type) + return jl_cgval_t(); + Value *tindex = compute_tindex_unboxed(ctx, rhs_union, jfty); + tindex = ctx.builder.CreateNUWSub(tindex, ConstantInt::get(T_int8, 1)); + Value *ptindex = ctx.builder.CreateInBoundsGEP(T_int8, emit_bitcast(ctx, maybe_decay_tracked(ctx, addr), T_pint8), ConstantInt::get(T_size, fsz)); + if (needlock) + emit_lockstate_value(ctx, strct, true); + jl_cgval_t oldval = rhs; + if (!issetfield) + oldval = emit_unionload(ctx, addr, ptindex, jfty, fsz, al, strct.tbaa, true); + Value *Success; + BasicBlock *DoneBB; + if (isreplacefield) { + BasicBlock *BB = BasicBlock::Create(jl_LLVMContext, "xchg", ctx.f); + DoneBB = BasicBlock::Create(jl_LLVMContext, "done_xchg", ctx.f); + Success = emit_f_is(ctx, oldval, cmp); + ctx.builder.CreateCondBr(Success, BB, DoneBB); + ctx.builder.SetInsertPoint(BB); + } + tbaa_decorate(tbaa_unionselbyte, ctx.builder.CreateAlignedStore(tindex, ptindex, Align(1))); + // copy data + if (!rhs.isghost) { + emit_unionmove(ctx, addr, strct.tbaa, rhs, nullptr); + } + if (isreplacefield) { + ctx.builder.CreateBr(DoneBB); + ctx.builder.SetInsertPoint(DoneBB); + } + if (needlock) + emit_lockstate_value(ctx, strct, false); + return oldval; + } + else { + unsigned align = jl_field_align(sty, idx0); + bool isboxed = jl_field_isptr(sty, idx0); + size_t nfields = jl_datatype_nfields(sty); + bool maybe_null = idx0 >= nfields - (unsigned)sty->name->n_uninitialized; + return typed_store(ctx, addr, NULL, rhs, cmp, jfty, strct.tbaa, nullptr, + wb ? maybe_bitcast(ctx, data_pointer(ctx, strct), T_pjlvalue) : nullptr, + isboxed, Order, FailOrder, align, + needlock, issetfield, isreplacefield, maybe_null); } } @@ -3098,7 +3387,7 @@ static jl_cgval_t emit_new_struct(jl_codectx_t &ctx, jl_value_t *ty, size_t narg else need_wb = false; emit_typecheck(ctx, rhs, jl_svecref(sty->types, i), "new"); - emit_setfield(ctx, sty, strctinfo, i, rhs, false, need_wb, AtomicOrdering::NotAtomic); + emit_setfield(ctx, sty, strctinfo, i, rhs, jl_cgval_t(), false, need_wb, AtomicOrdering::NotAtomic, AtomicOrdering::NotAtomic, false, true, false); } return strctinfo; } diff --git a/src/codegen.cpp b/src/codegen.cpp index 5a4bc9fec6b4b..3d8ad33516080 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -879,6 +879,8 @@ static const std::map builtin_func_map = { { &jl_f_isdefined, new JuliaFunction{"jl_f_isdefined", get_func_sig, get_func_attrs} }, { &jl_f_getfield, new JuliaFunction{"jl_f_getfield", get_func_sig, get_func_attrs} }, { &jl_f_setfield, new JuliaFunction{"jl_f_setfield", get_func_sig, get_func_attrs} }, + { &jl_f_swapfield, new JuliaFunction{"jl_f_swapfield", get_func_sig, get_func_attrs} }, + { &jl_f_modifyfield, new JuliaFunction{"jl_f_modifyfield", get_func_sig, get_func_attrs} }, { &jl_f_fieldtype, new JuliaFunction{"jl_f_fieldtype", get_func_sig, get_func_attrs} }, { &jl_f_nfields, new JuliaFunction{"jl_f_nfields", get_func_sig, get_func_attrs} }, { &jl_f__expr, new JuliaFunction{"jl_f__expr", get_func_sig, get_func_attrs} }, @@ -1160,6 +1162,8 @@ static CallInst *emit_jlcall(jl_codectx_t &ctx, Function *theFptr, Value *theF, jl_cgval_t *args, size_t nargs, CallingConv::ID cc); static CallInst *emit_jlcall(jl_codectx_t &ctx, JuliaFunction *theFptr, Value *theF, jl_cgval_t *args, size_t nargs, CallingConv::ID cc); +static Value *emit_f_is(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgval_t &arg2, + Value *nullcheck1 = nullptr, Value *nullcheck2 = nullptr); static Value *literal_pointer_val(jl_codectx_t &ctx, jl_value_t *p); static GlobalVariable *prepare_global_in(Module *M, GlobalVariable *G); @@ -1441,6 +1445,17 @@ static void alloc_def_flag(jl_codectx_t &ctx, jl_varinfo_t& vi) // --- utilities --- +static Constant *undef_value_for_type(Type *T) { + auto tracked = CountTrackedPointers(T); + Constant *undef; + if (tracked.count) + // make sure gc pointers (including ptr_phi of union-split) are initialized to NULL + undef = Constant::getNullValue(T); + else + undef = UndefValue::get(T); + return undef; +} + static void CreateTrap(IRBuilder<> &irbuilder) { Function *f = irbuilder.GetInsertBlock()->getParent(); @@ -1472,6 +1487,7 @@ static void CreateConditionalAbort(IRBuilder<> &irbuilder, Value *test) #endif #endif + #include "cgutils.cpp" static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t &v, jl_value_t *typ, Value **skip) @@ -2351,62 +2367,6 @@ static jl_cgval_t emit_globalref(jl_codectx_t &ctx, jl_module_t *mod, jl_sym_t * return emit_checked_var(ctx, bp, name, false, tbaa_binding); } -template -static Value *emit_guarded_test(jl_codectx_t &ctx, Value *ifnot, Constant *defval, Func &&func) -{ - if (auto Cond = dyn_cast(ifnot)) { - if (Cond->isZero()) - return defval; - return func(); - } - BasicBlock *currBB = ctx.builder.GetInsertBlock(); - BasicBlock *passBB = BasicBlock::Create(jl_LLVMContext, "guard_pass", ctx.f); - BasicBlock *exitBB = BasicBlock::Create(jl_LLVMContext, "guard_exit", ctx.f); - ctx.builder.CreateCondBr(ifnot, passBB, exitBB); - ctx.builder.SetInsertPoint(passBB); - auto res = func(); - passBB = ctx.builder.GetInsertBlock(); - ctx.builder.CreateBr(exitBB); - ctx.builder.SetInsertPoint(exitBB); - if (defval == nullptr) - return nullptr; - PHINode *phi = ctx.builder.CreatePHI(defval->getType(), 2); - phi->addIncoming(defval, currBB); - phi->addIncoming(res, passBB); - return phi; -} - -template -static Value *emit_guarded_test(jl_codectx_t &ctx, Value *ifnot, bool defval, Func &&func) -{ - return emit_guarded_test(ctx, ifnot, ConstantInt::get(T_int1, defval), func); -} - -template -static Value *emit_nullcheck_guard(jl_codectx_t &ctx, Value *nullcheck, Func &&func) -{ - if (!nullcheck) - return func(); - return emit_guarded_test(ctx, null_pointer_cmp(ctx, nullcheck), false, func); -} - -template -static Value *emit_nullcheck_guard2(jl_codectx_t &ctx, Value *nullcheck1, - Value *nullcheck2, Func &&func) -{ - if (!nullcheck1) - return emit_nullcheck_guard(ctx, nullcheck2, func); - if (!nullcheck2) - return emit_nullcheck_guard(ctx, nullcheck1, func); - nullcheck1 = null_pointer_cmp(ctx, nullcheck1); - nullcheck2 = null_pointer_cmp(ctx, nullcheck2); - // If both are NULL, return true. - return emit_guarded_test(ctx, ctx.builder.CreateOr(nullcheck1, nullcheck2), true, [&] { - return emit_guarded_test(ctx, ctx.builder.CreateAnd(nullcheck1, nullcheck2), - false, func); - }); -} - static Value *emit_box_compare(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgval_t &arg2, Value *nullcheck1, Value *nullcheck2) { @@ -2443,8 +2403,6 @@ static Value *emit_box_compare(jl_codectx_t &ctx, const jl_cgval_t &arg1, const } static Value *emit_bits_compare(jl_codectx_t &ctx, jl_cgval_t arg1, jl_cgval_t arg2); -static Value *emit_f_is(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgval_t &arg2, - Value *nullcheck1 = nullptr, Value *nullcheck2 = nullptr); static Value *emit_bitsunion_compare(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgval_t &arg2) { @@ -3011,13 +2969,18 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, else { typed_store(ctx, emit_arrayptr(ctx, ary, ary_ex, isboxed), - idx, val, ety, + idx, val, jl_cgval_t(), ety, isboxed ? tbaa_ptrarraybuf : tbaa_arraybuf, ctx.aliasscope, data_owner, isboxed, isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic, // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 - 0); + isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic, // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 + 0, + false, + true, + false, + false); } } *ret = ary; @@ -3158,19 +3121,34 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, return false; } - else if (f == jl_builtin_setfield && (nargs == 3 || nargs == 4)) { + else if ((f == jl_builtin_setfield && (nargs == 3 || nargs == 4)) || + (f == jl_builtin_swapfield && (nargs == 3 || nargs == 4)) || + (f == jl_builtin_replacefield && (nargs == 4 || nargs == 5 || nargs == 6))) { + bool issetfield = f == jl_builtin_setfield; + bool isreplacefield = f == jl_builtin_replacefield; + const jl_cgval_t undefval; const jl_cgval_t &obj = argv[1]; const jl_cgval_t &fld = argv[2]; - const jl_cgval_t &val = argv[3]; + const jl_cgval_t &val = argv[isreplacefield ? 4 : 3]; + const jl_cgval_t &cmp = isreplacefield ? argv[3] : undefval; enum jl_memory_order order = jl_memory_order_notatomic; - if (nargs == 4) { - const jl_cgval_t &ord = argv[4]; - emit_typecheck(ctx, ord, (jl_value_t*)jl_symbol_type, "setfield!"); + if (nargs >= (isreplacefield ? 5 : 4)) { + const jl_cgval_t &ord = argv[isreplacefield ? 5 : 4]; + emit_typecheck(ctx, ord, (jl_value_t*)jl_symbol_type, + issetfield ? "setfield!" : isreplacefield ? "replacefield!" : "swapfield!"); if (!ord.constant) return false; - order = jl_get_atomic_order((jl_sym_t*)ord.constant, false, true); + order = jl_get_atomic_order((jl_sym_t*)ord.constant, !issetfield, true); } - if (order == jl_memory_order_invalid) { + enum jl_memory_order fail_order = order; + if (isreplacefield && nargs == 6) { + const jl_cgval_t &ord = argv[6]; + emit_typecheck(ctx, ord, (jl_value_t*)jl_symbol_type, "replacefield!"); + if (!ord.constant) + return false; + fail_order = jl_get_atomic_order((jl_sym_t*)ord.constant, true, false); + } + if (order == jl_memory_order_invalid || fail_order == jl_memory_order_invalid || fail_order > order) { emit_atomic_error(ctx, "invalid atomic ordering"); *ret = jl_cgval_t(); // unreachable return true; @@ -3189,27 +3167,39 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } if (idx != -1) { jl_value_t *ft = jl_svecref(uty->types, idx); - if (jl_subtype(val.typ, ft)) { + if (!jl_has_free_typevars(ft) && jl_subtype(val.typ, ft)) { // TODO: attempt better codegen for approximate types bool isboxed = jl_field_isptr(uty, idx); bool isatomic = jl_field_isatomic(uty, idx); bool needlock = isatomic && !isboxed && jl_datatype_size(jl_field_type(uty, idx)) > MAX_ATOMIC_SIZE; if (isatomic == (order == jl_memory_order_notatomic)) { emit_atomic_error(ctx, - isatomic ? "setfield!: atomic field cannot be written non-atomically" - : "setfield!: non-atomic field cannot be written atomically"); + issetfield ? + (isatomic ? "setfield!: atomic field cannot be written non-atomically" + : "setfield!: non-atomic field cannot be written atomically") : + isreplacefield ? + (isatomic ? "replacefield!: atomic field cannot be written non-atomically" + : "replacefield!: non-atomic field cannot be written atomically") : + (isatomic ? "swapfield!: atomic field cannot be written non-atomically" + : "swapfield!: non-atomic field cannot be written atomically")); + *ret = jl_cgval_t(); + return true; + } + if (isatomic == (fail_order == jl_memory_order_notatomic)) { + emit_atomic_error(ctx, + (isatomic ? "replacefield!: atomic field cannot be accessed non-atomically" + : "replacefield!: non-atomic field cannot be accessed atomically")); *ret = jl_cgval_t(); return true; } - if (needlock) - emit_lockstate_value(ctx, obj, true); - emit_setfield(ctx, uty, obj, idx, val, true, true, + *ret = emit_setfield(ctx, uty, obj, idx, val, cmp, true, true, (needlock || order <= jl_memory_order_notatomic) ? (isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic) // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 - : get_llvm_atomic_order(order)); - if (needlock) - emit_lockstate_value(ctx, obj, false); - *ret = val; + : get_llvm_atomic_order(order), + (needlock || fail_order <= jl_memory_order_notatomic) + ? (isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic) // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 + : get_llvm_atomic_order(fail_order), + needlock, issetfield, isreplacefield); return true; } } @@ -7233,17 +7223,6 @@ static std::pair, jl_llvm_functions_t> ctx.builder.SetCurrentDebugLocation(noDbg); ctx.builder.ClearInsertionPoint(); - auto undef_value_for_type = [&](Type *T) { - auto tracked = CountTrackedPointers(T); - Constant *undef; - if (tracked.count) - // make sure gc pointers (including ptr_phi of union-split) are initialized to NULL - undef = Constant::getNullValue(T); - else - undef = UndefValue::get(T); - return undef; - }; - // Codegen Phi nodes std::map, BasicBlock*> BB_rewrite_map; std::vector ToDelete; diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp index 904623e4ec43c..7d0e94fd30783 100644 --- a/src/intrinsics.cpp +++ b/src/intrinsics.cpp @@ -690,7 +690,8 @@ static jl_cgval_t emit_pointerset(jl_codectx_t &ctx, jl_cgval_t *argv) assert(!isboxed); if (!type_is_ghost(ptrty)) { thePtr = emit_unbox(ctx, ptrty->getPointerTo(), e, e.typ); - typed_store(ctx, thePtr, im1, x, ety, tbaa_data, nullptr, nullptr, isboxed, AtomicOrdering::NotAtomic, align_nb); + typed_store(ctx, thePtr, im1, x, jl_cgval_t(), ety, tbaa_data, nullptr, nullptr, isboxed, + AtomicOrdering::NotAtomic, AtomicOrdering::NotAtomic, align_nb, false, true, false, false); } } return e; diff --git a/src/llvm-gc-invariant-verifier.cpp b/src/llvm-gc-invariant-verifier.cpp index 1c584f3852e9e..29b8c9ac4e60c 100644 --- a/src/llvm-gc-invariant-verifier.cpp +++ b/src/llvm-gc-invariant-verifier.cpp @@ -55,13 +55,17 @@ struct GCInvariantVerifier : public FunctionPass, public InstVisitorgetType(); +void GCInvariantVerifier::checkStoreInst(Type *VTy, unsigned AS, Value &SI) { if (VTy->isPointerTy()) { /* We currently don't obey this for arguments. That's ok - they're externally rooted. */ @@ -90,12 +93,23 @@ void GCInvariantVerifier::visitStoreInst(StoreInst &SI) { AS != AddressSpace::Derived, "Illegal store of decayed value", &SI); } - VTy = SI.getPointerOperand()->getType(); - if (VTy->isPointerTy()) { - unsigned AS = cast(VTy)->getAddressSpace(); - Check(AS != AddressSpace::CalleeRooted, - "Illegal store to callee rooted value", &SI); - } + Check(AS != AddressSpace::CalleeRooted, + "Illegal store to callee rooted value", &SI); +} + +void GCInvariantVerifier::visitStoreInst(StoreInst &SI) { + Type *VTy = SI.getValueOperand()->getType(); + checkStoreInst(VTy, SI.getPointerAddressSpace(), SI); +} + +void GCInvariantVerifier::visitAtomicRMWInst(AtomicRMWInst &SI) { + Type *VTy = SI.getValOperand()->getType(); + checkStoreInst(VTy, SI.getPointerAddressSpace(), SI); +} + +void GCInvariantVerifier::visitAtomicCmpXchgInst(AtomicCmpXchgInst &SI) { + Type *VTy = SI.getNewValOperand()->getType(); + checkStoreInst(VTy, SI.getPointerAddressSpace(), SI); } void GCInvariantVerifier::visitLoadInst(LoadInst &LI) { diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp index ca066319d9c33..d47f6e3d0b114 100644 --- a/src/llvm-late-gc-lowering.cpp +++ b/src/llvm-late-gc-lowering.cpp @@ -496,6 +496,16 @@ static std::pair FindBaseValue(const State &S, Value *V, bool UseCac // In general a load terminates a walk break; } + else if (auto LI = dyn_cast(CurrentV)) { + // In general a load terminates a walk + (void)LI; + break; + } + else if (auto LI = dyn_cast(CurrentV)) { + // In general a load terminates a walk + (void)LI; + break; + } else if (auto II = dyn_cast(CurrentV)) { // Some intrinsics behave like LoadInst followed by a SelectInst // This should never happen in a derived addrspace (since those cannot be stored to memory) @@ -538,6 +548,7 @@ static std::pair FindBaseValue(const State &S, Value *V, bool UseCac } } assert(isa(CurrentV) || isa(CurrentV) || + isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || @@ -883,7 +894,8 @@ std::vector LateLowerGCFrame::NumberAllBase(State &S, Value *CurrentV) { Numbers = S.AllCompositeNumbering.at(CurrentV); } } else { - assert((isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || isa(CurrentV)) + assert((isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || isa(CurrentV) || + isa(CurrentV) || isa(CurrentV)) && "unexpected def expression"); // This is simple, we can just number them sequentially for (unsigned i = 0; i < tracked.count; ++i) { @@ -1042,7 +1054,8 @@ void RecursivelyVisit(callback f, Value *V) { f(VU); if (isa(TheUser) || isa(TheUser) || isa(TheUser) || isa(TheUser) || - isa(TheUser) || isa(TheUser)) + isa(TheUser) || isa(TheUser) || + isa(TheUser) || isa(TheUser)) continue; if (isa(TheUser) || isa(TheUser) || isa(TheUser)) { RecursivelyVisit(f, TheUser); @@ -1583,6 +1596,20 @@ State LateLowerGCFrame::LocalScan(Function &F) { MaybeNoteDef(S, BBS, LI, BBS.Safepoints, std::move(RefinedPtr)); } NoteOperandUses(S, BBS, I); + } else if (auto *LI = dyn_cast(&I)) { + Type *Ty = LI->getNewValOperand()->getType()->getScalarType(); + if (!Ty->isPointerTy() || Ty->getPointerAddressSpace() != AddressSpace::Loaded) { + MaybeNoteDef(S, BBS, LI, BBS.Safepoints); + } + NoteOperandUses(S, BBS, I); + // TODO: do we need MaybeTrackStore(S, LI); + } else if (auto *LI = dyn_cast(&I)) { + Type *Ty = LI->getType()->getScalarType(); + if (!Ty->isPointerTy() || Ty->getPointerAddressSpace() != AddressSpace::Loaded) { + MaybeNoteDef(S, BBS, LI, BBS.Safepoints); + } + NoteOperandUses(S, BBS, I); + // TODO: do we need MaybeTrackStore(S, LI); } else if (SelectInst *SI = dyn_cast(&I)) { auto tracked = CountTrackedPointers(SI->getType()); if (tracked.count && !tracked.derived) { diff --git a/src/llvm-propagate-addrspaces.cpp b/src/llvm-propagate-addrspaces.cpp index 6cfa66ddca6ff..a6afcda870911 100644 --- a/src/llvm-propagate-addrspaces.cpp +++ b/src/llvm-propagate-addrspaces.cpp @@ -51,8 +51,11 @@ struct PropagateJuliaAddrspaces : public FunctionPass, public InstVisitorgetType()->getPointerAddressSpace(); if (!isSpecialAS(AS)) return; - Value *Replacement = LiftPointer(LI.getPointerOperand(), LI.getType(), &LI); + Value *Replacement = LiftPointer(Original, T, &I); if (!Replacement) return; - LI.setOperand(LoadInst::getPointerOperandIndex(), Replacement); + I.setOperand(OpIndex, Replacement); +} + +void PropagateJuliaAddrspaces::visitLoadInst(LoadInst &LI) { + visitMemop(LI, LI.getType(), LoadInst::getPointerOperandIndex()); } void PropagateJuliaAddrspaces::visitStoreInst(StoreInst &SI) { - unsigned AS = SI.getPointerAddressSpace(); - if (!isSpecialAS(AS)) - return; - Value *Replacement = LiftPointer(SI.getPointerOperand(), SI.getValueOperand()->getType(), &SI); - if (!Replacement) - return; - SI.setOperand(StoreInst::getPointerOperandIndex(), Replacement); + visitMemop(SI, SI.getValueOperand()->getType(), StoreInst::getPointerOperandIndex()); +} + +void PropagateJuliaAddrspaces::visitAtomicCmpXchgInst(AtomicCmpXchgInst &SI) { + visitMemop(SI, SI.getNewValOperand()->getType(), AtomicCmpXchgInst::getPointerOperandIndex()); +} + +void PropagateJuliaAddrspaces::visitAtomicRMWInst(AtomicRMWInst &SI) { + visitMemop(SI, SI.getType(), AtomicRMWInst::getPointerOperandIndex()); } void PropagateJuliaAddrspaces::visitMemSetInst(MemSetInst &MI) { diff --git a/test/atomics.jl b/test/atomics.jl index 59c45299db221..2a0cbd7357c6e 100644 --- a/test/atomics.jl +++ b/test/atomics.jl @@ -184,12 +184,12 @@ test_field_operators(ARefxy{Complex{Int128}}(12345_10, 12345_20)) @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be written atomically") replacefield!(r, :y, y, y, :acquire_release, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be written atomically") replacefield!(r, :y, y, y, :sequentially_consistent, :not_atomic) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :not_atomic, :u) - @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be accessed atomically") replacefield!(r, :y, y, y, :not_atomic, :unordered) - @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be accessed atomically") replacefield!(r, :y, y, y, :not_atomic, :monotonic) - @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be accessed atomically") replacefield!(r, :y, y, y, :not_atomic, :acquire) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :not_atomic, :unordered) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :not_atomic, :monotonic) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :not_atomic, :acquire) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :not_atomic, :release) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :not_atomic, :acquire_release) - @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be accessed atomically") replacefield!(r, :y, y, y, :not_atomic, :sequentially_consistent) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :not_atomic, :sequentially_consistent) @test replacefield!(r, :y, x, y, :not_atomic, :not_atomic) === (x, true) @test replacefield!(r, :y, x, y, :not_atomic, :not_atomic) === (y, x === y) @test replacefield!(r, :y, y, y, :not_atomic) === (y, true) @@ -225,12 +225,12 @@ test_field_operators(ARefxy{Complex{Int128}}(12345_10, 12345_20)) @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be accessed non-atomically") replacefield!(r, :x, x, x, :acquire_release, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be accessed non-atomically") replacefield!(r, :x, x, x, :sequentially_consistent, :not_atomic) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :not_atomic, :u) - @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be written non-atomically") replacefield!(r, :x, x, x, :not_atomic, :unordered) - @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be written non-atomically") replacefield!(r, :x, x, x, :not_atomic, :monotonic) - @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be written non-atomically") replacefield!(r, :x, x, x, :not_atomic, :acquire) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :not_atomic, :unordered) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :not_atomic, :monotonic) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :not_atomic, :acquire) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :not_atomic, :release) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :not_atomic, :acquire_release) - @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be written non-atomically") replacefield!(r, :x, x, x, :not_atomic, :sequentially_consistent) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :not_atomic, :sequentially_consistent) @test replacefield!(r, :x, x, y, :sequentially_consistent, :sequentially_consistent) === (x, true) @test replacefield!(r, :x, x, y, :sequentially_consistent, :sequentially_consistent) === (y, x === y) @test replacefield!(r, :x, y, x, :sequentially_consistent) === (y, true) From d61ce5a652d6125a3468e45ed7f8404e3386d4c8 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 5 Jul 2021 19:37:56 -0400 Subject: [PATCH 065/146] non-power-of-two atomic handling (#41369) (cherry picked from commit 252ae698f96a05439b78934d123130c2addd5470) --- src/cgutils.cpp | 94 +++++++++++++------- src/datatype.c | 219 +++++++++++++++++++++++++++------------------- src/processor.cpp | 2 + test/atomics.jl | 67 +++++++++----- 4 files changed, 241 insertions(+), 141 deletions(-) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index f715abb3b490b..8c7bdad2a5903 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1479,12 +1479,19 @@ static jl_cgval_t typed_load(jl_codectx_t &ctx, Value *ptr, Value *idx_0based, j if (type_is_ghost(elty)) return ghostValue(jltype); AllocaInst *intcast = NULL; - if (!isboxed && Order != AtomicOrdering::NotAtomic && !elty->isIntOrPtrTy() && !elty->isFloatingPointTy()) { + if (!isboxed && Order != AtomicOrdering::NotAtomic && !elty->isIntOrPtrTy()) { const DataLayout &DL = jl_data_layout; unsigned nb = DL.getTypeSizeInBits(elty); intcast = ctx.builder.CreateAlloca(elty); elty = Type::getIntNTy(jl_LLVMContext, nb); } + Type *realelty = elty; + if (Order != AtomicOrdering::NotAtomic && isa(elty)) { + unsigned nb = cast(elty)->getBitWidth(); + unsigned nb2 = PowerOf2Ceil(nb); + if (nb != nb2) + elty = Type::getIntNTy(jl_LLVMContext, nb2); + } Type *ptrty = PointerType::get(elty, ptr->getType()->getPointerAddressSpace()); Value *data; if (ptr->getType() != ptrty) @@ -1493,7 +1500,7 @@ static jl_cgval_t typed_load(jl_codectx_t &ctx, Value *ptr, Value *idx_0based, j data = ptr; if (idx_0based) data = ctx.builder.CreateInBoundsGEP(elty, data, idx_0based); - Instruction *load; + Value *instr; // TODO: can only lazy load if we can create a gc root for ptr for the lifetime of elt //if (elty->isAggregateType() && tbaa == tbaa_immut && !alignment) { // can lazy load on demand, no copy needed // elt = data; @@ -1503,20 +1510,23 @@ static jl_cgval_t typed_load(jl_codectx_t &ctx, Value *ptr, Value *idx_0based, j alignment = sizeof(void*); else if (!alignment) alignment = julia_alignment(jltype); - load = ctx.builder.CreateAlignedLoad(data, Align(alignment), false); - cast(load)->setOrdering(Order); + LoadInst *load = ctx.builder.CreateAlignedLoad(data, Align(alignment), false); + load->setOrdering(Order); if (aliasscope) load->setMetadata("alias.scope", aliasscope); if (isboxed) - load = maybe_mark_load_dereferenceable(load, true, jltype); + maybe_mark_load_dereferenceable(load, true, jltype); if (tbaa) - load = tbaa_decorate(tbaa, load); + tbaa_decorate(tbaa, load); + instr = load; + if (elty != realelty) + instr = ctx.builder.CreateTrunc(instr, realelty); if (intcast) { - ctx.builder.CreateStore(load, ctx.builder.CreateBitCast(intcast, load->getType()->getPointerTo())); - load = ctx.builder.CreateLoad(intcast); + ctx.builder.CreateStore(instr, ctx.builder.CreateBitCast(intcast, instr->getType()->getPointerTo())); + instr = ctx.builder.CreateLoad(intcast); } if (maybe_null_if_boxed) { - Value *first_ptr = isboxed ? load : extract_first_ptr(ctx, load); + Value *first_ptr = isboxed ? instr : extract_first_ptr(ctx, instr); if (first_ptr) null_pointer_check(ctx, first_ptr, nullcheck); } @@ -1526,9 +1536,9 @@ static jl_cgval_t typed_load(jl_codectx_t &ctx, Value *ptr, Value *idx_0based, j //load->setMetadata(LLVMContext::MD_range, MDNode::get(jl_LLVMContext, { // ConstantAsMetadata::get(ConstantInt::get(T_int8, 0)), // ConstantAsMetadata::get(ConstantInt::get(T_int8, 2)) })); - load = ctx.builder.Insert(CastInst::Create(Instruction::Trunc, load, T_int1)); + instr = ctx.builder.CreateTrunc(instr, T_int1); } - return mark_julia_type(ctx, load, isboxed, jltype); + return mark_julia_type(ctx, instr, isboxed, jltype); } static jl_cgval_t typed_store(jl_codectx_t &ctx, @@ -1544,18 +1554,27 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, if (type_is_ghost(elty)) return oldval; Value *intcast = nullptr; - if (!isboxed && Order != AtomicOrdering::NotAtomic && !elty->isIntOrPtrTy() && !elty->isFloatingPointTy()) { + if (!isboxed && Order != AtomicOrdering::NotAtomic && !elty->isIntOrPtrTy()) { const DataLayout &DL = jl_data_layout; unsigned nb = DL.getTypeSizeInBits(elty); if (!issetfield) intcast = ctx.builder.CreateAlloca(elty); elty = Type::getIntNTy(jl_LLVMContext, nb); } + Type *realelty = elty; + if (Order != AtomicOrdering::NotAtomic && isa(elty)) { + unsigned nb = cast(elty)->getBitWidth(); + unsigned nb2 = PowerOf2Ceil(nb); + if (nb != nb2) + elty = Type::getIntNTy(jl_LLVMContext, nb2); + } Value *r; if (!isboxed) - r = emit_unbox(ctx, elty, rhs, jltype); + r = emit_unbox(ctx, realelty, rhs, jltype); else r = boxed(ctx, rhs); + if (realelty != elty) + r = ctx.builder.CreateZExt(r, elty); Type *ptrty = PointerType::get(elty, ptr->getType()->getPointerAddressSpace()); if (ptr->getType() != ptrty) ptr = ctx.builder.CreateBitCast(ptr, ptrty); @@ -1578,18 +1597,19 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, instr->setMetadata("noalias", aliasscope); if (tbaa) tbaa_decorate(tbaa, instr); - } - if (isreplacefield) { - oldval = mark_julia_type(ctx, instr, isboxed, jltype); - Value *first_ptr = nullptr; - if (maybe_null_if_boxed) - first_ptr = isboxed ? instr : extract_first_ptr(ctx, instr); - Success = emit_nullcheck_guard(ctx, first_ptr, [&] { - return emit_f_is(ctx, oldval, cmp); - }); - BasicBlock *BB = BasicBlock::Create(jl_LLVMContext, "xchg", ctx.f); - ctx.builder.CreateCondBr(Success, BB, DoneBB); - ctx.builder.SetInsertPoint(BB); + assert(realelty == elty); + if (isreplacefield) { + oldval = mark_julia_type(ctx, instr, isboxed, jltype); + Value *first_ptr = nullptr; + if (maybe_null_if_boxed) + first_ptr = isboxed ? instr : extract_first_ptr(ctx, instr); + Success = emit_nullcheck_guard(ctx, first_ptr, [&] { + return emit_f_is(ctx, oldval, cmp); + }); + BasicBlock *BB = BasicBlock::Create(jl_LLVMContext, "xchg", ctx.f); + ctx.builder.CreateCondBr(Success, BB, DoneBB); + ctx.builder.SetInsertPoint(BB); + } } StoreInst *store = ctx.builder.CreateAlignedStore(r, ptr, Align(alignment)); store->setOrdering(Order); @@ -1628,7 +1648,9 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, Current->addIncoming(instr, SkipBB); ctx.builder.SetInsertPoint(BB); } - Compare = emit_unbox(ctx, elty, cmp, jltype); + Compare = emit_unbox(ctx, realelty, cmp, jltype); + if (realelty != elty) + Compare = ctx.builder.CreateZExt(Compare, elty); } else if (cmp.isboxed) { Compare = boxed(ctx, cmp); @@ -1676,21 +1698,26 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, if (tbaa) tbaa_decorate(tbaa, store); instr = ctx.builder.Insert(ExtractValueInst::Create(store, 0)); - Success = ctx.builder.CreateExtractValue(store, 1); + Success = ctx.builder.Insert(ExtractValueInst::Create(store, 1)); Value *Done = Success; if (needloop) { if (isreplacefield) { + Value *realinstr = instr; + if (realelty != elty) + realinstr = ctx.builder.CreateTrunc(instr, realelty); if (intcast) { - ctx.builder.CreateStore(instr, ctx.builder.CreateBitCast(intcast, instr->getType()->getPointerTo())); + ctx.builder.CreateStore(realinstr, ctx.builder.CreateBitCast(intcast, realinstr->getType()->getPointerTo())); oldval = mark_julia_slot(intcast, jltype, NULL, tbaa_stack); + if (maybe_null_if_boxed) + realinstr = ctx.builder.CreateLoad(intcast); } else { - oldval = mark_julia_type(ctx, instr, isboxed, jltype); + oldval = mark_julia_type(ctx, realinstr, isboxed, jltype); } Done = emit_guarded_test(ctx, ctx.builder.CreateNot(Success), false, [&] { Value *first_ptr = nullptr; if (maybe_null_if_boxed) - first_ptr = isboxed ? instr : extract_first_ptr(ctx, instr); + first_ptr = isboxed ? realinstr : extract_first_ptr(ctx, realinstr); return emit_nullcheck_guard(ctx, first_ptr, [&] { return emit_f_is(ctx, oldval, cmp); }); @@ -1747,6 +1774,8 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, } } if (!issetfield) { + if (realelty != elty) + instr = ctx.builder.Insert(CastInst::Create(Instruction::Trunc, instr, realelty)); if (intcast) { ctx.builder.CreateStore(instr, ctx.builder.CreateBitCast(intcast, instr->getType()->getPointerTo())); instr = ctx.builder.CreateLoad(intcast); @@ -2053,6 +2082,9 @@ static jl_cgval_t emit_getfield_knownidx(jl_codectx_t &ctx, const jl_cgval_t &st emit_atomic_error(ctx, "getfield: atomic field cannot be accessed non-atomically"); return jl_cgval_t(); // unreachable } + if (order == jl_memory_order_unspecified) { + order = isatomic ? jl_memory_order_unordered : jl_memory_order_notatomic; + } if (jfty == jl_bottom_type) { raise_exception(ctx, literal_pointer_val(ctx, jl_undefref_exception)); return jl_cgval_t(); // unreachable @@ -2126,7 +2158,7 @@ static jl_cgval_t emit_getfield_knownidx(jl_codectx_t &ctx, const jl_cgval_t &st if (needlock) emit_lockstate_value(ctx, strct, true); jl_cgval_t ret = typed_load(ctx, addr, NULL, jfty, tbaa, nullptr, false, - needlock || order <= jl_memory_order_notatomic ? AtomicOrdering::NotAtomic : get_llvm_atomic_order(order), // TODO: we should use unordered for anything with CountTrackedPointers(elty).count > 0 + needlock ? AtomicOrdering::NotAtomic : get_llvm_atomic_order(order), // TODO: we should use unordered for anything with CountTrackedPointers(elty).count > 0 maybe_null, align, nullcheck); if (needlock) emit_lockstate_value(ctx, strct, false); diff --git a/src/datatype.c b/src/datatype.c index a321b417d91c0..1a3ffa78170ac 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -730,7 +730,53 @@ JL_DLLEXPORT int jl_is_foreign_type(jl_datatype_t *dt) #error MAX_POINTERATOMIC_SIZE too large #endif #if MAX_POINTERATOMIC_SIZE >= 16 +#ifndef _P64 +#error 12 byte GC pool size not implemented for 32-bit +#endif typedef __uint128_t uint128_t; +typedef uint128_t jl_uatomicmax_t; +#else +typedef uint64_t jl_uatomicmax_t; +#endif + +#if BYTE_ORDER != LITTLE_ENDIAN +#error using masks for atomics (instead of memcpy like nb == 16) assumes little endian +#endif + +static inline uint32_t zext_read32(const jl_value_t *x, size_t nb) JL_NOTSAFEPOINT +{ + uint32_t y = *(uint32_t*)x; + if (nb == 4) + return y; + else // if (nb == 3) + return 0xffffffu & y; +} + +#if MAX_POINTERATOMIC_SIZE >= 8 +static inline uint64_t zext_read64(const jl_value_t *x, size_t nb) JL_NOTSAFEPOINT +{ + uint64_t y = *(uint64_t*)x; + if (nb == 8) + return y; + else if (nb == 7) + return 0xffffffffffffffu & y; + else if (nb == 6) + return 0xffffffffffffu & y; + else // if (nb == 5) + return 0xffffffffffu & y; +} +#endif + +#if MAX_POINTERATOMIC_SIZE >= 16 +static inline uint128_t zext_read128(const jl_value_t *x, size_t nb) JL_NOTSAFEPOINT +{ + uint128_t y = 0; + if (nb == 16) + y = *(uint128_t*)x; + else + memcpy(&y, x, nb); + return y; +} #endif JL_DLLEXPORT jl_value_t *jl_new_bits(jl_value_t *dt, const void *data) @@ -755,16 +801,7 @@ JL_DLLEXPORT jl_value_t *jl_new_bits(jl_value_t *dt, const void *data) jl_task_t *ct = jl_current_task; jl_value_t *v = jl_gc_alloc(ct->ptls, nb, bt); - switch (nb) { - case 1: *(uint8_t*) v = *(uint8_t*)data; break; - case 2: *(uint16_t*)v = jl_load_unaligned_i16(data); break; - case 4: *(uint32_t*)v = jl_load_unaligned_i32(data); break; - case 8: *(uint64_t*)v = jl_load_unaligned_i64(data); break; - case 16: - memcpy(jl_assume_aligned(v, 16), data, 16); - break; - default: memcpy(v, data, nb); - } + memcpy(jl_assume_aligned(v, sizeof(void*)), data, nb); return v; } @@ -789,19 +826,24 @@ JL_DLLEXPORT jl_value_t *jl_atomic_new_bits(jl_value_t *dt, const char *data) jl_task_t *ct = jl_current_task; jl_value_t *v = jl_gc_alloc(ct->ptls, nb, bt); - switch (nb) { - case 1: *(uint8_t*) v = jl_atomic_load((uint8_t*)data); break; - case 2: *(uint16_t*)v = jl_atomic_load((uint16_t*)data); break; - case 4: *(uint32_t*)v = jl_atomic_load((uint32_t*)data); break; + // data is aligned to the power of two, + // we will write too much of v, but the padding should exist + if (nb == 1) + *(uint8_t*) v = jl_atomic_load((uint8_t*)data); + else if (nb <= 2) + *(uint16_t*)v = jl_atomic_load((uint16_t*)data); + else if (nb <= 4) + *(uint32_t*)v = jl_atomic_load((uint32_t*)data); #if MAX_POINTERATOMIC_SIZE >= 8 - case 8: *(uint64_t*)v = jl_atomic_load((uint64_t*)data); break; + else if (nb <= 8) + *(uint64_t*)v = jl_atomic_load((uint64_t*)data); #endif #if MAX_POINTERATOMIC_SIZE >= 16 - case 16: *(uint128_t*)v = jl_atomic_load((uint128_t*)data); break; + else if (nb <= 16) + *(uint128_t*)v = jl_atomic_load((uint128_t*)data); #endif - default: + else abort(); - } return v; } @@ -809,20 +851,26 @@ JL_DLLEXPORT void jl_atomic_store_bits(char *dst, const jl_value_t *src, int nb) { // dst must have the required alignment for an atomic of the given size // src must be aligned by the GC - switch (nb) { - case 0: break; - case 1: jl_atomic_store((uint8_t*)dst, *(uint8_t*)src); break; - case 2: jl_atomic_store((uint16_t*)dst, *(uint16_t*)src); break; - case 4: jl_atomic_store((uint32_t*)dst, *(uint32_t*)src); break; + // we may therefore read too much from src, but will zero the excess bits + // before the store (so that we can get faster cmpswap later) + if (nb == 0) + ; + else if (nb == 1) + jl_atomic_store((uint8_t*)dst, *(uint8_t*)src); + else if (nb == 2) + jl_atomic_store((uint16_t*)dst, *(uint16_t*)src); + else if (nb <= 4) + jl_atomic_store((uint32_t*)dst, zext_read32(src, nb)); #if MAX_POINTERATOMIC_SIZE >= 8 - case 8: jl_atomic_store((uint64_t*)dst, *(uint64_t*)src); break; + else if (nb <= 8) + jl_atomic_store((uint64_t*)dst, zext_read64(src, nb)); #endif #if MAX_POINTERATOMIC_SIZE >= 16 - case 16: jl_atomic_store((uint128_t*)dst, *(uint128_t*)src); break; + else if (nb <= 16) + jl_atomic_store((uint128_t*)dst, zext_read128(src, nb)); #endif - default: + else abort(); - } } JL_DLLEXPORT jl_value_t *jl_atomic_swap_bits(jl_value_t *dt, char *dst, const jl_value_t *src, int nb) @@ -845,19 +893,22 @@ JL_DLLEXPORT jl_value_t *jl_atomic_swap_bits(jl_value_t *dt, char *dst, const jl jl_task_t *ct = jl_current_task; jl_value_t *v = jl_gc_alloc(ct->ptls, jl_datatype_size(bt), bt); - switch (nb) { - case 1: *(uint8_t*) v = jl_atomic_exchange((uint8_t*)dst, *(uint8_t*)src); break; - case 2: *(uint16_t*)v = jl_atomic_exchange((uint16_t*)dst, *(uint16_t*)src); break; - case 4: *(uint32_t*)v = jl_atomic_exchange((uint32_t*)dst, *(uint32_t*)src); break; + if (nb == 1) + *(uint8_t*)v = jl_atomic_exchange((uint8_t*)dst, *(uint8_t*)src); + else if (nb == 2) + *(uint16_t*)v = jl_atomic_exchange((uint16_t*)dst, *(uint16_t*)src); + else if (nb <= 4) + *(uint32_t*)v = jl_atomic_exchange((uint32_t*)dst, zext_read32(src, nb)); #if MAX_POINTERATOMIC_SIZE >= 8 - case 8: *(uint64_t*)v = jl_atomic_exchange((uint64_t*)dst, *(uint64_t*)src); break; + else if (nb <= 8) + *(uint64_t*)v = jl_atomic_exchange((uint64_t*)dst, zext_read64(src, nb)); #endif #if MAX_POINTERATOMIC_SIZE >= 16 - case 16: *(uint128_t*)v = jl_atomic_exchange((uint128_t*)dst, *(uint128_t*)src); break; + else if (nb <= 16) + *(uint128_t*)v = jl_atomic_exchange((uint128_t*)dst, zext_read128(src, nb)); #endif - default: + else abort(); - } return v; } @@ -866,41 +917,37 @@ JL_DLLEXPORT int jl_atomic_bool_cmpswap_bits(char *dst, const jl_value_t *expect // dst must have the required alignment for an atomic of the given size // n.b.: this can spuriously fail if there are padding bits, the caller should deal with that int success; - switch (nb) { - case 0: { + if (nb == 0) { success = 1; - break; } - case 1: { + else if (nb == 1) { uint8_t y = *(uint8_t*)expected; success = jl_atomic_cmpswap((uint8_t*)dst, &y, *(uint8_t*)src); - break; } - case 2: { + else if (nb == 2) { uint16_t y = *(uint16_t*)expected; success = jl_atomic_cmpswap((uint16_t*)dst, &y, *(uint16_t*)src); - break; } - case 4: { - uint32_t y = *(uint32_t*)expected; - success = jl_atomic_cmpswap((uint32_t*)dst, &y, *(uint32_t*)src); - break; + else if (nb <= 4) { + uint32_t y = zext_read32(expected, nb); + uint32_t z = zext_read32(src, nb); + success = jl_atomic_cmpswap((uint32_t*)dst, &y, z); } #if MAX_POINTERATOMIC_SIZE >= 8 - case 8: { - uint64_t y = *(uint64_t*)expected; - success = jl_atomic_cmpswap((uint64_t*)dst, &y, *(uint64_t*)src); - break; + else if (nb <= 8) { + uint64_t y = zext_read64(expected, nb); + uint64_t z = zext_read64(src, nb); + success = jl_atomic_cmpswap((uint64_t*)dst, &y, z); } #endif #if MAX_POINTERATOMIC_SIZE >= 16 - case 16: { - uint128_t y = *(uint128_t*)expected; - success = jl_atomic_cmpswap((uint128_t*)dst, &y, *(uint128_t*)src); - break; + else if (nb <= 16) { + uint128_t y = zext_read128(expected, nb); + uint128_t z = zext_read128(src, nb); + success = jl_atomic_cmpswap((uint128_t*)dst, &y, z); } #endif - default: + else { abort(); } return success; @@ -920,45 +967,42 @@ JL_DLLEXPORT jl_value_t *jl_atomic_cmpswap_bits(jl_datatype_t *dt, char *dst, co jl_value_t *y = jl_gc_alloc(ct->ptls, isptr ? nb : tuptyp->size, isptr ? dt : tuptyp); int success; jl_datatype_t *et = (jl_datatype_t*)jl_typeof(expected); - switch (nb) { - case 0: { + if (nb == 0) { success = (dt == et); - break; } - case 1: { + else if (nb == 1) { uint8_t *y8 = (uint8_t*)y; + assert(!dt->layout->haspadding); if (dt == et) { *y8 = *(uint8_t*)expected; - success = jl_atomic_cmpswap((uint8_t*)dst, y8, *(uint8_t*)src); + uint8_t z8 = *(uint8_t*)src; + success = jl_atomic_cmpswap((uint8_t*)dst, y8, z8); } else { *y8 = jl_atomic_load((uint8_t*)dst); success = 0; } - break; } - case 2: { + else if (nb == 2) { uint16_t *y16 = (uint16_t*)y; + assert(!dt->layout->haspadding); if (dt == et) { *y16 = *(uint16_t*)expected; - while (1) { - success = jl_atomic_cmpswap((uint16_t*)dst, y16, *(uint16_t*)src); - if (success || !dt->layout->haspadding || !jl_egal__bits(y, expected, dt)) - break; - } + uint16_t z16 = *(uint16_t*)src; + success = jl_atomic_cmpswap((uint16_t*)dst, y16, z16); } else { *y16 = jl_atomic_load((uint16_t*)dst); success = 0; } - break; } - case 4: { + else if (nb <= 4) { uint32_t *y32 = (uint32_t*)y; if (dt == et) { - *y32 = *(uint32_t*)expected; + *y32 = zext_read32(expected, nb); + uint32_t z32 = zext_read32(src, nb); while (1) { - success = jl_atomic_cmpswap((uint32_t*)dst, y32, *(uint32_t*)src); + success = jl_atomic_cmpswap((uint32_t*)dst, y32, z32); if (success || !dt->layout->haspadding || !jl_egal__bits(y, expected, dt)) break; } @@ -967,15 +1011,15 @@ JL_DLLEXPORT jl_value_t *jl_atomic_cmpswap_bits(jl_datatype_t *dt, char *dst, co *y32 = jl_atomic_load((uint32_t*)dst); success = 0; } - break; } #if MAX_POINTERATOMIC_SIZE >= 8 - case 8: { + else if (nb <= 8) { uint64_t *y64 = (uint64_t*)y; if (dt == et) { - *y64 = *(uint64_t*)expected; + *y64 = zext_read64(expected, nb); + uint64_t z64 = zext_read64(src, nb); while (1) { - success = jl_atomic_cmpswap((uint64_t*)dst, y64, *(uint64_t*)src); + success = jl_atomic_cmpswap((uint64_t*)dst, y64, z64); if (success || !dt->layout->haspadding || !jl_egal__bits(y, expected, dt)) break; } @@ -984,16 +1028,16 @@ JL_DLLEXPORT jl_value_t *jl_atomic_cmpswap_bits(jl_datatype_t *dt, char *dst, co *y64 = jl_atomic_load((uint64_t*)dst); success = 0; } - break; } #endif #if MAX_POINTERATOMIC_SIZE >= 16 - case 16: { + else if (nb <= 16) { uint128_t *y128 = (uint128_t*)y; if (dt == et) { - *y128 = *(uint128_t*)expected; + *y128 = zext_read128(expected, nb); + uint128_t z128 = zext_read128(src, nb); while (1) { - success = jl_atomic_cmpswap((uint128_t*)dst, y128, *(uint128_t*)src); + success = jl_atomic_cmpswap((uint128_t*)dst, y128, z128); if (success || !dt->layout->haspadding || !jl_egal__bits(y, expected, dt)) break; } @@ -1002,10 +1046,9 @@ JL_DLLEXPORT jl_value_t *jl_atomic_cmpswap_bits(jl_datatype_t *dt, char *dst, co *y128 = jl_atomic_load((uint128_t*)dst); success = 0; } - break; } #endif - default: + else { abort(); } if (isptr) { @@ -1417,16 +1460,12 @@ static inline void memassign_safe(int hasptr, jl_value_t *parent, char *dst, con else { // src must be a heap box. assert(nb == jl_datatype_size(jl_typeof(src))); + if (nb >= 16) { + memcpy(dst, jl_assume_aligned(src, 16), nb); + return; + } } - switch (nb) { - case 0: break; - case 1: *(uint8_t*)dst = *(uint8_t*)src; break; - case 2: jl_store_unaligned_i16(dst, *(uint16_t*)src); break; - case 4: jl_store_unaligned_i32(dst, *(uint32_t*)src); break; - case 8: jl_store_unaligned_i64(dst, *(uint64_t*)src); break; - case 16: memcpy(dst, jl_assume_aligned(src, 16), 16); break; - default: memcpy(dst, src, nb); break; - } + memcpy(dst, jl_assume_aligned(src, sizeof(void*)), nb); } void set_nth_field(jl_datatype_t *st, jl_value_t *v, size_t i, jl_value_t *rhs, int isatomic) JL_NOTSAFEPOINT diff --git a/src/processor.cpp b/src/processor.cpp index 9d4ac476ef316..c5e42368412e8 100644 --- a/src/processor.cpp +++ b/src/processor.cpp @@ -401,6 +401,8 @@ static inline std::vector serialize_target_data(llvm::StringRef name, { std::vector res; auto add_data = [&] (const void *data, size_t sz) { + if (sz == 0) + return; size_t old_sz = res.size(); res.resize(old_sz + sz); memcpy(&res[old_sz], data, sz); diff --git a/test/atomics.jl b/test/atomics.jl index 2a0cbd7357c6e..e4202b5ce1aea 100644 --- a/test/atomics.jl +++ b/test/atomics.jl @@ -63,22 +63,43 @@ let (x, y) = (Complex{Int128}(10, 30), Complex{Int128}(20, 40)) @test sizeof(r) == sizeof(ar) - Int(fieldoffset(typeof(ar), 1)) end +struct PadIntA <: Number # internal padding + a::Int8 + b::Int16 + PadIntA(x) = new(82, x) +end +struct PadIntB <: Number # external padding + a::UInt8 + b::UInt8 + c::UInt8 + PadIntB(x) = new(x & 0xff, (x >> 8) & 0xff, (x >> 16) & 0xff) +end +primitive type Int24 <: Signed 24 end # integral padding +Int24(x::Int) = Core.Intrinsics.trunc_int(Int24, x) +Base.Int(x::PadIntB) = x.a + (Int(x.b) << 8) + (Int(x.c) << 16) +Base.:(+)(x::PadIntA, b::Int) = PadIntA(x.b + b) +Base.:(+)(x::PadIntB, b::Int) = PadIntB(Int(x) + b) +Base.:(+)(x::Int24, b::Int) = Core.Intrinsics.add_int(x, Int24(b)) +Base.show(io::IO, x::PadIntA) = print(io, "PadIntA(", x.b, ")") +Base.show(io::IO, x::PadIntB) = print(io, "PadIntB(", Int(x), ")") +Base.show(io::IO, x::Int24) = print(io, "Int24(", Core.Intrinsics.zext_int(Int, x), ")") + @noinline function _test_field_operators(r) r = r[] T = typeof(getfield(r, :x)) - @test getfield(r, :x, :sequentially_consistent) === T(12345_10) - @test setfield!(r, :x, T(12345_1), :sequentially_consistent) === T(12345_1) - @test getfield(r, :x, :sequentially_consistent) === T(12345_1) - @test replacefield!(r, :x, 12345_1 % UInt, T(12345_100), :sequentially_consistent, :sequentially_consistent) === (T(12345_1), false) - @test replacefield!(r, :x, T(12345_1), T(12345_100), :sequentially_consistent, :sequentially_consistent) === (T(12345_1), true) - @test getfield(r, :x, :sequentially_consistent) === T(12345_100) - @test replacefield!(r, :x, T(12345_1), T(12345_1), :sequentially_consistent, :sequentially_consistent) === (T(12345_100), false) - @test getfield(r, :x, :sequentially_consistent) === T(12345_100) - @test modifyfield!(r, :x, add, 1, :sequentially_consistent) === (T(12345_100), T(12345_101)) - @test modifyfield!(r, :x, add, 1, :sequentially_consistent) === (T(12345_101), T(12345_102)) - @test getfield(r, :x, :sequentially_consistent) === T(12345_102) - @test swapfield!(r, :x, T(12345_1), :sequentially_consistent) === T(12345_102) - @test getfield(r, :x, :sequentially_consistent) === T(12345_1) + @test getfield(r, :x, :sequentially_consistent) === T(123_10) + @test setfield!(r, :x, T(123_1), :sequentially_consistent) === T(123_1) + @test getfield(r, :x, :sequentially_consistent) === T(123_1) + @test replacefield!(r, :x, 123_1 % UInt, T(123_30), :sequentially_consistent, :sequentially_consistent) === (T(123_1), false) + @test replacefield!(r, :x, T(123_1), T(123_30), :sequentially_consistent, :sequentially_consistent) === (T(123_1), true) + @test getfield(r, :x, :sequentially_consistent) === T(123_30) + @test replacefield!(r, :x, T(123_1), T(123_1), :sequentially_consistent, :sequentially_consistent) === (T(123_30), false) + @test getfield(r, :x, :sequentially_consistent) === T(123_30) + @test modifyfield!(r, :x, add, 1, :sequentially_consistent) === (T(123_30), T(123_31)) + @test modifyfield!(r, :x, add, 1, :sequentially_consistent) === (T(123_31), T(123_32)) + @test getfield(r, :x, :sequentially_consistent) === T(123_32) + @test swapfield!(r, :x, T(123_1), :sequentially_consistent) === T(123_32) + @test getfield(r, :x, :sequentially_consistent) === T(123_1) nothing end @noinline function test_field_operators(r) @@ -86,11 +107,15 @@ end _test_field_operators(Ref{Any}(copy(r))) nothing end -test_field_operators(ARefxy{Int}(12345_10, 12345_20)) -test_field_operators(ARefxy{Any}(12345_10, 12345_20)) -test_field_operators(ARefxy{Union{Nothing,Int}}(12345_10, nothing)) -test_field_operators(ARefxy{Complex{Int32}}(12345_10, 12345_20)) -test_field_operators(ARefxy{Complex{Int128}}(12345_10, 12345_20)) +test_field_operators(ARefxy{Int}(123_10, 123_20)) +test_field_operators(ARefxy{Any}(123_10, 123_20)) +test_field_operators(ARefxy{Union{Nothing,Int}}(123_10, nothing)) +test_field_operators(ARefxy{Complex{Int32}}(123_10, 123_20)) +test_field_operators(ARefxy{Complex{Int128}}(123_10, 123_20)) +test_field_operators(ARefxy{PadIntA}(123_10, 123_20)) +test_field_operators(ARefxy{PadIntB}(123_10, 123_20)) +#FIXME: test_field_operators(ARefxy{Int24}(123_10, 123_20)) +test_field_operators(ARefxy{Float64}(123_10, 123_20)) @noinline function _test_field_orderings(r, x, y) @nospecialize x y @@ -247,11 +272,13 @@ test_field_orderings(true, false) test_field_orderings("hi", "bye") test_field_orderings(:hi, :bye) test_field_orderings(nothing, nothing) -test_field_orderings(ARefxy{Any}(12345_10, 12345_20), 12345_10, 12345_20) +test_field_orderings(ARefxy{Any}(123_10, 123_20), 123_10, 123_20) test_field_orderings(ARefxy{Any}(true, false), true, false) test_field_orderings(ARefxy{Union{Nothing,Missing}}(nothing, missing), nothing, missing) -test_field_orderings(ARefxy{Union{Nothing,Int}}(nothing, 12345_1), nothing, 12345_1) +test_field_orderings(ARefxy{Union{Nothing,Int}}(nothing, 123_1), nothing, 123_1) test_field_orderings(Complex{Int128}(10, 30), Complex{Int128}(20, 40)) +test_field_orderings(10.0, 20.0) +test_field_orderings(NaN, Inf) struct UndefComplex{T} re::T From e76c9dad42c137c7812fb1970ecc23166f78ee1f Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 7 Jul 2021 10:12:16 +0200 Subject: [PATCH 066/146] Set VERSION to 1.7.0-beta3 (#41487) --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 070cf249531ef..4ccfeecee49f0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.0-beta2 +1.7.0-beta3 From 2b217590ab056714efe25d97bd992e2bb789180b Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Tue, 6 Jul 2021 20:13:14 +0200 Subject: [PATCH 067/146] Fix pivoted cholesky docstrings (#41298) (cherry picked from commit 7409a1c007b7773544223f0e0a2d8aaee4a45172) --- stdlib/LinearAlgebra/src/cholesky.jl | 68 +++++++++++++++------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/stdlib/LinearAlgebra/src/cholesky.jl b/stdlib/LinearAlgebra/src/cholesky.jl index 6e381243faf43..0030ba360602c 100644 --- a/stdlib/LinearAlgebra/src/cholesky.jl +++ b/stdlib/LinearAlgebra/src/cholesky.jl @@ -110,8 +110,10 @@ positive semi-definite matrix `A`. This is the return type of [`cholesky(_, Val( the corresponding matrix factorization function. The triangular Cholesky factor can be obtained from the factorization `F::CholeskyPivoted` -via `F.L` and `F.U`, and the permutation via `F.p`, where `A[F.p, F.p] ≈ F.U' * F.U ≈ F.L * F.L'`, -or alternatively `A ≈ F.U[:, F.p]' * F.U[:, F.p] ≈ F.L[F.p, :] * F.L[F.p, :]'`. +via `F.L` and `F.U`, and the permutation via `F.p`, where `A[F.p, F.p] ≈ Ur' * Ur ≈ Lr * Lr'` +with `Ur = F.U[1:F.rank, :]` and `Lr = F.L[:, 1:F.rank]`, or alternatively +`A ≈ Up' * Up ≈ Lp * Lp'` with `Up = F.U[1:F.rank, invperm(F.p)]` and +`Lp = F.L[invperm(F.p), 1:F.rank]`. The following functions are available for `CholeskyPivoted` objects: [`size`](@ref), [`\\`](@ref), [`inv`](@ref), [`det`](@ref), and [`rank`](@ref). @@ -120,25 +122,28 @@ Iterating the decomposition produces the components `L` and `U`. # Examples ```jldoctest -julia> A = [4. 12. -16.; 12. 37. -43.; -16. -43. 98.] -3×3 Matrix{Float64}: - 4.0 12.0 -16.0 - 12.0 37.0 -43.0 - -16.0 -43.0 98.0 +julia> X = [1.0, 2.0, 3.0, 4.0]; -julia> C = cholesky(A, Val(true)) +julia> A = X * X'; + +julia> C = cholesky(A, Val(true), check = false) CholeskyPivoted{Float64, Matrix{Float64}} -U factor with rank 3: -3×3 UpperTriangular{Float64, Matrix{Float64}}: - 9.89949 -4.34366 -1.61624 - ⋅ 4.25825 1.1694 - ⋅ ⋅ 0.142334 +U factor with rank 1: +4×4 UpperTriangular{Float64, Matrix{Float64}}: + 4.0 2.0 3.0 1.0 + ⋅ 0.0 6.0 2.0 + ⋅ ⋅ 9.0 3.0 + ⋅ ⋅ ⋅ 1.0 permutation: -3-element Vector{Int64}: - 3 +4-element Vector{Int64}: + 4 2 + 3 1 +julia> C.U[1:C.rank, :]' * C.U[1:C.rank, :] ≈ A[C.p, C.p] +true + julia> l, u = C; # destructuring via iteration julia> l == C.L && u == C.U @@ -398,8 +403,9 @@ and return a [`CholeskyPivoted`](@ref) factorization. The matrix `A` can either or [`Hermitian`](@ref) [`StridedMatrix`](@ref) or a *perfectly* symmetric or Hermitian `StridedMatrix`. The triangular Cholesky factor can be obtained from the factorization `F` via `F.L` and `F.U`, -and the permutation via `F.p`, where `A[F.p, F.p] ≈ F.U' * F.U ≈ F.L * F.L'`, or alternatively -`A ≈ F.U[:, F.p]' * F.U[:, F.p] ≈ F.L[F.p, :] * F.L[F.p, :]'`. +and the permutation via `F.p`, where `A[F.p, F.p] ≈ Ur' * Ur ≈ Lr * Lr'` with `Ur = F.U[1:F.rank, :]` +and `Lr = F.L[:, 1:F.rank]`, or alternatively `A ≈ Up' * Up ≈ Lp * Lp'` with +`Up = F.U[1:F.rank, invperm(F.p)]` and `Lp = F.L[invperm(F.p), 1:F.rank]`. The following functions are available for `CholeskyPivoted` objects: [`size`](@ref), [`\\`](@ref), [`inv`](@ref), [`det`](@ref), and [`rank`](@ref). @@ -416,26 +422,26 @@ validity (via [`issuccess`](@ref)) lies with the user. # Examples ```jldoctest -julia> A = [4. 12. -16.; 12. 37. -43.; -16. -43. 98.] -3×3 Matrix{Float64}: - 4.0 12.0 -16.0 - 12.0 37.0 -43.0 - -16.0 -43.0 98.0 +julia> X = [1.0, 2.0, 3.0, 4.0]; + +julia> A = X * X'; -julia> C = cholesky(A, Val(true)) +julia> C = cholesky(A, Val(true), check = false) CholeskyPivoted{Float64, Matrix{Float64}} -U factor with rank 3: -3×3 UpperTriangular{Float64, Matrix{Float64}}: - 9.89949 -4.34366 -1.61624 - ⋅ 4.25825 1.1694 - ⋅ ⋅ 0.142334 +U factor with rank 1: +4×4 UpperTriangular{Float64, Matrix{Float64}}: + 4.0 2.0 3.0 1.0 + ⋅ 0.0 6.0 2.0 + ⋅ ⋅ 9.0 3.0 + ⋅ ⋅ ⋅ 1.0 permutation: -3-element Vector{Int64}: - 3 +4-element Vector{Int64}: + 4 2 + 3 1 -julia> C.U[:, C.p]' * C.U[:, C.p] ≈ A +julia> C.U[1:C.rank, :]' * C.U[1:C.rank, :] ≈ A[C.p, C.p] true julia> l, u = C; # destructuring via iteration From 35c5fc16250dad33387984a4583aa31bbf48b586 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 6 Jul 2021 17:41:21 -0400 Subject: [PATCH 068/146] fix #41157, unnecessary assertion on `Tuple{Union{}}` (#41483) (cherry picked from commit 4733c0038fc072f150f5ec649643301dd4f215e7) --- src/intrinsics.cpp | 1 - test/compiler/codegen.jl | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp index 7d0e94fd30783..e37ee264398e9 100644 --- a/src/intrinsics.cpp +++ b/src/intrinsics.cpp @@ -284,7 +284,6 @@ static Value *emit_unboxed_coercion(jl_codectx_t &ctx, Type *to, Value *unboxed) Type *ty = unboxed->getType(); if (ty == to) return unboxed; - assert(to->isIntOrPtrTy() || to->isFloatingPointTy()); bool frompointer = ty->isPointerTy(); bool topointer = to->isPointerTy(); const DataLayout &DL = jl_data_layout; diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index df29a339d5a85..f232b246a9fc9 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -593,3 +593,7 @@ f41438(y) = y[].x @test B41438.body.layout === C_NULL @test f41438(Ref{A41438}(A41438(C_NULL))) === C_NULL @test f41438(Ref{B41438}(B41438(C_NULL))) === C_NULL + +# issue #41157 +f41157(a, b) = a[1] = b[1] +@test_throws BoundsError f41157(Tuple{Int}[], Tuple{Union{}}[]) From 26bfefa69047fdef26334f3a8d0c40329e979233 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Fri, 2 Jul 2021 01:59:25 +0200 Subject: [PATCH 069/146] fix `partially_inline!` with `isdefined` (#40628) ref https://github.com/JuliaLang/julia/pull/40562#issuecomment-824912109 (cherry picked from commit 10b010f6011996558c56a5c46d97e9a201286ea0) --- base/meta.jl | 29 ++++++++++++++++++++++++++++- test/meta.jl | 30 ++++++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/base/meta.jl b/base/meta.jl index aaf29b551cd0d..b483630a92f8f 100644 --- a/base/meta.jl +++ b/base/meta.jl @@ -370,7 +370,10 @@ function _partially_inline!(@nospecialize(x), slot_replacements::Vector{Any}, if isa(x, Expr) head = x.head if head === :static_parameter - return QuoteNode(static_param_values[x.args[1]]) + if isassigned(static_param_values, x.args[1]) + return QuoteNode(static_param_values[x.args[1]]) + end + return x elseif head === :cfunction @assert !isa(type_signature, UnionAll) || !isempty(spvals) if !isa(x.args[2], QuoteNode) # very common no-op @@ -413,6 +416,30 @@ function _partially_inline!(@nospecialize(x), slot_replacements::Vector{Any}, x.args[2] += statement_offset elseif head === :enter x.args[1] += statement_offset + elseif head === :isdefined + arg = x.args[1] + # inlining a QuoteNode or literal into `Expr(:isdefined, x)` is invalid, replace with true + if isa(arg, Core.SlotNumber) + id = arg.id + if 1 <= id <= length(slot_replacements) + replacement = slot_replacements[id] + if isa(replacement, Union{Core.SlotNumber, GlobalRef, Symbol}) + return Expr(:isdefined, replacement) + else + @assert !isa(replacement, Expr) + return true + end + end + return Expr(:isdefined, Core.SlotNumber(id + slot_offset)) + elseif isexpr(arg, :static_parameter) + if isassigned(static_param_values, arg.args[1]) + return true + end + return x + else + @assert isa(arg, Union{GlobalRef, Symbol}) + return x + end elseif !is_meta_expr_head(head) partially_inline!(x.args, slot_replacements, type_signature, static_param_values, slot_offset, statement_offset, boundscheck) diff --git a/test/meta.jl b/test/meta.jl index ab073668677c6..5bdb988f41b6d 100644 --- a/test/meta.jl +++ b/test/meta.jl @@ -241,7 +241,29 @@ ci = code_lowered(f, Tuple{Int})[1] g(::Val{x}) where {x} = x ? 1 : 0 ci = code_lowered(g, Tuple{Val{true}})[1] -@test Meta.partially_inline!(ci.code, [], Tuple{typeof(g),Val{true}}, Any[Val{true}], 0, 0, :propagate)[1] == - Core.GotoIfNot(QuoteNode(Val{true}), 3) -@test Meta.partially_inline!(ci.code, [], Tuple{typeof(g),Val{true}}, Any[Val{true}], 0, 2, :propagate)[1] == - Core.GotoIfNot(QuoteNode(Val{true}), 5) +@test Meta.partially_inline!(ci.code, [], Tuple{typeof(g),Val{true}}, Any[true], 0, 0, :propagate)[1] == + Core.GotoIfNot(QuoteNode(true), 3) +@test Meta.partially_inline!(ci.code, [], Tuple{typeof(g),Val{true}}, Any[true], 0, 2, :propagate)[1] == + Core.GotoIfNot(QuoteNode(true), 5) + +@testset "inlining with isdefined" begin + isdefined_slot(x) = @isdefined(x) + ci = code_lowered(isdefined_slot, Tuple{Int})[1] + @test Meta.partially_inline!(copy(ci.code), [], Tuple{typeof(isdefined_slot), Int}, + [], 0, 0, :propagate)[1] == Expr(:isdefined, Core.SlotNumber(2)) + @test Meta.partially_inline!(copy(ci.code), [isdefined_slot, 1], Tuple{typeof(isdefined_slot), Int}, + [], 0, 0, :propagate)[1] == true + + isdefined_sparam(::T) where {T} = @isdefined(T) + ci = code_lowered(isdefined_sparam, Tuple{Int})[1] + @test Meta.partially_inline!(copy(ci.code), [], Tuple{typeof(isdefined_sparam), Int}, + Any[Int], 0, 0, :propagate)[1] == true + @test Meta.partially_inline!(copy(ci.code), [], Tuple{typeof(isdefined_sparam), Int}, + [], 0, 0, :propagate)[1] == Expr(:isdefined, Expr(:static_parameter, 1)) + + @eval isdefined_globalref(x) = $(Expr(:isdefined, GlobalRef(Base, :foo))) + ci = code_lowered(isdefined_globalref, Tuple{Int})[1] + @test Meta.partially_inline!(copy(ci.code), Any[isdefined_globalref, 1], Tuple{typeof(isdefined_globalref), Int}, + [], 0, 0, :propagate)[1] == Expr(:isdefined, GlobalRef(Base, :foo)) + +end From 8ebbd94a83fcd4708bff898767686f27fdcc203a Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Fri, 2 Jul 2021 02:01:58 +0200 Subject: [PATCH 070/146] fix slurping into function definition (#40738) Discovered while working on #40737. Currently, this throws an unintuitive error: ```julia julia> a, f()... = 1, 2, 3 ERROR: syntax: ssavalue with no def Stacktrace: [1] top-level scope @ REPL[1]:1 ``` Might as well fix this properly - Why not allow function definitions to slurp a little from time to time? ;) (cherry picked from commit 5c49a0d4890e4cd63931718797adbb8143155e75) --- src/julia-syntax.scm | 12 ++++++++---- test/syntax.jl | 12 ++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 420eeaf51f747..f00ea0c9ba6d9 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1456,7 +1456,7 @@ (cons R elts))) ((vararg? L) (if (null? (cdr lhss)) - (let ((temp (make-ssavalue))) + (let ((temp (if (eventually-call? (cadr L)) (gensy) (make-ssavalue)))) `(block ,@(reverse stmts) (= ,temp (tuple ,@rhss)) ,@(reverse after) @@ -2155,9 +2155,13 @@ ((eq? l x) #t) (else (in-lhs? x (cdr lhss))))))) ;; in-lhs? also checks for invalid syntax, so always call it first - (let* ((xx (if (or (and (not (in-lhs? x lhss)) (symbol? x)) - (ssavalue? x)) - x (make-ssavalue))) + (let* ((xx (cond ((or (and (not (in-lhs? x lhss)) (symbol? x)) + (ssavalue? x)) + x) + ((and (pair? lhss) (vararg? (last lhss)) + (eventually-call? (cadr (last lhss)))) + (gensy)) + (else (make-ssavalue)))) (ini (if (eq? x xx) '() (list (sink-assignment xx (expand-forms x))))) (n (length lhss)) ;; skip last assignment if it is an all-underscore vararg diff --git a/test/syntax.jl b/test/syntax.jl index 707437096ef14..19f692baec95c 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2937,3 +2937,15 @@ end @test eval(Meta.parse("`a\\\r\nb`")) == `ab` @test eval(Meta.parse("`a\\\rb`")) == `ab` end + +@testset "slurping into function def" begin + x, f()... = [1, 2, 3] + @test x == 1 + @test f() == [2, 3] + # test that call to `Base.rest` is outside the definition of `f` + @test f() === f() + + x, f()... = 1, 2, 3 + @test x == 1 + @test f() == (2, 3) +end From 96386f98e58e1b27d101653810a62982faad57f4 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 16 Jul 2021 16:20:40 -0400 Subject: [PATCH 071/146] [release-1.7] README: update the Buildkite badges now that we have a separate pipeline for the `release-1.7` branch (#41609) --- README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cb1fc2bdd8180..e667ee6327e60 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,31 @@ +Documentation: +[![Documentation][docs-img]][docs-url] + +[docs-img]: https://img.shields.io/badge/docs-v1-blue.svg "Documentation (version 1)" +[docs-url]: https://docs.julialang.org + +Continuous integration: +[![Continuous integration (release-1.7)][buildkite-release-1.7-img]][buildkite-release-1.7-url] + + +[buildkite-release-1.7-img]: https://badge.buildkite.com/9c7938be8fdb44c25adfccd67ca79cb6afdd021b9c473bd1c8.svg?branch=release-1.7 "Continuous integration (release-1.7)" +[buildkite-release-1.7-url]: https://buildkite.com/julialang/julia-release-1-dot-7 + Code coverage: -[![coveralls][coveralls-img]](https://coveralls.io/r/JuliaLang/julia?branch=master) -[![codecov][codecov-img]](https://codecov.io/github/JuliaLang/julia?branch=master) +[![Code coverage (Coveralls)][coveralls-img]][coveralls-url] +[![Code coverage (Codecov)][codecov-img]][codecov-url] -Documentation: -[![version 1][docs-img]](https://docs.julialang.org) +[coveralls-img]: https://img.shields.io/coveralls/github/JuliaLang/julia/master.svg?label=coveralls "Code coverage (Coveralls)" +[coveralls-url]: https://coveralls.io/r/JuliaLang/julia?branch=master -[appveyor-img]: https://img.shields.io/appveyor/ci/JuliaLang/julia/master.svg?label=Windows -[coveralls-img]: https://img.shields.io/coveralls/github/JuliaLang/julia/master.svg?label=coveralls -[codecov-img]: https://img.shields.io/codecov/c/github/JuliaLang/julia/master.svg?label=codecov -[docs-img]: https://img.shields.io/badge/docs-v1-blue.svg +[codecov-img]: https://img.shields.io/codecov/c/github/JuliaLang/julia/master.svg?label=codecov "Code coverage (Codecov)" +[codecov-url]: https://codecov.io/github/JuliaLang/julia?branch=master ## The Julia Language From b1fd8f0db63038da61db1f539649bf995a838a44 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 20 Jun 2021 03:09:58 -0400 Subject: [PATCH 072/146] Transition the `coverage-linux64` pipeline to Buildkite (#41238) * Transition the `coverage-linux64` pipeline to Buildkite * Simplify, run inside of a sandbox * Upload coverage reports to Codecov and Coveralls * Add `COVERALLS_TOKEN` Co-authored-by: Elliot Saba (cherry picked from commit 9d5f31e9231c1d77e24ee820908e32f559e23057) --- .buildkite/coverage-linux64/0_webui.yml | 16 +++ .buildkite/coverage-linux64/README.md | 6 + .buildkite/coverage-linux64/pipeline.yml | 44 +++++++ .buildkite/coverage-linux64/run_tests_base.jl | 36 ++++++ .../coverage-linux64/upload_coverage.jl | 115 ++++++++++++++++++ 5 files changed, 217 insertions(+) create mode 100644 .buildkite/coverage-linux64/0_webui.yml create mode 100644 .buildkite/coverage-linux64/README.md create mode 100644 .buildkite/coverage-linux64/pipeline.yml create mode 100644 .buildkite/coverage-linux64/run_tests_base.jl create mode 100644 .buildkite/coverage-linux64/upload_coverage.jl diff --git a/.buildkite/coverage-linux64/0_webui.yml b/.buildkite/coverage-linux64/0_webui.yml new file mode 100644 index 0000000000000..6dafcd86f6bcd --- /dev/null +++ b/.buildkite/coverage-linux64/0_webui.yml @@ -0,0 +1,16 @@ +# This file represents what is put into the webUI. +# It is purely for keeping track of the changes we make to the webUI configuration; modifying this file has no effect. +# We use the `cryptic` buildkite plugin to provide secrets management, which requires some integration into the WebUI's steps. +agents: + queue: "julia" + sandbox.jl: "true" + +steps: + - label: ":unlock: Unlock secrets, launch pipelines" + plugins: + - staticfloat/cryptic: + # 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/coverage-linux64/pipeline.yml + signature: "U2FsdGVkX18eQWpd3hMYLO5Kd+6K+oBoLk1I6J3qIw7lc6g5/jaeWyq/wralosZCfTzyjS4NstNKFvhQf3KDPEBVElipNvTxoWOjVLRVOrfBqqvTkQN4xVosY/r026Gy" diff --git a/.buildkite/coverage-linux64/README.md b/.buildkite/coverage-linux64/README.md new file mode 100644 index 0000000000000..8cfb31d698225 --- /dev/null +++ b/.buildkite/coverage-linux64/README.md @@ -0,0 +1,6 @@ +# Coverage pipeline + +We run coverage on a separate pipeline, that uses a scheduled build rather than webhooks. +The pipeline is here: https://buildkite.com/julialang/julia-coverage-linux64 + +It contains [its own webui steps](0_webuiy.ml) (listed here in this repository for clarity) and its own [pipeline.yml](pipeline.yml). diff --git a/.buildkite/coverage-linux64/pipeline.yml b/.buildkite/coverage-linux64/pipeline.yml new file mode 100644 index 0000000000000..078b00254c4f9 --- /dev/null +++ b/.buildkite/coverage-linux64/pipeline.yml @@ -0,0 +1,44 @@ +# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones +# since we need nestable sandboxing. The rootfs images being used here are built from +# the `.buildkite/rootfs_images/llvm-passes.jl` file. +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: ":unlock: :coverage: Run coverage test" + plugins: + - staticfloat/cryptic: + variables: + - CODECOV_TOKEN="U2FsdGVkX19l0fhdBabbuiEdysyEabkJLRHfxm7CNRkuGbnwPV365sxxC7Czs/CVcws0N1oB4pVwALRRMe36oA==" + - COVERALLS_TOKEN="U2FsdGVkX19zopI0hMNzzi2UUOvNVFD8Y0iisFnO/ryVxU7Tit8ZEaeN+gxodRx4CosUUh192F1+q3dTMWRIvw==" + - JuliaCI/julia#v1: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz + rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + uid: 1000 + gid: 1000 + commands: | + echo "--- Build Julia from source" + make -j 6 + + echo "--- Print Julia version info" + ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' + ./julia -e '@info "" Sys.CPU_THREADS' + # this is necessary to make sure that the LibGit2 tests passes + git config --global init.defaultBranch master + + echo "--- Run Julia tests with code coverage enabled" + # Run the actual tests + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_base.jl + + echo "--- Process and upload coverage information" + ./julia .buildkite/coverage-linux64/upload_coverage.jl + timeout_in_minutes: 600 # 600 minutes = 10 hours + +# 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/coverage-linux64/run_tests_base.jl b/.buildkite/coverage-linux64/run_tests_base.jl new file mode 100644 index 0000000000000..5386828aa4e14 --- /dev/null +++ b/.buildkite/coverage-linux64/run_tests_base.jl @@ -0,0 +1,36 @@ +# When running this file, make sure to set the `--code-coverage=all` command-line flag. + +# Important note: even if one or more tests fail, we will still exit with status code 0. + +# The reason for this is that we always want to upload code coverage, even if some of the +# tests fail. Therefore, even if the `coverage-linux64` pipeline passes, you should not +# assume that all of the tests passed. If you want to know if all of the tests are passing, +# please look at the status of the `tester_linux64` pipeline. + +const include_tests = String[] + +const exclude_tests = String[] + +empty!(Base.DEPOT_PATH) +push!(Base.DEPOT_PATH, mktempdir(; cleanup = true)) + +module ChooseTests + include(joinpath(dirname(dirname(@__DIR__)), "test", "choosetests.jl")) +end + +const tests = ChooseTests.choosetests() |> + first |> + x -> setdiff(x, exclude_tests) |> + x -> vcat(x, include_tests) |> + unique |> + sort + +const ncores = min(Sys.CPU_THREADS, Threads.nthreads()) + +@info "" ncores Sys.CPU_THREADS Threads.nthreads() + +try + Base.runtests(tests; ncores) +catch ex + @error "" exception=(ex, catch_backtrace()) +end diff --git a/.buildkite/coverage-linux64/upload_coverage.jl b/.buildkite/coverage-linux64/upload_coverage.jl new file mode 100644 index 0000000000000..04ddd9651861e --- /dev/null +++ b/.buildkite/coverage-linux64/upload_coverage.jl @@ -0,0 +1,115 @@ +empty!(Base.DEPOT_PATH) +push!(Base.DEPOT_PATH, mktempdir(; cleanup = true)) + +import Pkg +import Logging +import TOML + +Pkg.add(; name = "Coverage", uuid = "a2441757-f6aa-5fb2-8edb-039e3f45d037", version = "1") +Pkg.precompile() + +import Coverage + +function get_external_stdlib_names(stdlib_dir::AbstractString) + filename_list = filter(x -> isfile(joinpath(stdlib_dir, x)), readdir(stdlib_dir)) + # find all of the files like `Pkg.version`, `Statistics.version`, etc. + regex_matches_or_nothing = match.(Ref(r"^([\w].*?)\.version$"), filename_list) + regex_matches = filter(x -> x !== nothing, regex_matches_or_nothing) + # get the names of the external stdlibs, like `Pkg`, `Statistics`, etc. + external_stdlib_names = only.(regex_matches) + unique!(external_stdlib_names) + sort!(external_stdlib_names) + @info "# Begin list of external stdlibs" + for (i, x) in enumerate(external_stdlib_names) + @info "$(i). $(x)" + end + @info "# End list of external stdlibs" + return external_stdlib_names +end + +function get_external_stdlib_prefixes(stdlib_dir::AbstractString) + external_stdlib_names = get_external_stdlib_names(stdlib_dir) + prefixes_1 = joinpath.(Ref(stdlib_dir), external_stdlib_names, Ref("")) + prefixes_2 = joinpath.(Ref(stdlib_dir), string.(external_stdlib_names, Ref("-"))) + prefixes = vcat(prefixes_1, prefixes_2) + unique!(prefixes) + sort!(prefixes) + # example of what `prefixes` might look like: + # 4-element Vector{String}: + # "stdlib/Pkg-" + # "stdlib/Pkg/" + # "stdlib/Statistics-" + # "stdlib/Statistics/" + return prefixes +end + +function print_coverage_summary(fc::Coverage.FileCoverage) + cov_lines, tot_lines = Coverage.get_summary(fc) + if cov_lines == tot_lines == 0 + cov_pct = 0 + else + cov_pct = floor(Int, cov_lines/tot_lines * 100) + end + pad_1 = 71 + pad_2 = 15 + pad_3 = 15 + col_1 = rpad(fc.filename, pad_1) + col_2 = rpad(string(cov_pct, " %"), pad_2) + col_3 = string( + rpad(string(cov_lines), pad_3), + string(tot_lines), + ) + @info "$(col_1) $(col_2) $(col_3)" + return nothing +end + +function print_coverage_summary( + fcs::Vector{Coverage.FileCoverage}, description::AbstractString, + ) + cov_lines, tot_lines = Coverage.get_summary(fcs) + if cov_lines == tot_lines == 0 + cov_pct = 0 + else + cov_pct = floor(Int, cov_lines/tot_lines * 100) + end + @info "$(description): $(cov_pct)% ($(cov_lines)/$(tot_lines))" + return nothing +end + +# `Coverage.process_folder` will have a LOT of `@info` statements that will make the log +# way too long. So before we run `Coverage.process_folder`, we disable logging for `@info` +# statements. After we run `Coverage.process_folder`, we re-enable logging for `@info` +# statements. +Logging.disable_logging(Logging.Info) +const fcs = Coverage.merge_coverage_counts( + Coverage.process_folder("base"), + Coverage.process_folder("stdlib"), +); +Logging.disable_logging(Logging.Debug) + +# Only include source code files. Exclude test files, benchmarking files, etc. +filter!(fcs) do fc + occursin(r"^base\/", fc.filename) || occursin("/src/", fc.filename) +end; + +# Exclude all external stdlibs (stdlibs that live in external repos). +const external_stdlib_prefixes = get_external_stdlib_prefixes("stdlib") +filter!(fcs) do fc + all(x -> !startswith(fc.filename, x), external_stdlib_prefixes) +end; + +# Exclude all stdlib JLLs (stdlibs of the form `stdlib/*_jll/`). +filter!(fcs) do fc + !occursin(r"^stdlib\/[A-Za-z0-9]*?_jll\/", fc.filename) +end + +sort!(fcs; by = fc -> fc.filename) + +print_coverage_summary.(fcs); +print_coverage_summary(fcs, "Total") + +# In order to upload to Codecov, you need to have the `CODECOV_TOKEN` environment variable defined. +Coverage.Codecov.submit_local(fcs) + +# In order to upload to Coveralls, you need to have the `COVERALLS_TOKEN` environment variable defined. +Coverage.Coveralls.submit_local(fcs) From cea02c0d21f387012775835aeecf935b905258ba Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 26 Jun 2021 11:25:24 -0400 Subject: [PATCH 073/146] Code coverage: fix the code coverage pipeline (#41375) * Code coverage: fix the code coverage pipeline * Run all tests (cherry picked from commit 05e41385de563a2e8aeea9000a7e381fd9bb3318) --- .../coverage-linux64/upload_coverage.jl | 136 +++++++++++++++--- 1 file changed, 120 insertions(+), 16 deletions(-) diff --git a/.buildkite/coverage-linux64/upload_coverage.jl b/.buildkite/coverage-linux64/upload_coverage.jl index 04ddd9651861e..8d14cded56140 100644 --- a/.buildkite/coverage-linux64/upload_coverage.jl +++ b/.buildkite/coverage-linux64/upload_coverage.jl @@ -10,6 +10,24 @@ Pkg.precompile() import Coverage +function process_folders() + # `Coverage.process_folder` will have a LOT of `@info` statements that will make the log + # way too long. So before we run `Coverage.process_folder`, we disable logging for `@info` + # statements. After we run `Coverage.process_folder`, we re-enable logging for `@info` + # statements. + Logging.disable_logging(Logging.Info) + fcs_base = Coverage.process_folder("base"); + fcs_stdlib = Coverage.process_folder("stdlib"); + Logging.disable_logging(Logging.Debug) + + fcs = Coverage.merge_coverage_counts( + fcs_base, + fcs_stdlib, + ); + + return fcs +end + function get_external_stdlib_names(stdlib_dir::AbstractString) filename_list = filter(x -> isfile(joinpath(stdlib_dir, x)), readdir(stdlib_dir)) # find all of the files like `Pkg.version`, `Statistics.version`, etc. @@ -76,16 +94,90 @@ function print_coverage_summary( return nothing end -# `Coverage.process_folder` will have a LOT of `@info` statements that will make the log -# way too long. So before we run `Coverage.process_folder`, we disable logging for `@info` -# statements. After we run `Coverage.process_folder`, we re-enable logging for `@info` -# statements. -Logging.disable_logging(Logging.Info) -const fcs = Coverage.merge_coverage_counts( - Coverage.process_folder("base"), - Coverage.process_folder("stdlib"), -); -Logging.disable_logging(Logging.Debug) +function buildkite_env(name::String) + value = String(strip(ENV[name])) + if isempty(value) + throw(ErrorException("environment variable $(name) is empty")) + end + return value +end + +function buildkite_env(name_1::String, name_2::String, default::String) + value_1 = String(strip(ENV[name_1])) + value_2 = String(strip(ENV[name_2])) + !isempty(value_1) && return value_1 + !isempty(value_2) && return value_2 + return default +end + +function buildkite_branch_and_commit() + branch = buildkite_env("BUILDKITE_BRANCH") + commit = buildkite_env("BUILDKITE_COMMIT") + head_rev_parse = String(strip(read(`git rev-parse HEAD`, String))) + if strip(commit) == "HEAD" + commit = head_rev_parse + end + if commit !== head_rev_parse + msg = "mismatch" + @error msg commit head_rev_parse + throw(ErrorException(msg)) + end + if !occursin(r"^[a-f0-9]{40}$", commit) + msg = "BUILDKITE_COMMIT does not look like a long commit SHA" + @error msg commit + throw(ErrorException(msg)) + end + return (; branch, commit) +end + +function codecov_buildkite_add_local_to_kwargs() + branch, commit = buildkite_branch_and_commit() + kwargs = Coverage.Codecov.set_defaults( + Dict(); + branch, + commit, + ) + return kwargs +end + +function coveralls_buildkite_query_git_info() + branch, commit = buildkite_branch_and_commit() + remote_name = "origin" + remote = buildkite_env("BUILDKITE_REPO") + message = buildkite_env("BUILDKITE_MESSAGE") + author_name = buildkite_env( + "BUILDKITE_BUILD_AUTHOR", + "BUILDKITE_BUILD_CREATOR", + "", + ) + author_email = buildkite_env( + "BUILDKITE_BUILD_AUTHOR_EMAIL", + "BUILDKITE_BUILD_CREATOR_EMAIL", + "", + ) + remotes = [ + Dict( + "name" => remote_name, + "url" => remote, + ) + ] + head = Dict( + "id" => commit, + "author_name" => author_name, + "author_email" => author_email, + "committer_name" => author_name, + "committer_email" => author_email, + "message" => message, + ) + git_info = Dict( + "branch" => branch, + "remotes" => remotes, + "head" => head, + ) + return git_info +end + +const fcs = process_folders() # Only include source code files. Exclude test files, benchmarking files, etc. filter!(fcs) do fc @@ -101,15 +193,27 @@ end; # Exclude all stdlib JLLs (stdlibs of the form `stdlib/*_jll/`). filter!(fcs) do fc !occursin(r"^stdlib\/[A-Za-z0-9]*?_jll\/", fc.filename) -end +end; -sort!(fcs; by = fc -> fc.filename) +sort!(fcs; by = fc -> fc.filename); print_coverage_summary.(fcs); print_coverage_summary(fcs, "Total") -# In order to upload to Codecov, you need to have the `CODECOV_TOKEN` environment variable defined. -Coverage.Codecov.submit_local(fcs) +let + git_info = coveralls_buildkite_query_git_info() + @info "" git_info + @info "" git_info["branch"] + @info "" git_info["head"] -# In order to upload to Coveralls, you need to have the `COVERALLS_TOKEN` environment variable defined. -Coverage.Coveralls.submit_local(fcs) + # In order to upload to Coveralls, you need to have the `COVERALLS_TOKEN` environment variable defined. + Coverage.Coveralls.submit_local(fcs, git_info) +end + +let + kwargs = codecov_buildkite_add_local_to_kwargs() + @info "" kwargs + + # In order to upload to Codecov, you need to have the `CODECOV_TOKEN` environment variable defined. + Coverage.Codecov.submit_generic(fcs, kwargs) +end From 1ca346775577e1a71b603a30211b906c6739f3a7 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 6 Jul 2021 20:24:45 -0700 Subject: [PATCH 074/146] Add embedding and whitespace jobs to buildkite (#41321) * Add "Check whitespace" buildkite job * Add `key` values for later `wait` blocks * Add "embedding tests" to buildkite configuration * Eliminate unnecessary work in buildkite builds Don't bother to precompile the Julia system image like we normally would want to if we're just going to run things once. Also use `JULIA_NUM_CORES` instead of hard-coding `-j 6` into the buildsystem. * Update embedding.yml * Update whitespace.yml (cherry picked from commit a2af84564cb96d36b37c632bf02b45ec5b7fc116) --- .buildkite/embedding.yml | 34 ++++++++++++++++++++++++++++++++++ .buildkite/llvm_passes.yml | 14 ++++++++------ .buildkite/pipeline.yml | 2 ++ .buildkite/whitespace.yml | 24 ++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 .buildkite/embedding.yml create mode 100644 .buildkite/whitespace.yml diff --git a/.buildkite/embedding.yml b/.buildkite/embedding.yml new file mode 100644 index 0000000000000..a7cd2611033e5 --- /dev/null +++ b/.buildkite/embedding.yml @@ -0,0 +1,34 @@ +# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones +# since we need nestable sandboxing. The rootfs images being used here are built from +# the `.buildkite/rootfs_images/llvm-passes.jl` file. +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: "Run embedding tests" + key: embedding + plugins: + - JuliaCI/julia#v1: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz + rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + uid: 1000 + gid: 1000 + commands: | + prefix="/tmp/prefix" + echo "+++ Build julia, deploy to $${prefix}" + make -j$${JULIA_NUM_CORES} 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}" + + timeout_in_minutes: 60 + notify: + - github_commit_status: + context: "embedding" diff --git a/.buildkite/llvm_passes.yml b/.buildkite/llvm_passes.yml index 862f748c18499..7beb30e418bb2 100644 --- a/.buildkite/llvm_passes.yml +++ b/.buildkite/llvm_passes.yml @@ -9,6 +9,7 @@ agents: steps: - label: "analyzegc" + key: analyzegc plugins: - JuliaCI/julia#v1: version: 1.6 @@ -17,13 +18,14 @@ steps: rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" commands: | echo "--- Install in-tree LLVM dependencies" - make -j 6 -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind + make -j$${JULIA_NUM_CORES} -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind echo "+++ run clangsa/analyzegc" - make -j 6 -C test/clangsa - make -j 6 -C src analyzegc + make -j$${JULIA_NUM_CORES} -C test/clangsa + make -j$${JULIA_NUM_CORES} -C src analyzegc timeout_in_minutes: 60 - label: "llvmpasses" + key: llvmpasses plugins: - JuliaCI/julia#v1: version: 1.6 @@ -34,7 +36,7 @@ steps: gid: 1000 commands: | echo "+++ run llvmpasses" - make -j 6 release - make -j 6 -C src install-analysis-deps - make -j 6 -C test/llvmpasses + make -j$${JULIA_NUM_CORES} release JULIA_PRECOMPILE=0 + make -j$${JULIA_NUM_CORES} -C src install-analysis-deps + make -j$${JULIA_NUM_CORES} -C test/llvmpasses timeout_in_minutes: 60 diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d76f3fd77bd4f..0dee5f2aaa3f7 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,6 +14,8 @@ steps: - label: ":buildkite: Launch unsigned pipelines" commands: | + buildkite-agent pipeline upload .buildkite/whitespace.yml buildkite-agent pipeline upload .buildkite/llvm_passes.yml + buildkite-agent pipeline upload .buildkite/embedding.yml agents: queue: julia diff --git a/.buildkite/whitespace.yml b/.buildkite/whitespace.yml new file mode 100644 index 0000000000000..94dcac590a8ca --- /dev/null +++ b/.buildkite/whitespace.yml @@ -0,0 +1,24 @@ +# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones +# since we need nestable sandboxing. The rootfs images being used here are built from +# the `.buildkite/rootfs_images/llvm-passes.jl` file. +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: "Check whitespace" + key: whitespace + plugins: + - JuliaCI/julia#v1: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz + rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + commands: | + make -j$${JULIA_NUM_CORES} check-whitespace + timeout_in_minutes: 10 + notify: + - github_commit_status: + context: "whitespace" From 470d4463b61ab70df6ba0319a28a398f5eb6bdcc Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 6 Jul 2021 20:30:34 -0700 Subject: [PATCH 075/146] Comment out signed pipeline test (#41493) * Comment out signed pipeline test This is confirmed working, so let's comment it out until it's actually used by a codesigning step or similar. * Specifically notify llvm passes (cherry picked from commit f2d73006fbffbe91d00f9c32f5c9a1082e255648) --- .buildkite/0_webui.yml | 6 +++--- .buildkite/llvm_passes.yml | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.buildkite/0_webui.yml b/.buildkite/0_webui.yml index d5ba4e0ea7cf9..aed6a5e59d9c3 100644 --- a/.buildkite/0_webui.yml +++ b/.buildkite/0_webui.yml @@ -19,6 +19,6 @@ steps: # 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/signed_pipeline_test.yml - signature: "U2FsdGVkX18aZgryp6AJTArgD2uOnVWyFFGVOP5qsY4WbGQ/LVAcYiMEp9cweV+2iht+vmEF949CuuGTeQPA1fKlhPwkG3nZ688752DUB6en9oM2nuL31NoDKWHhpygZ" + #signed_pipelines: + # - pipeline: .buildkite/signed_pipeline_test.yml + # signature: "U2FsdGVkX18aZgryp6AJTArgD2uOnVWyFFGVOP5qsY4WbGQ/LVAcYiMEp9cweV+2iht+vmEF949CuuGTeQPA1fKlhPwkG3nZ688752DUB6en9oM2nuL31NoDKWHhpygZ" diff --git a/.buildkite/llvm_passes.yml b/.buildkite/llvm_passes.yml index 7beb30e418bb2..27611a02b8391 100644 --- a/.buildkite/llvm_passes.yml +++ b/.buildkite/llvm_passes.yml @@ -23,6 +23,9 @@ steps: make -j$${JULIA_NUM_CORES} -C test/clangsa make -j$${JULIA_NUM_CORES} -C src analyzegc timeout_in_minutes: 60 + notify: + - github_commit_status: + context: "analyzegc" - label: "llvmpasses" key: llvmpasses @@ -40,3 +43,6 @@ steps: make -j$${JULIA_NUM_CORES} -C src install-analysis-deps make -j$${JULIA_NUM_CORES} -C test/llvmpasses timeout_in_minutes: 60 + notify: + - github_commit_status: + context: "llvm passes" From 4f1fa2fac8a0356e4bad298ce118de1f4b488060 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 6 Jul 2021 23:02:58 -0700 Subject: [PATCH 076/146] Streamline buildkite configuration a bit (#41494) * Add `/cache/repos` as a mapping into the CI sandbox This should allow `git` to find its cached objects properly, which should silence the warnings on CI, and also give us the proper git version info within buildkite builds * Break up `llvmpasses` output a bit * Provide `/cache/repos` for `whitespace` as well * Give a positive message if whitespace check passes It's a little unnerving to have a silent command block in buildkite, so let's output a success message if everything is on the up-and-up (cherry picked from commit 460e981de68169acea23cbe768ea4f8be50d7b85) --- .buildkite/embedding.yml | 3 +++ .buildkite/llvm_passes.yml | 9 ++++++++- .buildkite/whitespace.yml | 2 ++ contrib/check-whitespace.sh | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.buildkite/embedding.yml b/.buildkite/embedding.yml index a7cd2611033e5..faffeb1f7cc87 100644 --- a/.buildkite/embedding.yml +++ b/.buildkite/embedding.yml @@ -18,6 +18,9 @@ steps: rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" uid: 1000 gid: 1000 + workspaces: + # Include `/cache/repos` so that our `git` version introspection works. + - "/cache/repos:/cache/repos" commands: | prefix="/tmp/prefix" echo "+++ Build julia, deploy to $${prefix}" diff --git a/.buildkite/llvm_passes.yml b/.buildkite/llvm_passes.yml index 27611a02b8391..b4311f689d089 100644 --- a/.buildkite/llvm_passes.yml +++ b/.buildkite/llvm_passes.yml @@ -16,6 +16,9 @@ steps: - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + workspaces: + # Include `/cache/repos` so that our `git` version introspection works. + - "/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 @@ -37,10 +40,14 @@ steps: rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" uid: 1000 gid: 1000 + workspaces: + - "/cache/repos:/cache/repos" commands: | - echo "+++ run llvmpasses" + echo "--- make release" make -j$${JULIA_NUM_CORES} release JULIA_PRECOMPILE=0 + echo "--- make src/install-analysis-deps" make -j$${JULIA_NUM_CORES} -C src install-analysis-deps + echo "+++ make test/llvmpasses" make -j$${JULIA_NUM_CORES} -C test/llvmpasses timeout_in_minutes: 60 notify: diff --git a/.buildkite/whitespace.yml b/.buildkite/whitespace.yml index 94dcac590a8ca..37fa66f75a3d9 100644 --- a/.buildkite/whitespace.yml +++ b/.buildkite/whitespace.yml @@ -16,6 +16,8 @@ steps: - staticfloat/sandbox#v1: rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + workspaces: + - "/cache/repos:/cache/repos" commands: | make -j$${JULIA_NUM_CORES} check-whitespace timeout_in_minutes: 10 diff --git a/contrib/check-whitespace.sh b/contrib/check-whitespace.sh index c380d7bdd2969..ff5bd24ab2cbe 100755 --- a/contrib/check-whitespace.sh +++ b/contrib/check-whitespace.sh @@ -35,3 +35,5 @@ if git --no-pager grep --color -n --full-name -e ' $' -- $file_patterns; then echo "and then a forced push of the correct branch" exit 1 fi + +echo "Whitespace check found no issues" From 09a592b0662c7dc5ee2174248420b0de3f97cd3e Mon Sep 17 00:00:00 2001 From: Benjamin Lorenz Date: Wed, 7 Jul 2021 14:24:07 +0200 Subject: [PATCH 077/146] [openblas] fix make targets for applying patches (#41501) when building with USE_BINARYBUILDER=0 (cherry picked from commit 19ecf0078b2fdfb64bc14455abff81c02a2d64e2) --- deps/openblas.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/openblas.mk b/deps/openblas.mk index d86663efcbde7..a1ce15100ac4c 100644 --- a/deps/openblas.mk +++ b/deps/openblas.mk @@ -108,12 +108,12 @@ $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-exshift.patch-applied: $(BUILDDIR)/$(OP patch -p1 -f < $(SRCDIR)/patches/openblas-exshift.patch echo 1 > $@ -$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-openblas-exshift.patch-applied +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-exshift.patch-applied cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ patch -p1 -f < $(SRCDIR)/patches/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch echo 1 > $@ -$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-Only-filter-out-mavx-on-Sandybridge.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch +$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-Only-filter-out-mavx-on-Sandybridge.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-filter-out-mavx-flag-on-zgemm-kernels.patch-applied cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && \ patch -p1 -f < $(SRCDIR)/patches/openblas-Only-filter-out-mavx-on-Sandybridge.patch echo 1 > $@ From db05faee3f5f8d81f883f7574bc9417fd06894a2 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Wed, 7 Jul 2021 23:09:43 +0900 Subject: [PATCH 078/146] improve some inferrabilities (#41495) (cherry picked from commit 8efdf854448edc2b52dd4bfe1825f940edff15ce) --- base/errorshow.jl | 3 +-- base/process.jl | 9 +++++---- base/toml_parser.jl | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base/errorshow.jl b/base/errorshow.jl index 1e03996e410ea..641cf5f2cdf4b 100644 --- a/base/errorshow.jl +++ b/base/errorshow.jl @@ -222,7 +222,7 @@ function showerror(io::IO, ex::MethodError) arg_types = (is_arg_types ? ex.args : typesof(ex.args...))::DataType f = ex.f meth = methods_including_ambiguous(f, arg_types) - if length(meth) > 1 + if isa(meth, MethodList) && length(meth) > 1 return showerror_ambiguous(io, meth, f, arg_types) end arg_types_param::SimpleVector = arg_types.parameters @@ -898,4 +898,3 @@ function show(io::IO, ::MIME"text/plain", stack::ExceptionStack) show_exception_stack(io, stack) end show(io::IO, stack::ExceptionStack) = show(io, MIME("text/plain"), stack) - diff --git a/base/process.jl b/base/process.jl index 89ea68a9444c9..b3ec79fa1ab4e 100644 --- a/base/process.jl +++ b/base/process.jl @@ -84,15 +84,16 @@ const SpawnIOs = Vector{Any} # convenience name for readability for io in stdio] handle = Libc.malloc(_sizeof_uv_process) disassociate_julia_struct(handle) # ensure that data field is set to C_NULL + (; exec, flags, env, dir) = cmd err = ccall(:jl_spawn, Int32, (Cstring, Ptr{Cstring}, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Tuple{Cint, UInt}}, Int, UInt32, Ptr{Cstring}, Cstring, Ptr{Cvoid}), - file, cmd.exec, loop, handle, + file, exec, loop, handle, iohandles, length(iohandles), - cmd.flags, - cmd.env === nothing ? C_NULL : cmd.env, - isempty(cmd.dir) ? C_NULL : cmd.dir, + flags, + env === nothing ? C_NULL : env, + isempty(dir) ? C_NULL : dir, @cfunction(uv_return_spawn, Cvoid, (Ptr{Cvoid}, Int64, Int32))) if err != 0 ccall(:jl_forceclose_uv, Cvoid, (Ptr{Cvoid},), handle) # will call free on handle eventually diff --git a/base/toml_parser.jl b/base/toml_parser.jl index 8fcfc4ca0c29c..4b2af426429a0 100644 --- a/base/toml_parser.jl +++ b/base/toml_parser.jl @@ -323,7 +323,7 @@ function Base.showerror(io::IO, err::ParserError) # In this case we want the arrow to point one character pos = err.pos::Int err.type == ErrUnexpectedEofExpectedValue && (pos += 1) - str1, err1 = point_to_line(err.str, pos, pos, io) + str1, err1 = point_to_line(err.str::String, pos, pos, io) @static if VERSION <= v"1.6.0-DEV.121" # See https://github.com/JuliaLang/julia/issues/36015 format_fixer = get(io, :color, false) == true ? "\e[0m" : "" From ac93888917394d4f18dbba3a406d5132d858b6e8 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Wed, 7 Jul 2021 17:40:33 +0200 Subject: [PATCH 079/146] fix #41489: inference of `+(::Rational, Rational)` (#41491) * fix #41489: inference of `+(::Rational, Rational)` * implement review comments (cherry picked from commit cf4e1c458c109959300e4db308a71599de582ca9) --- base/rational.jl | 4 ++-- test/rational.jl | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/base/rational.jl b/base/rational.jl index ab4e7d6d0abbd..23c9298962f53 100644 --- a/base/rational.jl +++ b/base/rational.jl @@ -280,7 +280,7 @@ function -(x::Rational{T}) where T<:Unsigned end function +(x::Rational, y::Rational) - xp, yp = promote(x, y) + xp, yp = promote(x, y)::NTuple{2,Rational} if isinf(x) && x == y return xp end @@ -289,7 +289,7 @@ function +(x::Rational, y::Rational) end function -(x::Rational, y::Rational) - xp, yp = promote(x, y) + xp, yp = promote(x, y)::NTuple{2,Rational} if isinf(x) && x == -y return xp end diff --git a/test/rational.jl b/test/rational.jl index 24b99cdc8b6d9..a329a1ac5f93d 100644 --- a/test/rational.jl +++ b/test/rational.jl @@ -622,3 +622,11 @@ end @testset "Rational{T} with non-concrete T (issue #41222)" begin @test @inferred(Rational{Integer}(2,3)) isa Rational{Integer} end + +@testset "issue #41489" begin + @test Core.Compiler.return_type(+, NTuple{2, Rational}) == Rational + @test Core.Compiler.return_type(-, NTuple{2, Rational}) == Rational + + A=Rational[1 1 1; 2 2 2; 3 3 3] + @test @inferred(A*A) isa Matrix{Rational} +end From 08f11dbf3026b0fe9fa4f100f70a73b43dc19a3b Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Wed, 7 Jul 2021 12:24:23 -0700 Subject: [PATCH 080/146] Initialize n_uninitialized for Symbol and SimpleVector (#41496) (cherry picked from commit 6240d352f1bed2671b0477584a8b4082c5fb38da) --- src/jltypes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jltypes.c b/src/jltypes.c index 886abadb046e0..1ae49c0a32eab 100644 --- a/src/jltypes.c +++ b/src/jltypes.c @@ -2016,6 +2016,7 @@ void jl_init_types(void) JL_GC_DISABLED jl_symbol_type->name->mt = jl_nonfunction_mt; jl_symbol_type->super = jl_any_type; jl_symbol_type->parameters = jl_emptysvec; + jl_symbol_type->name->n_uninitialized = 0; jl_symbol_type->name->names = jl_emptysvec; jl_symbol_type->types = jl_emptysvec; jl_symbol_type->size = 0; @@ -2026,6 +2027,7 @@ void jl_init_types(void) JL_GC_DISABLED jl_simplevector_type->name->mt = jl_nonfunction_mt; jl_simplevector_type->super = jl_any_type; jl_simplevector_type->parameters = jl_emptysvec; + jl_simplevector_type->name->n_uninitialized = 0; jl_simplevector_type->name->names = jl_emptysvec; jl_simplevector_type->types = jl_emptysvec; jl_precompute_memoized_dt(jl_simplevector_type, 1); From 54017220337914c5d2e6e36837b6ddd9f657b9f9 Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Wed, 7 Jul 2021 16:53:23 -0400 Subject: [PATCH 081/146] `hvncat`: Better handling of 0- and 1-length dims/shape args (#41197) (cherry picked from commit 7bc38a0d937fb30cd19753a400913fca1046d37f) --- base/abstractarray.jl | 67 ++++++++++++++++++++++++++++++++++--------- test/abstractarray.jl | 64 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 15 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index b438a0ad36339..8a2774c866dbc 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -2129,28 +2129,34 @@ julia> hvncat(((3, 3), (3, 3), (6,)), true, a, b, c, d, e, f) 4 = elements in each 4d slice (4,) => shape = ((2, 1, 1), (3, 1), (4,), (4,)) with `rowfirst` = true """ -hvncat(::Tuple{}, ::Bool) = [] -hvncat(::Tuple{}, ::Bool, xs...) = [] -hvncat(::Tuple{Vararg{Any, 1}}, ::Bool, xs...) = vcat(xs...) # methods assume 2+ dimensions hvncat(dimsshape::Tuple, row_first::Bool, xs...) = _hvncat(dimsshape, row_first, xs...) hvncat(dim::Int, xs...) = _hvncat(dim, true, xs...) -_hvncat(::Union{Tuple, Int}, ::Bool) = [] +_hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool) = _typed_hvncat(Any, dimsshape, row_first) _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs...) = _typed_hvncat(promote_eltypeof(xs...), dimsshape, row_first, xs...) _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs::T...) where T<:Number = _typed_hvncat(T, dimsshape, row_first, xs...) _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs::Number...) = _typed_hvncat(promote_typeof(xs...), dimsshape, row_first, xs...) _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs::AbstractArray...) = _typed_hvncat(promote_eltype(xs...), dimsshape, row_first, xs...) _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs::AbstractArray{T}...) where T = _typed_hvncat(T, dimsshape, row_first, xs...) -typed_hvncat(::Type{T}, ::Tuple{}, ::Bool) where T = Vector{T}() -typed_hvncat(::Type{T}, ::Tuple{}, ::Bool, xs...) where T = Vector{T}() -typed_hvncat(T::Type, ::Tuple{Vararg{Any, 1}}, ::Bool, xs...) = typed_vcat(T, xs...) # methods assume 2+ dimensions typed_hvncat(T::Type, dimsshape::Tuple, row_first::Bool, xs...) = _typed_hvncat(T, dimsshape, row_first, xs...) typed_hvncat(T::Type, dim::Int, xs...) = _typed_hvncat(T, Val(dim), xs...) -_typed_hvncat(::Type{T}, ::Tuple{}, ::Bool) where T = Vector{T}() -_typed_hvncat(::Type{T}, ::Tuple{}, ::Bool, xs...) where T = Vector{T}() -_typed_hvncat(::Type{T}, ::Tuple{}, ::Bool, xs::Number...) where T = Vector{T}() +# 1-dimensional hvncat methods + +_typed_hvncat(::Type, ::Val{0}) = _typed_hvncat_0d_only_one() +_typed_hvncat(T::Type, ::Val{0}, x) = fill(convert(T, x)) +_typed_hvncat(T::Type, ::Val{0}, x::Number) = fill(convert(T, x)) +_typed_hvncat(T::Type, ::Val{0}, x::AbstractArray) = convert.(T, x) +_typed_hvncat(::Type, ::Val{0}, ::Any...) = _typed_hvncat_0d_only_one() +_typed_hvncat(::Type, ::Val{0}, ::Number...) = _typed_hvncat_0d_only_one() +_typed_hvncat(::Type, ::Val{0}, ::AbstractArray...) = _typed_hvncat_0d_only_one() + +_typed_hvncat_0d_only_one() = + throw(ArgumentError("a 0-dimensional array may only contain exactly one element")) + +_typed_hvncat(::Type{T}, ::Val{N}) where {T, N} = Array{T, N}(undef, ntuple(x -> 0, Val(N))) + function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, xs::Number...) where {T, N} A = Array{T, N}(undef, dims...) lengtha = length(A) # Necessary to store result because throw blocks are being deoptimized right now, which leads to excessive allocations @@ -2188,14 +2194,13 @@ function hvncat_fill!(A::Array, row_first::Bool, xs::Tuple) end _typed_hvncat(T::Type, dim::Int, ::Bool, xs...) = _typed_hvncat(T, Val(dim), xs...) # catches from _hvncat type promoters -_typed_hvncat(::Type{T}, ::Val) where T = Vector{T}() -_typed_hvncat(T::Type, ::Val{N}, xs::Number...) where N = _typed_hvncat(T, (ntuple(x -> 1, N - 1)..., length(xs)), false, xs...) function _typed_hvncat(::Type{T}, ::Val{N}, as::AbstractArray...) where {T, N} # optimization for arrays that can be concatenated by copying them linearly into the destination # conditions: the elements must all have 1- or 0-length dimensions above N for a ∈ as ndims(a) <= N || all(x -> size(a, x) == 1, (N + 1):ndims(a)) || - return _typed_hvncat(T, (ntuple(x -> 1, N - 1)..., length(as)), false, as...) + return _typed_hvncat(T, (ntuple(x -> 1, N - 1)..., length(as), 1), false, as...) + # the extra 1 is to avoid an infinite cycle end nd = max(N, ndims(as[1])) @@ -2249,6 +2254,31 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as...) where {T, N} return A end + +# 0-dimensional cases for balanced and unbalanced hvncat method + +_typed_hvncat(T::Type, ::Tuple{}, ::Bool, x...) = _typed_hvncat(T, Val(0), x...) +_typed_hvncat(T::Type, ::Tuple{}, ::Bool, x::Number...) = _typed_hvncat(T, Val(0), x...) + + +# balanced dimensions hvncat methods + +_typed_hvncat(T::Type, dims::Tuple{Int}, ::Bool, as...) = _typed_hvncat_1d(T, dims[1], Val(false), as...) +_typed_hvncat(T::Type, dims::Tuple{Int}, ::Bool, as::Number...) = _typed_hvncat_1d(T, dims[1], Val(false), as...) + +function _typed_hvncat_1d(::Type{T}, ds::Int, ::Val{row_first}, as...) where {T, row_first} + lengthas = length(as) + ds > 0 || + throw(ArgumentError("`dimsshape` argument must consist of positive integers")) + lengthas == ds || + throw(ArgumentError("number of elements does not match `dimshape` argument; expected $ds, got $lengthas")) + if row_first + return _typed_hvncat(T, Val(2), as...) + else + return _typed_hvncat(T, Val(1), as...) + end +end + function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, as...) where {T, N} d1 = row_first ? 2 : 1 d2 = row_first ? 1 : 2 @@ -2311,7 +2341,16 @@ function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, return A end -function _typed_hvncat(::Type{T}, shape::Tuple{Vararg{Tuple, N}}, row_first::Bool, as...) where {T, N} + +# unbalanced dimensions hvncat methods + +function _typed_hvncat(T::Type, shape::Tuple{Tuple}, row_first::Bool, xs...) + length(shape[1]) > 0 || + throw(ArgumentError("each level of `shape` argument must have at least one value")) + return _typed_hvncat_1d(T, shape[1][1], Val(row_first), xs...) +end + +function _typed_hvncat(T::Type, shape::NTuple{N, Tuple}, row_first::Bool, as...) where {N} d1 = row_first ? 2 : 1 d2 = row_first ? 1 : 2 shape = collect(shape) # saves allocations later diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 65f9f4efa2cd3..a1c6dd1b22ce7 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1342,6 +1342,7 @@ end end end +using Base: typed_hvncat @testset "hvncat" begin a = fill(1, (2,3,2,4,5)) b = fill(2, (1,1,2,4,5)) @@ -1389,7 +1390,68 @@ end @test [v v;;; fill(v, 1, 2)] == fill(v, 1, 2, 2) end - @test_throws BoundsError hvncat(((1, 2), (3,)), false, zeros(Int, 0, 0, 0), 7, 8) + # 0-dimension behaviors + # exactly one argument, placed in an array + # if already an array, copy, with type conversion as necessary + @test_throws ArgumentError hvncat(0) + @test hvncat(0, 1) == fill(1) + @test hvncat(0, [1]) == [1] + @test_throws ArgumentError hvncat(0, 1, 1) + @test_throws ArgumentError typed_hvncat(Float64, 0) + @test typed_hvncat(Float64, 0, 1) == fill(1.0) + @test typed_hvncat(Float64, 0, [1]) == Float64[1.0] + @test_throws ArgumentError typed_hvncat(Float64, 0, 1, 1) + @test_throws ArgumentError hvncat((), true) == [] + @test hvncat((), true, 1) == fill(1) + @test hvncat((), true, [1]) == [1] + @test_throws ArgumentError hvncat((), true, 1, 1) + @test_throws ArgumentError typed_hvncat(Float64, (), true) == Float64[] + @test typed_hvncat(Float64, (), true, 1) == fill(1.0) + @test typed_hvncat(Float64, (), true, [1]) == [1.0] + @test_throws ArgumentError typed_hvncat(Float64, (), true, 1, 1) + + # 1-dimension behaviors + # int form + @test hvncat(1) == [] + @test hvncat(1, 1) == [1] + @test hvncat(1, [1]) == [1] + @test hvncat(1, [1 2; 3 4]) == [1 2; 3 4] + @test hvncat(1, 1, 1) == [1 ; 1] + @test typed_hvncat(Float64, 1) == Float64[] + @test typed_hvncat(Float64, 1, 1) == Float64[1.0] + @test typed_hvncat(Float64, 1, [1]) == Float64[1.0] + @test typed_hvncat(Float64, 1, 1, 1) == Float64[1.0 ; 1.0] + # dims form + @test_throws ArgumentError hvncat((1,), true) + @test hvncat((2,), true, 1, 1) == [1; 1] + @test hvncat((2,), true, [1], [1]) == [1; 1] + @test_throws ArgumentError hvncat((2,), true, 1) + @test typed_hvncat(Float64, (2,), true, 1, 1) == Float64[1.0; 1.0] + @test typed_hvncat(Float64, (2,), true, [1], [1]) == Float64[1.0; 1.0] + @test_throws ArgumentError typed_hvncat(Float64, (2,), true, 1) + # row_first has no effect with just one dimension of the dims form + @test hvncat((2,), false, 1, 1) == [1; 1] + @test typed_hvncat(Float64, (2,), false, 1, 1) == Float64[1.0; 1.0] + # shape form + @test hvncat(((2,),), true, 1, 1) == [1 1] + @test hvncat(((2,),), true, [1], [1]) == [1 1] + @test_throws ArgumentError hvncat(((2,),), true, 1) + @test hvncat(((2,),), false, 1, 1) == [1; 1] + @test hvncat(((2,),), false, [1], [1]) == [1; 1] + @test typed_hvncat(Float64, ((2,),), true, 1, 1) == Float64[1.0 1.0] + @test typed_hvncat(Float64, ((2,),), true, [1], [1]) == Float64[1.0 1.0] + @test_throws ArgumentError typed_hvncat(Float64, ((2,),), true, 1) + @test typed_hvncat(Float64, ((2,),), false, 1, 1) == Float64[1.0; 1.0] + @test typed_hvncat(Float64, ((2,),), false, [1], [1]) == Float64[1.0; 1.0] + + # zero-value behaviors for int form above dimension zero + # e.g. [;;], [;;;], though that isn't valid syntax + @test [] == hvncat(1) isa Array{Any, 1} + @test Array{Any, 2}(undef, 0, 0) == hvncat(2) isa Array{Any, 2} + @test Array{Any, 3}(undef, 0, 0, 0) == hvncat(3) isa Array{Any, 3} + @test Int[] == typed_hvncat(Int, 1) isa Array{Int, 1} + @test Array{Int, 2}(undef, 0, 0) == typed_hvncat(Int, 2) isa Array{Int, 2} + @test Array{Int, 3}(undef, 0, 0, 0) == typed_hvncat(Int, 3) isa Array{Int, 3} end @testset "keepat!" begin From cbb3367fe7941152d65b5ed359e705e0f223fd16 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 7 Jul 2021 16:54:52 -0400 Subject: [PATCH 082/146] fix #40773, bug in `summarysize` on arrays of inlined structs with pointers (#41492) (cherry picked from commit c49153dce6c29e9e04cd1b7e4c71ac89c4a64737) --- base/summarysize.jl | 5 +++-- test/misc.jl | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/base/summarysize.jl b/base/summarysize.jl index 916214a69f88f..62458dcdc5b97 100644 --- a/base/summarysize.jl +++ b/base/summarysize.jl @@ -120,12 +120,13 @@ function (ss::SummarySize)(obj::Array) if !haskey(ss.seen, datakey) ss.seen[datakey] = true dsize = Core.sizeof(obj) - if isbitsunion(eltype(obj)) + T = eltype(obj) + if isbitsunion(T) # add 1 union selector byte for each element dsize += length(obj) end size += dsize - if !isempty(obj) && !Base.allocatedinline(eltype(obj)) + if !isempty(obj) && (!Base.allocatedinline(T) || (T isa DataType && !Base.datatype_pointerfree(T))) push!(ss.frontier_x, obj) push!(ss.frontier_i, 1) end diff --git a/test/misc.jl b/test/misc.jl index 37c5397b4948f..e765dc9279b86 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -302,6 +302,11 @@ let vec = vcat(missing, ones(100000)) @test length(unique(summarysize(vec) for i = 1:20)) == 1 end +# issue #40773 +let s = Set(1:100) + @test summarysize([s]) > summarysize(s) +end + # issue #13021 let ex = try Main.x13021 = 0 From afad5f61f405efdea4884bc569278b0b84b015d9 Mon Sep 17 00:00:00 2001 From: Pete Vilter <7341+vilterp@users.noreply.github.com> Date: Wed, 7 Jul 2021 18:58:21 -0400 Subject: [PATCH 083/146] add a GC safepoint in Task.wait (#41441) (cherry picked from commit 97f817a379b0c3c5f9bb803427fe88a018ebfe18) --- base/task.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/base/task.jl b/base/task.jl index e84c344c28d17..0d4e5da4ccfd4 100644 --- a/base/task.jl +++ b/base/task.jl @@ -818,6 +818,7 @@ end end function wait() + GC.safepoint() W = Workqueues[Threads.threadid()] poptask(W) result = try_yieldto(ensure_rescheduled) From 170c2768beff9fdfc1390e47d4327d2ca291a8f1 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Fri, 9 Jul 2021 23:49:13 -0400 Subject: [PATCH 084/146] Null out some GC roots (cherry picked from commit 22c52a1db096b8182ba7d496fe9fb61159cc2b0c) --- src/codegen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 3d8ad33516080..9775db39892f7 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4697,10 +4697,10 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaval) std::unique_ptr closure_m; jl_llvm_functions_t closure_decls; - jl_method_instance_t *li; - jl_value_t *closure_t; - jl_tupletype_t *env_t; - jl_svec_t *sig_args; + jl_method_instance_t *li = NULL; + jl_value_t *closure_t = NULL; + jl_tupletype_t *env_t = NULL; + jl_svec_t *sig_args = NULL; JL_GC_PUSH5(&li, &closure_src, &closure_t, &env_t, &sig_args); li = jl_new_method_instance_uninit(); From 4f4fabfd77f71678989ef24b263f3b5fdc2ec42a Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 11 Jul 2021 01:19:12 -0400 Subject: [PATCH 085/146] CI (Buildkite): use a consistent naming scheme for labels, keys, and commit statuses (#41543) (cherry picked from commit ffc340c07ed15e1b1960ab7c900ef5203e3a0fad) --- .buildkite/embedding.yml | 4 ++-- .buildkite/llvm_passes.yml | 6 +++--- .buildkite/whitespace.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.buildkite/embedding.yml b/.buildkite/embedding.yml index faffeb1f7cc87..5cf6b985573f5 100644 --- a/.buildkite/embedding.yml +++ b/.buildkite/embedding.yml @@ -8,8 +8,8 @@ agents: os: "linux" steps: - - label: "Run embedding tests" - key: embedding + - label: "embedding" + key: "embedding" plugins: - JuliaCI/julia#v1: version: 1.6 diff --git a/.buildkite/llvm_passes.yml b/.buildkite/llvm_passes.yml index b4311f689d089..7453af82c1e73 100644 --- a/.buildkite/llvm_passes.yml +++ b/.buildkite/llvm_passes.yml @@ -9,7 +9,7 @@ agents: steps: - label: "analyzegc" - key: analyzegc + key: "analyzegc" plugins: - JuliaCI/julia#v1: version: 1.6 @@ -31,7 +31,7 @@ steps: context: "analyzegc" - label: "llvmpasses" - key: llvmpasses + key: "llvmpasses" plugins: - JuliaCI/julia#v1: version: 1.6 @@ -52,4 +52,4 @@ steps: timeout_in_minutes: 60 notify: - github_commit_status: - context: "llvm passes" + context: "llvmpasses" diff --git a/.buildkite/whitespace.yml b/.buildkite/whitespace.yml index 37fa66f75a3d9..bd625e855c5b5 100644 --- a/.buildkite/whitespace.yml +++ b/.buildkite/whitespace.yml @@ -8,8 +8,8 @@ agents: os: "linux" steps: - - label: "Check whitespace" - key: whitespace + - label: "whitespace" + key: "whitespace" plugins: - JuliaCI/julia#v1: version: 1.6 From 663415f9eb9770ea0bfa8a7bf1932a8ba72d5e66 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 11 Jul 2021 17:01:58 -0400 Subject: [PATCH 086/146] CI: Add more Debian packages to the `llvm-passes` rootfs image (#41544) * Add `less` to the `llvm-passes` rootfs image Also, sort the entries of `packages` in alphabetical order. * Update llvm-passes.jl (cherry picked from commit 516af1b182e38aefd4223b740e4c6fef7aea4797) --- .buildkite/rootfs_images/llvm-passes.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.buildkite/rootfs_images/llvm-passes.jl b/.buildkite/rootfs_images/llvm-passes.jl index 17c9588f75c9e..2d9e47ba4f0fc 100755 --- a/.buildkite/rootfs_images/llvm-passes.jl +++ b/.buildkite/rootfs_images/llvm-passes.jl @@ -8,18 +8,20 @@ include("rootfs_utils.jl") # Build debian-based image with the following extra packages: packages = [ + "bash", "build-essential", + "cmake", + "curl", + "gfortran", + "git", + "less", "libatomic1", + "m4", + "perl", + "pkg-config", "python", "python3", - "gfortran", - "perl", "wget", - "m4", - "cmake", - "pkg-config", - "curl", - "git", ] tarball_path = debootstrap("llvm-passes"; packages) From fd85e6b1742cedf4f99f9a8e9747b4a76b76ae59 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Mon, 12 Jul 2021 05:36:42 -0400 Subject: [PATCH 087/146] change .* to * in fallback 3-arg `*` methods (#41545) (cherry picked from commit e3a06c495df00ed6b83596b1a34855957d4beff7) --- stdlib/LinearAlgebra/src/matmul.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/LinearAlgebra/src/matmul.jl b/stdlib/LinearAlgebra/src/matmul.jl index 10e6e7722f414..82f44c8e559fc 100644 --- a/stdlib/LinearAlgebra/src/matmul.jl +++ b/stdlib/LinearAlgebra/src/matmul.jl @@ -1141,7 +1141,7 @@ end # Fast path for two arrays * one scalar is opt-in, via mat_vec_scalar and mat_mat_scalar. -mat_vec_scalar(A, x, γ) = A * (x .* γ) # fallback +mat_vec_scalar(A, x, γ) = A * (x * γ) # fallback mat_vec_scalar(A::StridedMaybeAdjOrTransMat, x::StridedVector, γ) = _mat_vec_scalar(A, x, γ) mat_vec_scalar(A::AdjOrTransAbsVec, x::StridedVector, γ) = (A * x) * γ @@ -1151,7 +1151,7 @@ function _mat_vec_scalar(A, x, γ) mul!(C, A, x, γ, false) end -mat_mat_scalar(A, B, γ) = (A*B) .* γ # fallback +mat_mat_scalar(A, B, γ) = (A*B) * γ # fallback mat_mat_scalar(A::StridedMaybeAdjOrTransMat, B::StridedMaybeAdjOrTransMat, γ) = _mat_mat_scalar(A, B, γ) @@ -1161,11 +1161,11 @@ function _mat_mat_scalar(A, B, γ) mul!(C, A, B, γ, false) end -mat_mat_scalar(A::AdjointAbsVec, B, γ) = (γ' .* (A * B)')' # preserving order, adjoint reverses +mat_mat_scalar(A::AdjointAbsVec, B, γ) = (γ' * (A * B)')' # preserving order, adjoint reverses mat_mat_scalar(A::AdjointAbsVec{<:RealOrComplex}, B::StridedMaybeAdjOrTransMat{<:RealOrComplex}, γ::RealOrComplex) = mat_vec_scalar(B', A', γ')' -mat_mat_scalar(A::TransposeAbsVec, B, γ) = transpose(γ .* transpose(A * B)) +mat_mat_scalar(A::TransposeAbsVec, B, γ) = transpose(γ * transpose(A * B)) mat_mat_scalar(A::TransposeAbsVec{<:RealOrComplex}, B::StridedMaybeAdjOrTransMat{<:RealOrComplex}, γ::RealOrComplex) = transpose(mat_vec_scalar(transpose(B), transpose(A), γ)) From c85a571a8daf2ce33bb529efe7bf051b7d9a5438 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 12 Jul 2021 13:53:43 -0400 Subject: [PATCH 088/146] CI (Buildkite): rootfs_images: allow user to override the default value of `tag_name` (#41549) (cherry picked from commit a9232d67203e6f1aca4934318d86f85cad50550b) --- .buildkite/rootfs_images/llvm-passes.jl | 2 +- .buildkite/rootfs_images/rootfs_utils.jl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.buildkite/rootfs_images/llvm-passes.jl b/.buildkite/rootfs_images/llvm-passes.jl index 2d9e47ba4f0fc..3df2de49522c9 100755 --- a/.buildkite/rootfs_images/llvm-passes.jl +++ b/.buildkite/rootfs_images/llvm-passes.jl @@ -26,4 +26,4 @@ packages = [ tarball_path = debootstrap("llvm-passes"; packages) # Upload it -upload_rootfs_image(tarball_path) +upload_rootfs_image(tarball_path; tag_name = "v1") diff --git a/.buildkite/rootfs_images/rootfs_utils.jl b/.buildkite/rootfs_images/rootfs_utils.jl index 7df224a31f740..3412fbcc03f56 100644 --- a/.buildkite/rootfs_images/rootfs_utils.jl +++ b/.buildkite/rootfs_images/rootfs_utils.jl @@ -82,9 +82,10 @@ function debootstrap(name::String; release::String="buster", variant::String="mi return tarball_path end -function upload_rootfs_image(tarball_path::String; github_repo::String="JuliaCI/rootfs-images") +function upload_rootfs_image(tarball_path::String; + github_repo::String="JuliaCI/rootfs-images", + tag_name::String="v1") # Upload it to `github_repo` - tag_name = "v1" tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))" @info("Uploading to $(github_repo)@$(tag_name)", tarball_url) run(`$(ghr_jll.ghr()) -u $(dirname(github_repo)) -r $(basename(github_repo)) -replace $(tag_name) $(tarball_path)`) From 9ae40befb09edc79bd7d638c2cba432f91b06bb5 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Mon, 12 Jul 2021 16:17:15 -0700 Subject: [PATCH 089/146] Fix `get-task-allow` entitlement (#41559) We had apparently misspelled this entitlement, not allowing `lldb` to attach to official macOS builds. (cherry picked from commit ad6740b4f27ddc5a32bc3ee7496383b2fa3edfea) --- contrib/mac/app/Entitlements.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/mac/app/Entitlements.plist b/contrib/mac/app/Entitlements.plist index b84dccb00f95c..95c1a02d58958 100644 --- a/contrib/mac/app/Entitlements.plist +++ b/contrib/mac/app/Entitlements.plist @@ -4,7 +4,7 @@ com.apple.security.automation.apple-events - com.apple.security.cs.get-task-allow + com.apple.security.get-task-allow com.apple.security.cs.allow-dyld-environment-variables From 91789413234a1e358f995e3c25f989df581291a1 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 13 Jul 2021 10:29:53 +0200 Subject: [PATCH 090/146] add a test for #41096 (#41556) (cherry picked from commit d7329038feb207997b9a6d969c5c8f11d37680d5) --- test/compiler/codegen.jl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index f232b246a9fc9..cc6095b867d41 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -597,3 +597,35 @@ f41438(y) = y[].x # issue #41157 f41157(a, b) = a[1] = b[1] @test_throws BoundsError f41157(Tuple{Int}[], Tuple{Union{}}[]) + +# issue #41096 +struct Modulate41096{M<:Union{Function, Val{true}, Val{false}}, id} + modulate::M + Modulate41096(id::Symbol, modulate::Function) = new{typeof(modulate), id}(modulate) + Modulate41096(id::Symbol, modulate::Bool=true) = new{Val{modulate}, id}(modulate|>Val) +end +@inline ismodulatable41096(modulate::Modulate41096) = ismodulatable41096(typeof(modulate)) +@inline ismodulatable41096(::Type{<:Modulate41096{Val{B}}}) where B = B +@inline ismodulatable41096(::Type{<:Modulate41096{<:Function}}) = true + +mutable struct Term41096{I, M<:Modulate41096} + modulate::M + Term41096{I}(modulate::Modulate41096) where I = new{I, typeof(modulate)}(modulate) +end +@inline ismodulatable41096(term::Term41096) = ismodulatable41096(typeof(term)) +@inline ismodulatable41096(::Type{<:Term41096{I, M} where I}) where M = ismodulatable41096(M) + +function newexpand41096(gen, name::Symbol) + flag = ismodulatable41096(getfield(gen, name)) + if flag + return true + else + return false + end +end + +t41096 = Term41096{:t}(Modulate41096(:t, false)) +μ41096 = Term41096{:μ}(Modulate41096(:μ, false)) +U41096 = Term41096{:U}(Modulate41096(:U, false)) + +@test !newexpand41096((t=t41096, μ=μ41096, U=U41096), :U) From e4217a4e3804bfd2259f65a36579d0020241917c Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 13 Jul 2021 17:45:50 -0400 Subject: [PATCH 091/146] fix another bug in circular type detection (#41516) Co-authored-by: Jeff Bezanson (cherry picked from commit 1c92e0de7a0c9fea963bd622a63d37f680e8d996) --- src/builtins.c | 35 ++++++++++++++++++++++++++++------- test/core.jl | 13 +++++++++++-- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index f40d694d23529..7ef93faaa6368 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -1487,22 +1487,38 @@ static int equiv_field_types(jl_value_t *old, jl_value_t *ft) return 1; } +// If a field can reference its enclosing type, then the inlining +// recursive depth is not statically bounded for some layouts, so we cannot +// inline it. The only way fields can reference this type (due to +// syntax-enforced restrictions) is via being passed as a type parameter. Thus +// we can conservatively check this by examining only the parameters of the +// dependent types. +// affects_layout is a hack introduced by #35275 to workaround a problem +// introduced by #34223: it checks whether we will potentially need to +// compute the layout of the object before we have fully computed the types of +// the fields during recursion over the allocation of the parameters for the +// field types (of the concrete subtypes) static int references_name(jl_value_t *p, jl_typename_t *name, int affects_layout) JL_NOTSAFEPOINT { if (jl_is_uniontype(p)) return references_name(((jl_uniontype_t*)p)->a, name, affects_layout) || references_name(((jl_uniontype_t*)p)->b, name, affects_layout); if (jl_is_unionall(p)) - return references_name((jl_value_t*)((jl_unionall_t*)p)->var, name, 0) || + return references_name((jl_value_t*)((jl_unionall_t*)p)->var->lb, name, 0) || + references_name((jl_value_t*)((jl_unionall_t*)p)->var->ub, name, 0) || references_name(((jl_unionall_t*)p)->body, name, affects_layout); if (jl_is_typevar(p)) - return references_name(((jl_tvar_t*)p)->ub, name, 0) || - references_name(((jl_tvar_t*)p)->lb, name, 0); + return 0; // already checked by unionall, if applicable if (jl_is_datatype(p)) { jl_datatype_t *dp = (jl_datatype_t*)p; if (affects_layout && dp->name == name) return 1; - affects_layout = dp->types == NULL || jl_svec_len(dp->types) != 0; + // affects_layout checks whether we will need to attempt to layout this + // type (based on whether all copies of it have the same layout) in + // that case, we still need to check the recursive parameters for + // layout recursion happening also, but we know it won't itself cause + // problems for the layout computation + affects_layout = ((jl_datatype_t*)jl_unwrap_unionall(dp->name->wrapper))->layout == NULL; size_t i, l = jl_nparams(p); for (i = 0; i < l; i++) { if (references_name(jl_tparam(p, i), name, affects_layout)) @@ -1537,16 +1553,21 @@ JL_CALLABLE(jl_f__typebody) else { dt->types = (jl_svec_t*)ft; jl_gc_wb(dt, ft); - if (!dt->name->mutabl) { - dt->name->mayinlinealloc = 1; + // If a supertype can reference the same type, then we may not be + // able to compute the layout of the object before needing to + // publish it, so we must assume it cannot be inlined, if that + // check passes, then we also still need to check the fields too. + if (!dt->name->mutabl && !references_name((jl_value_t*)dt->super, dt->name, 1)) { + int mayinlinealloc = 1; size_t i, nf = jl_svec_len(ft); for (i = 0; i < nf; i++) { jl_value_t *fld = jl_svecref(ft, i); if (references_name(fld, dt->name, 1)) { - dt->name->mayinlinealloc = 0; + mayinlinealloc = 0; break; } } + dt->name->mayinlinealloc = mayinlinealloc; } } } diff --git a/test/core.jl b/test/core.jl index e0be3b109cb44..020722fd5f70b 100644 --- a/test/core.jl +++ b/test/core.jl @@ -7217,8 +7217,17 @@ end struct B33954 x::Q33954{B33954} end -@test_broken isbitstype(Tuple{B33954}) -@test_broken isbitstype(B33954) +@test isbitstype(Tuple{B33954}) +@test isbitstype(B33954) + +struct A41503{d} + e::d +end +struct B41503{j,k} <: AbstractArray{A41503{B41503{Any,k}},Any} + l::k +end +@test !isbitstype(B41503{Any,Any}) +@test_broken isbitstype(B41503{Any,Int}) struct B40050 <: Ref{Tuple{B40050}} end From 456fb2b014dc9c648a79018626bd9a54ec3769e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 14 Jul 2021 18:02:47 +0100 Subject: [PATCH 092/146] [deps] Replace `-L` option to `xargs` with `-n` (#41583) Busybox `xargs` doesn't support `-L` option, so building Julia fails on Alpine Linux for example (cherry picked from commit da28c17d9f9401ff4e9bd1b6e29e09ef735091d1) --- deps/tools/bb-install.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/tools/bb-install.mk b/deps/tools/bb-install.mk index 5c18ddee0bfce..781d66f1c5dda 100644 --- a/deps/tools/bb-install.mk +++ b/deps/tools/bb-install.mk @@ -51,7 +51,7 @@ ifneq (bsdtar,$(findstring bsdtar,$(TAR_TEST))) @# work-around a gtar bug: they do some complicated work to avoid the mkdir @# syscall, which is buggy when working with Tar.jl files so we manually do @# the mkdir calls first in a pre-pass - $(TAR) -tzf $$< | xargs -L 1 dirname | sort -u | (cd $$(build_prefix) && xargs -t mkdir -p) + $(TAR) -tzf $$< | xargs -n 1 dirname | sort -u | (cd $$(build_prefix) && xargs -t mkdir -p) endif $(UNTAR) $$< -C $$(build_prefix) echo '$$(UNINSTALL_$(strip $1))' > $$@ From 89cb6fa294a73a52258ce814c34929d6d549081d Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Wed, 14 Jul 2021 13:09:54 -0400 Subject: [PATCH 093/146] CI (rootfs_utils): Require that the user explicitly specify the `tag_name` (#41571) (cherry picked from commit 23dbf169f0e4b831adfd20d666bedd1f669527ca) --- .buildkite/rootfs_images/llvm-passes.jl | 7 ++++++- .buildkite/rootfs_images/rootfs_utils.jl | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.buildkite/rootfs_images/llvm-passes.jl b/.buildkite/rootfs_images/llvm-passes.jl index 3df2de49522c9..9555abe183368 100755 --- a/.buildkite/rootfs_images/llvm-passes.jl +++ b/.buildkite/rootfs_images/llvm-passes.jl @@ -4,6 +4,11 @@ ## Eventually, this image will probably be replaced with the actual builder image, ## as that will have the necessary toolchains as well, but that image is not built yet. +if length(ARGS) != 1 + throw(ArgumentError("Usage: llvm-passes.jl [tag_name]")) +end +const tag_name = convert(String, strip(ARGS[1]))::String + include("rootfs_utils.jl") # Build debian-based image with the following extra packages: @@ -26,4 +31,4 @@ packages = [ tarball_path = debootstrap("llvm-passes"; packages) # Upload it -upload_rootfs_image(tarball_path; tag_name = "v1") +upload_rootfs_image(tarball_path; tag_name) diff --git a/.buildkite/rootfs_images/rootfs_utils.jl b/.buildkite/rootfs_images/rootfs_utils.jl index 3412fbcc03f56..0079b13ae4026 100644 --- a/.buildkite/rootfs_images/rootfs_utils.jl +++ b/.buildkite/rootfs_images/rootfs_utils.jl @@ -84,7 +84,7 @@ end function upload_rootfs_image(tarball_path::String; github_repo::String="JuliaCI/rootfs-images", - tag_name::String="v1") + tag_name::String) # Upload it to `github_repo` tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))" @info("Uploading to $(github_repo)@$(tag_name)", tarball_url) From 61d1ca8d1bf7cccbe8c182daa62e2ec554e90eb0 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 14 Jul 2021 15:48:03 -0400 Subject: [PATCH 094/146] increase specialization of `_totuple` (#41515) Helps #41512 (cherry picked from commit 468b1571b3676528feb1e44fd497b3bb9b55ef42) --- base/tuple.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/tuple.jl b/base/tuple.jl index dc777e7497598..421ada47c0c36 100644 --- a/base/tuple.jl +++ b/base/tuple.jl @@ -323,7 +323,7 @@ function _totuple_err(@nospecialize T) throw(ArgumentError("too few elements for tuple type $T")) end -function _totuple(T, itr, s...) +function _totuple(::Type{T}, itr, s::Vararg{Any,N}) where {T,N} @_inline_meta y = iterate(itr, s...) y === nothing && _totuple_err(T) From 687c2146302b96a40639d891a1c9f106c6d1d677 Mon Sep 17 00:00:00 2001 From: Sukera <11753998+Seelengrab@users.noreply.github.com> Date: Thu, 15 Jul 2021 12:14:27 +0200 Subject: [PATCH 095/146] REPL doc lookup assumed ASCII for the given string, fixes #41589 (#41594) (cherry picked from commit be443ac05451202fc92ca4fd8ad991c6057e0516) --- stdlib/REPL/src/docview.jl | 2 +- stdlib/REPL/test/docview.jl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index b6eb73bcd5faa..2e5fc361d8cbc 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -221,7 +221,7 @@ function lookup_doc(ex) str = string(ex) isdotted = startswith(str, ".") if endswith(str, "=") && Base.operator_precedence(ex) == Base.prec_assignment && ex !== :(:=) - op = str[1:end-1] + op = chop(str) eq = isdotted ? ".=" : "=" return Markdown.parse("`x $op= y` is a synonym for `x $eq x $op y`") elseif isdotted && ex !== :(..) diff --git a/stdlib/REPL/test/docview.jl b/stdlib/REPL/test/docview.jl index 1cc5037c1c806..160544eb475d2 100644 --- a/stdlib/REPL/test/docview.jl +++ b/stdlib/REPL/test/docview.jl @@ -47,3 +47,7 @@ end # shouldn't throw when there is a space in a middle of query @test (REPL.matchinds("a ", "a file.txt"); true) end + +@testset "Unicode doc lookup (#41589)" begin + @test REPL.lookup_doc(:(÷=)) isa Markdown.MD +end From 1bfd4dcb959d1dca4db5eb20f698c065afcfb55f Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 15 Jul 2021 14:31:26 -0400 Subject: [PATCH 096/146] intrinsics: optimize several atomic intrinsics (#41563) (cherry picked from commit 430e5e002b5a07b3966e694d2f681992c2123f1f) --- src/intrinsics.cpp | 195 +++++++++++++++++++++++++++++++++++---- src/julia_internal.h | 4 + src/runtime_intrinsics.c | 69 +++++++------- test/intrinsics.jl | 139 +++++++++++++++++++--------- 4 files changed, 314 insertions(+), 93 deletions(-) diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp index e37ee264398e9..4096bba08d0c7 100644 --- a/src/intrinsics.cpp +++ b/src/intrinsics.cpp @@ -584,25 +584,21 @@ static jl_cgval_t emit_pointerref(jl_codectx_t &ctx, jl_cgval_t *argv) jl_value_t *ety = jl_tparam0(aty); if (jl_is_typevar(ety)) return emit_runtime_pointerref(ctx, argv); - if (!jl_is_datatype(ety)) - ety = (jl_value_t*)jl_any_type; + if (!is_valid_intrinsic_elptr(ety)) { + emit_error(ctx, "pointerref: invalid pointer type"); + return jl_cgval_t(); + } Value *idx = emit_unbox(ctx, T_size, i, (jl_value_t*)jl_long_type); Value *im1 = ctx.builder.CreateSub(idx, ConstantInt::get(T_size, 1)); if (ety == (jl_value_t*)jl_any_type) { Value *thePtr = emit_unbox(ctx, T_pprjlvalue, e, e.typ); - return mark_julia_type( - ctx, - ctx.builder.CreateAlignedLoad(ctx.builder.CreateInBoundsGEP(T_prjlvalue, thePtr, im1), Align(align_nb)), - true, - ety); + LoadInst *load = ctx.builder.CreateAlignedLoad(ctx.builder.CreateInBoundsGEP(T_prjlvalue, thePtr, im1), Align(align_nb)); + tbaa_decorate(tbaa_data, load); + return mark_julia_type(ctx, load, true, ety); } else if (!jl_isbits(ety)) { - if (!jl_is_structtype(ety) || jl_is_array_type(ety) || !jl_is_concrete_type(ety)) { - emit_error(ctx, "pointerref: invalid pointer type"); - return jl_cgval_t(); - } assert(jl_is_datatype(ety)); uint64_t size = jl_datatype_size(ety); Value *strct = emit_allocobj(ctx, size, @@ -656,8 +652,8 @@ static jl_cgval_t emit_pointerset(jl_codectx_t &ctx, jl_cgval_t *argv) return emit_runtime_pointerset(ctx, argv); if (align.constant == NULL || !jl_is_long(align.constant)) return emit_runtime_pointerset(ctx, argv); - if (!jl_is_datatype(ety)) - ety = (jl_value_t*)jl_any_type; + if (!is_valid_intrinsic_elptr(ety)) + emit_error(ctx, "pointerset: invalid pointer type"); emit_typecheck(ctx, x, ety, "pointerset"); Value *idx = emit_unbox(ctx, T_size, i, (jl_value_t*)jl_long_type); @@ -673,10 +669,6 @@ static jl_cgval_t emit_pointerset(jl_codectx_t &ctx, jl_cgval_t *argv) tbaa_decorate(tbaa_data, store); } else if (!jl_isbits(ety)) { - if (!jl_is_structtype(ety) || jl_is_array_type(ety) || !jl_is_concrete_type(ety)) { - emit_error(ctx, "pointerset: invalid pointer type"); - return jl_cgval_t(); - } thePtr = emit_unbox(ctx, T_pint8, e, e.typ); uint64_t size = jl_datatype_size(ety); im1 = ctx.builder.CreateMul(im1, ConstantInt::get(T_size, @@ -696,6 +688,170 @@ static jl_cgval_t emit_pointerset(jl_codectx_t &ctx, jl_cgval_t *argv) return e; } +static jl_cgval_t emit_atomicfence(jl_codectx_t &ctx, jl_cgval_t *argv) +{ + const jl_cgval_t &ord = argv[0]; + if (ord.constant && jl_is_symbol(ord.constant)) { + enum jl_memory_order order = jl_get_atomic_order((jl_sym_t*)ord.constant, false, false); + if (order == jl_memory_order_invalid) { + emit_atomic_error(ctx, "invalid atomic ordering"); + return jl_cgval_t(); // unreachable + } + if (order > jl_memory_order_monotonic) + ctx.builder.CreateFence(get_llvm_atomic_order(order)); + return ghostValue(jl_nothing_type); + } + return emit_runtime_call(ctx, atomic_fence, argv, 1); +} + +static jl_cgval_t emit_atomic_pointerref(jl_codectx_t &ctx, jl_cgval_t *argv) +{ + const jl_cgval_t &e = argv[0]; + const jl_cgval_t &ord = argv[1]; + jl_value_t *aty = e.typ; + if (!jl_is_cpointer_type(aty) || !ord.constant || !jl_is_symbol(ord.constant)) + return emit_runtime_call(ctx, atomic_pointerref, argv, 2); + jl_value_t *ety = jl_tparam0(aty); + if (jl_is_typevar(ety)) + return emit_runtime_call(ctx, atomic_pointerref, argv, 2); + enum jl_memory_order order = jl_get_atomic_order((jl_sym_t*)ord.constant, true, false); + if (order == jl_memory_order_invalid) { + emit_atomic_error(ctx, "invalid atomic ordering"); + return jl_cgval_t(); // unreachable + } + AtomicOrdering llvm_order = get_llvm_atomic_order(order); + + if (ety == (jl_value_t*)jl_any_type) { + Value *thePtr = emit_unbox(ctx, T_pprjlvalue, e, e.typ); + LoadInst *load = ctx.builder.CreateAlignedLoad(thePtr, Align(sizeof(jl_value_t*))); + tbaa_decorate(tbaa_data, load); + load->setOrdering(llvm_order); + return mark_julia_type(ctx, load, true, ety); + } + + if (!is_valid_intrinsic_elptr(ety)) { + emit_error(ctx, "atomic_pointerref: invalid pointer type"); + return jl_cgval_t(); + } + + size_t nb = jl_datatype_size(ety); + if ((nb & (nb - 1)) != 0 || nb > MAX_POINTERATOMIC_SIZE) { + emit_error(ctx, "atomic_pointerref: invalid pointer for atomic operation"); + return jl_cgval_t(); + } + + if (!jl_isbits(ety)) { + assert(jl_is_datatype(ety)); + uint64_t size = jl_datatype_size(ety); + Value *strct = emit_allocobj(ctx, size, + literal_pointer_val(ctx, ety)); + Value *thePtr = emit_unbox(ctx, T_pint8, e, e.typ); + Type *loadT = Type::getIntNTy(jl_LLVMContext, nb * 8); + thePtr = emit_bitcast(ctx, thePtr, loadT->getPointerTo()); + MDNode *tbaa = best_tbaa(ety); + LoadInst *load = ctx.builder.CreateAlignedLoad(loadT, thePtr, Align(nb)); + tbaa_decorate(tbaa, load); + load->setOrdering(llvm_order); + thePtr = emit_bitcast(ctx, strct, thePtr->getType()); + StoreInst *store = ctx.builder.CreateAlignedStore(load, thePtr, Align(julia_alignment(ety))); + tbaa_decorate(tbaa, store); + return mark_julia_type(ctx, strct, true, ety); + } + else { + bool isboxed; + Type *ptrty = julia_type_to_llvm(ctx, ety, &isboxed); + assert(!isboxed); + if (!type_is_ghost(ptrty)) { + Value *thePtr = emit_unbox(ctx, ptrty->getPointerTo(), e, e.typ); + return typed_load(ctx, thePtr, nullptr, ety, tbaa_data, nullptr, isboxed, llvm_order, true, nb); + } + else { + if (order > jl_memory_order_monotonic) + ctx.builder.CreateFence(llvm_order); + return ghostValue(ety); + } + } +} + +// e[i] = x (set) +// e[i] <= x (swap) +// e[i] y => x (replace) +static jl_cgval_t emit_atomic_pointerset(jl_codectx_t &ctx, intrinsic f, const jl_cgval_t *argv, int nargs) +{ + bool issetfield = f == atomic_pointerset; + bool isreplacefield = f == atomic_pointerreplace; + const jl_cgval_t undefval; + const jl_cgval_t &e = argv[0]; + const jl_cgval_t &x = isreplacefield ? argv[2] : argv[1]; + const jl_cgval_t &y = isreplacefield ? argv[1] : undefval; + const jl_cgval_t &ord = isreplacefield ? argv[3] : argv[2]; + const jl_cgval_t &failord = isreplacefield ? argv[4] : undefval; + + jl_value_t *aty = e.typ; + if (!jl_is_cpointer_type(aty) || !ord.constant || !jl_is_symbol(ord.constant)) + return emit_runtime_call(ctx, f, argv, nargs); + if (isreplacefield) { + if (!failord.constant || !jl_is_symbol(failord.constant)) + return emit_runtime_call(ctx, f, argv, nargs); + } + jl_value_t *ety = jl_tparam0(aty); + if (jl_is_typevar(ety)) + return emit_runtime_call(ctx, f, argv, nargs); + enum jl_memory_order order = jl_get_atomic_order((jl_sym_t*)ord.constant, !issetfield, true); + enum jl_memory_order failorder = isreplacefield ? jl_get_atomic_order((jl_sym_t*)failord.constant, true, false) : order; + if (order == jl_memory_order_invalid || failorder == jl_memory_order_invalid || failorder > order) { + emit_atomic_error(ctx, "invalid atomic ordering"); + return jl_cgval_t(); // unreachable + } + AtomicOrdering llvm_order = get_llvm_atomic_order(order); + AtomicOrdering llvm_failorder = get_llvm_atomic_order(failorder); + + if (ety == (jl_value_t*)jl_any_type) { + // unsafe_store to Ptr{Any} is allowed to implicitly drop GC roots. + // n.b.: the expected value (y) must be rooted, but not the others + Value *thePtr = emit_unbox(ctx, T_pprjlvalue, e, e.typ); + bool isboxed = true; + jl_cgval_t ret = typed_store(ctx, thePtr, nullptr, x, y, ety, tbaa_data, nullptr, nullptr, isboxed, + llvm_order, llvm_failorder, sizeof(jl_value_t*), false, issetfield, isreplacefield, false); + if (issetfield) + ret = e; + return ret; + } + + if (!is_valid_intrinsic_elptr(ety)) { + std::string msg(StringRef(jl_intrinsic_name((int)f))); + msg += ": invalid pointer type"; + emit_error(ctx, msg); + return jl_cgval_t(); + } + emit_typecheck(ctx, x, ety, std::string(jl_intrinsic_name((int)f))); + + size_t nb = jl_datatype_size(ety); + if ((nb & (nb - 1)) != 0 || nb > MAX_POINTERATOMIC_SIZE) { + std::string msg(StringRef(jl_intrinsic_name((int)f))); + msg += ": invalid pointer for atomic operation"; + emit_error(ctx, msg); + return jl_cgval_t(); + } + + if (!jl_isbits(ety)) { + //Value *thePtr = emit_unbox(ctx, T_pint8, e, e.typ); + //uint64_t size = jl_datatype_size(ety); + return emit_runtime_call(ctx, f, argv, nargs); // TODO: optimizations + } + else { + bool isboxed; + Type *ptrty = julia_type_to_llvm(ctx, ety, &isboxed); + assert(!isboxed); + Value *thePtr = emit_unbox(ctx, ptrty->getPointerTo(), e, e.typ); + jl_cgval_t ret = typed_store(ctx, thePtr, nullptr, x, y, ety, tbaa_data, nullptr, nullptr, isboxed, + llvm_order, llvm_failorder, nb, false, issetfield, isreplacefield, false); + if (issetfield) + ret = e; + return ret; + } +} + static Value *emit_checked_srem_int(jl_codectx_t &ctx, Value *x, Value *den) { Type *t = den->getType(); @@ -924,11 +1080,14 @@ static jl_cgval_t emit_intrinsic(jl_codectx_t &ctx, intrinsic f, jl_value_t **ar case pointerset: return emit_pointerset(ctx, argv); case atomic_fence: + return emit_atomicfence(ctx, argv); case atomic_pointerref: + return emit_atomic_pointerref(ctx, argv); case atomic_pointerset: case atomic_pointerswap: - case atomic_pointermodify: case atomic_pointerreplace: + return emit_atomic_pointerset(ctx, f, argv, nargs); + case atomic_pointermodify: return emit_runtime_call(ctx, f, argv, nargs); case bitcast: return generic_bitcast(ctx, argv); diff --git a/src/julia_internal.h b/src/julia_internal.h index 11eb24330c638..f4d63cc27cf78 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -1110,6 +1110,10 @@ extern JL_DLLEXPORT jl_value_t *jl_segv_exception; JL_DLLEXPORT const char *jl_intrinsic_name(int f) JL_NOTSAFEPOINT; unsigned jl_intrinsic_nargs(int f) JL_NOTSAFEPOINT; +STATIC_INLINE int is_valid_intrinsic_elptr(jl_value_t *ety) +{ + return ety == (jl_value_t*)jl_any_type || (jl_is_concrete_type(ety) && !jl_is_layout_opaque(((jl_datatype_t*)ety)->layout)); +} JL_DLLEXPORT jl_value_t *jl_bitcast(jl_value_t *ty, jl_value_t *v); JL_DLLEXPORT jl_value_t *jl_pointerref(jl_value_t *p, jl_value_t *i, jl_value_t *align); JL_DLLEXPORT jl_value_t *jl_pointerset(jl_value_t *p, jl_value_t *x, jl_value_t *align, jl_value_t *i); diff --git a/src/runtime_intrinsics.c b/src/runtime_intrinsics.c index c7c31bb98a86d..7cb58bc230294 100644 --- a/src/runtime_intrinsics.c +++ b/src/runtime_intrinsics.c @@ -43,7 +43,7 @@ JL_DLLEXPORT jl_value_t *jl_pointerref(jl_value_t *p, jl_value_t *i, jl_value_t return *pp; } else { - if (!jl_is_datatype(ety)) + if (!is_valid_intrinsic_elptr(ety)) jl_error("pointerref: invalid pointer"); size_t nb = LLT_ALIGN(jl_datatype_size(ety), jl_datatype_align(ety)); char *pp = (char*)jl_unbox_long(p) + (jl_unbox_long(i)-1)*nb; @@ -56,14 +56,14 @@ JL_DLLEXPORT jl_value_t *jl_pointerset(jl_value_t *p, jl_value_t *x, jl_value_t { JL_TYPECHK(pointerset, pointer, p); JL_TYPECHK(pointerset, long, i); - JL_TYPECHK(pointerref, long, align); + JL_TYPECHK(pointerset, long, align); jl_value_t *ety = jl_tparam0(jl_typeof(p)); if (ety == (jl_value_t*)jl_any_type) { jl_value_t **pp = (jl_value_t**)(jl_unbox_long(p) + (jl_unbox_long(i)-1)*sizeof(void*)); *pp = x; } else { - if (!jl_is_datatype(ety)) + if (!is_valid_intrinsic_elptr(ety)) jl_error("pointerset: invalid pointer"); if (jl_typeof(x) != ety) jl_type_error("pointerset", ety, x); @@ -77,8 +77,8 @@ JL_DLLEXPORT jl_value_t *jl_pointerset(jl_value_t *p, jl_value_t *x, jl_value_t JL_DLLEXPORT jl_value_t *jl_atomic_pointerref(jl_value_t *p, jl_value_t *order) { - JL_TYPECHK(pointerref, pointer, p); - JL_TYPECHK(pointerref, symbol, order) + JL_TYPECHK(atomic_pointerref, pointer, p); + JL_TYPECHK(atomic_pointerref, symbol, order) (void)jl_get_atomic_order_checked((jl_sym_t*)order, 1, 0); jl_value_t *ety = jl_tparam0(jl_typeof(p)); char *pp = (char*)jl_unbox_long(p); @@ -86,19 +86,19 @@ JL_DLLEXPORT jl_value_t *jl_atomic_pointerref(jl_value_t *p, jl_value_t *order) return jl_atomic_load((jl_value_t**)pp); } else { - if (!jl_is_datatype(ety)) - jl_error("pointerref: invalid pointer"); + if (!is_valid_intrinsic_elptr(ety)) + jl_error("atomic_pointerref: invalid pointer"); size_t nb = jl_datatype_size(ety); if ((nb & (nb - 1)) != 0 || nb > MAX_POINTERATOMIC_SIZE) - jl_error("pointerref: invalid pointer for atomic operation"); + jl_error("atomic_pointerref: invalid pointer for atomic operation"); return jl_atomic_new_bits(ety, pp); } } JL_DLLEXPORT jl_value_t *jl_atomic_pointerset(jl_value_t *p, jl_value_t *x, jl_value_t *order) { - JL_TYPECHK(pointerset, pointer, p); - JL_TYPECHK(pointerset, symbol, order); + JL_TYPECHK(atomic_pointerset, pointer, p); + JL_TYPECHK(atomic_pointerset, symbol, order); (void)jl_get_atomic_order_checked((jl_sym_t*)order, 0, 1); jl_value_t *ety = jl_tparam0(jl_typeof(p)); char *pp = (char*)jl_unbox_long(p); @@ -106,13 +106,13 @@ JL_DLLEXPORT jl_value_t *jl_atomic_pointerset(jl_value_t *p, jl_value_t *x, jl_v jl_atomic_store((jl_value_t**)pp, x); } else { - if (!jl_is_datatype(ety)) - jl_error("pointerset: invalid pointer"); + if (!is_valid_intrinsic_elptr(ety)) + jl_error("atomic_pointerset: invalid pointer"); if (jl_typeof(x) != ety) - jl_type_error("pointerset", ety, x); + jl_type_error("atomic_pointerset", ety, x); size_t nb = jl_datatype_size(ety); if ((nb & (nb - 1)) != 0 || nb > MAX_POINTERATOMIC_SIZE) - jl_error("pointerset: invalid pointer for atomic operation"); + jl_error("atomic_pointerset: invalid pointer for atomic operation"); jl_atomic_store_bits(pp, x, nb); } return p; @@ -120,8 +120,8 @@ JL_DLLEXPORT jl_value_t *jl_atomic_pointerset(jl_value_t *p, jl_value_t *x, jl_v JL_DLLEXPORT jl_value_t *jl_atomic_pointerswap(jl_value_t *p, jl_value_t *x, jl_value_t *order) { - JL_TYPECHK(pointerswap, pointer, p); - JL_TYPECHK(pointerswap, symbol, order); + JL_TYPECHK(atomic_pointerswap, pointer, p); + JL_TYPECHK(atomic_pointerswap, symbol, order); (void)jl_get_atomic_order_checked((jl_sym_t*)order, 1, 1); jl_value_t *ety = jl_tparam0(jl_typeof(p)); jl_value_t *y; @@ -130,13 +130,13 @@ JL_DLLEXPORT jl_value_t *jl_atomic_pointerswap(jl_value_t *p, jl_value_t *x, jl_ y = jl_atomic_exchange((jl_value_t**)pp, x); } else { - if (!jl_is_datatype(ety)) - jl_error("pointerswap: invalid pointer"); + if (!is_valid_intrinsic_elptr(ety)) + jl_error("atomic_pointerswap: invalid pointer"); if (jl_typeof(x) != ety) - jl_type_error("pointerswap", ety, x); + jl_type_error("atomic_pointerswap", ety, x); size_t nb = jl_datatype_size(ety); if ((nb & (nb - 1)) != 0 || nb > MAX_POINTERATOMIC_SIZE) - jl_error("pointerswap: invalid pointer for atomic operation"); + jl_error("atomic_pointerswap: invalid pointer for atomic operation"); y = jl_atomic_swap_bits(ety, pp, x, nb); } return y; @@ -163,8 +163,10 @@ JL_DLLEXPORT jl_value_t *jl_atomic_pointermodify(jl_value_t *p, jl_value_t *f, j break; } else { + //if (!is_valid_intrinsic_elptr(ety)) // handled by jl_atomic_pointerref earlier + // jl_error("atomic_pointermodify: invalid pointer"); if (jl_typeof(y) != ety) - jl_type_error("pointermodify", ety, y); + jl_type_error("atomic_pointermodify", ety, y); size_t nb = jl_datatype_size(ety); if (jl_atomic_bool_cmpswap_bits(pp, expected, y, nb)) break; @@ -181,13 +183,13 @@ JL_DLLEXPORT jl_value_t *jl_atomic_pointermodify(jl_value_t *p, jl_value_t *f, j JL_DLLEXPORT jl_value_t *jl_atomic_pointerreplace(jl_value_t *p, jl_value_t *expected, jl_value_t *x, jl_value_t *success_order_sym, jl_value_t *failure_order_sym) { - JL_TYPECHK(pointerreplace, pointer, p); - JL_TYPECHK(pointerreplace, symbol, success_order_sym); - JL_TYPECHK(pointerreplace, symbol, failure_order_sym); + JL_TYPECHK(atomic_pointerreplace, pointer, p); + JL_TYPECHK(atomic_pointerreplace, symbol, success_order_sym); + JL_TYPECHK(atomic_pointerreplace, symbol, failure_order_sym); enum jl_memory_order success_order = jl_get_atomic_order_checked((jl_sym_t*)success_order_sym, 1, 1); enum jl_memory_order failure_order = jl_get_atomic_order_checked((jl_sym_t*)failure_order_sym, 1, 0); if (failure_order > success_order) - jl_atomic_error("pointerreplace: invalid atomic ordering"); + jl_atomic_error("atomic_pointerreplace: invalid atomic ordering"); // TODO: filter other invalid orderings jl_value_t *ety = jl_tparam0(jl_typeof(p)); char *pp = (char*)jl_unbox_long(p); @@ -207,22 +209,23 @@ JL_DLLEXPORT jl_value_t *jl_atomic_pointerreplace(jl_value_t *p, jl_value_t *exp return result[0]; } else { - if (!jl_is_datatype(ety)) - jl_error("pointerreplace: invalid pointer"); + if (!is_valid_intrinsic_elptr(ety)) + jl_error("atomic_pointerreplace: invalid pointer"); if (jl_typeof(x) != ety) - jl_type_error("pointerreplace", ety, x); + jl_type_error("atomic_pointerreplace", ety, x); size_t nb = jl_datatype_size(ety); if ((nb & (nb - 1)) != 0 || nb > MAX_POINTERATOMIC_SIZE) - jl_error("pointerreplace: invalid pointer for atomic operation"); + jl_error("atomic_pointerreplace: invalid pointer for atomic operation"); return jl_atomic_cmpswap_bits((jl_datatype_t*)ety, pp, expected, x, nb); } } -JL_DLLEXPORT jl_value_t *jl_atomic_fence(jl_value_t *order) +JL_DLLEXPORT jl_value_t *jl_atomic_fence(jl_value_t *order_sym) { - JL_TYPECHK(fence, symbol, order); - (void)jl_get_atomic_order_checked((jl_sym_t*)order, 0, 0); - jl_fence(); + JL_TYPECHK(fence, symbol, order_sym); + enum jl_memory_order order = jl_get_atomic_order_checked((jl_sym_t*)order_sym, 0, 0); + if (order > jl_memory_order_monotonic) + jl_fence(); return jl_nothing; } diff --git a/test/intrinsics.jl b/test/intrinsics.jl index c1d3019f8db35..7fa8ecb0ebe27 100644 --- a/test/intrinsics.jl +++ b/test/intrinsics.jl @@ -171,51 +171,106 @@ primitive type Int512 <: Signed 512 end Int512(i::Int) = Core.Intrinsics.sext_int(Int512, i) function add(i::T, j)::T where {T}; return i + j; end swap(i, j) = j + for TT in (Int8, Int16, Int32, Int64, Int128, Int256, Int512, Complex{Int32}, Complex{Int512}, Any) - T(x) = convert(TT, x) r = Ref{TT}(10) - p = Base.unsafe_convert(Ptr{eltype(r)}, r) GC.@preserve r begin - S = UInt32 - if TT !== Any - @test_throws TypeError Core.Intrinsics.atomic_pointerset(p, S(1), :sequentially_consistent) - @test_throws TypeError Core.Intrinsics.atomic_pointerswap(p, S(100), :sequentially_consistent) - @test_throws TypeError Core.Intrinsics.atomic_pointerreplace(p, T(100), S(2), :sequentially_consistent, :sequentially_consistent) - end - @test Core.Intrinsics.pointerref(p, 1, 1) === T(10) === r[] - if sizeof(r) > 8 - @test_throws ErrorException("pointerref: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) - @test_throws ErrorException("pointerset: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerset(p, T(1), :sequentially_consistent) - @test_throws ErrorException("pointerswap: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerswap(p, T(100), :sequentially_consistent) - @test_throws ErrorException("pointerref: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) - @test_throws ErrorException("pointerref: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointermodify(p, swap, S(1), :sequentially_consistent) - @test_throws ErrorException("pointerreplace: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerreplace(p, T(100), T(2), :sequentially_consistent, :sequentially_consistent) - @test_throws ErrorException("pointerreplace: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerreplace(p, S(100), T(2), :sequentially_consistent, :sequentially_consistent) + (function (::Type{TT}) where TT + p = Base.unsafe_convert(Ptr{TT}, r) + T(x) = convert(TT, x) + S = UInt32 + if TT !== Any + @test_throws TypeError Core.Intrinsics.atomic_pointerset(p, S(1), :sequentially_consistent) + @test_throws TypeError Core.Intrinsics.atomic_pointerswap(p, S(100), :sequentially_consistent) + @test_throws TypeError Core.Intrinsics.atomic_pointerreplace(p, T(100), S(2), :sequentially_consistent, :sequentially_consistent) + end @test Core.Intrinsics.pointerref(p, 1, 1) === T(10) === r[] - else - TT !== Any && @test_throws TypeError Core.Intrinsics.atomic_pointermodify(p, swap, S(1), :sequentially_consistent) - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(10) - @test Core.Intrinsics.atomic_pointerset(p, T(1), :sequentially_consistent) === p - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(1) - @test Core.Intrinsics.atomic_pointerreplace(p, T(1), T(100), :sequentially_consistent, :sequentially_consistent) === (T(1), true) - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(100) - @test Core.Intrinsics.atomic_pointerreplace(p, T(1), T(1), :sequentially_consistent, :sequentially_consistent) === (T(100), false) - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(100) - @test Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) === (T(100), T(101)) - @test Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) === (T(101), T(102)) - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(102) - @test Core.Intrinsics.atomic_pointerswap(p, T(103), :sequentially_consistent) === T(102) - @test Core.Intrinsics.atomic_pointerreplace(p, S(100), T(2), :sequentially_consistent, :sequentially_consistent) === (T(103), false) - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(103) - end - if TT === Any - @test Core.Intrinsics.atomic_pointermodify(p, swap, S(103), :sequentially_consistent) === (T(103), S(103)) - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === S(103) - @test Core.Intrinsics.atomic_pointerset(p, S(1), :sequentially_consistent) === p - @test Core.Intrinsics.atomic_pointerswap(p, S(100), :sequentially_consistent) === S(1) - @test Core.Intrinsics.atomic_pointerreplace(p, T(100), S(2), :sequentially_consistent, :sequentially_consistent) === (S(100), false) - @test Core.Intrinsics.atomic_pointerreplace(p, S(100), T(2), :sequentially_consistent, :sequentially_consistent) === (S(100), true) - @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(2) - end + if sizeof(r) > 8 + @test_throws ErrorException("atomic_pointerref: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) + @test_throws ErrorException("atomic_pointerset: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerset(p, T(1), :sequentially_consistent) + @test_throws ErrorException("atomic_pointerswap: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerswap(p, T(100), :sequentially_consistent) + @test_throws ErrorException("atomic_pointerref: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) + @test_throws ErrorException("atomic_pointerref: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointermodify(p, swap, S(1), :sequentially_consistent) + @test_throws ErrorException("atomic_pointerreplace: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerreplace(p, T(100), T(2), :sequentially_consistent, :sequentially_consistent) + @test_throws ErrorException("atomic_pointerreplace: invalid pointer for atomic operation") Core.Intrinsics.atomic_pointerreplace(p, S(100), T(2), :sequentially_consistent, :sequentially_consistent) + @test Core.Intrinsics.pointerref(p, 1, 1) === T(10) === r[] + else + TT !== Any && @test_throws TypeError Core.Intrinsics.atomic_pointermodify(p, swap, S(1), :sequentially_consistent) + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(10) + @test Core.Intrinsics.atomic_pointerset(p, T(1), :sequentially_consistent) === p + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(1) + @test Core.Intrinsics.atomic_pointerreplace(p, T(1), T(100), :sequentially_consistent, :sequentially_consistent) === (T(1), true) + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(100) + @test Core.Intrinsics.atomic_pointerreplace(p, T(1), T(1), :sequentially_consistent, :sequentially_consistent) === (T(100), false) + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(100) + @test Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) === (T(100), T(101)) + @test Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) === (T(101), T(102)) + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(102) + @test Core.Intrinsics.atomic_pointerswap(p, T(103), :sequentially_consistent) === T(102) + @test Core.Intrinsics.atomic_pointerreplace(p, S(100), T(2), :sequentially_consistent, :sequentially_consistent) === (T(103), false) + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(103) + end + if TT === Any + @test Core.Intrinsics.atomic_pointermodify(p, swap, S(103), :sequentially_consistent) === (T(103), S(103)) + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === S(103) + @test Core.Intrinsics.atomic_pointerset(p, S(1), :sequentially_consistent) === p + @test Core.Intrinsics.atomic_pointerswap(p, S(100), :sequentially_consistent) === S(1) + @test Core.Intrinsics.atomic_pointerreplace(p, T(100), S(2), :sequentially_consistent, :sequentially_consistent) === (S(100), false) + @test Core.Intrinsics.atomic_pointerreplace(p, S(100), T(2), :sequentially_consistent, :sequentially_consistent) === (S(100), true) + @test Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) === T(2) + end + end)(TT,) end end + +mutable struct IntWrap <: Signed + x::Int +end +Base.:(+)(a::IntWrap, b::Int) = IntWrap(a.x + b) +Base.:(+)(a::IntWrap, b::IntWrap) = IntWrap(a.x + b.x) +Base.show(io::IO, a::IntWrap) = print(io, "IntWrap(", a.x, ")") +(function() + TT = IntWrap + T(x) = convert(TT, x) + r = Ref{TT}(10) + p = Base.unsafe_convert(Ptr{TT}, r) + GC.@preserve r begin + S = UInt32 + @test_throws TypeError Core.Intrinsics.atomic_pointerset(p, S(1), :sequentially_consistent) + @test_throws TypeError Core.Intrinsics.atomic_pointerswap(p, S(100), :sequentially_consistent) + @test_throws TypeError Core.Intrinsics.atomic_pointerreplace(p, T(100), S(2), :sequentially_consistent, :sequentially_consistent) + r2 = Core.Intrinsics.pointerref(p, 1, 1) + @test r2 isa IntWrap && r2.x === 10 === r[].x && r2 !== r[] + @test_throws TypeError Core.Intrinsics.atomic_pointermodify(p, swap, S(1), :sequentially_consistent) + r2 = Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 10 === r[].x && r2 !== r[] + @test Core.Intrinsics.atomic_pointerset(p, T(1), :sequentially_consistent) === p + r2 = Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 1 === r[].x && r2 !== r[] + r2, succ = Core.Intrinsics.atomic_pointerreplace(p, T(1), T(100), :sequentially_consistent, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 1 && r[].x === 100 && r2 !== r[] + @test succ + r2 = Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 100 === r[].x && r2 !== r[] + r2, succ = Core.Intrinsics.atomic_pointerreplace(p, T(1), T(1), :sequentially_consistent, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 100 === r[].x && r2 !== r[] + @test !succ + r2 = Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 100 === r[].x && r2 !== r[] + r2, r3 = Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 100 !== r[].x && r2 !== r[] + @test r3 isa IntWrap && r3.x === 101 === r[].x && r3 !== r[] + r2, r3 = Core.Intrinsics.atomic_pointermodify(p, add, T(1), :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 101 !== r[].x && r2 !== r[] + @test r3 isa IntWrap && r3.x === 102 === r[].x && r3 !== r[] + r2 = Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 102 === r[].x && r2 !== r[] + r2 = Core.Intrinsics.atomic_pointerswap(p, T(103), :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 102 !== r[].x && r[].x == 103 && r2 !== r[] + r2, succ = Core.Intrinsics.atomic_pointerreplace(p, S(100), T(2), :sequentially_consistent, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 103 === r[].x && r2 !== r[] + @test !succ + r2 = Core.Intrinsics.atomic_pointerref(p, :sequentially_consistent) + @test r2 isa IntWrap && r2.x === 103 === r[].x && r2 !== r[] + end +end)() From 99d27f6fc40abbb145b5e9832c277c17ae96c3e3 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 15 Jul 2021 18:55:37 -0400 Subject: [PATCH 097/146] CI (rootfs images): when uploading a tarball, don't allow it to override an existing tarball (unless the user provides the `--force-overwrite` command-line flag) (#41591) Co-authored-by: Elliot Saba Co-authored-by: Elliot Saba (cherry picked from commit 3ac7c383a1d5825866664939e6e2de694c55d19d) --- .buildkite/rootfs_images/llvm-passes.jl | 9 +++---- .buildkite/rootfs_images/rootfs_utils.jl | 31 ++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.buildkite/rootfs_images/llvm-passes.jl b/.buildkite/rootfs_images/llvm-passes.jl index 9555abe183368..bc6d57eb2f87e 100755 --- a/.buildkite/rootfs_images/llvm-passes.jl +++ b/.buildkite/rootfs_images/llvm-passes.jl @@ -4,13 +4,10 @@ ## Eventually, this image will probably be replaced with the actual builder image, ## as that will have the necessary toolchains as well, but that image is not built yet. -if length(ARGS) != 1 - throw(ArgumentError("Usage: llvm-passes.jl [tag_name]")) -end -const tag_name = convert(String, strip(ARGS[1]))::String - include("rootfs_utils.jl") +const tag_name, force_overwrite = get_arguments(ARGS, @__FILE__) + # Build debian-based image with the following extra packages: packages = [ "bash", @@ -31,4 +28,4 @@ packages = [ tarball_path = debootstrap("llvm-passes"; packages) # Upload it -upload_rootfs_image(tarball_path; tag_name) +upload_rootfs_image(tarball_path; tag_name, force_overwrite) diff --git a/.buildkite/rootfs_images/rootfs_utils.jl b/.buildkite/rootfs_images/rootfs_utils.jl index 0079b13ae4026..3d31747e0e6f8 100644 --- a/.buildkite/rootfs_images/rootfs_utils.jl +++ b/.buildkite/rootfs_images/rootfs_utils.jl @@ -84,10 +84,37 @@ end function upload_rootfs_image(tarball_path::String; github_repo::String="JuliaCI/rootfs-images", - tag_name::String) + tag_name::String, + force_overwrite::Bool) # Upload it to `github_repo` tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))" @info("Uploading to $(github_repo)@$(tag_name)", tarball_url) - run(`$(ghr_jll.ghr()) -u $(dirname(github_repo)) -r $(basename(github_repo)) -replace $(tag_name) $(tarball_path)`) + replace_flag = force_overwrite ? "-replace" : "" + run(`$(ghr_jll.ghr()) -u $(dirname(github_repo)) -r $(basename(github_repo)) $(replace_flag) $(tag_name) $(tarball_path)`) return tarball_url end + +# process command-line arguments + +function get_arguments(args::AbstractVector, script_file::AbstractString) + usage = "Usage: $(basename(script_file)) [--force-overwrite]" + length(args) < 1 && throw(ArgumentError(usage)) + length(args) > 2 && throw(ArgumentError(usage)) + tag_name = get_tag_name(args; usage) + force_overwrite = get_force_overwrite(args; usage) + return (; tag_name, force_overwrite) +end + +function get_tag_name(args::AbstractVector; usage::AbstractString) + tag_name = convert(String, strip(args[1]))::String + isempty(tag_name) && throw(ArgumentError(usage)) + startswith(tag_name, "--") && throw(ArgumentError(usage)) + return tag_name +end + +function get_force_overwrite(args::AbstractVector; usage::AbstractString) + force_overwrite_string = strip(get(args, 2, "")) + force_overwrite_string == "" && return false + force_overwrite_string == "--force-overwrite" && return true + throw(ArgumentError(usage)) +end From 735724abbda2fd5c40b211694a8e21e6a826b212 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 16 Jul 2021 16:19:50 -0400 Subject: [PATCH 098/146] CI (rootfs images): fix a bug in the `upload_rootfs_image` function (#41610) (cherry picked from commit e1aeb8a95ede8212ea09bdb49bdd805f66dfb9d5) --- .buildkite/rootfs_images/rootfs_utils.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.buildkite/rootfs_images/rootfs_utils.jl b/.buildkite/rootfs_images/rootfs_utils.jl index 3d31747e0e6f8..82baeec7a0933 100644 --- a/.buildkite/rootfs_images/rootfs_utils.jl +++ b/.buildkite/rootfs_images/rootfs_utils.jl @@ -89,8 +89,11 @@ function upload_rootfs_image(tarball_path::String; # Upload it to `github_repo` tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))" @info("Uploading to $(github_repo)@$(tag_name)", tarball_url) - replace_flag = force_overwrite ? "-replace" : "" - run(`$(ghr_jll.ghr()) -u $(dirname(github_repo)) -r $(basename(github_repo)) $(replace_flag) $(tag_name) $(tarball_path)`) + cmd = ghr_jll.ghr() + append!(cmd.exec, ["-u", dirname(github_repo), "-r", basename(github_repo)]) + force_overwrite && push!(cmd.exec, "-replace") + append!(cmd.exec, [tag_name, tarball_path]) + run(cmd) return tarball_url end From a2b980de3981be0703730c8d69e71c590cad05f9 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 7 Jul 2021 14:43:45 -0700 Subject: [PATCH 099/146] Add signed pipeline test back (cherry picked from commit 480ff81e78b2d7b139ec34f0f2d70cfdc51895d2) (cherry picked from commit dad0f150958899f1f0d632a1974c6af897389c46) --- .buildkite/0_webui.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/0_webui.yml b/.buildkite/0_webui.yml index aed6a5e59d9c3..d5ba4e0ea7cf9 100644 --- a/.buildkite/0_webui.yml +++ b/.buildkite/0_webui.yml @@ -19,6 +19,6 @@ steps: # 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/signed_pipeline_test.yml - # signature: "U2FsdGVkX18aZgryp6AJTArgD2uOnVWyFFGVOP5qsY4WbGQ/LVAcYiMEp9cweV+2iht+vmEF949CuuGTeQPA1fKlhPwkG3nZ688752DUB6en9oM2nuL31NoDKWHhpygZ" + signed_pipelines: + - pipeline: .buildkite/signed_pipeline_test.yml + signature: "U2FsdGVkX18aZgryp6AJTArgD2uOnVWyFFGVOP5qsY4WbGQ/LVAcYiMEp9cweV+2iht+vmEF949CuuGTeQPA1fKlhPwkG3nZ688752DUB6en9oM2nuL31NoDKWHhpygZ" From 17f5c9d5660766418b628185913090e62e4b2ec3 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 8 Jul 2021 11:44:44 -0400 Subject: [PATCH 100/146] CI (code coverage): run some tests in serial (#41507) (cherry picked from commit 9564bfbd6cc0254bb6ee900e09034e7291ca7e19) --- .buildkite/0_webui.yml | 2 +- .buildkite/coverage-linux64/0_webui.yml | 2 +- .buildkite/coverage-linux64/pipeline.yml | 15 ++++++++++++--- .../{run_tests_base.jl => run_tests_parallel.jl} | 0 .buildkite/coverage-linux64/run_tests_serial.jl | 16 ++++++++++++++++ 5 files changed, 30 insertions(+), 5 deletions(-) rename .buildkite/coverage-linux64/{run_tests_base.jl => run_tests_parallel.jl} (100%) create mode 100644 .buildkite/coverage-linux64/run_tests_serial.jl diff --git a/.buildkite/0_webui.yml b/.buildkite/0_webui.yml index d5ba4e0ea7cf9..440d2d443ce7e 100644 --- a/.buildkite/0_webui.yml +++ b/.buildkite/0_webui.yml @@ -21,4 +21,4 @@ steps: # verifies the treehash of the pipeline itself and the inputs listed in `inputs` signed_pipelines: - pipeline: .buildkite/signed_pipeline_test.yml - signature: "U2FsdGVkX18aZgryp6AJTArgD2uOnVWyFFGVOP5qsY4WbGQ/LVAcYiMEp9cweV+2iht+vmEF949CuuGTeQPA1fKlhPwkG3nZ688752DUB6en9oM2nuL31NoDKWHhpygZ" + signature: "U2FsdGVkX18ZrMlORSIi0TvW99eZ3JyUEhntMyXjrOSJ9jAtUohgHc8+dMnWUc6qWjYt8k63wfPrth33SGWDiF814Bm1W5Zk3+R6HgVu6UCrQEI5sLm+SJPbrvET+Jkn" diff --git a/.buildkite/coverage-linux64/0_webui.yml b/.buildkite/coverage-linux64/0_webui.yml index 6dafcd86f6bcd..b0df8ec41de68 100644 --- a/.buildkite/coverage-linux64/0_webui.yml +++ b/.buildkite/coverage-linux64/0_webui.yml @@ -13,4 +13,4 @@ steps: # verifies the treehash of the pipeline itself and the inputs listed in `inputs` signed_pipelines: - pipeline: .buildkite/coverage-linux64/pipeline.yml - signature: "U2FsdGVkX18eQWpd3hMYLO5Kd+6K+oBoLk1I6J3qIw7lc6g5/jaeWyq/wralosZCfTzyjS4NstNKFvhQf3KDPEBVElipNvTxoWOjVLRVOrfBqqvTkQN4xVosY/r026Gy" + signature: U2FsdGVkX190BiaBGCTT6GNBDe5cHX3ZAP0IXbBfOWo7ys+1IuD5ymf4ImJbRIeE8NQac+iqud+bqCPHjii6DKmqzX+Jz6vax1NY3AxROhYlO5spUClvKr1wdngUCQON diff --git a/.buildkite/coverage-linux64/pipeline.yml b/.buildkite/coverage-linux64/pipeline.yml index 078b00254c4f9..218212d24ac2a 100644 --- a/.buildkite/coverage-linux64/pipeline.yml +++ b/.buildkite/coverage-linux64/pipeline.yml @@ -31,9 +31,18 @@ steps: # this is necessary to make sure that the LibGit2 tests passes git config --global init.defaultBranch master - echo "--- Run Julia tests with code coverage enabled" - # Run the actual tests - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_base.jl + echo "--- Run some Julia tests in serial" + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/codegen.jl + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/contextual.jl + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/inference.jl + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/inline.jl + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/interpreter_exec.jl + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/irpasses.jl + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/ssair.jl + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/validation.jl + + echo "--- Run Julia tests in parallel with code coverage enabled" + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_parallel.jl echo "--- Process and upload coverage information" ./julia .buildkite/coverage-linux64/upload_coverage.jl diff --git a/.buildkite/coverage-linux64/run_tests_base.jl b/.buildkite/coverage-linux64/run_tests_parallel.jl similarity index 100% rename from .buildkite/coverage-linux64/run_tests_base.jl rename to .buildkite/coverage-linux64/run_tests_parallel.jl diff --git a/.buildkite/coverage-linux64/run_tests_serial.jl b/.buildkite/coverage-linux64/run_tests_serial.jl new file mode 100644 index 0000000000000..6d7380a55e402 --- /dev/null +++ b/.buildkite/coverage-linux64/run_tests_serial.jl @@ -0,0 +1,16 @@ +using Test + +const repository_root = dirname(dirname(@__DIR__)) + +for filename in ARGS + path = joinpath(repository_root, filename) + @info "Starting $(filename)" + try + @testset "$(filename)" begin + include(path) + end + catch ex + @error "" exception=(ex, catch_backtrace()) + end + @info "Finished $(filename)" +end From 26686041062abb1470e78924855cd04d2bcca843 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Tue, 13 Jul 2021 08:54:20 -0400 Subject: [PATCH 101/146] add default "auto" as option to --check-bounds (#41551) * add default "auto" as option to --check-bounds * add to NEWS (cherry picked from commit 7d0f7693fd9999f88623dc435e0f83dc9681fbd1) --- NEWS.md | 1 + base/util.jl | 2 +- doc/man/julia.1 | 4 ++-- doc/src/devdocs/boundscheck.md | 2 +- doc/src/manual/command-line-options.md | 2 +- src/jloptions.c | 7 +++++-- test/cmdlineargs.jl | 2 ++ 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/NEWS.md b/NEWS.md index c95d6896388c3..7b2d16c2d2dc5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -21,6 +21,7 @@ New language features lines of code ([#40753]). * A backslash before a newline in command literals now always removes the newline, similar to standard string literals, whereas the result was not well-defined before ([#40753]). +* The default behavior of observing `@inbounds` declarations is now an option via `auto` in `--check-bounds=yes|no|auto` ([#41551]) Language changes ---------------- diff --git a/base/util.jl b/base/util.jl index 503ba5c390e1c..a8bbd92116a83 100644 --- a/base/util.jl +++ b/base/util.jl @@ -174,7 +174,7 @@ function julia_cmd(julia=joinpath(Sys.BINDIR::String, julia_exename())) elseif opts.check_bounds == 2 "no" # off else - "" # "default" + "" # default = "auto" end isempty(check_bounds) || push!(addflags, "--check-bounds=$check_bounds") end diff --git a/doc/man/julia.1 b/doc/man/julia.1 index 8e2ed9f94c76a..76277e39bc079 100644 --- a/doc/man/julia.1 +++ b/doc/man/julia.1 @@ -162,8 +162,8 @@ Set the level of debug info generation to Control whether inlining is permitted (overrides functions declared as @inline) .TP ---check-bounds={yes|no} -Emit bounds checks always or never (ignoring declarations) +--check-bounds={yes|no|auto} +Emit bounds checks always, never, or respect @inbounds declarations .TP --math-mode={ieee|user} diff --git a/doc/src/devdocs/boundscheck.md b/doc/src/devdocs/boundscheck.md index 300d7f8b72993..4f9c247db8c80 100644 --- a/doc/src/devdocs/boundscheck.md +++ b/doc/src/devdocs/boundscheck.md @@ -92,4 +92,4 @@ the last argument). ## Emit bounds checks -Julia can be launched with `--check-bounds={yes|no}` to emit bounds checks always or never (ignoring declarations). +Julia can be launched with `--check-bounds={yes|no|auto}` to emit bounds checks always, never, or respect @inbounds declarations. diff --git a/doc/src/manual/command-line-options.md b/doc/src/manual/command-line-options.md index 47d581af430e5..a0fe1849cc7b1 100644 --- a/doc/src/manual/command-line-options.md +++ b/doc/src/manual/command-line-options.md @@ -31,7 +31,7 @@ The following is a complete list of command-line switches available when launchi |`--min-optlevel={0,1,2,3}` |Set the lower bound on per-module optimization (default is 0)| |`-g`, `-g ` |Enable / Set the level of debug info generation (default level is 1 if unspecified or 2 if used without a level)| |`--inline={yes\|no}` |Control whether inlining is permitted, including overriding `@inline` declarations| -|`--check-bounds={yes\|no}` |Emit bounds checks always or never (ignoring declarations)| +|`--check-bounds={yes\|no\|auto}` |Emit bounds checks always, never, or respect @inbounds declarations| |`--math-mode={ieee,fast}` |Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)| |`--code-coverage={none\|user\|all}` |Count executions of source lines| |`--code-coverage` |equivalent to `--code-coverage=user`| diff --git a/src/jloptions.c b/src/jloptions.c index 3fb06fd4e7340..ab1af72a04c79 100644 --- a/src/jloptions.c +++ b/src/jloptions.c @@ -131,7 +131,8 @@ static const char opts[] = " (default level is 1 if unspecified or 2 if used without a level)\n" #endif " --inline={yes|no} Control whether inlining is permitted, including overriding @inline declarations\n" - " --check-bounds={yes|no} Emit bounds checks always or never (ignoring @inbounds declarations)\n" + " --check-bounds={yes|no|auto}\n" + " Emit bounds checks always, never, or respect @inbounds declarations\n" #ifdef USE_POLLY " --polly={yes|no} Enable or disable the polyhedral optimizer Polly (overrides @polly declaration)\n" #endif @@ -565,8 +566,10 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) jl_options.check_bounds = JL_OPTIONS_CHECK_BOUNDS_ON; else if (!strcmp(optarg,"no")) jl_options.check_bounds = JL_OPTIONS_CHECK_BOUNDS_OFF; + else if (!strcmp(optarg,"auto")) + jl_options.check_bounds = JL_OPTIONS_CHECK_BOUNDS_DEFAULT; else - jl_errorf("julia: invalid argument to --check-bounds={yes|no} (%s)", optarg); + jl_errorf("julia: invalid argument to --check-bounds={yes|no|auto} (%s)", optarg); break; case opt_output_bc: jl_options.outputbc = optarg; diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index fbf60acdbc848..c5e82b681a3c4 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -396,6 +396,8 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` filter!(a -> !startswith(a, "--check-bounds="), exename_default_checkbounds.exec) @test parse(Int, readchomp(`$exename_default_checkbounds -E "Int(Base.JLOptions().check_bounds)"`)) == JL_OPTIONS_CHECK_BOUNDS_DEFAULT + @test parse(Int, readchomp(`$exename -E "Int(Base.JLOptions().check_bounds)" + --check-bounds=auto`)) == JL_OPTIONS_CHECK_BOUNDS_DEFAULT @test parse(Int, readchomp(`$exename -E "Int(Base.JLOptions().check_bounds)" --check-bounds=yes`)) == JL_OPTIONS_CHECK_BOUNDS_ON @test parse(Int, readchomp(`$exename -E "Int(Base.JLOptions().check_bounds)" From 87af6211d26c6ce51f6bd5ada55488c550efe563 Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Thu, 15 Jul 2021 14:40:06 -0400 Subject: [PATCH 102/146] `hvncat`: Stronger argument checks (#41196) fixes #41047 (cherry picked from commit e6aca8929f7e2e8a332aa5187a1b77457e13599b) --- base/abstractarray.jl | 111 +++++++++++++++++++++++++++++------------- test/abstractarray.jl | 63 ++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 33 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 8a2774c866dbc..1fdb441f952c8 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -2139,6 +2139,7 @@ _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs::Number...) = _typed_h _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs::AbstractArray...) = _typed_hvncat(promote_eltype(xs...), dimsshape, row_first, xs...) _hvncat(dimsshape::Union{Tuple, Int}, row_first::Bool, xs::AbstractArray{T}...) where T = _typed_hvncat(T, dimsshape, row_first, xs...) + typed_hvncat(T::Type, dimsshape::Tuple, row_first::Bool, xs...) = _typed_hvncat(T, dimsshape, row_first, xs...) typed_hvncat(T::Type, dim::Int, xs...) = _typed_hvncat(T, Val(dim), xs...) @@ -2155,9 +2156,9 @@ _typed_hvncat(::Type, ::Val{0}, ::AbstractArray...) = _typed_hvncat_0d_only_one( _typed_hvncat_0d_only_one() = throw(ArgumentError("a 0-dimensional array may only contain exactly one element")) -_typed_hvncat(::Type{T}, ::Val{N}) where {T, N} = Array{T, N}(undef, ntuple(x -> 0, Val(N))) - -function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, xs::Number...) where {T, N} +function _typed_hvncat(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, xs::Number...) where {T, N} + all(>(0), dims) || + throw(ArgumentError("`dims` argument must contain positive integers")) A = Array{T, N}(undef, dims...) lengtha = length(A) # Necessary to store result because throw blocks are being deoptimized right now, which leads to excessive allocations lengthx = length(xs) # Cuts from 3 allocations to 1. @@ -2194,9 +2195,28 @@ function hvncat_fill!(A::Array, row_first::Bool, xs::Tuple) end _typed_hvncat(T::Type, dim::Int, ::Bool, xs...) = _typed_hvncat(T, Val(dim), xs...) # catches from _hvncat type promoters + +function _typed_hvncat(::Type{T}, ::Val{N}) where {T, N} + N < 0 && + throw(ArgumentError("concatenation dimension must be nonnegative")) + return Array{T, N}(undef, ntuple(x -> 0, Val(N))) +end + +function _typed_hvncat(T::Type, ::Val{N}, xs::Number...) where N + N < 0 && + throw(ArgumentError("concatenation dimension must be nonnegative")) + A = cat_similar(xs[1], T, (ntuple(x -> 1, Val(N - 1))..., length(xs))) + hvncat_fill!(A, false, xs) + return A +end + function _typed_hvncat(::Type{T}, ::Val{N}, as::AbstractArray...) where {T, N} # optimization for arrays that can be concatenated by copying them linearly into the destination - # conditions: the elements must all have 1- or 0-length dimensions above N + # conditions: the elements must all have 1-length dimensions above N + length(as) > 0 || + throw(ArgumentError("must have at least one element")) + N < 0 && + throw(ArgumentError("concatenation dimension must be nonnegative")) for a ∈ as ndims(a) <= N || all(x -> size(a, x) == 1, (N + 1):ndims(a)) || return _typed_hvncat(T, (ntuple(x -> 1, N - 1)..., length(as), 1), false, as...) @@ -2206,10 +2226,13 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as::AbstractArray...) where {T, N} nd = max(N, ndims(as[1])) Ndim = 0 - for i ∈ 1:lastindex(as) - Ndim += cat_size(as[i], N) - for d ∈ 1:N - 1 - cat_size(as[1], d) == cat_size(as[i], d) || throw(ArgumentError("mismatched size along axis $d in element $i")) + for i ∈ eachindex(as) + a = as[i] + Ndim += size(a, N) + nd = max(nd, ndims(a)) + for d ∈ 1:N-1 + size(a, d) == size(as[1], d) || + throw(ArgumentError("all dimensions of element $i other than $N must be of length 1")) end end @@ -2225,17 +2248,20 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as::AbstractArray...) where {T, N} end function _typed_hvncat(::Type{T}, ::Val{N}, as...) where {T, N} - # optimization for scalars and 1-length arrays that can be concatenated by copying them linearly - # into the destination + length(as) > 0 || + throw(ArgumentError("must have at least one element")) + N < 0 && + throw(ArgumentError("concatenation dimension must be nonnegative")) nd = N Ndim = 0 - for a ∈ as - if a isa AbstractArray - cat_size(a, N) == length(a) || - throw(ArgumentError("all dimensions of elements other than $N must be of length 1")) - nd = max(nd, cat_ndims(a)) - end + for i ∈ eachindex(as) + a = as[i] Ndim += cat_size(a, N) + nd = max(nd, cat_ndims(a)) + for d ∈ 1:N-1 + cat_size(a, d) == 1 || + throw(ArgumentError("all dimensions of element $i other than $N must be of length 1")) + end end A = Array{T, nd}(undef, ntuple(x -> 1, N - 1)..., Ndim, ntuple(x -> 1, nd - N)...) @@ -2279,7 +2305,12 @@ function _typed_hvncat_1d(::Type{T}, ds::Int, ::Val{row_first}, as...) where {T, end end -function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, as...) where {T, N} +function _typed_hvncat(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, as...) where {T, N} + length(as) > 0 || + throw(ArgumentError("must have at least one element")) + all(>(0), dims) || + throw(ArgumentError("`dims` argument must contain positive integers")) + d1 = row_first ? 2 : 1 d2 = row_first ? 1 : 2 @@ -2294,7 +2325,9 @@ function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, currentdims = zeros(Int, nd) blockcount = 0 + elementcount = 0 for i ∈ eachindex(as) + elementcount += cat_length(as[i]) currentdims[d1] += cat_size(as[i], d1) if currentdims[d1] == outdims[d1] currentdims[d1] = 0 @@ -2324,14 +2357,9 @@ function _typed_hvncat(::Type{T}, dims::Tuple{Vararg{Int, N}}, row_first::Bool, end end - # calling sum() leads to 3 extra allocations - len = 0 - for a ∈ as - len += cat_length(a) - end outlen = prod(outdims) - outlen == 0 && ArgumentError("too few elements in arguments, unable to infer dimensions") |> throw - len == outlen || ArgumentError("too many elements in arguments; expected $(outlen), got $(len)") |> throw + elementcount == outlen || + throw(ArgumentError("mismatched number of elements; expected $(outlen), got $(elementcount)")) # copy into final array A = cat_similar(as[1], T, outdims) @@ -2350,14 +2378,22 @@ function _typed_hvncat(T::Type, shape::Tuple{Tuple}, row_first::Bool, xs...) return _typed_hvncat_1d(T, shape[1][1], Val(row_first), xs...) end -function _typed_hvncat(T::Type, shape::NTuple{N, Tuple}, row_first::Bool, as...) where {N} +function _typed_hvncat(::Type{T}, shape::NTuple{N, Tuple}, row_first::Bool, as...) where {T, N} + length(as) > 0 || + throw(ArgumentError("must have at least one element")) + all(>(0), tuple((shape...)...)) || + throw(ArgumentError("`shape` argument must consist of positive integers")) + d1 = row_first ? 2 : 1 d2 = row_first ? 1 : 2 - shape = collect(shape) # saves allocations later - shapelength = shape[end][1] + shapev = collect(shape) # saves allocations later + all(!isempty, shapev) || + throw(ArgumentError("each level of `shape` argument must have at least one value")) + length(shapev[end]) == 1 || + throw(ArgumentError("last level of shape must contain only one integer")) + shapelength = shapev[end][1] lengthas = length(as) shapelength == lengthas || throw(ArgumentError("number of elements does not match shape; expected $(shapelength), got $lengthas)")) - # discover dimensions nd = max(N, cat_ndims(as[1])) outdims = zeros(Int, nd) @@ -2365,7 +2401,9 @@ function _typed_hvncat(T::Type, shape::NTuple{N, Tuple}, row_first::Bool, as...) blockcounts = zeros(Int, nd) shapepos = ones(Int, nd) + elementcount = 0 for i ∈ eachindex(as) + elementcount += cat_length(as[i]) wasstartblock = false for d ∈ 1:N ad = (d < 3 && row_first) ? (d == 1 ? 2 : 1) : d @@ -2375,27 +2413,34 @@ function _typed_hvncat(T::Type, shape::NTuple{N, Tuple}, row_first::Bool, as...) if d == 1 || i == 1 || wasstartblock currentdims[d] += dsize elseif dsize != cat_size(as[i - 1], ad) - throw(ArgumentError("""argument $i has a mismatched number of elements along axis $ad; \ - expected $(cat_size(as[i - 1], ad)), got $dsize""")) + throw(ArgumentError("argument $i has a mismatched number of elements along axis $ad; \ + expected $(cat_size(as[i - 1], ad)), got $dsize")) end wasstartblock = blockcounts[d] == 1 # remember for next dimension - isendblock = blockcounts[d] == shape[d][shapepos[d]] + isendblock = blockcounts[d] == shapev[d][shapepos[d]] if isendblock if outdims[d] == 0 outdims[d] = currentdims[d] elseif outdims[d] != currentdims[d] - throw(ArgumentError("""argument $i has a mismatched number of elements along axis $ad; \ - expected $(abs(outdims[d] - (currentdims[d] - dsize))), got $dsize""")) + throw(ArgumentError("argument $i has a mismatched number of elements along axis $ad; \ + expected $(abs(outdims[d] - (currentdims[d] - dsize))), got $dsize")) end currentdims[d] = 0 blockcounts[d] = 0 shapepos[d] += 1 + d > 1 && (blockcounts[d - 1] == 0 || + throw(ArgumentError("shape in level $d is inconsistent; level counts must nest \ + evenly into each other"))) end end end + outlen = prod(outdims) + elementcount == outlen || + throw(ArgumentError("mismatched number of elements; expected $(outlen), got $(elementcount)")) + if row_first outdims[1], outdims[2] = outdims[2], outdims[1] end diff --git a/test/abstractarray.jl b/test/abstractarray.jl index a1c6dd1b22ce7..05f93805953dd 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1390,6 +1390,69 @@ using Base: typed_hvncat @test [v v;;; fill(v, 1, 2)] == fill(v, 1, 2, 2) end + # dims form + for v ∈ ((), (1,), ([1],), (1, [1]), ([1], 1), ([1], [1])) + # reject dimension < 0 + @test_throws ArgumentError hvncat(-1, v...) + + # reject shape tuple with no elements + @test_throws ArgumentError hvncat(((),), true, v...) + end + + # reject dims or shape with negative or zero values + for v1 ∈ (-1, 0, 1) + for v2 ∈ (-1, 0, 1) + v1 == v2 == 1 && continue + for v3 ∈ ((), (1,), ([1],), (1, [1]), ([1], 1), ([1], [1])) + @test_throws ArgumentError hvncat((v1, v2), true, v3...) + @test_throws ArgumentError hvncat(((v1,), (v2,)), true, v3...) + end + end + end + + for v ∈ ((1, [1]), ([1], 1), ([1], [1])) + # reject shape with more than one end value + @test_throws ArgumentError hvncat(((1, 1),), true, v...) + end + + for v ∈ ((1, 2, 3), (1, 2, [3]), ([1], [2], [3])) + # reject shape with more values in later level + @test_throws ArgumentError hvncat(((2, 1), (1, 1, 1)), true, v...) + end + + # reject shapes that don't nest evenly between levels (e.g. 1 + 2 does not fit into 2) + @test_throws ArgumentError hvncat(((1, 2, 1), (2, 2), (4,)), true, [1 2], [3], [4], [1 2; 3 4]) + + # zero-length arrays are handled appropriately + @test [zeros(Int, 1, 2, 0) ;;; 1 3] == [1 3;;;] + @test [[] ;;; [] ;;; []] == Array{Any}(undef, 0, 1, 3) + @test [[] ; 1 ;;; 2 ; []] == [1 ;;; 2] + @test [[] ; [] ;;; [] ; []] == Array{Any}(undef, 0, 1, 2) + @test [[] ; 1 ;;; 2] == [1 ;;; 2] + @test [[] ; [] ;;; [] ;;; []] == Array{Any}(undef, 0, 1, 3) + z = zeros(Int, 0, 0, 0) + [z z ; z ;;; z ;;; z] == Array{Int}(undef, 0, 0, 0) + + for v1 ∈ (zeros(Int, 0, 0), zeros(Int, 0, 0, 0, 0), zeros(Int, 0, 0, 0, 0, 0, 0, 0)) + for v2 ∈ (1, [1]) + for v3 ∈ (2, [2]) + @test_throws ArgumentError [v1 ;;; v2] + @test_throws ArgumentError [v1 ;;; v2 v3] + @test_throws ArgumentError [v1 v1 ;;; v2 v3] + end + end + end + v1 = zeros(Int, 0, 0, 0) + for v2 ∈ (1, [1]) + for v3 ∈ (2, [2]) + # current behavior, not potentially dangerous. + # should throw error like above loop + @test [v1 ;;; v2 v3] == [v2 v3;;;] + @test_throws ArgumentError [v1 ;;; v2] + @test_throws ArgumentError [v1 v1 ;;; v2 v3] + end + end + # 0-dimension behaviors # exactly one argument, placed in an array # if already an array, copy, with type conversion as necessary From 81d8c0c11b7516ec1d262b36736ef46465610ccf Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Fri, 16 Jul 2021 13:41:41 -0400 Subject: [PATCH 103/146] `hvncat`: Ensure output ndims are >= the ndims of input arrays (#41201) (cherry picked from commit a2f5fe59d72736bfda7b3004f1c4bb58918fa94c) --- base/abstractarray.jl | 127 ++++++++++++++++++++++-------------------- test/abstractarray.jl | 19 +++++++ 2 files changed, 86 insertions(+), 60 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 1fdb441f952c8..f5eb075241dc6 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -2156,44 +2156,6 @@ _typed_hvncat(::Type, ::Val{0}, ::AbstractArray...) = _typed_hvncat_0d_only_one( _typed_hvncat_0d_only_one() = throw(ArgumentError("a 0-dimensional array may only contain exactly one element")) -function _typed_hvncat(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, xs::Number...) where {T, N} - all(>(0), dims) || - throw(ArgumentError("`dims` argument must contain positive integers")) - A = Array{T, N}(undef, dims...) - lengtha = length(A) # Necessary to store result because throw blocks are being deoptimized right now, which leads to excessive allocations - lengthx = length(xs) # Cuts from 3 allocations to 1. - if lengtha != lengthx - throw(ArgumentError("argument count does not match specified shape (expected $lengtha, got $lengthx)")) - end - hvncat_fill!(A, row_first, xs) - return A -end - -function hvncat_fill!(A::Array, row_first::Bool, xs::Tuple) - # putting these in separate functions leads to unnecessary allocations - if row_first - nr, nc = size(A, 1), size(A, 2) - nrc = nr * nc - na = prod(size(A)[3:end]) - k = 1 - for d ∈ 1:na - dd = nrc * (d - 1) - for i ∈ 1:nr - Ai = dd + i - for j ∈ 1:nc - A[Ai] = xs[k] - k += 1 - Ai += nr - end - end - end - else - for k ∈ eachindex(xs) - A[k] = xs[k] - end - end -end - _typed_hvncat(T::Type, dim::Int, ::Bool, xs...) = _typed_hvncat(T, Val(dim), xs...) # catches from _hvncat type promoters function _typed_hvncat(::Type{T}, ::Val{N}) where {T, N} @@ -2219,20 +2181,18 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as::AbstractArray...) where {T, N} throw(ArgumentError("concatenation dimension must be nonnegative")) for a ∈ as ndims(a) <= N || all(x -> size(a, x) == 1, (N + 1):ndims(a)) || - return _typed_hvncat(T, (ntuple(x -> 1, N - 1)..., length(as), 1), false, as...) + return _typed_hvncat(T, (ntuple(x -> 1, Val(N - 1))..., length(as), 1), false, as...) # the extra 1 is to avoid an infinite cycle end - nd = max(N, ndims(as[1])) + nd = N Ndim = 0 for i ∈ eachindex(as) - a = as[i] - Ndim += size(a, N) - nd = max(nd, ndims(a)) - for d ∈ 1:N-1 - size(a, d) == size(as[1], d) || - throw(ArgumentError("all dimensions of element $i other than $N must be of length 1")) + Ndim += cat_size(as[i], N) + nd = max(nd, cat_ndims(as[i])) + for d ∈ 1:N - 1 + cat_size(as[1], d) == cat_size(as[i], d) || throw(ArgumentError("mismatched size along axis $d in element $i")) end end @@ -2255,16 +2215,15 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as...) where {T, N} nd = N Ndim = 0 for i ∈ eachindex(as) - a = as[i] - Ndim += cat_size(a, N) - nd = max(nd, cat_ndims(a)) + Ndim += cat_size(as[i], N) + nd = max(nd, cat_ndims(as[i])) for d ∈ 1:N-1 - cat_size(a, d) == 1 || + cat_size(as[i], d) == 1 || throw(ArgumentError("all dimensions of element $i other than $N must be of length 1")) end end - A = Array{T, nd}(undef, ntuple(x -> 1, N - 1)..., Ndim, ntuple(x -> 1, nd - N)...) + A = Array{T, nd}(undef, ntuple(x -> 1, Val(N - 1))..., Ndim, ntuple(x -> 1, nd - N)...) k = 1 for a ∈ as @@ -2280,7 +2239,6 @@ function _typed_hvncat(::Type{T}, ::Val{N}, as...) where {T, N} return A end - # 0-dimensional cases for balanced and unbalanced hvncat method _typed_hvncat(T::Type, ::Tuple{}, ::Bool, x...) = _typed_hvncat(T, Val(0), x...) @@ -2305,7 +2263,51 @@ function _typed_hvncat_1d(::Type{T}, ds::Int, ::Val{row_first}, as...) where {T, end end -function _typed_hvncat(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, as...) where {T, N} +function _typed_hvncat(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, xs::Number...) where {T, N} + all(>(0), dims) || + throw(ArgumentError("`dims` argument must contain positive integers")) + A = Array{T, N}(undef, dims...) + lengtha = length(A) # Necessary to store result because throw blocks are being deoptimized right now, which leads to excessive allocations + lengthx = length(xs) # Cuts from 3 allocations to 1. + if lengtha != lengthx + throw(ArgumentError("argument count does not match specified shape (expected $lengtha, got $lengthx)")) + end + hvncat_fill!(A, row_first, xs) + return A +end + +function hvncat_fill!(A::Array, row_first::Bool, xs::Tuple) + # putting these in separate functions leads to unnecessary allocations + if row_first + nr, nc = size(A, 1), size(A, 2) + nrc = nr * nc + na = prod(size(A)[3:end]) + k = 1 + for d ∈ 1:na + dd = nrc * (d - 1) + for i ∈ 1:nr + Ai = dd + i + for j ∈ 1:nc + A[Ai] = xs[k] + k += 1 + Ai += nr + end + end + end + else + for k ∈ eachindex(xs) + A[k] = xs[k] + end + end +end + +function _typed_hvncat(T::Type, dims::NTuple{N, Int}, row_first::Bool, as...) where {N} + # function barrier after calculating the max is necessary for high performance + nd = max(maximum(cat_ndims(a) for a ∈ as), N) + return _typed_hvncat_dims(T, (dims..., ntuple(x -> 1, nd - N)...), row_first, as) +end + +function _typed_hvncat_dims(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, as::Tuple) where {T, N} length(as) > 0 || throw(ArgumentError("must have at least one element")) all(>(0), dims) || @@ -2314,16 +2316,14 @@ function _typed_hvncat(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, as...) d1 = row_first ? 2 : 1 d2 = row_first ? 1 : 2 - # discover dimensions - nd = max(N, cat_ndims(as[1])) - outdims = zeros(Int, nd) + outdims = zeros(Int, N) # discover number of rows or columns for i ∈ 1:dims[d1] outdims[d1] += cat_size(as[i], d1) end - currentdims = zeros(Int, nd) + currentdims = zeros(Int, N) blockcount = 0 elementcount = 0 for i ∈ eachindex(as) @@ -2331,11 +2331,11 @@ function _typed_hvncat(::Type{T}, dims::NTuple{N, Int}, row_first::Bool, as...) currentdims[d1] += cat_size(as[i], d1) if currentdims[d1] == outdims[d1] currentdims[d1] = 0 - for d ∈ (d2, 3:nd...) + for d ∈ (d2, 3:N...) currentdims[d] += cat_size(as[i], d) if outdims[d] == 0 # unfixed dimension blockcount += 1 - if blockcount == (d > length(dims) ? 1 : dims[d]) # last expected member of dimension + if blockcount == dims[d] outdims[d] = currentdims[d] currentdims[d] = 0 blockcount = 0 @@ -2378,7 +2378,13 @@ function _typed_hvncat(T::Type, shape::Tuple{Tuple}, row_first::Bool, xs...) return _typed_hvncat_1d(T, shape[1][1], Val(row_first), xs...) end -function _typed_hvncat(::Type{T}, shape::NTuple{N, Tuple}, row_first::Bool, as...) where {T, N} +function _typed_hvncat(T::Type, shape::NTuple{N, Tuple}, row_first::Bool, as...) where {N} + # function barrier after calculating the max is necessary for high performance + nd = max(maximum(cat_ndims(a) for a ∈ as), N) + return _typed_hvncat_shape(T, (shape..., ntuple(x -> shape[end], nd - N)...), row_first, as) +end + +function _typed_hvncat_shape(::Type{T}, shape::NTuple{N, Tuple}, row_first, as::Tuple) where {T, N} length(as) > 0 || throw(ArgumentError("must have at least one element")) all(>(0), tuple((shape...)...)) || @@ -2386,6 +2392,7 @@ function _typed_hvncat(::Type{T}, shape::NTuple{N, Tuple}, row_first::Bool, as.. d1 = row_first ? 2 : 1 d2 = row_first ? 1 : 2 + shapev = collect(shape) # saves allocations later all(!isempty, shapev) || throw(ArgumentError("each level of `shape` argument must have at least one value")) diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 05f93805953dd..b2b53d33db8ec 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1390,6 +1390,25 @@ using Base: typed_hvncat @test [v v;;; fill(v, 1, 2)] == fill(v, 1, 2, 2) end + # output dimensions are maximum of input dimensions and concatenation dimension + begin + v1 = fill(1, 1, 1) + v2 = fill(1, 1, 1, 1, 1) + v3 = fill(1, 1, 2, 1, 1) + @test [v1 ;;; v2] == [1 ;;; 1 ;;;;] + @test [v2 ;;; v1] == [1 ;;; 1 ;;;;] + @test [v3 ;;; v1 v1] == [1 1 ;;; 1 1 ;;;;] + @test [v1 v1 ;;; v3] == [1 1 ;;; 1 1 ;;;;] + @test [v2 v1 ;;; v1 v1] == [1 1 ;;; 1 1 ;;;;] + @test [v1 v1 ;;; v1 v2] == [1 1 ;;; 1 1 ;;;;] + @test [v2 ;;; 1] == [1 ;;; 1 ;;;;] + @test [1 ;;; v2] == [1 ;;; 1 ;;;;] + @test [v3 ;;; 1 v1] == [1 1 ;;; 1 1 ;;;;] + @test [v1 1 ;;; v3] == [1 1 ;;; 1 1 ;;;;] + @test [v2 1 ;;; v1 v1] == [1 1 ;;; 1 1 ;;;;] + @test [v1 1 ;;; v1 v2] == [1 1 ;;; 1 1 ;;;;] + end + # dims form for v ∈ ((), (1,), ([1],), (1, [1]), ([1], 1), ([1], [1])) # reject dimension < 0 From 31aad85920486923fbaf72174d7c9685c99d365e Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Wed, 14 Jul 2021 08:08:27 +0200 Subject: [PATCH 104/146] Revert "Extend `Eigen` to keep additional information from `geevx` (#38483)" This reverts commit 9d3a7c47df972b1108b5a49d2c5ce493635bbadf. --- stdlib/LinearAlgebra/src/eigen.jl | 113 ++++++------------------------ 1 file changed, 21 insertions(+), 92 deletions(-) diff --git a/stdlib/LinearAlgebra/src/eigen.jl b/stdlib/LinearAlgebra/src/eigen.jl index 3341a2a9bc744..943a5ca0cdf3d 100644 --- a/stdlib/LinearAlgebra/src/eigen.jl +++ b/stdlib/LinearAlgebra/src/eigen.jl @@ -17,7 +17,7 @@ Iterating the decomposition produces the components `F.values` and `F.vectors`. # Examples ```jldoctest julia> F = eigen([1.0 0.0 0.0; 0.0 3.0 0.0; 0.0 0.0 18.0]) -Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}, Vector{Float64}} +Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}} values: 3-element Vector{Float64}: 1.0 @@ -47,18 +47,14 @@ julia> vals == F.values && vecs == F.vectors true ``` """ -struct Eigen{T,V,S<:AbstractMatrix,U<:AbstractVector,R<:AbstractVector} <: Factorization{T} +struct Eigen{T,V,S<:AbstractMatrix,U<:AbstractVector} <: Factorization{T} values::U vectors::S - vectorsl::S - unitary::Bool - rconde::R - rcondv::R - Eigen{T,V,S,U,R}(values::AbstractVector{V}, vectors::AbstractMatrix{T}, vectorsl::AbstractMatrix{T}, unitary::Bool, rconde::R, rcondv::R) where {T,V,S,U,R} = - new(values, vectors, vectorsl, unitary, rconde, rcondv) + Eigen{T,V,S,U}(values::AbstractVector{V}, vectors::AbstractMatrix{T}) where {T,V,S,U} = + new(values, vectors) end -Eigen(values::AbstractVector{V}, vectors::AbstractMatrix{T}, vectorsl=vectors, uni=true, rce=zeros(real(T),0), rcv=zeros(real(T), 0)) where {T,V} = - Eigen{T,V,typeof(vectors),typeof(values),typeof(rce)}(values, vectors, vectorsl, uni, rce, rcv) +Eigen(values::AbstractVector{V}, vectors::AbstractMatrix{T}) where {T,V} = + Eigen{T,V,typeof(vectors),typeof(values)}(values, vectors) # Generalized eigenvalue problem. """ @@ -137,21 +133,10 @@ function sorteig!(λ::AbstractVector, X::AbstractMatrix, sortby::Union{Function, if sortby !== nothing && !issorted(λ, by=sortby) p = sortperm(λ; alg=QuickSort, by=sortby) permute!(λ, p) - !isempty(X) && Base.permutecols!!(X, copy(p)) + Base.permutecols!!(X, p) end return λ, X end -function sorteig!(λ::AbstractVector, X::AbstractMatrix, sortby::Union{Function,Nothing}, Y::AbstractMatrix, rconde::AbstractVector, rcondv::AbstractVector) - if sortby !== nothing && !issorted(λ, by=sortby) - p = sortperm(λ; alg=QuickSort, by=sortby) - permute!(λ, p) - !isempty(rconde) && permute!(rconde, p) - !isempty(rcondv) && permute!(rcondv, p) - !isempty(X) && Base.permutecols!!(X, copy(p)) - !isempty(Y) && X !== Y && Base.permutecols!!(Y, p) - end - return λ, X, Y, false, rconde, rcondv -end sorteig!(λ::AbstractVector, sortby::Union{Function,Nothing}=eigsortby) = sortby === nothing ? λ : sort!(λ, by=sortby) """ @@ -160,32 +145,12 @@ sorteig!(λ::AbstractVector, sortby::Union{Function,Nothing}=eigsortby) = sortby Same as [`eigen`](@ref), but saves space by overwriting the input `A` (and `B`), instead of creating a copy. """ -function eigen!(A::StridedMatrix{T}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=eigsortby, jvl::Bool=false, jvr::Bool=true, jce::Bool=false, jcv::Bool=false) where T<:BlasReal +function eigen!(A::StridedMatrix{T}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=eigsortby) where T<:BlasReal n = size(A, 2) n == 0 && return Eigen(zeros(T, 0), zeros(T, 0, 0)) issymmetric(A) && return eigen!(Symmetric(A), sortby=sortby) - - balance = permute ? (scale ? 'B' : 'P') : (scale ? 'S' : 'N') - jobvl = jvl || jce ? 'V' : 'N' - jobvr = jvr || jce ? 'V' : 'N' - sense = jce && jcv ? 'B' : jce ? 'E' : jcv ? 'V' : 'N' - A, WR, WI, VL, VR, _, _, scale, abnrm, rconde, rcondv = LAPACK.geevx!(balance, jobvl, jobvr, sense, A) - if iszero(WI) - evecr = VR - evecl = VL - evals = WR - else - evecr = complexeig(WI, VR) - evecl = complexeig(WI, VL) - evals = complex.(WR, WI) - end - rconde = jce ? inv.(rconde) : zeros(T, 0) - rcondv = jcv ? inv.(rcondv) : zeros(T, 0) - return Eigen(sorteig!(evals, evecr, sortby, evecl, rconde, rcondv)...) -end - -function complexeig(WI::Vector{T}, VR::Matrix{T}) where T - n = min(size(VR)...) + A, WR, WI, VL, VR, _ = LAPACK.geevx!(permute ? (scale ? 'B' : 'P') : (scale ? 'S' : 'N'), 'N', 'V', 'N', A) + iszero(WI) && return Eigen(sorteig!(WR, VR, sortby)...) evec = zeros(Complex{T}, n, n) j = 1 while j <= n @@ -200,19 +165,15 @@ function complexeig(WI::Vector{T}, VR::Matrix{T}) where T end j += 1 end - evec + return Eigen(sorteig!(complex.(WR, WI), evec, sortby)...) end -function eigen!(A::StridedMatrix{T}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=eigsortby, jvl::Bool=false, jvr::Bool=true, jce::Bool=false, jcv::Bool=false) where T<:BlasComplex +function eigen!(A::StridedMatrix{T}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=eigsortby) where T<:BlasComplex n = size(A, 2) n == 0 && return Eigen(zeros(T, 0), zeros(T, 0, 0)) ishermitian(A) && return eigen!(Hermitian(A), sortby=sortby) - balance = permute ? (scale ? 'B' : 'P') : (scale ? 'S' : 'N') - jobvl = jvl || jce ? 'V' : 'N' - jobvr = jvr || jce ? 'V' : 'N' - sense = jce && jcv ? 'B' : jce ? 'E' : jcv ? 'V' : 'N' - A, W, VL, VR, _, _, scale, abnrm, rconde, rcondv = LAPACK.geevx!(balance, jobvl, jobvr, sense, A) - return Eigen(sorteig!(W, VR, sortby, VL, rconde, rcondv)...) + eval, evec = LAPACK.geevx!(permute ? (scale ? 'B' : 'P') : (scale ? 'S' : 'N'), 'N', 'V', 'N', A)[[2,4]] + return Eigen(sorteig!(eval, evec, sortby)...) end """ @@ -240,7 +201,7 @@ accept a `sortby` keyword. # Examples ```jldoctest julia> F = eigen([1.0 0.0 0.0; 0.0 3.0 0.0; 0.0 0.0 18.0]) -Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}, Vector{Float64}} +Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}} values: 3-element Vector{Float64}: 1.0 @@ -270,10 +231,10 @@ julia> vals == F.values && vecs == F.vectors true ``` """ -function eigen(A::AbstractMatrix{T}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=eigsortby, jvl::Bool=false, jvr::Bool=true, jce::Bool=false, jcv::Bool=false) where T +function eigen(A::AbstractMatrix{T}; permute::Bool=true, scale::Bool=true, sortby::Union{Function,Nothing}=eigsortby) where T AA = copy_oftype(A, eigtype(T)) isdiag(AA) && return eigen(Diagonal(AA); permute=permute, scale=scale, sortby=sortby) - return eigen!(AA; permute=permute, scale=scale, sortby=sortby, jvl=jvl, jvr=jvr, jce=jce, jcv=jcv) + return eigen!(AA; permute=permute, scale=scale, sortby=sortby) end eigen(x::Number) = Eigen([x], fill(one(x), 1, 1)) @@ -459,19 +420,7 @@ function eigmin(A::Union{Number, AbstractMatrix}; minimum(v) end -""" - spectral(f, F::Eigen) - -Construct a matrix from an eigen-decomposition `F` by applying the function to -the spectrum (diagonal) of `F`. -""" -function spectral(f, A::Eigen) - d = Diagonal(f.(A.values)) - v = A.vectors - vd = v * d - A.unitary ? vd * v' : vd / v -end -inv(A::Eigen) = spectral(inv, A) +inv(A::Eigen) = A.vectors * inv(Diagonal(A.values)) / A.vectors det(A::Eigen) = prod(A.values) # Generalized eigenproblem @@ -661,28 +610,8 @@ function show(io::IO, mime::MIME{Symbol("text/plain")}, F::Union{Eigen,Generaliz summary(io, F); println(io) println(io, "values:") show(io, mime, F.values) - if !isdefined(F, :vectorsl) || (!isempty(F.vectors) && (F.vectors === F.vectorsl || isempty(F.vectorsl))) - println(io, "\nvectors:") - show(io, mime, F.vectors) - else - if !isempty(F.vectors) - println(io, "\nright vectors:") - show(io, mime, F.vectors) - end - if !isempty(F.vectorsl) - println(io, "\nleft vectors:") - show(io, mime, F.vectorsl) - end - end - if isdefined(F, :rconde) && !isempty(F.rconde) - println(io, "\ncondition values:") - show(io, mime, F.rconde) - end - if isdefined(F, :rcondv) && !isempty(F.rcondv) - println(io, "\ncondition vectors:") - show(io, mime, F.rcondv) - end - nothing + println(io, "\nvectors:") + show(io, mime, F.vectors) end function Base.hash(F::Eigen, h::UInt) @@ -698,7 +627,7 @@ end # Conversion methods ## Can we determine the source/result is Real? This is not stored in the type Eigen -AbstractMatrix(F::Eigen) = spectral(identity, F) +AbstractMatrix(F::Eigen) = F.vectors * Diagonal(F.values) / F.vectors AbstractArray(F::Eigen) = AbstractMatrix(F) Matrix(F::Eigen) = Array(AbstractArray(F)) Array(F::Eigen) = Matrix(F) From 903ae5afc0167c764ed0e01ce468a57322a1bd14 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Tue, 13 Jul 2021 14:28:29 -0700 Subject: [PATCH 105/146] CI: add the sanitizers pipelines (e.g. ASAN) to Buildkite (#41530) * Setup CI for ASAN * Launch the `sanitizers.yml` unsigned pipeline * Use a workspace directory in ./tmp * Add some log group headers to make the logs easier to navigate * Install `julia` binary inside sandbox * Double timeout * More descriptive message from sanitizer CI * Fix the path to the binary * Use addenv * Apply suggestions from code review Co-authored-by: Elliot Saba * Group ASAN related files under contrib/asan/ * Remove redundant JULIA_PRECOMPILE=1 Co-authored-by: Dilum Aluthge Co-authored-by: Elliot Saba (cherry picked from commit 84934e66db2ed0c3b888270380b4c34541d9ffc8) --- .buildkite/pipeline.yml | 5 +- .buildkite/sanitizers.yml | 34 +++++++++++++ contrib/asan/Make.user.asan | 24 ++++++++++ contrib/asan/Make.user.tools | 2 + contrib/asan/build.sh | 53 +++++++++++++++++++++ contrib/asan/check.jl | 92 ++++++++++++++++++++++++++++++++++++ 6 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 .buildkite/sanitizers.yml create mode 100644 contrib/asan/Make.user.asan create mode 100644 contrib/asan/Make.user.tools create mode 100755 contrib/asan/build.sh create mode 100755 contrib/asan/check.jl diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 0dee5f2aaa3f7..99473055f2eeb 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -14,8 +14,11 @@ steps: - label: ":buildkite: Launch unsigned pipelines" commands: | + # We launch whitespace first, because we want that pipeline to finish as quickly as possible. + # The remaining unsigned pipelines are launched in alphabetical order. buildkite-agent pipeline upload .buildkite/whitespace.yml - buildkite-agent pipeline upload .buildkite/llvm_passes.yml buildkite-agent pipeline upload .buildkite/embedding.yml + buildkite-agent pipeline upload .buildkite/llvm_passes.yml + buildkite-agent pipeline upload .buildkite/sanitizers.yml agents: queue: julia diff --git a/.buildkite/sanitizers.yml b/.buildkite/sanitizers.yml new file mode 100644 index 0000000000000..f29ed4e42a4a6 --- /dev/null +++ b/.buildkite/sanitizers.yml @@ -0,0 +1,34 @@ +# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones +# since we need nestable sandboxing. The rootfs images being used here are built from +# the `.buildkite/rootfs_images/llvm-passes.jl` file. +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: "asan" + key: asan + plugins: + - JuliaCI/julia#v1: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz + rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + uid: 1000 + gid: 1000 + workspaces: + - "/cache/repos:/cache/repos" + # `contrib/check-asan.jl` needs a `julia` binary: + - JuliaCI/julia#v1: + version: 1.6 + 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: + - github_commit_status: + context: "asan" diff --git a/contrib/asan/Make.user.asan b/contrib/asan/Make.user.asan new file mode 100644 index 0000000000000..3bcc34df68323 --- /dev/null +++ b/contrib/asan/Make.user.asan @@ -0,0 +1,24 @@ +TOOLCHAIN=$(BUILDROOT)/../toolchain/usr/tools + +# use our new toolchain +USECLANG=1 +override CC=$(TOOLCHAIN)/clang +override CXX=$(TOOLCHAIN)/clang++ +export ASAN_SYMBOLIZER_PATH=$(TOOLCHAIN)/llvm-symbolizer + +USE_BINARYBUILDER_LLVM=1 + +override SANITIZE=1 +override SANITIZE_ADDRESS=1 + +# make the GC use regular malloc/frees, which are hooked by ASAN +override WITH_GC_DEBUG_ENV=1 + +# default to a debug build for better line number reporting +override JULIA_BUILD_MODE=debug + +# make ASAN consume less memory +export ASAN_OPTIONS=detect_leaks=0:fast_unwind_on_malloc=0:allow_user_segv_handler=1:malloc_context_size=2 + +# tell libblastrampoline to not use RTLD_DEEPBIND +export LBT_USE_RTLD_DEEPBIND=0 diff --git a/contrib/asan/Make.user.tools b/contrib/asan/Make.user.tools new file mode 100644 index 0000000000000..1bd6f97e39111 --- /dev/null +++ b/contrib/asan/Make.user.tools @@ -0,0 +1,2 @@ +USE_BINARYBUILDER_LLVM=1 +BUILD_LLVM_CLANG=1 diff --git a/contrib/asan/build.sh b/contrib/asan/build.sh new file mode 100755 index 0000000000000..d124e0a92f1e0 --- /dev/null +++ b/contrib/asan/build.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# This file is a part of Julia. License is MIT: https://julialang.org/license +# +# Usage: +# contrib/asan/build.sh [...] +# +# Build ASAN-enabled julia. Given a workspace directory , build +# ASAN-enabled julia in /asan. Required toolss are install under +# /toolchain. This scripts also takes optional arguments +# which are passed to `make`. The default make target is `debug`. + +set -ue + +# `$WORKSPACE` is a directory in which we create `toolchain` and `asan` +# sub-directories. +WORKSPACE="$1" +shift +if [ "$WORKSPACE" = "" ]; then + echo "Workspace directory must be specified as the first argument" >&2 + exit 2 +fi + +mkdir -pv "$WORKSPACE" +WORKSPACE="$(cd "$WORKSPACE" && pwd)" +if [ "$WORKSPACE" = "" ]; then + echo "Failed to create the workspace directory." >&2 + exit 2 +fi + +HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +JULIA_HOME="$HERE/../../" + +echo +echo "Installing toolchain..." + +TOOLCHAIN="$WORKSPACE/toolchain" +if [ ! -d "$TOOLCHAIN" ]; then + make -C "$JULIA_HOME" configure O=$TOOLCHAIN + cp "$HERE/Make.user.tools" "$TOOLCHAIN/Make.user" +fi + +make -C "$TOOLCHAIN/deps" install-clang install-llvm-tools + +echo +echo "Building Julia..." + +BUILD="$WORKSPACE/asan" +if [ ! -d "$BUILD" ]; then + make -C "$JULIA_HOME" configure O="$BUILD" + cp "$HERE/Make.user.asan" "$BUILD/Make.user" +fi + +make -C "$BUILD" "$@" diff --git a/contrib/asan/check.jl b/contrib/asan/check.jl new file mode 100755 index 0000000000000..0c1e12f7f471a --- /dev/null +++ b/contrib/asan/check.jl @@ -0,0 +1,92 @@ +#!/bin/bash +# -*- mode: julia -*- +# This file is a part of Julia. License is MIT: https://julialang.org/license +# +# Usage: +# contrib/asan/check.jl +# +# Check that is built with ASAN. +# +#= +JULIA="${JULIA:-julia}" +exec "$JULIA" --startup-file=no --compile=min "${BASH_SOURCE[0]}" "$@" +=# + +function main(args = ARGS)::Int + if length(args) != 1 + @error "Expect a single argument" args + return 2 + end + julia, = args + + # It looks like double-free is easy to robustly trigger. + code = """ + @info "Testing a pattern that would trigger ASAN" + write(ARGS[1], "started") + + ptr = ccall(:malloc, Ptr{UInt}, (Csize_t,), 256) + ccall(:free, Cvoid, (Ptr{UInt},), ptr) + ccall(:free, Cvoid, (Ptr{UInt},), ptr) + + @error "Failed to trigger ASAN" + """ + + local proc + timeout = Threads.Atomic{Bool}(false) + isstarted = false + mktemp() do tmppath, tmpio + cmd = addenv( + `$julia -e $code $tmppath`, + "ASAN_OPTIONS" => + "detect_leaks=0:fast_unwind_on_malloc=0:allow_user_segv_handler=1:malloc_context_size=2", + "LBT_USE_RTLD_DEEPBIND" => "0", + ) + # Note: Ideally, we set ASAN_SYMBOLIZER_PATH here. But there is no easy + # way to find out the path from just a Julia binary. + + @debug "Starting a process" cmd + proc = run(pipeline(cmd; stdout, stderr); wait = false) + timer = Timer(10) + @sync try + @async begin + try + wait(timer) + true + catch err + err isa EOFError || rethrow() + false + end && begin + timeout[] = true + kill(proc) + end + end + wait(proc) + finally + close(timer) + end + + # At the very beginning of the process, the `julia` subprocess put a + # marker that it is successfully started. This is to avoid mixing + # non-functional `julia` binary (or even non-`julia` command) and + # correctly working `julia` with ASAN: + isstarted = read(tmpio, String) == "started" + end + + if timeout[] + @error "Timeout waiting for the subprocess" + return 1 + elseif success(proc) + @error "ASAN was not triggered" + return 1 + elseif !isstarted + @error "Failed to start the process" + return 1 + else + @info "ASAN is functional in the Julia binary `$julia`" + return 0 + end +end + +if abspath(PROGRAM_FILE) == @__FILE__ + exit(main()) +end From 98b5e4155ee1d2684ae3d63b5841de5e9975efee Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 19 Jul 2021 07:27:37 -0400 Subject: [PATCH 106/146] Move compile timing to inside `@time`'s main timing block. Fixes >100% compilation time reports (#41286) * ensure `@time`'s inner timing functions are compiled (cherry picked from commit 0dbd3f77d975edcc7e03e167f3f60aca186aff6c) --- base/timing.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/timing.jl b/base/timing.jl index 7af6f038ba6ea..ab7af23048305 100644 --- a/base/timing.jl +++ b/base/timing.jl @@ -205,11 +205,11 @@ macro time(ex) quote while false; end # compiler heuristic: compile this block (alter this if the heuristic changes) local stats = gc_num() - local compile_elapsedtime = cumulative_compile_time_ns_before() local elapsedtime = time_ns() + local compile_elapsedtime = cumulative_compile_time_ns_before() local val = $(esc(ex)) - elapsedtime = time_ns() - elapsedtime compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime + elapsedtime = time_ns() - elapsedtime local diff = GC_Diff(gc_num(), stats) time_print(elapsedtime, diff.allocd, diff.total_time, gc_alloc_count(diff), compile_elapsedtime, true) val @@ -251,11 +251,11 @@ macro timev(ex) quote while false; end # compiler heuristic: compile this block (alter this if the heuristic changes) local stats = gc_num() - local compile_elapsedtime = cumulative_compile_time_ns_before() local elapsedtime = time_ns() + local compile_elapsedtime = cumulative_compile_time_ns_before() local val = $(esc(ex)) - elapsedtime = time_ns() - elapsedtime compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime + elapsedtime = time_ns() - elapsedtime local diff = GC_Diff(gc_num(), stats) timev_print(elapsedtime, diff, compile_elapsedtime) val From 01f53de2c4ebe70337991e091b81d7ba71ae0765 Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Mon, 19 Jul 2021 13:28:03 +0200 Subject: [PATCH 107/146] Do not error when showing invalid enums (#40042) (#41596) (cherry picked from commit 02807b279a5e6d5acaeb7095e4c0527e2a5c190e) --- base/Enums.jl | 10 ++++++++-- test/enums.jl | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/base/Enums.jl b/base/Enums.jl index 06860402fbcb1..7b5e9587d5f6c 100644 --- a/base/Enums.jl +++ b/base/Enums.jl @@ -25,10 +25,16 @@ Base.isless(x::T, y::T) where {T<:Enum} = isless(basetype(T)(x), basetype(T)(y)) Base.Symbol(x::Enum) = namemap(typeof(x))[Integer(x)]::Symbol -Base.print(io::IO, x::Enum) = print(io, Symbol(x)) +function _symbol(x::Enum) + names = namemap(typeof(x)) + x = Integer(x) + get(() -> Symbol(""), names, x)::Symbol +end + +Base.print(io::IO, x::Enum) = print(io, _symbol(x)) function Base.show(io::IO, x::Enum) - sym = Symbol(x) + sym = _symbol(x) if !(get(io, :compact, false)::Bool) from = get(io, :module, Main) def = typeof(x).name.module diff --git a/test/enums.jl b/test/enums.jl index d3c585678c572..5a83e1b4dfa42 100644 --- a/test/enums.jl +++ b/test/enums.jl @@ -143,6 +143,10 @@ let io = IOBuffer() @test String(take!(io)) == sprint(print, Fruit) end +# Test printing of invalid enums +@test repr("text/plain", reinterpret(Fruit, Int32(11))) == "::Fruit = 11" +@test repr("text/plain", reinterpret(Fruit, Int32(-5))) == "::Fruit = -5" + @enum LogLevel DEBUG INFO WARN ERROR CRITICAL @test DEBUG < CRITICAL @@ -160,6 +164,9 @@ end @test repr("text/plain", sevn) == "$(string(sevn))::UI8 = 0x07" @test repr("text/plain", fiftn) == "$(string(fiftn))::UI8 = 0xf0" +@test repr("text/plain", reinterpret(UI8, 0x01)) == "::UI8 = 0x01" +@test repr("text/plain", reinterpret(UI8, 0xff)) == "::UI8 = 0xff" + # test block form @enum BritishFood begin blackpudding = 1 From 9c851b8b8f62c858168d9b1e79a001b273c30e8e Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Mon, 19 Jul 2021 22:45:29 +0200 Subject: [PATCH 108/146] pretty-printing for ncat and nrow expressions (#41617) fixes #41134 (cherry picked from commit 2e08ccdb12cca46b109492b1198635759bae1e31) --- base/show.jl | 21 ++++++++++++++------- test/show.jl | 16 ++++++++++++++++ 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/base/show.jl b/base/show.jl index 79a2c1203f0d6..f3465a25d4abb 100644 --- a/base/show.jl +++ b/base/show.jl @@ -1303,6 +1303,7 @@ const expr_calls = Dict(:call => ('(',')'), :calldecl => ('(',')'), :ref => ('[',']'), :curly => ('{','}'), :(.) => ('(',')')) const expr_parens = Dict(:tuple=>('(',')'), :vcat=>('[',']'), :hcat =>('[',']'), :row =>('[',']'), :vect=>('[',']'), + :ncat =>('[',']'), :nrow =>('[',']'), :braces=>('{','}'), :bracescat=>('{','}')) ## AST decoding helpers ## @@ -1811,14 +1812,16 @@ function show_unquoted(io::IO, ex::Expr, indent::Int, prec::Int, quote_level::In # list-like forms, e.g. "[1, 2, 3]" elseif haskey(expr_parens, head) || # :vcat etc. - head === :typed_vcat || head === :typed_hcat + head === :typed_vcat || head === :typed_hcat || head === :typed_ncat # print the type and defer to the untyped case - if head === :typed_vcat || head === :typed_hcat + if head === :typed_vcat || head === :typed_hcat || head === :typed_ncat show_unquoted(io, args[1], indent, prec, quote_level) if head === :typed_vcat head = :vcat - else + elseif head === :typed_hcat head = :hcat + else + head = :ncat end args = args[2:end] nargs = nargs - 1 @@ -1828,15 +1831,19 @@ function show_unquoted(io::IO, ex::Expr, indent::Int, prec::Int, quote_level::In sep = "; " elseif head === :hcat || head === :row sep = " " + elseif head === :ncat || head === :nrow + sep = ";"^args[1] * " " + args = args[2:end] + nargs = nargs - 1 else sep = ", " end - head !== :row && print(io, op) + head !== :row && head !== :nrow && print(io, op) show_list(io, args, sep, indent, 0, quote_level) - if nargs == 1 && head === :vcat - print(io, ';') + if nargs <= 1 && (head === :vcat || head === :ncat) + print(io, sep[1:end-1]) end - head !== :row && print(io, cl) + head !== :row && head !== :nrow && print(io, cl) # transpose elseif (head === Symbol("'") && nargs == 1) || ( diff --git a/test/show.jl b/test/show.jl index e4bfd3f95af32..c00dcf523898c 100644 --- a/test/show.jl +++ b/test/show.jl @@ -2304,3 +2304,19 @@ end @test replstr([[1;;]]) == "1-element Vector{Matrix{$Int}}:\n [1;;]" @test replstr([[1;;;]]) == "1-element Vector{Array{$Int, 3}}:\n [1;;;]" end + +@testset "ncat and nrow" begin + @test_repr "[1;;]" + @test_repr "[1;;;]" + @test_repr "[1;; 2]" + @test_repr "[1;;; 2]" + @test_repr "[1;;; 2 3;;; 4]" + @test_repr "[1;;; 2;;;; 3;;; 4]" + + @test_repr "T[1;;]" + @test_repr "T[1;;;]" + @test_repr "T[1;; 2]" + @test_repr "T[1;;; 2]" + @test_repr "T[1;;; 2 3;;; 4]" + @test_repr "T[1;;; 2;;;; 3;;; 4]" +end From 765da54a4fad7f9fa51f7160ffa8d27efc4c90c3 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 20 Jul 2021 09:21:52 +0200 Subject: [PATCH 109/146] make precompile files writable (#41614) (cherry picked from commit 6d58068541720a11eede10edfa24aae47ab2f5ab) --- base/loading.jl | 4 ++-- test/precompile.jl | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/base/loading.jl b/base/loading.jl index 851ebf17cc3b9..84ad47517cc31 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1435,8 +1435,8 @@ function compilecache(pkg::PkgId, path::String, internal_stderr::IO = stderr, in open(tmppath, "a+") do f write(f, _crc32c(seekstart(f))) end - # inherit permission from the source file - chmod(tmppath, filemode(path) & 0o777) + # inherit permission from the source file (and make them writable) + chmod(tmppath, filemode(path) & 0o777 | 0o200) # Read preferences hash back from .ji file (we can't precompute because # we don't actually know what the list of compile-time preferences are without compiling) diff --git a/test/precompile.jl b/test/precompile.jl index f69e7a4766f2c..51b25b8325b2a 100644 --- a/test/precompile.jl +++ b/test/precompile.jl @@ -823,6 +823,10 @@ precompile_test_harness("Issue #25971") do load_path chmod(sourcefile, 0o600) cachefile = Base.compilecache(Base.PkgId("Foo25971")) @test filemode(sourcefile) == filemode(cachefile) + chmod(sourcefile, 0o444) + cachefile = Base.compilecache(Base.PkgId("Foo25971")) + # Check writable + @test touch(cachefile) == cachefile end precompile_test_harness("Issue #38312") do load_path From 77a5810faf2e73ed163e765ca7861e409ecd1cfd Mon Sep 17 00:00:00 2001 From: Fred Callaway Date: Tue, 20 Jul 2021 00:25:43 -0700 Subject: [PATCH 110/146] while loop -> for loop in _simplify_include_frames (fixes #41566) (#41622) * while loop -> for loop in _simplify_include_frames (fixes #41566) prevents the possibility of a bounds error when i = 0 (cherry picked from commit ed4f3169573903f1767871243375d2407db959a0) --- base/errorshow.jl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/base/errorshow.jl b/base/errorshow.jl index 641cf5f2cdf4b..6cd94cbed371a 100644 --- a/base/errorshow.jl +++ b/base/errorshow.jl @@ -773,10 +773,9 @@ end # For improved user experience, filter out frames for include() implementation # - see #33065. See also #35371 for extended discussion of internal frames. function _simplify_include_frames(trace) - i = length(trace) - kept_frames = trues(i) + kept_frames = trues(length(trace)) first_ignored = nothing - while i >= 1 + for i in length(trace):-1:1 frame::StackFrame, _ = trace[i] mod = parentmodule(frame) if first_ignored === nothing @@ -798,10 +797,9 @@ function _simplify_include_frames(trace) first_ignored = nothing end end - i -= 1 end if first_ignored !== nothing - kept_frames[i:first_ignored] .= false + kept_frames[1:first_ignored] .= false end return trace[kept_frames] end From 1ddf23865009015452ae93719f4a119d2ea77b66 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 20 Jul 2021 05:58:28 -0400 Subject: [PATCH 111/146] CI (Buildkite): move the `sanitizers` builders (e.g. `asan`) to the experimental pipeline (#41606) (cherry picked from commit c95448fb988441ecd7fb0604606ac08c5014abd3) --- .buildkite/experimental/0_webui.yml | 18 ++++++++++++++++++ .buildkite/experimental/pipeline.yml | 19 +++++++++++++++++++ .buildkite/{ => experimental}/sanitizers.yml | 10 +++++----- .buildkite/pipeline.yml | 1 - 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 .buildkite/experimental/0_webui.yml create mode 100644 .buildkite/experimental/pipeline.yml rename .buildkite/{ => experimental}/sanitizers.yml (85%) diff --git a/.buildkite/experimental/0_webui.yml b/.buildkite/experimental/0_webui.yml new file mode 100644 index 0000000000000..ab3f68db4c393 --- /dev/null +++ b/.buildkite/experimental/0_webui.yml @@ -0,0 +1,18 @@ +# This file represents what is put into the webUI. +# It is purely for keeping track of the changes we make to the webUI configuration; modifying this file has no effect. +# We use the `cryptic` buildkite plugin to provide secrets management, which requires some integration into the WebUI's steps. +agents: + queue: "julia" + sandbox.jl: "true" + +steps: + - label: ":unlock: Unlock secrets, launch pipelines" + plugins: + - staticfloat/cryptic: + # Our list of pipelines that should be launched (but don't require a signature) + # These pipelines can be modified by any contributor and CI will still run. + # 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/experimental/pipeline.yml diff --git a/.buildkite/experimental/pipeline.yml b/.buildkite/experimental/pipeline.yml new file mode 100644 index 0000000000000..6f86f7ef243e5 --- /dev/null +++ b/.buildkite/experimental/pipeline.yml @@ -0,0 +1,19 @@ +# This file launches all the build jobs that _don't_ require secrets access. +# These jobs can pass their output off to jobs that do require secrets access, +# but those privileged steps require signing before they can be run. +# +# Yes, this is creating another layer of indirection; the flow now looks like: +# +# [webui] -> pipeline.yml -> llvm_passes.yml +# +# when we could theoretically just have the `webui` launch `llvm_passes.yml`, +# however this raises the bar for contributors to add new (unsigned) steps to +# our CI configuration, so I'd rather live with an extra layer of indirection +# and only need to touch the webui configuration when we need to alter +# something about the privileged steps. +steps: + - label: ":buildkite: Launch unsigned pipelines" + commands: | + buildkite-agent pipeline upload .buildkite/experimental/sanitizers.yml + agents: + queue: julia diff --git a/.buildkite/sanitizers.yml b/.buildkite/experimental/sanitizers.yml similarity index 85% rename from .buildkite/sanitizers.yml rename to .buildkite/experimental/sanitizers.yml index f29ed4e42a4a6..534dac81e53f3 100644 --- a/.buildkite/sanitizers.yml +++ b/.buildkite/experimental/sanitizers.yml @@ -14,8 +14,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz - rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v2.0/llvm_passes.tar.gz + rootfs_treehash: "0b5a80c1d0ab110a57fbdb7f4bc042a5ede310f3" uid: 1000 gid: 1000 workspaces: @@ -29,6 +29,6 @@ steps: echo "--- Test that ASAN is enabled" contrib/asan/check.jl ./tmp/test-asan/asan/usr/bin/julia-debug timeout_in_minutes: 120 - notify: - - github_commit_status: - context: "asan" + # notify: + # - github_commit_status: + # context: "asan" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 99473055f2eeb..097b8976eea70 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -19,6 +19,5 @@ steps: buildkite-agent pipeline upload .buildkite/whitespace.yml buildkite-agent pipeline upload .buildkite/embedding.yml buildkite-agent pipeline upload .buildkite/llvm_passes.yml - buildkite-agent pipeline upload .buildkite/sanitizers.yml agents: queue: julia From 7142613f7f039aa6ddcb45610307c613ee77f24b Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 20 Jul 2021 13:59:55 +0200 Subject: [PATCH 112/146] [LLVM] Add missing GPU related patch (cherry picked from commit 8b15db7d659b40df6a7304df183fed61f49fb2c2) --- deps/llvm.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/llvm.mk b/deps/llvm.mk index b6f6455f88255..c12c8c0eaa119 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -481,7 +481,7 @@ ifeq ($(LLVM_VER_PATCH), 0) $(eval $(call LLVM_PATCH,llvm-11-D85313-debuginfo-empty-arange)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-D90722-rtdyld-absolute-relocs)) # remove for LLVM 12 endif # LLVM_VER 11.0.0 -$(eval $(call LLVM_PATCH,llvm-invalid-addrspacecast-sink)) # upstreamed as D92210 +$(eval $(call LLVM_PATCH,llvm-invalid-addrspacecast-sink)) # Still being upstreamed as D92210 $(eval $(call LLVM_PATCH,llvm-11-D92906-ppc-setjmp)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-PR48458-X86ISelDAGToDAG)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-D93092-ppc-knownbits)) # remove for LLVM 12 @@ -506,6 +506,7 @@ $(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)) From 117a31e606a7a87a6f6806c04511d66211e0d370 Mon Sep 17 00:00:00 2001 From: Sebastian Pfitzner Date: Tue, 20 Jul 2021 18:41:46 +0200 Subject: [PATCH 113/146] always send log messages to stderr by default (#41653) (cherry picked from commit e196b853c8950ce0d7863c9348fb01274de585d9) --- base/logging.jl | 2 +- stdlib/Logging/src/ConsoleLogger.jl | 2 +- test/corelogging.jl | 16 +--------------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/base/logging.jl b/base/logging.jl index fd35f547c82a6..8177d1eddff84 100644 --- a/base/logging.jl +++ b/base/logging.jl @@ -670,7 +670,7 @@ function handle_message(logger::SimpleLogger, level::LogLevel, message, _module, buf = IOBuffer() stream = logger.stream if !isopen(stream) - stream = level < Warn ? stdout : stderr + stream = stderr end iob = IOContext(buf, stream) levelstr = level == Warn ? "Warning" : string(level) diff --git a/stdlib/Logging/src/ConsoleLogger.jl b/stdlib/Logging/src/ConsoleLogger.jl index 04c56c6dbfaae..f13a8aa2f633b 100644 --- a/stdlib/Logging/src/ConsoleLogger.jl +++ b/stdlib/Logging/src/ConsoleLogger.jl @@ -119,7 +119,7 @@ function handle_message(logger::ConsoleLogger, level::LogLevel, message, _module msglines = [(indent=0, msg=l) for l in split(chomp(string(message)::String), '\n')] stream = logger.stream if !isopen(stream) - stream = level < Warn ? stdout : stderr + stream = stderr end dsize = displaysize(stream)::Tuple{Int,Int} nkwargs = length(kwargs)::Int diff --git a/test/corelogging.jl b/test/corelogging.jl index 698209661456b..9c5102d848013 100644 --- a/test/corelogging.jl +++ b/test/corelogging.jl @@ -341,20 +341,6 @@ end String(take!(io)) end - function genmsg_out(level, message, _module, filepath, line; kws...) - fname = tempname() - f = open(fname, "w") - logger = SimpleLogger() - redirect_stdout(f) do - handle_message(logger, level, message, _module, :group, :id, - filepath, line; kws...) - end - close(f) - buf = read(fname) - rm(fname) - String(buf) - end - function genmsg_err(level, message, _module, filepath, line; kws...) fname = tempname() f = open(fname, "w") @@ -370,7 +356,7 @@ end end # Simple - @test genmsg_out(Info, "msg", Main, "some/path.jl", 101) == + @test genmsg_err(Info, "msg", Main, "some/path.jl", 101) == """ ┌ Info: msg └ @ Main some/path.jl:101 From 990283618723d00e4380556e86eccb4c636ae24e Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 20 Jul 2021 19:50:20 -0400 Subject: [PATCH 114/146] codegen: add missing return after error check (#41657) Fixes #41655 (cherry picked from commit 9442f1bf25d41feaaaa789b9d9a0dac344e60283) --- src/intrinsics.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intrinsics.cpp b/src/intrinsics.cpp index 4096bba08d0c7..e1d821a34e42d 100644 --- a/src/intrinsics.cpp +++ b/src/intrinsics.cpp @@ -652,8 +652,10 @@ static jl_cgval_t emit_pointerset(jl_codectx_t &ctx, jl_cgval_t *argv) return emit_runtime_pointerset(ctx, argv); if (align.constant == NULL || !jl_is_long(align.constant)) return emit_runtime_pointerset(ctx, argv); - if (!is_valid_intrinsic_elptr(ety)) + if (!is_valid_intrinsic_elptr(ety)) { emit_error(ctx, "pointerset: invalid pointer type"); + return jl_cgval_t(); + } emit_typecheck(ctx, x, ety, "pointerset"); Value *idx = emit_unbox(ctx, T_size, i, (jl_value_t*)jl_long_type); From 95c8bb727bb647c729a6952e13806212b625ce20 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 20 Jul 2021 19:50:41 -0400 Subject: [PATCH 115/146] codegen: avoid attempting to box singleton objects unnecessarily (#41658) Fixes #41615 (cherry picked from commit b692c9b00f322276a2b7504e1a02295e7e27afc1) --- src/codegen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 9775db39892f7..acf7f1167cb14 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -946,11 +946,13 @@ static bool jl_is_pointerfree(jl_value_t* t) // these queries are usually related, but we split them out here // for convenience and clarity (and because it changes the calling convention) +// n.b. this must include jl_is_datatype_singleton (ghostType) and primitive types static bool deserves_stack(jl_value_t* t) { if (!jl_is_concrete_immutable(t)) return false; - return jl_datatype_isinlinealloc((jl_datatype_t*)t, 0); + jl_datatype_t *dt = (jl_datatype_t*)t; + return jl_is_datatype_singleton(dt) || jl_datatype_isinlinealloc(dt, 0); } static bool deserves_argbox(jl_value_t* t) { From a2ff7d70b026338fcc7bd5183b8293ac23752e6e Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 21 Jul 2021 12:15:12 -0400 Subject: [PATCH 116/146] fix memory corruption in `deleteat!` (#41646) n.b. `n == a->nrows + dec` Fixes https://github.com/JuliaData/DataFrames.jl/issues/2819 (cherry picked from commit 2e06a016fdad70736dd6c25c5a5286809e442b35) --- src/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/array.c b/src/array.c index 258b80948bf28..bc86eb50b95c5 100644 --- a/src/array.c +++ b/src/array.c @@ -1112,7 +1112,7 @@ STATIC_INLINE void jl_array_del_at_beg(jl_array_t *a, size_t idx, size_t dec, // Move the rest of the data if the offset changed if (newoffs != offset) { memmove_safe(a->flags.hasptr, newdata + nb1, olddata + nb1 + nbdec, nbtotal - nb1); - if (isbitsunion) memmove(newtypetagdata + idx, typetagdata + idx + dec, n - idx); + if (isbitsunion) memmove(newtypetagdata + idx, typetagdata + idx + dec, a->nrows - idx); } a->data = newdata; } From 1d6af37d891df781b70757d25936e1058f2424bc Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 21 Jul 2021 12:55:17 -0400 Subject: [PATCH 117/146] fix #41654, layout of 0-field structs with circular supertypes (#41660) (cherry picked from commit b3a99c00a0b4e75761b6d18a4e62a6ca76049a01) --- src/builtins.c | 4 ++-- test/core.jl | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index 7ef93faaa6368..a6bcad48ab731 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -1557,9 +1557,9 @@ JL_CALLABLE(jl_f__typebody) // able to compute the layout of the object before needing to // publish it, so we must assume it cannot be inlined, if that // check passes, then we also still need to check the fields too. - if (!dt->name->mutabl && !references_name((jl_value_t*)dt->super, dt->name, 1)) { + if (!dt->name->mutabl && (nf == 0 || !references_name((jl_value_t*)dt->super, dt->name, 1))) { int mayinlinealloc = 1; - size_t i, nf = jl_svec_len(ft); + size_t i; for (i = 0; i < nf; i++) { jl_value_t *fld = jl_svecref(ft, i); if (references_name(fld, dt->name, 1)) { diff --git a/test/core.jl b/test/core.jl index 020722fd5f70b..e55705b3e6923 100644 --- a/test/core.jl +++ b/test/core.jl @@ -7234,6 +7234,12 @@ end @test string((B40050(),)) == "($B40050(),)" @test_broken isbitstype(Tuple{B40050}) +# issue #41654 +struct X41654 <: Ref{X41654} +end +@test isbitstype(X41654) +@test ('a'=>X41654(),)[1][2] isa X41654 + # Issue #34206/34207 function mre34206(a, n) va = view(a, :) From 7e46121303ac2efc1146358178c3bd05d7a8a28c Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Wed, 21 Jul 2021 13:10:03 -0400 Subject: [PATCH 118/146] CI: delete the `.buildkite/rootfs_images` directory (#41648) (cherry picked from commit 61b6994884642f8fc7e18844d37dc70b9dfdb9ab) --- .buildkite/rootfs_images/Manifest.toml | 134 ----------------------- .buildkite/rootfs_images/Project.toml | 5 - .buildkite/rootfs_images/README.md | 5 - .buildkite/rootfs_images/llvm-passes.jl | 31 ------ .buildkite/rootfs_images/rootfs_utils.jl | 123 --------------------- 5 files changed, 298 deletions(-) delete mode 100644 .buildkite/rootfs_images/Manifest.toml delete mode 100644 .buildkite/rootfs_images/Project.toml delete mode 100644 .buildkite/rootfs_images/README.md delete mode 100755 .buildkite/rootfs_images/llvm-passes.jl delete mode 100644 .buildkite/rootfs_images/rootfs_utils.jl diff --git a/.buildkite/rootfs_images/Manifest.toml b/.buildkite/rootfs_images/Manifest.toml deleted file mode 100644 index d24e9a4ee166e..0000000000000 --- a/.buildkite/rootfs_images/Manifest.toml +++ /dev/null @@ -1,134 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -[[ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" - -[[Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[Downloads]] -deps = ["ArgTools", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" - -[[InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.3.0" - -[[LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" - -[[LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" - -[[LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" - -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" - -[[MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" - -[[NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" - -[[Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[Preferences]] -deps = ["TOML"] -git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.2.2" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[Random]] -deps = ["Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" - -[[Scratch]] -deps = ["Dates"] -git-tree-sha1 = "0b4b7f1393cff97c33891da2a0bf69c6ed241fda" -uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.1.0" - -[[Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" - -[[Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" - -[[UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" - -[[ghr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f5c8cb306d4fe2d1fff90443a088fc5ba536c134" -uuid = "07c12ed4-43bc-5495-8a2a-d5838ef8d533" -version = "0.13.0+1" - -[[nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" - -[[p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/.buildkite/rootfs_images/Project.toml b/.buildkite/rootfs_images/Project.toml deleted file mode 100644 index 1dbde5ed9df66..0000000000000 --- a/.buildkite/rootfs_images/Project.toml +++ /dev/null @@ -1,5 +0,0 @@ -[deps] -Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" -SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" -Scratch = "6c6a2e73-6563-6170-7368-637461726353" -ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533" diff --git a/.buildkite/rootfs_images/README.md b/.buildkite/rootfs_images/README.md deleted file mode 100644 index 1d3962c2bee3e..0000000000000 --- a/.buildkite/rootfs_images/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## Rootfs images - -Our CI setup makes use of rootfs images that contain our build tools. -These rootfs images are built using the fairly simple scripts held within this directory. -Most images are based on Debian, making use of `debootstrap` to provide a quick and easy rootfs with packages installed through an initial `apt` invocation. diff --git a/.buildkite/rootfs_images/llvm-passes.jl b/.buildkite/rootfs_images/llvm-passes.jl deleted file mode 100755 index bc6d57eb2f87e..0000000000000 --- a/.buildkite/rootfs_images/llvm-passes.jl +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env julia - -## This rootfs includes enough of a host toolchain to build the LLVM passes. -## Eventually, this image will probably be replaced with the actual builder image, -## as that will have the necessary toolchains as well, but that image is not built yet. - -include("rootfs_utils.jl") - -const tag_name, force_overwrite = get_arguments(ARGS, @__FILE__) - -# Build debian-based image with the following extra packages: -packages = [ - "bash", - "build-essential", - "cmake", - "curl", - "gfortran", - "git", - "less", - "libatomic1", - "m4", - "perl", - "pkg-config", - "python", - "python3", - "wget", -] -tarball_path = debootstrap("llvm-passes"; packages) - -# Upload it -upload_rootfs_image(tarball_path; tag_name, force_overwrite) diff --git a/.buildkite/rootfs_images/rootfs_utils.jl b/.buildkite/rootfs_images/rootfs_utils.jl deleted file mode 100644 index 82baeec7a0933..0000000000000 --- a/.buildkite/rootfs_images/rootfs_utils.jl +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env julia - -# This is an example invocation of `debootstrap` to generate a Debian/Ubuntu-based rootfs -using Scratch, Pkg, Pkg.Artifacts, ghr_jll, SHA, Dates - -# Utility functions -getuid() = ccall(:getuid, Cint, ()) -getgid() = ccall(:getgid, Cint, ()) - -function debootstrap(name::String; release::String="buster", variant::String="minbase", - packages::Vector{String}=String[], force::Bool=false) - if Sys.which("debootstrap") === nothing - error("Must install `debootstrap`!") - end - - tarball_path = joinpath(@get_scratch!("rootfs-images"), "$(name).tar.gz") - if !force && isfile(tarball_path) - @error("Refusing to overwrite tarball without `force` set", tarball_path) - error() - end - - artifact_hash = create_artifact() do rootfs - packages_string = join(push!(packages, "locales"), ",") - @info("Running debootstrap", release, variant, packages) - run(`sudo debootstrap --variant=$(variant) --include=$(packages_string) $(release) "$(rootfs)"`) - - # Remove special `dev` files - @info("Cleaning up `/dev`") - for f in readdir(joinpath(rootfs, "dev"); join=true) - # Keep the symlinks around (such as `/dev/fd`), as they're useful - if !islink(f) - run(`sudo rm -rf "$(f)"`) - end - end - - # take ownership of the entire rootfs - @info("Chown'ing rootfs") - run(`sudo chown $(getuid()):$(getgid()) -R "$(rootfs)"`) - - # Write out rootfs-info to contain a minimally-identifying string - open(joinpath(rootfs, "etc", "rootfs-info"), write=true) do io - write(io, """ - rootfs_type=debootstrap - release=$(release) - variant=$(variant) - packages=$(packages_string) - build_date=$(Dates.now()) - """) - end - - # Write out a reasonable default resolv.conf - open(joinpath(rootfs, "etc", "resolv.conf"), write=true) do io - write(io, """ - nameserver 1.1.1.1 - nameserver 8.8.8.8 - """) - end - - # Remove `_apt` user so that `apt` doesn't try to `setgroups()` - @info("Removing `_apt` user") - open(joinpath(rootfs, "etc", "passwd"), write=true, read=true) do io - filtered_lines = filter(l -> !startswith(l, "_apt:"), readlines(io)) - truncate(io, 0) - seek(io, 0) - for l in filtered_lines - println(io, l) - end - end - - # Set up the one true locale - @info("Setting up UTF-8 locale") - open(joinpath(rootfs, "etc", "locale.gen"), "a") do io - println(io, "en_US.UTF-8 UTF-8") - end - run(`sudo chroot --userspec=$(getuid()):$(getgid()) $(rootfs) locale-gen`) - end - - # Archive it into a `.tar.gz` file - @info("Archiving", tarball_path, artifact_hash) - archive_artifact(artifact_hash, tarball_path) - - return tarball_path -end - -function upload_rootfs_image(tarball_path::String; - github_repo::String="JuliaCI/rootfs-images", - tag_name::String, - force_overwrite::Bool) - # Upload it to `github_repo` - tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))" - @info("Uploading to $(github_repo)@$(tag_name)", tarball_url) - cmd = ghr_jll.ghr() - append!(cmd.exec, ["-u", dirname(github_repo), "-r", basename(github_repo)]) - force_overwrite && push!(cmd.exec, "-replace") - append!(cmd.exec, [tag_name, tarball_path]) - run(cmd) - return tarball_url -end - -# process command-line arguments - -function get_arguments(args::AbstractVector, script_file::AbstractString) - usage = "Usage: $(basename(script_file)) [--force-overwrite]" - length(args) < 1 && throw(ArgumentError(usage)) - length(args) > 2 && throw(ArgumentError(usage)) - tag_name = get_tag_name(args; usage) - force_overwrite = get_force_overwrite(args; usage) - return (; tag_name, force_overwrite) -end - -function get_tag_name(args::AbstractVector; usage::AbstractString) - tag_name = convert(String, strip(args[1]))::String - isempty(tag_name) && throw(ArgumentError(usage)) - startswith(tag_name, "--") && throw(ArgumentError(usage)) - return tag_name -end - -function get_force_overwrite(args::AbstractVector; usage::AbstractString) - force_overwrite_string = strip(get(args, 2, "")) - force_overwrite_string == "" && return false - force_overwrite_string == "--force-overwrite" && return true - throw(ArgumentError(usage)) -end From 99c71aca24bf6608df1db2042f8a782376e80d72 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 21 Jul 2021 20:27:25 -0700 Subject: [PATCH 119/146] [build] Automatically set `USE_BINARYBUILDER_CSL=0` when local CSL is new (#41645) We ship our own compiler support libraries to ensure a minimum level of support for BB-built libraries, however certain distros provide very bleeding-edge compilers. This can be a problem if we download an _older_ `libstdc++.so` and forcibly link against that when launching Julia, as when Julia itself is built with the local `g++`, it may use symbols that don't exist in the BB-sourced `libstdc++.so`. To address this, we default to not using BB-sourced CSLs if the `libstdc++.so` that the native compiler would use contains a symbol that our BB-sourced CSLs do not have. We use the monotonically-climbing `GLIBCXX_3.4.XX` version symbols for this purpose; encoding the "next" version number within `deps/csl.mk`, and triggering the BB-avoidance if that version exists within the system-provided `libstdc++.so`. (cherry picked from commit 27c0291f7fbecd811a3f9eb62b1159cff6b61e2a) --- Make.inc | 5 ++- deps/csl.mk | 40 ++++++++++++++++++- .../CompilerSupportLibraries_jll/Project.toml | 4 ++ 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/Make.inc b/Make.inc index 19c9629e0423e..5f8fcab2ede2c 100644 --- a/Make.inc +++ b/Make.inc @@ -1168,7 +1168,10 @@ BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(s LIBGFORTRAN_VERSION := $(subst libgfortran,,$(filter libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN)))) # This is the set of projects that BinaryBuilder dependencies are hooked up for. -BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM LIBSUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL +# Note: we explicitly _do not_ define `CSL` here, since it requires some more +# advanced techniques to decide whether it should be installed from a BB source +# or not. See `deps/csl.mk` for more detail. +BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM LIBSUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP define SET_BB_DEFAULT # First, check to see if BB is disabled on a global setting ifeq ($$(USE_BINARYBUILDER),0) diff --git a/deps/csl.mk b/deps/csl.mk index 423201cbb5a0c..9f95c00f3cfe7 100644 --- a/deps/csl.mk +++ b/deps/csl.mk @@ -1,5 +1,3 @@ -ifeq ($(USE_BINARYBUILDER_CSL),0) - # Interrogate the fortran compiler (which is always GCC based) on where it is keeping its libraries STD_LIB_PATH := $(shell LANG=C $(FC) -print-search-dirs | grep '^programs: =' | sed -e "s/^programs: =//") STD_LIB_PATH += :$(shell LANG=C $(FC) -print-search-dirs | grep '^libraries: =' | sed -e "s/^libraries: =//") @@ -12,6 +10,44 @@ define pathsearch $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2))))) endef +# CSL bundles lots of system compiler libraries, and while it is quite bleeding-edge +# as compared to what most distros ship, if someone tries to build an older branch, +# the version of CSL that ships with that branch may become relatively old. This is +# not a problem for code that is built in BB, but when we build Julia with the system +# compiler, that compiler uses the version of `libstdc++` that it is bundled with, +# and we can get linker errors when trying to run that `julia` executable with the +# `libstdc++` that comes from the (now old) BB-built CSL. +# +# To fix this, we take note when the system `libstdc++.so` is newer than whatever we +# would get from CSL (by searching for a `GLIBCXX_3.4.X` symbol that does not exist +# in our CSL, but would in a newer one), and default to `USE_BINARYBUILDER_CSL=0` in +# this case. +CSL_NEXT_GLIBCXX_VERSION=GLIBCXX_3\.4\.30|GLIBCXX_3\.5\.|GLIBCXX_4\. + +# First, check to see if BB is disabled on a global setting +ifeq ($(USE_BINARYBUILDER),0) +USE_BINARYBUILDER_CSL ?= 0 +else +# If it's not, check to see if it's disabled by a USE_SYSTEM_xxx flag +ifeq ($(USE_SYSTEM_CSL),1) +USE_BINARYBUILDER_CSL ?= 0 +else +# If it's not, see if we should disable it due to `libstdc++` being newer: +LIBSTDCXX_PATH := $(eval $(call pathsearch,libstdc++,$(STD_LIB_PATH))) +ifneq (,$(and $(LIBSTDCXX_PATH),$(shell objdump -p $(LIBSTDCXX_PATH) | grep $(CSL_NEXT_GLIBCXX_VERSION)))) +# Found `libstdc++`, grepped it for strings and found a `GLIBCXX` symbol +# that is newer that whatever we have in CSL. Default to not using BB. +USE_BINARYBUILDER_CSL ?= 0 +else +# Either we didn't find `libstdc++` (e.g. we're using `clang`), or we +# found it and couldn't find the new symbol in it (it's older than what +# BB provides, so let's use BB instead) +USE_BINARYBUILDER_CSL ?= 1 +endif +endif +endif + +ifeq ($(USE_BINARYBUILDER_CSL),0) define copy_csl install-csl: | $$(build_shlibdir) $$(build_shlibdir)/$(1) $$(build_shlibdir)/$(1): | $$(build_shlibdir) diff --git a/stdlib/CompilerSupportLibraries_jll/Project.toml b/stdlib/CompilerSupportLibraries_jll/Project.toml index ac78369b12602..b76517c828d0e 100644 --- a/stdlib/CompilerSupportLibraries_jll/Project.toml +++ b/stdlib/CompilerSupportLibraries_jll/Project.toml @@ -1,5 +1,9 @@ name = "CompilerSupportLibraries_jll" uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" + +# NOTE: When updating this, also make sure to update the value +# `CSL_NEXT_GLIBCXX_VERSION` in `deps/csl.mk`, to properly disable +# automatic usage of BB-built CSLs on extremely up-to-date systems! version = "0.5.0+0" [deps] From b2d80a1420b98835fec812e9c1e0859dad8433eb Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Thu, 22 Jul 2021 07:41:31 +0200 Subject: [PATCH 120/146] Fix `fieldtype_tfunc` for union types (#41667) Co-authored-by: Jameson Nash (cherry picked from commit 2c02de80bd7ec2e33378e75be34635c072d06a60) --- base/compiler/tfuncs.jl | 15 +++++++++++++-- test/compiler/inference.jl | 11 +++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index 57b86bf504217..c31b32428a297 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1015,8 +1015,19 @@ function _fieldtype_tfunc(@nospecialize(s), exact::Bool, @nospecialize(name)) exact = exact && !has_free_typevars(s) u = unwrap_unionall(s) if isa(u, Union) - return tmerge(_fieldtype_tfunc(rewrap(u.a, s), exact, name), - _fieldtype_tfunc(rewrap(u.b, s), exact, name)) + ta0 = _fieldtype_tfunc(rewrap(u.a, s), exact, name) + tb0 = _fieldtype_tfunc(rewrap(u.b, s), exact, name) + ta0 ⊑ tb0 && return tb0 + tb0 ⊑ ta0 && return ta0 + ta, exacta, _, istypea = instanceof_tfunc(ta0) + tb, exactb, _, istypeb = instanceof_tfunc(tb0) + if exact && exacta && exactb + return Const(Union{ta, tb}) + end + if istypea && istypeb + return Type{<:Union{ta, tb}} + end + return Any end u isa DataType || return Any if isabstracttype(u) diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 008e6ff0d6997..4d7aed372f6c8 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3395,3 +3395,14 @@ end x.x end) == Any[Int] end + +@testset "fieldtype for unions" begin # e.g. issue #40177 + f40177(::Type{T}) where {T} = fieldtype(T, 1) + for T in [ + Union{Tuple{Val}, Tuple{Tuple}}, + Union{Base.RefValue{T}, Type{Int32}} where T<:Real, + Union{Tuple{Vararg{Symbol}}, Tuple{Float64, Vararg{Float32}}}, + ] + @test @inferred(f40177(T)) == fieldtype(T, 1) + end +end From e5267faa1e9bbaac7178e6be185e96cf18850b81 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 22 Jul 2021 20:21:27 -0400 Subject: [PATCH 121/146] Update the `file.jl` tests to allow for both `EPERM` and `EINVAL` in the non-root CHOWN tests (#41682) Co-authored-by: Elliot Saba Co-authored-by: Elliot Saba (cherry picked from commit 114ee174cff04b7ecf3514d58e310384fa1bbf17) --- test/file.jl | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/test/file.jl b/test/file.jl index 6c48cedb0ebb0..b6db735e7c483 100644 --- a/test/file.jl +++ b/test/file.jl @@ -491,6 +491,29 @@ rm(c_tmpdir, recursive=true) @test_throws Base._UVError("unlink($(repr(c_tmpdir)))", Base.UV_ENOENT) rm(c_tmpdir, recursive=true) @test rm(c_tmpdir, force=true, recursive=true) === nothing +# Some operations can return multiple different error codes depending on the system environment. +function throws_matching_exception(f::Function, acceptable_exceptions::AbstractVector) + try + f() + @error "No exception was thrown." + return false + catch ex + if ex in acceptable_exceptions + return true + else + @error "The thrown exception is not in the list of acceptable exceptions" acceptable_exceptions exception=(ex, catch_backtrace()) + return false + end + end +end +function throws_matching_uv_error(f::Function, pfx::AbstractString, codes::AbstractVector{<:Integer}) + acceptable_exceptions = multiple_uv_errors(pfx, codes) + return throws_matching_exception(f, acceptable_exceptions) +end +function multiple_uv_errors(pfx::AbstractString, codes::AbstractVector{<:Integer}) + return [Base._UVError(pfx, code) for code in codes] +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" @@ -503,8 +526,12 @@ if !Sys.iswindows() @test stat(file).gid == 0 @test stat(file).uid == 0 else - @test_throws Base._UVError("chown($(repr(file)), -2, -1)", Base.UV_EPERM) chown(file, -2, -1) # Non-root user cannot change ownership to another user - @test_throws Base._UVError("chown($(repr(file)), -1, -2)", Base.UV_EPERM) chown(file, -1, -2) # Non-root user cannot change group to a group they are not a member of (eg: nogroup) + @test throws_matching_uv_error("chown($(repr(file)), -2, -1)", [Base.UV_EPERM, Base.UV_EINVAL]) do + chown(file, -2, -1) # Non-root user cannot change ownership to another user + end + @test throws_matching_uv_error("chown($(repr(file)), -1, -2)", [Base.UV_EPERM, Base.UV_EINVAL]) do + chown(file, -1, -2) # Non-root user cannot change group to a group they are not a member of (eg: nogroup) + end end else # test that chown doesn't cause any errors for Windows From f7aaf22f404cf7ad68a8cd33a8b81809d3c30aa6 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 24 Jul 2021 22:58:54 -0400 Subject: [PATCH 122/146] CI (Buildkite): Add the `package_linux64` and `doctest` builders (#41541) Co-authored-by: Elliot Saba (cherry picked from commit c7097c5793545658aef20d6bb83eb1af7bc81310) --- .buildkite/misc/doctest.yml | 39 +++++ .buildkite/{ => misc}/embedding.yml | 4 +- .../{llvm_passes.yml => misc/llvmpasses.yml} | 8 +- .buildkite/{ => misc}/whitespace.yml | 4 +- .buildkite/pipeline.yml | 19 ++- .buildkite/platforms/linux64.yml | 80 +++++++++++ .buildkite/rr_capture.jl | 134 ++++++++++++++++++ 7 files changed, 273 insertions(+), 15 deletions(-) create mode 100644 .buildkite/misc/doctest.yml rename .buildkite/{ => misc}/embedding.yml (91%) rename .buildkite/{llvm_passes.yml => misc/llvmpasses.yml} (88%) rename .buildkite/{ => misc}/whitespace.yml (87%) create mode 100644 .buildkite/platforms/linux64.yml create mode 100644 .buildkite/rr_capture.jl diff --git a/.buildkite/misc/doctest.yml b/.buildkite/misc/doctest.yml new file mode 100644 index 0000000000000..234e49f5dcf53 --- /dev/null +++ b/.buildkite/misc/doctest.yml @@ -0,0 +1,39 @@ +# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones +# since we need nestable sandboxing. The rootfs images being used here are built from +# the `.buildkite/rootfs_images/llvm-passes.jl` file. +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: "doctest" + key: doctest + plugins: + - JuliaCI/julia#v1: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz + rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + uid: 1000 + gid: 1000 + workspaces: + # Include `/cache/repos` so that our `git` version introspection works. + - "/cache/repos:/cache/repos" + commands: | + echo "--- Build Julia from source" + make -j 6 + + echo "--- Print Julia version info" + ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' + + echo "--- Build Julia docs" + make docs + + echo "--- Run Julia doctests" + JULIA_NUM_THREADS=1 make -C doc doctest=true + timeout_in_minutes: 120 + notify: + - github_commit_status: + context: "doctest" diff --git a/.buildkite/embedding.yml b/.buildkite/misc/embedding.yml similarity index 91% rename from .buildkite/embedding.yml rename to .buildkite/misc/embedding.yml index 5cf6b985573f5..31f85633479a4 100644 --- a/.buildkite/embedding.yml +++ b/.buildkite/misc/embedding.yml @@ -14,8 +14,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz - rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz + rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" uid: 1000 gid: 1000 workspaces: diff --git a/.buildkite/llvm_passes.yml b/.buildkite/misc/llvmpasses.yml similarity index 88% rename from .buildkite/llvm_passes.yml rename to .buildkite/misc/llvmpasses.yml index 7453af82c1e73..7660b3978e967 100644 --- a/.buildkite/llvm_passes.yml +++ b/.buildkite/misc/llvmpasses.yml @@ -14,8 +14,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz - rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/llvm_passes.x86_64.tar.gz + rootfs_treehash: "9dd715500b117a16fcfa419ea0bca0c0ca902cee" workspaces: # Include `/cache/repos` so that our `git` version introspection works. - "/cache/repos:/cache/repos" @@ -36,8 +36,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz - rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz + rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" uid: 1000 gid: 1000 workspaces: diff --git a/.buildkite/whitespace.yml b/.buildkite/misc/whitespace.yml similarity index 87% rename from .buildkite/whitespace.yml rename to .buildkite/misc/whitespace.yml index bd625e855c5b5..01b4c79e7822b 100644 --- a/.buildkite/whitespace.yml +++ b/.buildkite/misc/whitespace.yml @@ -14,8 +14,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz - rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz + rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" workspaces: - "/cache/repos:/cache/repos" commands: | diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 097b8976eea70..3a3ebc718cbaa 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -4,9 +4,9 @@ # # Yes, this is creating another layer of indirection; the flow now looks like: # -# [webui] -> pipeline.yml -> llvm_passes.yml +# [webui] -> pipeline.yml -> misc/whitespace.yml # -# when we could theoretically just have the `webui` launch `llvm_passes.yml`, +# when we could theoretically just have the `webui` launch `misc/whitespace.yml`, # however this raises the bar for contributors to add new (unsigned) steps to # our CI configuration, so I'd rather live with an extra layer of indirection # and only need to touch the webui configuration when we need to alter @@ -14,10 +14,15 @@ steps: - label: ":buildkite: Launch unsigned pipelines" commands: | - # We launch whitespace first, because we want that pipeline to finish as quickly as possible. - # The remaining unsigned pipelines are launched in alphabetical order. - buildkite-agent pipeline upload .buildkite/whitespace.yml - buildkite-agent pipeline upload .buildkite/embedding.yml - buildkite-agent pipeline upload .buildkite/llvm_passes.yml + # First, we launch whitespace, because we want that pipeline to finish as quickly as possible. + buildkite-agent pipeline upload .buildkite/misc/whitespace.yml + + # Next, we launch the miscellaneous pipelines in alphabetical order. + buildkite-agent pipeline upload .buildkite/misc/doctest.yml + buildkite-agent pipeline upload .buildkite/misc/embedding.yml + buildkite-agent pipeline upload .buildkite/misc/llvmpasses.yml + + # Finally, we launch the platform pipelines in alphabetical order. + buildkite-agent pipeline upload .buildkite/platforms/linux64.yml agents: queue: julia diff --git a/.buildkite/platforms/linux64.yml b/.buildkite/platforms/linux64.yml new file mode 100644 index 0000000000000..69befe1064df7 --- /dev/null +++ b/.buildkite/platforms/linux64.yml @@ -0,0 +1,80 @@ +# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones +# since we need nestable sandboxing. The rootfs images being used here are built from +# the `.buildkite/rootfs_images/llvm-passes.jl` file. +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: + version: 1.6 + - staticfloat/sandbox#v1: + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz + rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + uid: 1000 + gid: 1000 + workspaces: + # Include `/cache/repos` so that our `git` version introspection works. + - "/cache/repos:/cache/repos" + commands: | + echo "--- Build Julia from source" + make -j 6 + make release + make install + + echo "--- Print Julia version info" + ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' + + echo "--- Compress build artifacts" + mv julia-* julia-artifact + rm -rf julia-linux64.tar.gz + tar czf julia-linux64.tar.gz julia-artifact/ + + echo "--- Upload build artifacts" + buildkite-agent artifact upload julia-linux64.tar.gz + timeout_in_minutes: 60 + notify: + - github_commit_status: + context: "package_linux64" + + # - 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.0/package_linux.x86_64.tar.gz + # rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + # 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/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/rr_capture.jl b/.buildkite/rr_capture.jl new file mode 100644 index 0000000000000..07d57f31ff29c --- /dev/null +++ b/.buildkite/rr_capture.jl @@ -0,0 +1,134 @@ +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...]")) +end + +const TIMEOUT = 2 * 60 * 60 # timeout in seconds + +# 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 + +@info "" run_id shortcommit builder use_rr +@info "" ARGS + +# 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) +end + +@info "We will run the tests under rr" + +const num_cores = min(Sys.CPU_THREADS, 8, parse(Int, get(ENV, "JULIA_TEST_NUM_CORES", "8")) + 1) +@info "" num_cores + +proc = nothing + +new_env = copy(ENV) +mktempdir() do dir + Pkg.activate(dir) + Pkg.add("rr_jll") + Pkg.add("Zstd_jll") + + rr_jll = Base.require(Base.PkgId(Base.UUID((0xe86bdf43_55f7_5ea2_9fd0_e7daa2c0f2b4)), "rr_jll")) + zstd_jll = Base.require(Base.PkgId(Base.UUID((0x3161d3a3_bdf6_5164_811a_617609db77b4)), "Zstd_jll")) + rr(func) = Base.invokelatest(rr_jll.rr, func; adjust_LIBPATH=false) + rr() do rr_path + capture_script_path = joinpath(dir, "capture_output.sh") + loader = Sys.WORD_SIZE == 64 ? "/lib64/ld-linux-x86-64.so.2" : "/lib/ld-linux.so.2" + open(capture_script_path, "w") do io + write(io, """ + #!/bin/bash + + $(rr_path) record --nested=detach "\$@" > >(tee -a $(dir)/stdout.log) 2> >(tee -a $(dir)/stderr.log >&2) + """) + end + chmod(capture_script_path, 0o755) + + new_env = copy(ENV) + new_env["_RR_TRACE_DIR"] = joinpath(dir, "rr_traces") + new_env["RR_LOG"]="all:debug" + new_env["RR_LOG_BUFFER"]="100000" + new_env["JULIA_RR"] = capture_script_path + t_start = time() + global proc = run(setenv(`$(rr_path) record --num-cores=$(num_cores) $ARGS`, new_env), (stdin, stdout, stderr); wait=false) + + # Start asynchronous timer that will kill `rr` + @async begin + sleep(TIMEOUT) + + # 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!") + kill(proc, Base.SIGTERM) + + # Give `rr` a chance to cleanup + sleep(60) + + if isopen(proc) + println(stderr, "\n\n`rr` failed to cleanup within one minute, killing and exiting immediately!") + kill(proc, Base.SIGKILL) + exit(1) + end + end + end + + # Wait for `rr` to finish, either through naturally finishing its run, or `SIGTERM`. + # If we have to `SIGKILL` + wait(proc) + + # On a non-zero exit code, upload the `rr` trace + if !success(proc) + println(stderr, "`rr` returned $(proc.exitcode), packing and uploading traces...") + + if !isdir(joinpath(dir, "rr_traces")) + println(stderr, "No `rr_traces` directory! Did `rr` itself fail?") + exit(1) + end + + # Clean up non-traces + rm(joinpath(dir, "rr_traces", "latest-trace")) + rm(joinpath(dir, "rr_traces", "cpu_lock")) + + # Create a directory for the pack files to go + pack_dir = joinpath(dir, "pack") + mkdir(pack_dir) + + # Pack all traces + trace_dirs = [joinpath(dir, "rr_traces", f) for f in readdir(joinpath(dir, "rr_traces"))] + filter!(isdir, trace_dirs) + 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" + zstd_jll.zstdmt() do zstdp + tarproc = open(`$zstdp -o $dst_path`, "w") + Tar.create(dir, tarproc) + close(tarproc.in) + 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 From 6806bf2d80e9e1fd90f25478fa84a9c76091ec65 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 25 Jul 2021 05:16:24 -0400 Subject: [PATCH 123/146] CI (Buildkite): Update all rootfs images to version v3.1, add some documentation, and reorganize/rename/move a bunch of configuration files (#41698) (cherry picked from commit e6e79f7ab4549ab4d6ffbad22038ebfce1368f93) --- .buildkite/README.md | 5 ++ .buildkite/coverage-linux64/0_webui.yml | 16 ------ .buildkite/coverage-linux64/README.md | 6 --- .buildkite/coverage-linux64/pipeline.yml | 53 ------------------- .../coverage-linux64/run_tests_parallel.jl | 36 ------------- .../coverage-linux64/run_tests_serial.jl | 16 ------ .buildkite/experimental/pipeline.yml | 19 ------- .buildkite/pipeline.yml | 28 ---------- .../{ => pipelines}/experimental/0_webui.yml | 8 ++- .buildkite/pipelines/experimental/README.md | 7 +++ .../experimental/launch_unsigned_builders.yml | 6 +++ .../experimental/misc}/sanitizers.yml | 13 ++--- .buildkite/{ => pipelines/main}/0_webui.yml | 4 +- .buildkite/pipelines/main/README.md | 15 ++++++ .../main/launch_unsigned_builders.yml | 29 ++++++++++ .../{ => pipelines/main}/misc/doctest.yml | 9 ++-- .../{ => pipelines/main}/misc/embedding.yml | 7 +-- .../{ => pipelines/main}/misc/llvmpasses.yml | 7 +-- .../main/misc}/signed_pipeline_test.yml | 0 .../{ => pipelines/main}/misc/whitespace.yml | 7 +-- .../main}/platforms/linux64.yml | 14 +++-- .buildkite/pipelines/scheduled/0_webui.yml | 24 +++++++++ .buildkite/pipelines/scheduled/README.md | 5 ++ .../scheduled/coverage/coverage_linux64.yml | 40 ++++++++++++++ .../scheduled/coverage/run_tests_parallel.jl | 25 +++++++++ .../scheduled/coverage}/upload_coverage.jl | 0 .../scheduled/launch_unsigned_builders.yml | 0 .buildkite/{ => utilities/rr}/rr_capture.jl | 0 28 files changed, 185 insertions(+), 214 deletions(-) create mode 100644 .buildkite/README.md delete mode 100644 .buildkite/coverage-linux64/0_webui.yml delete mode 100644 .buildkite/coverage-linux64/README.md delete mode 100644 .buildkite/coverage-linux64/pipeline.yml delete mode 100644 .buildkite/coverage-linux64/run_tests_parallel.jl delete mode 100644 .buildkite/coverage-linux64/run_tests_serial.jl delete mode 100644 .buildkite/experimental/pipeline.yml delete mode 100644 .buildkite/pipeline.yml rename .buildkite/{ => pipelines}/experimental/0_webui.yml (67%) create mode 100644 .buildkite/pipelines/experimental/README.md create mode 100644 .buildkite/pipelines/experimental/launch_unsigned_builders.yml rename .buildkite/{experimental => pipelines/experimental/misc}/sanitizers.yml (67%) rename .buildkite/{ => pipelines/main}/0_webui.yml (89%) create mode 100644 .buildkite/pipelines/main/README.md create mode 100644 .buildkite/pipelines/main/launch_unsigned_builders.yml rename .buildkite/{ => pipelines/main}/misc/doctest.yml (71%) rename .buildkite/{ => pipelines/main}/misc/embedding.yml (76%) rename .buildkite/{ => pipelines/main}/misc/llvmpasses.yml (83%) rename .buildkite/{ => pipelines/main/misc}/signed_pipeline_test.yml (100%) rename .buildkite/{ => pipelines/main}/misc/whitespace.yml (63%) rename .buildkite/{ => pipelines/main}/platforms/linux64.yml (79%) create mode 100644 .buildkite/pipelines/scheduled/0_webui.yml create mode 100644 .buildkite/pipelines/scheduled/README.md create mode 100644 .buildkite/pipelines/scheduled/coverage/coverage_linux64.yml create mode 100644 .buildkite/pipelines/scheduled/coverage/run_tests_parallel.jl rename .buildkite/{coverage-linux64 => pipelines/scheduled/coverage}/upload_coverage.jl (100%) create mode 100644 .buildkite/pipelines/scheduled/launch_unsigned_builders.yml rename .buildkite/{ => utilities/rr}/rr_capture.jl (100%) diff --git a/.buildkite/README.md b/.buildkite/README.md new file mode 100644 index 0000000000000..12887536b90c1 --- /dev/null +++ b/.buildkite/README.md @@ -0,0 +1,5 @@ +# Buildkite + +This directory contains the Buildkite configuration files for Base Julia CI. + +The rootfs image definitions are located in the [rootfs-images](https://github.com/JuliaCI/rootfs-images) repository. diff --git a/.buildkite/coverage-linux64/0_webui.yml b/.buildkite/coverage-linux64/0_webui.yml deleted file mode 100644 index b0df8ec41de68..0000000000000 --- a/.buildkite/coverage-linux64/0_webui.yml +++ /dev/null @@ -1,16 +0,0 @@ -# This file represents what is put into the webUI. -# It is purely for keeping track of the changes we make to the webUI configuration; modifying this file has no effect. -# We use the `cryptic` buildkite plugin to provide secrets management, which requires some integration into the WebUI's steps. -agents: - queue: "julia" - sandbox.jl: "true" - -steps: - - label: ":unlock: Unlock secrets, launch pipelines" - plugins: - - staticfloat/cryptic: - # 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/coverage-linux64/pipeline.yml - signature: U2FsdGVkX190BiaBGCTT6GNBDe5cHX3ZAP0IXbBfOWo7ys+1IuD5ymf4ImJbRIeE8NQac+iqud+bqCPHjii6DKmqzX+Jz6vax1NY3AxROhYlO5spUClvKr1wdngUCQON diff --git a/.buildkite/coverage-linux64/README.md b/.buildkite/coverage-linux64/README.md deleted file mode 100644 index 8cfb31d698225..0000000000000 --- a/.buildkite/coverage-linux64/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Coverage pipeline - -We run coverage on a separate pipeline, that uses a scheduled build rather than webhooks. -The pipeline is here: https://buildkite.com/julialang/julia-coverage-linux64 - -It contains [its own webui steps](0_webuiy.ml) (listed here in this repository for clarity) and its own [pipeline.yml](pipeline.yml). diff --git a/.buildkite/coverage-linux64/pipeline.yml b/.buildkite/coverage-linux64/pipeline.yml deleted file mode 100644 index 218212d24ac2a..0000000000000 --- a/.buildkite/coverage-linux64/pipeline.yml +++ /dev/null @@ -1,53 +0,0 @@ -# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones -# since we need nestable sandboxing. The rootfs images being used here are built from -# the `.buildkite/rootfs_images/llvm-passes.jl` file. -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: ":unlock: :coverage: Run coverage test" - plugins: - - staticfloat/cryptic: - variables: - - CODECOV_TOKEN="U2FsdGVkX19l0fhdBabbuiEdysyEabkJLRHfxm7CNRkuGbnwPV365sxxC7Czs/CVcws0N1oB4pVwALRRMe36oA==" - - COVERALLS_TOKEN="U2FsdGVkX19zopI0hMNzzi2UUOvNVFD8Y0iisFnO/ryVxU7Tit8ZEaeN+gxodRx4CosUUh192F1+q3dTMWRIvw==" - - JuliaCI/julia#v1: - version: 1.6 - - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz - rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8" - uid: 1000 - gid: 1000 - commands: | - echo "--- Build Julia from source" - make -j 6 - - echo "--- Print Julia version info" - ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' - ./julia -e '@info "" Sys.CPU_THREADS' - # this is necessary to make sure that the LibGit2 tests passes - git config --global init.defaultBranch master - - echo "--- Run some Julia tests in serial" - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/codegen.jl - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/contextual.jl - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/inference.jl - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/inline.jl - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/interpreter_exec.jl - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/irpasses.jl - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/ssair.jl - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_serial.jl test/compiler/validation.jl - - echo "--- Run Julia tests in parallel with code coverage enabled" - ./julia --code-coverage=all --sysimage-native-code=no .buildkite/coverage-linux64/run_tests_parallel.jl - - echo "--- Process and upload coverage information" - ./julia .buildkite/coverage-linux64/upload_coverage.jl - timeout_in_minutes: 600 # 600 minutes = 10 hours - -# 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/coverage-linux64/run_tests_parallel.jl b/.buildkite/coverage-linux64/run_tests_parallel.jl deleted file mode 100644 index 5386828aa4e14..0000000000000 --- a/.buildkite/coverage-linux64/run_tests_parallel.jl +++ /dev/null @@ -1,36 +0,0 @@ -# When running this file, make sure to set the `--code-coverage=all` command-line flag. - -# Important note: even if one or more tests fail, we will still exit with status code 0. - -# The reason for this is that we always want to upload code coverage, even if some of the -# tests fail. Therefore, even if the `coverage-linux64` pipeline passes, you should not -# assume that all of the tests passed. If you want to know if all of the tests are passing, -# please look at the status of the `tester_linux64` pipeline. - -const include_tests = String[] - -const exclude_tests = String[] - -empty!(Base.DEPOT_PATH) -push!(Base.DEPOT_PATH, mktempdir(; cleanup = true)) - -module ChooseTests - include(joinpath(dirname(dirname(@__DIR__)), "test", "choosetests.jl")) -end - -const tests = ChooseTests.choosetests() |> - first |> - x -> setdiff(x, exclude_tests) |> - x -> vcat(x, include_tests) |> - unique |> - sort - -const ncores = min(Sys.CPU_THREADS, Threads.nthreads()) - -@info "" ncores Sys.CPU_THREADS Threads.nthreads() - -try - Base.runtests(tests; ncores) -catch ex - @error "" exception=(ex, catch_backtrace()) -end diff --git a/.buildkite/coverage-linux64/run_tests_serial.jl b/.buildkite/coverage-linux64/run_tests_serial.jl deleted file mode 100644 index 6d7380a55e402..0000000000000 --- a/.buildkite/coverage-linux64/run_tests_serial.jl +++ /dev/null @@ -1,16 +0,0 @@ -using Test - -const repository_root = dirname(dirname(@__DIR__)) - -for filename in ARGS - path = joinpath(repository_root, filename) - @info "Starting $(filename)" - try - @testset "$(filename)" begin - include(path) - end - catch ex - @error "" exception=(ex, catch_backtrace()) - end - @info "Finished $(filename)" -end diff --git a/.buildkite/experimental/pipeline.yml b/.buildkite/experimental/pipeline.yml deleted file mode 100644 index 6f86f7ef243e5..0000000000000 --- a/.buildkite/experimental/pipeline.yml +++ /dev/null @@ -1,19 +0,0 @@ -# This file launches all the build jobs that _don't_ require secrets access. -# These jobs can pass their output off to jobs that do require secrets access, -# but those privileged steps require signing before they can be run. -# -# Yes, this is creating another layer of indirection; the flow now looks like: -# -# [webui] -> pipeline.yml -> llvm_passes.yml -# -# when we could theoretically just have the `webui` launch `llvm_passes.yml`, -# however this raises the bar for contributors to add new (unsigned) steps to -# our CI configuration, so I'd rather live with an extra layer of indirection -# and only need to touch the webui configuration when we need to alter -# something about the privileged steps. -steps: - - label: ":buildkite: Launch unsigned pipelines" - commands: | - buildkite-agent pipeline upload .buildkite/experimental/sanitizers.yml - agents: - queue: julia diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index 3a3ebc718cbaa..0000000000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This file launches all the build jobs that _don't_ require secrets access. -# These jobs can pass their output off to jobs that do require secrets access, -# but those privileged steps require signing before they can be run. -# -# Yes, this is creating another layer of indirection; the flow now looks like: -# -# [webui] -> pipeline.yml -> misc/whitespace.yml -# -# when we could theoretically just have the `webui` launch `misc/whitespace.yml`, -# however this raises the bar for contributors to add new (unsigned) steps to -# our CI configuration, so I'd rather live with an extra layer of indirection -# and only need to touch the webui configuration when we need to alter -# something about the privileged steps. -steps: - - label: ":buildkite: Launch unsigned pipelines" - commands: | - # First, we launch whitespace, because we want that pipeline to finish as quickly as possible. - buildkite-agent pipeline upload .buildkite/misc/whitespace.yml - - # Next, we launch the miscellaneous pipelines in alphabetical order. - buildkite-agent pipeline upload .buildkite/misc/doctest.yml - buildkite-agent pipeline upload .buildkite/misc/embedding.yml - buildkite-agent pipeline upload .buildkite/misc/llvmpasses.yml - - # Finally, we launch the platform pipelines in alphabetical order. - buildkite-agent pipeline upload .buildkite/platforms/linux64.yml - agents: - queue: julia diff --git a/.buildkite/experimental/0_webui.yml b/.buildkite/pipelines/experimental/0_webui.yml similarity index 67% rename from .buildkite/experimental/0_webui.yml rename to .buildkite/pipelines/experimental/0_webui.yml index ab3f68db4c393..54dbbc59d4256 100644 --- a/.buildkite/experimental/0_webui.yml +++ b/.buildkite/pipelines/experimental/0_webui.yml @@ -15,4 +15,10 @@ steps: # but some of our signed pipelines can wait upon the completion of these unsigned # pipelines. unsigned_pipelines: - - .buildkite/experimental/pipeline.yml + - .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" diff --git a/.buildkite/pipelines/experimental/README.md b/.buildkite/pipelines/experimental/README.md new file mode 100644 index 0000000000000..f92aac7a1af02 --- /dev/null +++ b/.buildkite/pipelines/experimental/README.md @@ -0,0 +1,7 @@ +## Experimental pipeline (`master` branch only) + +This is the [`julia-master->experimental`](https://buildkite.com/julialang/julia-master-experimental) pipeline. + +We use this pipeline for builders that are not yet stable enough to go into the main pipeline. + +These builders are triggered by GitHub webhook events, such as pushes and pull requests. diff --git a/.buildkite/pipelines/experimental/launch_unsigned_builders.yml b/.buildkite/pipelines/experimental/launch_unsigned_builders.yml new file mode 100644 index 0000000000000..f023e19a5c940 --- /dev/null +++ b/.buildkite/pipelines/experimental/launch_unsigned_builders.yml @@ -0,0 +1,6 @@ +steps: + - label: ":buildkite: Launch unsigned pipelines" + commands: | + buildkite-agent pipeline upload .buildkite/pipelines/experimental/misc/sanitizers.yml + agents: + queue: julia diff --git a/.buildkite/experimental/sanitizers.yml b/.buildkite/pipelines/experimental/misc/sanitizers.yml similarity index 67% rename from .buildkite/experimental/sanitizers.yml rename to .buildkite/pipelines/experimental/misc/sanitizers.yml index 534dac81e53f3..67c0b547d4b20 100644 --- a/.buildkite/experimental/sanitizers.yml +++ b/.buildkite/pipelines/experimental/misc/sanitizers.yml @@ -1,6 +1,3 @@ -# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones -# since we need nestable sandboxing. The rootfs images being used here are built from -# the `.buildkite/rootfs_images/llvm-passes.jl` file. agents: queue: "julia" # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing @@ -14,8 +11,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v2.0/llvm_passes.tar.gz - rootfs_treehash: "0b5a80c1d0ab110a57fbdb7f4bc042a5ede310f3" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/llvm_passes.x86_64.tar.gz + rootfs_treehash: "9dd715500b117a16fcfa419ea0bca0c0ca902cee" uid: 1000 gid: 1000 workspaces: @@ -29,6 +26,6 @@ steps: echo "--- Test that ASAN is enabled" contrib/asan/check.jl ./tmp/test-asan/asan/usr/bin/julia-debug timeout_in_minutes: 120 - # notify: - # - github_commit_status: - # context: "asan" + # notify: # TODO: uncomment this line + # - github_commit_status: # TODO: uncomment this line + # context: "asan" # TODO: uncomment this line diff --git a/.buildkite/0_webui.yml b/.buildkite/pipelines/main/0_webui.yml similarity index 89% rename from .buildkite/0_webui.yml rename to .buildkite/pipelines/main/0_webui.yml index 440d2d443ce7e..96dc81cef36fe 100644 --- a/.buildkite/0_webui.yml +++ b/.buildkite/pipelines/main/0_webui.yml @@ -15,10 +15,10 @@ steps: # but some of our signed pipelines can wait upon the completion of these unsigned # pipelines. unsigned_pipelines: - - .buildkite/pipeline.yml + - .buildkite/pipelines/main/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/signed_pipeline_test.yml + - pipeline: .buildkite/pipelines/main/misc/signed_pipeline_test.yml signature: "U2FsdGVkX18ZrMlORSIi0TvW99eZ3JyUEhntMyXjrOSJ9jAtUohgHc8+dMnWUc6qWjYt8k63wfPrth33SGWDiF814Bm1W5Zk3+R6HgVu6UCrQEI5sLm+SJPbrvET+Jkn" diff --git a/.buildkite/pipelines/main/README.md b/.buildkite/pipelines/main/README.md new file mode 100644 index 0000000000000..6b9d67bd7cc3a --- /dev/null +++ b/.buildkite/pipelines/main/README.md @@ -0,0 +1,15 @@ +## Main pipeline + +This is the main pipeline. It contains most of the builders. These builders are triggered by GitHub webhook events, such as pushes and pull requests. + +We have a different main pipeline for each permanent branch. + +For example: + +| Permanent Branch | Pipeline | +| ---------------- | -------------------------------------------------------------------------------- | +| `master` | [`julia-master`](https://buildkite.com/julialang/julia-master) | +| `release-1.6` | [`julia-release-1.6`](https://buildkite.com/julialang/julia-release-1-dot-6) | +| `release-1.7` | [`julia-release-1.7`](https://buildkite.com/julialang/julia-release-1-dot-7) | + +(This is not a complete list.) diff --git a/.buildkite/pipelines/main/launch_unsigned_builders.yml b/.buildkite/pipelines/main/launch_unsigned_builders.yml new file mode 100644 index 0000000000000..6e9f0f0d8fa23 --- /dev/null +++ b/.buildkite/pipelines/main/launch_unsigned_builders.yml @@ -0,0 +1,29 @@ +# This file launches all the build jobs that _don't_ require secrets access. +# These jobs can pass their output off to jobs that do require secrets access, +# but those privileged steps require signing before they can be run. +# +# Yes, this is creating another layer of indirection; the flow now looks like: +# +# [webui] -> launch_unsigned_builders.yml -> misc/whitespace.yml +# +# when we could theoretically just have the `webui` launch `misc/whitespace.yml`, +# however this raises the bar for contributors to add new (unsigned) steps to +# our CI configuration, so I'd rather live with an extra layer of indirection +# and only need to touch the webui configuration when we need to alter +# something about the privileged steps. + +steps: + - label: ":buildkite: Launch unsigned builders" + commands: | + # First, we launch the `whitespace` builder, 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. + 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 + agents: + queue: julia diff --git a/.buildkite/misc/doctest.yml b/.buildkite/pipelines/main/misc/doctest.yml similarity index 71% rename from .buildkite/misc/doctest.yml rename to .buildkite/pipelines/main/misc/doctest.yml index 234e49f5dcf53..0a5dc29bcb1c7 100644 --- a/.buildkite/misc/doctest.yml +++ b/.buildkite/pipelines/main/misc/doctest.yml @@ -1,6 +1,3 @@ -# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones -# since we need nestable sandboxing. The rootfs images being used here are built from -# the `.buildkite/rootfs_images/llvm-passes.jl` file. agents: queue: "julia" # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing @@ -14,8 +11,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz - rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + 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: @@ -33,7 +30,7 @@ steps: echo "--- Run Julia doctests" JULIA_NUM_THREADS=1 make -C doc doctest=true - timeout_in_minutes: 120 + timeout_in_minutes: 45 notify: - github_commit_status: context: "doctest" diff --git a/.buildkite/misc/embedding.yml b/.buildkite/pipelines/main/misc/embedding.yml similarity index 76% rename from .buildkite/misc/embedding.yml rename to .buildkite/pipelines/main/misc/embedding.yml index 31f85633479a4..087ca0f68eb3d 100644 --- a/.buildkite/misc/embedding.yml +++ b/.buildkite/pipelines/main/misc/embedding.yml @@ -1,6 +1,3 @@ -# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones -# since we need nestable sandboxing. The rootfs images being used here are built from -# the `.buildkite/rootfs_images/llvm-passes.jl` file. agents: queue: "julia" # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing @@ -14,8 +11,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz - rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + 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: diff --git a/.buildkite/misc/llvmpasses.yml b/.buildkite/pipelines/main/misc/llvmpasses.yml similarity index 83% rename from .buildkite/misc/llvmpasses.yml rename to .buildkite/pipelines/main/misc/llvmpasses.yml index 7660b3978e967..eed2f957855bb 100644 --- a/.buildkite/misc/llvmpasses.yml +++ b/.buildkite/pipelines/main/misc/llvmpasses.yml @@ -1,6 +1,3 @@ -# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones -# since we need nestable sandboxing. The rootfs images being used here are built from -# the `.buildkite/rootfs_images/llvm-passes.jl` file. agents: queue: "julia" # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing @@ -36,8 +33,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz - rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + 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: diff --git a/.buildkite/signed_pipeline_test.yml b/.buildkite/pipelines/main/misc/signed_pipeline_test.yml similarity index 100% rename from .buildkite/signed_pipeline_test.yml rename to .buildkite/pipelines/main/misc/signed_pipeline_test.yml diff --git a/.buildkite/misc/whitespace.yml b/.buildkite/pipelines/main/misc/whitespace.yml similarity index 63% rename from .buildkite/misc/whitespace.yml rename to .buildkite/pipelines/main/misc/whitespace.yml index 01b4c79e7822b..3f9bf13421d8e 100644 --- a/.buildkite/misc/whitespace.yml +++ b/.buildkite/pipelines/main/misc/whitespace.yml @@ -1,6 +1,3 @@ -# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones -# since we need nestable sandboxing. The rootfs images being used here are built from -# the `.buildkite/rootfs_images/llvm-passes.jl` file. agents: queue: "julia" # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing @@ -14,8 +11,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz - rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz + rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e" workspaces: - "/cache/repos:/cache/repos" commands: | diff --git a/.buildkite/platforms/linux64.yml b/.buildkite/pipelines/main/platforms/linux64.yml similarity index 79% rename from .buildkite/platforms/linux64.yml rename to .buildkite/pipelines/main/platforms/linux64.yml index 69befe1064df7..7780c574951e8 100644 --- a/.buildkite/platforms/linux64.yml +++ b/.buildkite/pipelines/main/platforms/linux64.yml @@ -1,6 +1,3 @@ -# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones -# since we need nestable sandboxing. The rootfs images being used here are built from -# the `.buildkite/rootfs_images/llvm-passes.jl` file. agents: queue: "julia" # Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing @@ -14,8 +11,8 @@ steps: - JuliaCI/julia#v1: version: 1.6 - staticfloat/sandbox#v1: - rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.0/package_linux.x86_64.tar.gz - rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + 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: @@ -42,6 +39,7 @@ steps: - 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 @@ -50,8 +48,8 @@ steps: # 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.0/package_linux.x86_64.tar.gz - # rootfs_treehash: "d5722d586b93eb307bb6340d275afdbf7578a756" + # 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: @@ -73,7 +71,7 @@ steps: # # echo "--- Run the Julia test suite" # unset JULIA_DEPOT_PATH - # julia-artifact/bin/julia .buildkite/rr_capture.jl julia-artifact/bin/julia -e 'Base.runtests(["all"]; ncores = Sys.CPU_THREADS)' + # 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: diff --git a/.buildkite/pipelines/scheduled/0_webui.yml b/.buildkite/pipelines/scheduled/0_webui.yml new file mode 100644 index 0000000000000..8aaf812376b5c --- /dev/null +++ b/.buildkite/pipelines/scheduled/0_webui.yml @@ -0,0 +1,24 @@ +# This file represents what is put into the webUI. +# It is purely for keeping track of the changes we make to the webUI configuration; modifying this file has no effect. +# We use the `cryptic` buildkite plugin to provide secrets management, which requires some integration into the WebUI's steps. +agents: + queue: "julia" + sandbox.jl: "true" + +steps: + - label: ":unlock: Unlock secrets, launch pipelines" + plugins: + - staticfloat/cryptic: + # Our list of pipelines that should be launched (but don't require a signature) + # These pipelines can be modified by any contributor and CI will still run. + # 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 + + # 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/scheduled/coverage/coverage_linux64.yml + signature: "U2FsdGVkX1+lpFo/nKzx3c6xCZPKYTAuunXpOsZG4+s4+iU5LfEpMvtNvpKQjDugRoxQxCItMqB6vr4KZN3KtKhjkLbr8ExAyaPil/N/uFhrLlpwNem9dxHbPrU2l7qo" diff --git a/.buildkite/pipelines/scheduled/README.md b/.buildkite/pipelines/scheduled/README.md new file mode 100644 index 0000000000000..ca071dceb2a44 --- /dev/null +++ b/.buildkite/pipelines/scheduled/README.md @@ -0,0 +1,5 @@ +## Scheduled pipeline (`master` branch only) + +This is the [`julia-master->scheduled`](https://buildkite.com/julialang/julia-master-scheduled) pipeline. + +We use this pipeline for scheduled builds. The builders in this pipeline run on a schedule once per day. They are not triggered by GitHub webhooks. diff --git a/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml new file mode 100644 index 0000000000000..ce7a3aca4227d --- /dev/null +++ b/.buildkite/pipelines/scheduled/coverage/coverage_linux64.yml @@ -0,0 +1,40 @@ +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: ":unlock: :coverage: Run coverage test" + plugins: + - staticfloat/cryptic: + variables: + - CODECOV_TOKEN="U2FsdGVkX19l0fhdBabbuiEdysyEabkJLRHfxm7CNRkuGbnwPV365sxxC7Czs/CVcws0N1oB4pVwALRRMe36oA==" + - COVERALLS_TOKEN="U2FsdGVkX19zopI0hMNzzi2UUOvNVFD8Y0iisFnO/ryVxU7Tit8ZEaeN+gxodRx4CosUUh192F1+q3dTMWRIvw==" + - JuliaCI/julia#v1: + 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 + commands: | + echo "--- Build Julia from source" + make -j 6 + + echo "--- Print Julia version info" + ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' + ./julia -e '@info "" Sys.CPU_THREADS' + # this is necessary to make sure that the LibGit2 tests passes + git config --global init.defaultBranch master + + echo "--- Run Julia tests in parallel with code coverage enabled" + ./julia --code-coverage=all --sysimage-native-code=no .buildkite/pipelines/scheduled/coverage/run_tests_parallel.jl + + echo "--- Process and upload coverage information" + ./julia .buildkite/pipelines/scheduled/coverage/upload_coverage.jl + timeout_in_minutes: 240 # 240 minutes = 4 hours + +# 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/scheduled/coverage/run_tests_parallel.jl b/.buildkite/pipelines/scheduled/coverage/run_tests_parallel.jl new file mode 100644 index 0000000000000..6da608b5e8be9 --- /dev/null +++ b/.buildkite/pipelines/scheduled/coverage/run_tests_parallel.jl @@ -0,0 +1,25 @@ +# Important note: even if one or more tests fail, we will still exit with status code 0. + +# The reason for this is that we always want to upload code coverage, even if some of the +# tests fail. Therefore, even if the `coverage_linux64` builder passes, you should not +# assume that all of the tests passed. If you want to know if all of the tests are passing, +# please look at the status of the `tester_*` builders (e.g. `tester_linux64`). + +# When running this file, make sure to set all of the following command-line flags: +# 1. `--code-coverage=all` +# 2. `--sysimage-native-code=no` + +empty!(Base.DEPOT_PATH) +push!(Base.DEPOT_PATH, mktempdir(; cleanup = true)) + +const tests = "all" +const ncores = Sys.CPU_THREADS + +@info "" Sys.CPU_THREADS +@info "" tests ncores + +try + Base.runtests(tests; ncores) +catch ex + @error "" exception=(ex, catch_backtrace()) +end diff --git a/.buildkite/coverage-linux64/upload_coverage.jl b/.buildkite/pipelines/scheduled/coverage/upload_coverage.jl similarity index 100% rename from .buildkite/coverage-linux64/upload_coverage.jl rename to .buildkite/pipelines/scheduled/coverage/upload_coverage.jl diff --git a/.buildkite/pipelines/scheduled/launch_unsigned_builders.yml b/.buildkite/pipelines/scheduled/launch_unsigned_builders.yml new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/.buildkite/rr_capture.jl b/.buildkite/utilities/rr/rr_capture.jl similarity index 100% rename from .buildkite/rr_capture.jl rename to .buildkite/utilities/rr/rr_capture.jl From ac3d472c2994c903cf0d480677400a47538af609 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 25 Jul 2021 21:42:39 -0400 Subject: [PATCH 124/146] CI (Buildkite): include the short commit hash in the artifact filename (#41700) (cherry picked from commit 343c2b19bc83dfa58cbb701babba4a0721e18903) --- .../pipelines/main/platforms/linux64.yml | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.buildkite/pipelines/main/platforms/linux64.yml b/.buildkite/pipelines/main/platforms/linux64.yml index 7780c574951e8..1e88db1144b4c 100644 --- a/.buildkite/pipelines/main/platforms/linux64.yml +++ b/.buildkite/pipelines/main/platforms/linux64.yml @@ -19,6 +19,17 @@ steps: # 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 @@ -28,12 +39,13 @@ steps: ./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()' echo "--- Compress build artifacts" - mv julia-* julia-artifact - rm -rf julia-linux64.tar.gz - tar czf julia-linux64.tar.gz julia-artifact/ + 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 julia-linux64.tar.gz + buildkite-agent artifact upload $$ARTIFACT_FILENAME timeout_in_minutes: 60 notify: - github_commit_status: From 2b7080844ec98e2d0adf2f7654348fdf66d8485f Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 25 Jul 2021 22:20:55 -0400 Subject: [PATCH 125/146] CI (Buildkite): for the signed pipeline test, use `signature_file` instead of `signature` (#41706) * CI (Buildkite): for the signed pipeline test, use `signature_file` instead of `signature` * Base64-decode the signature before writing it to the signature file (cherry picked from commit f7f46af8ff39a1b4c7000651c680058e9c0639f5) --- .buildkite/pipelines/main/0_webui.yml | 2 +- .../pipelines/main/misc/signed_pipeline_test.yml.signature | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature diff --git a/.buildkite/pipelines/main/0_webui.yml b/.buildkite/pipelines/main/0_webui.yml index 96dc81cef36fe..8e7b9c58ea423 100644 --- a/.buildkite/pipelines/main/0_webui.yml +++ b/.buildkite/pipelines/main/0_webui.yml @@ -21,4 +21,4 @@ steps: # verifies the treehash of the pipeline itself and the inputs listed in `inputs` signed_pipelines: - pipeline: .buildkite/pipelines/main/misc/signed_pipeline_test.yml - signature: "U2FsdGVkX18ZrMlORSIi0TvW99eZ3JyUEhntMyXjrOSJ9jAtUohgHc8+dMnWUc6qWjYt8k63wfPrth33SGWDiF814Bm1W5Zk3+R6HgVu6UCrQEI5sLm+SJPbrvET+Jkn" + signature_file: .buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature diff --git a/.buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature b/.buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature new file mode 100644 index 0000000000000..10220c758086a --- /dev/null +++ b/.buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature @@ -0,0 +1 @@ +Salted__��NE""�;��יܜ��3%���0-R�`�>t��QΪZ6-�N�����He��_5��[�d��zn�@�@B9���H�ۮ���' \ No newline at end of file From 80b456d7e9814701e2bd65ca51229509f6df6e03 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 18 Jul 2021 13:13:06 +0200 Subject: [PATCH 126/146] [LLVM] upgrade LLVM to 12.0.1 (cherry picked from commit 5386fa6cfbc7ac0c0c1c2464c7d7dd79cf829a35) --- deps/Versions.make | 10 +- deps/checksums/clang | 116 ++++---- deps/checksums/llvm | 476 ++++++++++++++++---------------- doc/src/devdocs/llvm.md | 2 +- stdlib/libLLVM_jll/Project.toml | 2 +- 5 files changed, 299 insertions(+), 307 deletions(-) diff --git a/deps/Versions.make b/deps/Versions.make index 770828e28d93c..2d29b0bf0b470 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -15,7 +15,7 @@ CSL_JLL_NAME := CompilerSupportLibraries # Clang (paired with LLVM, only here as a JLL download) CLANG_JLL_NAME := Clang -CLANG_JLL_VER := 12.0.0+1 +CLANG_JLL_VER := 12.0.1+0 # DSFMT DSFMT_VER := 2.2.4 @@ -44,14 +44,14 @@ LIBUV_VER := 2 LIBUV_JLL_NAME := LibUV # LLVM -LLVM_VER := 12.0.0 -LLVM_ASSERT_JLL_VER := 12.0.0+1 +LLVM_VER := 12.0.1 +LLVM_ASSERT_JLL_VER := 12.0.1+0 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.0+1 -LLVM_TOOLS_ASSERT_JLL_VER := 12.0.0+1 +LLVM_TOOLS_JLL_VER := 12.0.1+0 +LLVM_TOOLS_ASSERT_JLL_VER := 12.0.1+0 # LLVM libunwind LLVMUNWIND_VER := 11.0.1 diff --git a/deps/checksums/clang b/deps/checksums/clang index 125b200da0a36..6d6d4d100a432 100644 --- a/deps/checksums/clang +++ b/deps/checksums/clang @@ -1,58 +1,58 @@ -Clang.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/465b3375db7ab6b93fbe465ed76a275d -Clang.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/a39faf3bb411612da5cb29be70a3b200dac3a4bfd7eb58e4f68edfd09923819f7f465dab4dde4caa0335d8fc392b2f55db762de0e93642ff49a466b68f0fd383 -Clang.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/162a2ee947742b9d0c01c95725b98d96 -Clang.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/ead804d78ab42d3e1ca6cb7f12ff7544525772badce779eaef5cf973e23966f1398343d3c3148b58195eef7d4e9c7ee897e8bfb30a24c095685cece46344671e -Clang.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/563e93b82893c8257c23878135de6687 -Clang.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/ce8103e409790b5d4993ef4259524096617ee27b82b5d1f6c55880814211da6cefb4645a9c5de4ec44f9c961d1ec62da8cde0977d8af4be6e25a638891efc372 -Clang.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/d3eac2234c6fa736c3c8e8a4a7e9eb0c -Clang.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/0a7f414dd22d34184c47695b5ad40e57286527a16fe32e90eaccad11d72192679985a9ffd6f9616564ff87de1d189726c3049100269648115f0f983d80400400 -Clang.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/23cdec7b732c13313c897593c40bce2a -Clang.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/616fcd76d887cb3188b5dab8a2a15f276f3cc7d73ebdc13e1e12d1d4eaf0a3722ee288b5531bd24ab825a463112052399ab75d839e9df1c98987313fe731a2ef -Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/f2d3d99ae67b8435021b20bd77aaf433 -Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/7cb4ac7392501a849058822f88aac49f9a0a03496a5fb39b8a8fcfeecf86f004b466e9fbfe2bfdaaed6d9cbe33e61b42d89c03ffddbfc4d8015790f64ca3623b -Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/3c43e3cbbea5c8f2f197bf6c505a98c4 -Clang.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/31107abd43a3ad43a3df424e9d35739d646c955923c08ca3cc405b7677deacc0cf9aaaf29b29fdd4fd53a434087620317e1f4d91c3bcb2932716a87804388d0b -Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/dd2eecb77a209c088ad81dec1f4d9610 -Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/7a5a13ed5e046fb05cba3cd7aa55cdef741a7d76274e71d2b2fa194f132bb98c40d200fb04dc111cda7d901babd4f1f5d4e9bdf1dfd635f0492c386971878b5a -Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/74684a3dfdecad109aa1cb3e5eb1f24b -Clang.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/e1dae1ae3bd5b82d21401cbc9c6ca2281a05bb1039fffe0d94e7d5ef482a09bedbb5c512aae52873ec7ca471e543c334ff37b1e8429da79724b6b131b0502bf5 -Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/32284100f6a57f5e4b32d0e6d35dff9c -Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/201cff5571219df602ea2f63d9559e8345aacc8c8691b30614fe6b6f5d0b7692f670b17366185f0e16cd1119bc49cdd1184247b32826bcc0a3a1d026c48e538b -Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/c854231dcdd3816078ffaf435b152a3c -Clang.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/082760f1dcb39cccffd5fa0a096ff0c6d823355d22d8cc2b69aa90092fb6157c87070d932fa736e3ddf4de0199c7f06cdca91bb354ee0cc125b505e66f5df068 -Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/5c909ab9d88334058e99be60e0330711 -Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/abb39baac59aff579603870a31dbbbfebae3eea91caa203dbb3409d49cccd81dd96aa82a098c20265ee5f5fd851a0621c11b1a8837952a329c699b909e2c83a1 -Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/5c275a64299c0d4fc51d35f53c3dab00 -Clang.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/05c167d371dc5fa0226f0505ea1339ffcec8563c76adbc1450098ec7aa096fe04d855595d3cee290c2b6dc0843d8fc1c5215c84d3b3095d2cf0d93711dd4acec -Clang.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/f27a08b7004c4a5eeb35d22198d72c82 -Clang.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/9fdcadb0d2bb56eb0e880a7b7a0c7660d614670209f76dfd5aae70ef0d3c437d6b56171b542d608784f7c4f7ef7bc5a4844baffae4fa95c25094c630ac39bfdb -Clang.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/748c1efc36a70910fb3d3fea537c3b4e -Clang.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/bf70ba1a1576039210978488050890d6ee049fdab076a9a8498058b732c1c05d47861146aa48262a304f7dd8b24529e1a3425d0afc42c69843eac4b1317327a2 -Clang.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/5233ddc66968db6bd00bcc9e2aed7f12 -Clang.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/bb9aea78c78c6cbb613b4c3eac6f08776dfafcc5402e6bf1a6670ac8d707de29b0ff8ad654d1d586f3e0b2a324c8fff49524033277f3cceb08c826243dd8a519 -Clang.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/f448936531ab804b56b0d8b63a2b7cb9 -Clang.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/5ccdaad4623ec17eb72f806bea432fbe62584b512159771cb295bd273771b168f502a3a8f15588e0e9df65024271a8edb891fc48c2535e45a31289b4c3469a28 -Clang.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/2e68b66d9d607414d69bf2b11609ce5d -Clang.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/fec58abebab5d632fbfaef8335737a54d83804a823ca6aa8ab9031aa3c2a8afd5c342d6d989d7918352c241b7d7cb8f9802a1422a44316ad0f8760998e2e02ae -Clang.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/1ab89ec9072eb7d871b3a0eff78d56ac -Clang.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/9878561bbf405ca29e1f32049c753215ecac1bbcbb62f66dc573da3826bbdfb5f4e5630273595d611c2aa315d54fdfa35a954f71ba8781e5eb659658a9157886 -Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/4b8045175ede4b934e2ccc8a28920910 -Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/38c952d0ed7e63c52e013e303f77c4d779ca8682926a32705402f5a275358fdd5d7f59188c0f43d994b8c2ea31939c23d0dff9a4b7312ed39574cc39c27691ea -Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/53ce55e158860afa17cc653f4fc0b500 -Clang.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/15738783329bca1720278526a306d230917d64d6ec6c9542a248953f5c1a071316de6bb80cd1d0498926ce876fd541d939023fda7b234ae9517f4583a2b6aa8c -Clang.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/aefdcf918b508ba66cba11abd0d99ef7 -Clang.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/c7ef9af9bbb5a1e2fe022c3996566fe774903bee67c15dd6ae304e89fc93e5080f177ea074f9736d6959edecae415586db4dfff8328e8fdfd643019ca7d41131 -Clang.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/490a63fadd41b10c425c1e87170b63eb -Clang.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/14ad28afecad4a60d0a978af75b3db68feed71badb271dee0b29bb4cb471f5e69ce85b6cc990b63a2f9db24ca87e897ee935beca532451b2ffc020d80e3cc827 -Clang.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/9056064168e01462aae83721a670fc7e -Clang.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/aa0340efa8106acf92c2528c6cd5ac8b6bfd0ca0b8041e22534db4178364467dd8c46f4c77f365fa0ddeb5aefc6ed01e4a4416e1326173a255e18cc890dfc0ef -Clang.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/b4edd5baae3b1f9b18eae365d7969621 -Clang.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/abe5ada1bfb6d69ff28fd1d16f5de3e2b12c36730f04d3fb4c9e332d4947438530f4d5a677d3dfc973769a381ec7dd1944c3ce2213bf2177d263b47b4903d186 -Clang.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/d3176f49c216d11f2113caa10020745e -Clang.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/8585c40983ab7c401bc6537cfc3ebb7a44e52738576155855db5c51fa9c0dfbec3b5c12f63575b09c038c9f047d9941a192082ba7572489b55d5bcba2e3fb27b -Clang.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/1d3bb2c77b0a3473697ca2a63de35b89 -Clang.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/de8922979ad7158fa72d0e152670ad3be75fabdb22a1e91d187e6847e9b6cbc905ca09a476dac651a52c775192b3bada333e68e38e6ba7101a472755bb7ad79f -Clang.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/ecaf6c8831e8c6de8b8e74f95f04dbf4 -Clang.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/aec6626dd02fc6a0f82e05783dbce19d69a2fd9eec53189a1086393134ce1f972a1b0ef286b06f19be192fc4575d6e9f5f09984444cd3bd50c66c2fcabe23b73 -Clang.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/23c8b1d208dde43fe2b48f143f2108ea -Clang.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/75118203f3ba67ca99279100e9b31eaff165f70af5a487bd9ad6dbf70da8041a374d9953b807739258be6e493a5422a2e5e1ba00b8ebd746b706de3915375c1e +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 diff --git a/deps/checksums/llvm b/deps/checksums/llvm index 71b445c82f00c..a865392ba8f72 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -1,242 +1,234 @@ -libLLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/9b6a02cdb753464998c2108401321c8c -libLLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/4986a37bdfebb17a2c70f3e24dc104a2b9c48fda5149e1e8f0df1b7139689e09bc6f5438f34e3fb6ca1ccbae57792959e2ca6fe66b267a2081df6a999cc11d35 -libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/4e6d298d5680c3a063739f508561e357 -libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/c70ef95a4e3c571b119f8d623b17d98591d268f7242c024e33b87ff80dc6cf96a7589c5e4e528d4f3b54fb8c7b1b6653873b4ec7a94b297524b9fda31dded006 -libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/941d910dbfa4f7339c942f547596daa3 -libLLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/486a01f9c8f632b6f84d802b00c443cf9a5fbcca61ea7cc392c9211c71243e39f50ae8812dde7f5347965e0aa9a8dbd73a4988d780ae77dfa04fe329359c50dd -libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/ab8f2a3167d192a933c86214c275d1e9 -libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/fec5e2ea1398c226cc9a3c31c5041f9b4e111793039f7cc373ff47e86e72685a4cc254ef3d42db7cee239a7422f56fdba513f572f5156f8dd6c286c799547636 -libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/dce59160064ef20720e2b97e903dc829 -libLLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/704d2007d0074a87a2c780e6b9f38117cee75a9e3e7a84edb9915962d7d5dc92453dc8ad3f2a73404173b7cdce5759f7764011452b9dd0da71053fa87bf89be4 -libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/e8e483bea9effe1a43cb14eb32d2edce -libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/709e10ae71641ac285380a73457988df8745d9baaa1584ef67871daa42ef16b568aa93633f774a9d4541ed1cefe49c7614b295f16da6fab91e493a2a58ff7143 -libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/2ef8f91e7df587e2bd8c73140c29d771 -libLLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/6b16d86a6636b070924d251581ec01df759197e642f8703111869c2510194b40e3dd6d56e605208d9e4d1a0fbe96709d56a9d065f3111979c989cda9c44093f4 -libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/7ae9c70790aca9cc9ed2dc6504f44348 -libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/4d5aaedf590343bb788d6a8cfd714d3d659a82e44c411d93bcd8f524bd0563dc8ac2ddfafe87b2c762e7d9f22a1bc6cf7a331343738e7a38c246f41a8bf24d64 -libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/2be0d9c87322bf63d3081e434b3b5eda -libLLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/45bc193f86093e479710455ac7bbd4e853537e2d22946a4c30d942a3f2f1946b2156fd80282f05a3fc73a65835d06d372b76ce90685cb4f1ca31606d2481b1d6 -libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/7009d45f00f0ce67ffca15a59ae0b682 -libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/5030c05e5b91d1fcaa866522ebabe0f112493fae9aa64cd3a003266939093bb422320f2cad31c19ee1989f5beb84781b1b54090b6a4c2a8fda3e80809ae65160 -libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/cd92d0ea3f9aa34c834f6ba9c5d6b199 -libLLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/b79e5f42890712e2ced99e80e1827aef0824568c34f029ed94142a29b925375a8e85d305411e42d05bee1959863906f1958485b3fb982b022cf567871005e20e -libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/406cc9431dde64b98b7c2cf0d44b8528 -libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/426a99f9b4eac3835de4a1ae3f49a23c342f773af5a3c4c6354cb27a120f8d83513ac9dbdcd1040b018ffdf6f5092de66fb37a8eacb07b9eed67a1f6da411fe1 -libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/c6d6c5e91e33fa326763034b58c9c306 -libLLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/7b2557c766371fc12172ac6469624fd7452e2be49c0ee4e0658018e1e779122d89cdb81fddf8df1374ad17286b96e299320d076b2527137680423bcd3a88e5ae -libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/8f3acc592c604ea386488a28c12a69f6 -libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/049d11ea4d44a60037c25c8893a336358f2422a4ed7d350f0212736b040b7af2d50fb80681d20ff58c220f9bc4559cc2b70ead1efa923cd0a36b12f3673f343d -libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/9727f0bd0663847095a8f4574a87c318 -libLLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/0d3a344b37cc4345d31612964f95674b18d2d41dfb6314d12c88290772bc9ed5d15dd90c2e8940710c1accefa368046c626d12c42297de162e24f08653ef2a6b -libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/9bb55b1d0e0e52443296b96b2117b6cd -libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/02450ebbd012aeac1e86ce22ce699dc0ebe75748335ab37ef854d3ff27d08e5762a1addf400e51aa26dda44f16c93e7b16199cc6d8e4019736bb0138044693cf -libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/f7bc96ec83a87233c3eaab79f117f9b3 -libLLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/c398b9684ea06e1cf4595c30eea69bce0623f858647ff686a6592d6d062479cd1ae4bb01367f7ef156ed75457454e6f4df7bcaceaa2f3f50ebdbfe2777f326d0 -libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/b495bf59b53148178937ead404f887f2 -libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/ec5e2316b846e436024c16aec6a271f23ad7879119660488509e3a88e8012e1b1592f492696d645b7ec5b2d710c9524100a186df836ff03ed9b8728b009a381f -libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/57e237b29d01266c97c2dc716f8648a7 -libLLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/742eeba173b2ad95b8ac9ba3b21afc49a081aee6ed12607d1e17e648310372dc95c5f839cac8db74a49a0eed8b82700922176b55a57b3dc9ee4a820da9816283 -libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/5d1c3f5cbf94df631b7f1a73a0a2063a -libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/8072be35d0ab07d853815ccc84013f76895603297bb4f4b77b22fe538467b273a6e6918486db8170f7e2ba2507b5e36ef42f9f321c797ac5e871618d3372ce66 -libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/5d1ea307a7481ca0393f88f3929de53b -libLLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/c62e3f7807390144f65cf9081b3f6710c1022f260a2ffda0d7e72583224cac638e87655d472de2490ce465279d79edea18a6fea99b6afbbdd9a427ef5d6439ad -libLLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/f7764a7eb7bb79439bcc8a853dff5b22 -libLLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/b1cdc7f1078eb07e2d37482c96b14c288f6c0d5c0860854e02c3c1a407fcb66d4f03abccf1b74b7ee9a6eb503b3c60e67e7ed75ece765b385f17c6f502a5d489 -libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/99a5965cc849e3dd79878a7c6b29b6df -libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/9b138f955de9266ff364022f53b6b8641670a8221e0bb6b61d5bbc9151e8c4ce08c61fcb90d6572c51853723f53c6b6afebc5c4e17e6e33e39590c53c5206f91 -libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/2a27b02a388679164b58dbd853f5145a -libLLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/febee5224a7e4499509105c59365eca340526e002f12395bfb2a31c944fdaf89345fec971c67874356c8235abd14bdff3d7485c13bb4af944105dbb43b2d665c -libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/f23b627174133dd8e94733c6bef0ac89 -libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/b7b2fdc4d154b2e1aa805a98d6b15c6a88a1dd59812dba1030ca0628192b993c965ccc7e0aefb723ce6ce8ecd3a6788fdd0cdcdc5c966bef55f67834b056e52b -libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/0dbab594b2066ffdcf4c1fe47612cab1 -libLLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/86e4d06a6c52d04175d8751cd84cfe1896ac66614aa92c7d60674a3ba49aa6a68e9700cc8150abecc7acdae4786d9899eb052a015a902a2459858156b0ffc2cd -libLLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/5b39f69421ab3c5a234436a7b8430c82 -libLLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/2dc735103c4c4eed676a149ddb8d4959ed8c6c00698683b5213d22661d5a1c079fdaf2c21196bf5d4e3841692bc09dfc4c8b723d808b33b94bb06a407a8ad809 -libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/21bd6a1e696b015a880efd795fa0e136 -libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/218bf452d5336d1ed69879b33f50f92f0118fefe21366733746cf50d6accd7b0ce71659233470f1f3eff26180a5245550b2c53b2678ded317bfd0a5c2a4fc2df -libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/cdce26125c4f37ee3c9f92cdd7598da5 -libLLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/9bed9f8b1fc7f94f67aa5d2496a5081ab594d3210b93e5ee1f71e32bb053e87229afd783d34c8d048afbd396451c75c82b7c7d5f60d018b7325f703687eaa07f -libLLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/4ac10ba89a464473457448f2f697abc0 -libLLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/ee80c94d8a4c89910d170a9781f72bc53e0b3e3b853157d0830b16626ba7d188d4a3c1c7b723c4c4d428676e4f8c3120928dc7b59a5f950d096d25b5d488ed31 -libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/95500f6f9eef53d670fd77a6949d43b0 -libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/e3099e8587aa36785fc48d05691236c62c7121c953f645ac5fc7d9068127c8bc7e3aa48f0a1ec8a994c3729f75ae3bf155baaa4f1c7e761860e38d7f89d29117 -libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/a900d9889fc22a19e005e550f0154709 -libLLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/acc1bc5338d8ded0898818fac5b3a1e0528df3902ae9e4062ce2db3a769ead7168ee152262ad98cfada19941f9c49a72fad7e356d1b7f046bf0a05db83af3f9d -libLLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/4d62b2d7e0de328a8f1d497acd9dec4c -libLLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/6c199d25f038bb619e8c7449d65dd61be4d264109acfe5e694881bd7ae7d207cc714bf3350442c27a73a0d3702a5ab386c90ac6c7147b3b0b7de862f28584e74 -libLLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/52af995cd60019b0fc607f7d89d1db73 -libLLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/98c412b6ef5d12f6a0fbf2b9a848a3e26ec98f9eaafa9c7048d52164df69716aa2ce172e546c56627d208e9aff03f1fd0b011eeed842cbc92280bda5c42e1e5c -libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/ba0a2f3e9ba09b2081062437d12c3b58 -libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/a4f5a47a876b660c1d08805ce296ae59ec65dfa89334542cbbdd696909b2be8697b104006f365ea404c2967928dd5580bd2c7d9a03f3894952742456f450415a -libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/d2c4da0530fea40e082404886e86caf7 -libLLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/a66ec214d80023110e281b2029d9dc8ad61a1a3be9bba96ed7d5bbfcacba76d7359c152982036d317d383a390e27a6eea969d6bd5fc50ef7b879dccac5dd320c -libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/abd5d1cd535566f61ff0138ca852b771 -libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/f247d4127798576e0a39cb2b78c359c30679b2f5ade08a39973989fbd72387a06ef35b3421c4ebde564240776a4be9b3a24f78eebc22ea192e72941558264093 -libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/abbe7e449a3a0d78ba320b0cf9b98534 -libLLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/8b2b50d972d76b18938856546f7fa13b243cffb348f64f0c528668c1ad6e28bb03f3af05fa5af8ca01a4cb12062719665fdce6018c6141ae7bdeef1cb876351a -libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a5d0b33472dc32278cacc0b5904aa569 -libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/501f6a43cd75f33056723781becc40fa1babab2a0e720700bcf4708782cecff20140d753141de8a2bf06fa8d97360b9e7533a3947a5eb39453fca5ba6d94fd15 -libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/b9f62938d21eef15bf58b799d06f049e -libLLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/6430c18e13c7f97c2b12594d6ec0afee9ffc8fdd0e1608a40df79345932b9739bfd8f7d15b494bd576784b12b4a1400c9fdaaeb350f74bf2f15a3dd66bea4d4c -libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/c87fd44a812346a6c471a7992c1898fb -libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/f00d6caafc3298ac8fd7ecff937e453c97e41167dc2e0f43abf83cf6b899380d1db70e74245ebcb1bba8022e0f86d30dfae214005dc6b02232b0bba6045ddbca -libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/260f3e0ed2bcea0122f4c104cf115661 -libLLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/3a853ca386e8cf578d92ec55c824e0e1b6ef8551dfbd4bd042f81e3063fc9a1bd25a3a3b182444e178e34c4a477bc4293a3b4ab1eea1915f9c063c396c548ee4 -libLLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/eedcb1470ba914c6df43d41aab2f336e -libLLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/4634c7bdcb1a7ec31d7f629da1418dbf7c2da8ef35c59daa8acde5ddfb04acf617e60368c1ddf21d7ce3684f0d091471264107a3674ac7cb8eccf05e8d7ef82f -libLLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/26854ac7b1d8b5cc516310c6f0603e28 -libLLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/2579b123cbfd7f306747ea0eb9830228b330c2443153dcee3d97388465c974cc1b67ad729a5be8519c31e90a85221c03c56dc244a202a190cc9b54b1e9b4bf09 -libLLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/844eb964e50bdcca7c7c046bc3f7be99 -libLLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/da0f995f96f060933f828a38c1d1b586ee5ec9a97f22626fb6297d1da7c9be4a79fb17b5207f51e96b0454c9684bd7c371a0f43585e135ccc28d873ca9215649 -libLLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/b3ab85c5a4d2aee0aa07d75e49d35f88 -libLLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/b1656422f172685ebd8ef090ecf4c06f7364612f4b195820d2782d5252dc965322b66ae3f0d42817685a12ba2460e66ea201bf2bf5e48199156c4f124862097f -libLLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/619ef68aad7d051b32777551b6465432 -libLLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/fdedb19322bd216d6aa4908afbc99b0789424c6b27d6be7769c9b1b80e35ae04b3da290d7a5002bf95bee725684d5c8303b3fb762807cde5b5451b5a107a6e5d -libLLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/9a62570aaafc78a52bfd0799ef27d38e -libLLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/3b629bb4611f6ec388c4ffd03f2456780f41528f6f99446f2a0adb35c1953921641d2fffed5224817dfe76a6faad832a11267e57b01469959242ab34d1b1823f -libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/fea7ed9b9d20e76d2fe31ca3e5cfcd3a -libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/5448b21d8746f15c8c496b2123963c4bab271770003bad45150e93d6dd69651b604720bfadd5fe95a9034cf5bceb41c2f85efb0bd3420bc2ff0c0e100a51f10b -libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/04700344e64312cf3d8e0cac982e8a33 -libLLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/f89b350716508a9278ebc64cadc6cac0f7bcf76e966facfa6e8713103554806d8d788d2a8bc8ad7f8c21d5ddb3e943fa11db9cf51aa24f92302d4f592fa5a601 -libLLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/37dd7c11c6533af26774c8d60f47b944 -libLLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/793b04f255546fc76158b21c1e8018700416341199c2681a14a3bd28f9799fe2e7bab40b05421e6bbd9bd08608af3db705e14d1fa52f213821a8a80c69d2ccdb -libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/88b02af758c3373c026f6c727431a1aa -libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/eb29edd8b35417adcbd400fa5c0327d5c03ca014e6699330d08488c4d83d10aeeb21b60acfc51f5fc05c9fe46a048edd12702790cbd731db653d06b1746e5650 -libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/c3c759d8706cc339077d2f084f36d6c7 -libLLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/595edb80d42b47835ae435526711ec3fae39d12fcad28e1c2abdfb3dd414f71c7ac3e1ac5ac16c25e7e1c0885c6591358ed066d9be0d701c17d155fbc0f9f701 -libLLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/5e297c6897cf1bc9e0d5627a31295473 -libLLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/3a18eb2fb891071516fec4340809eb511369f70674c96db02558ea07f3819680f4f63cf20fd57a76293ed9c18746b3c2572cbd1b1621721142e7c4526294baf8 -libLLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/a3f0facc8ffe1a806f38a7441e307be5 -libLLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/751a55ac5ecbe328097998c6a9c57198cf326bd5bbbadcdfc3abdcdbf6802b4a039df8a6a5020fea911fabff7eb113207e87d4fa1a7debef59832d5aa9e10846 -libLLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/2728fc4d132e5f6e955ca684c75dc021 -libLLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/64b28ec60e564d815f3554f363e70770cec9936264ec5c3022a422acfff836aafce0d7bd3a83819735fec203f62af43e84f8770b89784f3a8e71890d1bc900a3 -libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/82abd763588375fa58700085edf4d1b8 -libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/89de803c913967c087851197d18f2ae9d6ea10c653b3988ab77edd1a90b94073fe2477f4291f10fb9496dd5c77c952e7358f68788d487989fb164001b6522d41 -libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/6805ae4e8276b1e774decc8d755b518a -libLLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/002bf892daa13ce1200996035ad7159d90c5f5974989c5c20a4ebc74c0f82553a2d0198459dc4ee7f7363cc3d10e5b11bf7088bd1288af9fac0cce707de8452c -llvm-12.0.0.src.tar.xz/md5/ceab21c9081e122a88d82216a80d0dc0 -llvm-12.0.0.src.tar.xz/sha512/ec17153ef774a1e08085763bda7d0dfce6802fbaa17e89831695ce1b2eb015a6c2aebfaa9fe7985a83b9c51bd75d40bb4f1fc706dc16d4c0dc2b2722a1d8a24e -LLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/a6ac9c9c1831bf01edf1bcb526e7c62d -LLVM_assert.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/4473ba37065329cf91192c0496136f161030da03a9a7e72106f41403e5b49debe7f0c203839f7deac7ca0b61b3d136404bf442b4f044f10e636a994e34994a40 -LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/0ccdf2fadf185c90e1938d946a6542e3 -LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/d35e314b2928ce16b0369c1b7b38682d42d1443e0ca72f77e1b32d2231af5dc5a66eaee1881832ade8777566a0447319805e8fc1f2b702b19097240ac36da1fb -LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/3acde3cd87feb3984f45f0ef323002e1 -LLVM_assert.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/be8d40794a5eee7ea775e33c8173deb3a775e5eaebfdc20341ad66a6d12d48692e0838e872245c74a8bea46ca085f8f3e7995f6ba33df2444fdf79d251ee272b -LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/760edd92d241365409c59ca9ba46ce6c -LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/45b52ec2f516a7098f89f6ca6027d677329780ce61886821478d6889b1b1624d7f43e6f23daa2037c4fdbb25a71f97ef5a1ad9e0574760f0f304a2eb01cf6793 -LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/907174cef57551c44825034487417b31 -LLVM_assert.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/5abac8be17a83108ce3bf0c6d48342cc5db506049623c35859045758a3c31829bf388fc9c6ecc2ad1438e464930d9e1870cadc895eb7dbc72bdafd04666f60d7 -LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/f90b16fffb796299a4e061d302a9855d -LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/cc3f019f88f167ee45638e3bf23f04ec8e4b021000e53342189bd75a2145f99523aa501e60457fc5cbbf5d35e1f8fd17a97fa9b18ebed5a04c2366333094e440 -LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/3aa7211a765fe31a56d48151b7ec820d -LLVM_assert.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/1e4e6a1a91ff1093b6441b43e50dd2cffa14d8cacecb6d812fde94164961e44569c17d74c65feccd613dee14311478bda112088d245e89bb307a3453e4d4d378 -LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/0155f81732916dcad2aa40b14d9db752 -LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/7521fb007a0d589c9e70f7434afdc9e12867b6f82e6b7bc4c1f59fa337149648d6ea0367ae9dc7bb88840f6db05734d921f8da86633776a48529a0d6838feeee -LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/90095ad6a9506c7e83b195becc9f9cf4 -LLVM_assert.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/15d34c652513a25d967d2721b4ab196f570fa80e02f17a905240ae838aafeb4fc88c99810c26558babf35ef2b478b067126d76f1e4c9366a143b139640a14939 -LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/0384e43e079b05f8cc2bbc23012794be -LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/c599404cfc5b78342ce8f4790b6f9b1d7e7cc0e26e674040d1538d676e11c1c95734bfec7a7869a5eeef20641ac3c4b510bc40f2c6a1ef40dfd196d975c0d596 -LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/7d1c3fd8fe1458ad5e8996dd282087e8 -LLVM_assert.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/c5b378c395be0339639baf8f10918ca2c6eed59a8fa8a34601e26c2433c6b543e92f71b73ceda254fa41f5b73796062758df26fe46335882c70c31c97ec128b5 -LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/6b42ab461336ea90274db8d059b7eec6 -LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/3cb43d785825705567cb2b557a19486c75810d223e8ae828bfa9502de38f4bf76a3913634402529bda9f4a7525cc04fc33ab2a152c5dabb5adbbfd2497ade3fd -LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/8fa56521559c7bc15c52e3282b75e377 -LLVM_assert.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/9632ff9a34cb92527eda6b3904f3444dfc79577a30d047062d1a1320fb0b91fa8bd2ff061ef075b2a7340db330800e9ca14f26090ede82707e92f6bb449be3ad -LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/b93efe32fa26b868a37b698d27aff94b -LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/fc3d05bea5f40ae893585314f6f7fbf92eebd58676489760c8dc3e5a7bba1963fc251a87d685c3fa1922f9d5e63cb59645b2126b3746258bc01acaeeb425796a -LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/01cb79e3c4d4d198f53fe0f79223ad03 -LLVM_assert.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/8620f2339e270c3cb5f455cc95acaa11bd9539475e64786c1869cd8582442812e732b903cda89a06bca8abf2aad3ff111f320fdd54e52d96ece6d57b35da3678 -LLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/84948b34ac2d1a3d3e5011df423070a9 -LLVM_assert.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/df02613ed334d9d1d59daeb99e346e824e2cb0a35f092be5521e520ef0255c90a1d80b3b65db05162be2ae9707b7655da048f958b3dbcb7b57302a4105a57ada -LLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/d2e047b04a3a7aa8006b310f105f6503 -LLVM_assert.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/3f574b15d3341e2897986a1cab9a883582c1eff594b4d952550ac4753b2ee795f8f2c6947cfd8dc1ee2dd2a5ed4414a11675dd86f53088274aa6d5c71111dd32 -LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/1bc857bdf2d143fdf808a956ca528f05 -LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/0c2357fa990b20f247487a22a2d73289b7288a23269d7212c4066dd86ba02a18eff59be86e77b6cd50cd20ef05cc50bba8ed7fb7cddcae7c61603ff556e01fd0 -LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/baed06cea973e29804f05ed77c6974fa -LLVM_assert.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/b119901a524211cab7fd5eff962722fe5768975775267134094990a682d68779dafc9a9fba0b011e6927fca65e2cd52bee3e80fc505eb9571f32ccf41dbc1bb4 -LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/be94db30f358856a1e246be7355be7cf -LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/de63c33dec3440626315457a93a860230cce3c8cb0bd967459ffc12af9bd0684fdf3c81edf7440ce2dcd02367dd3e5679238c588ca52daa870308bb6b3e56fce -LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/df5844b2dd49fe0eb4eac58fb22b7f8d -LLVM_assert.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/ef4a99aa6957d11aaa8a94027f6a7c2b7800f9b8f3fd8f7a7e9762383ac0064245e695c7040d9189a47ad7f95b1a0760fa6b655aa0f44e95d7ba684b9ccf174e -LLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/bdb347aa9b67ce6d24aba48d34299f0b -LLVM_assert.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/527164a4db3e146f72eee0f2972209cf9eb705c3d614f0e505e0b503ef2a0e7986eeacdbf3e1197631454c90bfdc6f55dfc80c85a1537c3791ea0360610ffe19 -LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/a900923c8800c1860d5c98f9172b4c75 -LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/04732d78b628b8fb06b2368d1ed48d21a3aefd5def2566f7fa17ab279b99e9fb0c0cb7f1d65933cbc6ff473c4e566034066666838644f9792eaa1d4ed0a8122e -LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/7669055a5e43049fc14282d9a37bd39d -LLVM_assert.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/71a8daba8baae164a6af16353d49a3f5bcb4b41714813659d8d488d7c8d26ffd8fbec92c6b53b98f05a4234224df81eebe7006e0ec5567518d7b42fa285be1a3 -LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/1c38ee7ccb6dcbe22698f2eb08ffa627 -LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/dcd059ac9121f59507391657baf4c8eaaea7f531adc0ca02ea688d09643ada9e10a74e6441755014914f3f1764b90f99299ed4a3af5b234ec64cb5ed84934cb0 -LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/a98e8304dd300af4b14211fd5f5c8a68 -LLVM_assert.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/2a4a567d681a42cb6b05059dd68646f85841ba431eecfa36d0b8d0d0a9290d3aa9a628317050711e6c3a599e48b77d1988cfa9e4429b07e9f371741aa8d6f841 -LLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/9c92e5737faf62609844983f1603f75f -LLVM_assert.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/dfe1f1836d74693f4061a07d834f622c6c9142ce8c949c07a5ca9a0976feecc67a483edcb1ff4dfab04fd54f063c0890655e855f55734d81fa3d595fcfc23109 -LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/578f4ab4fd290342f3290e5b182af9c4 -LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/f8d23c8b994f8e503d041322dbd68b0d5682d8939480afab620ee861799000ba91571f59832f148dcd97cb0ab2bac9691eaa83107b98b8dbdf99569bc1b77432 -LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/818b94c89b0af9f9e1dbfc98db278d03 -LLVM_assert.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/672853d70cd25b13249479c1c831ba121e164a1aefbf46d6b9647501bf746b0925538bf126c552317482b9729fc9653800246ff25206775f5f5c6fb4196bffe9 -LLVM_full_assert.v9.0.1-1.x86_64-linux-gnu-cxx11.tar.gz/md5/1faea42ae449b43c9f3119ccc0c1b375 -LLVM_full_assert.v9.0.1-1.x86_64-linux-gnu-cxx11.tar.gz/sha512/c99baba5a831405d4ad4d8636eefbc260fcffcb8026fa1537cf63dc79d71dea7e57b52acf6815cbbc0aec8ae8c9aadfb1349791b0b31cfa8418529faa494195e -LLVM_full.v10.0.1-0.i686-linux-gnu-cxx03.tar.gz/md5/68d90f435664d4fef450eff70539dca9 -LLVM_full.v10.0.1-0.i686-linux-gnu-cxx03.tar.gz/sha512/65b07bc5f6145b063d7bc8d35fd22a2d578cd972c74b08ec827b9980e4ceb1fd77ce5ba921cd0d907643594fe73d67a7b56c699d3e64f9ac6b2b6953972a4179 -LLVM_full.v10.0.1-0.i686-linux-gnu-cxx11.tar.gz/md5/2128286984b014f41e1449e884a8f7c4 -LLVM_full.v10.0.1-0.i686-linux-gnu-cxx11.tar.gz/sha512/d8e99a78e29a7eec99bf5924c8f095b82fd7b020c19f8f41401eec514e468c48e489fd047401d751c8273f264fafd13964d1dd160d2be1e19d50f48133a7da9b -LLVM_full.v10.0.1-0.x86_64-linux-gnu-cxx11.tar.gz/md5/7718b789700c0f6f5329efabf6b0bfd0 -LLVM_full.v10.0.1-0.x86_64-linux-gnu-cxx11.tar.gz/sha512/94d6a951e5f6d6b9a2399a80b9cae5a52d37145956e4752f0bf2fb9b8b9e43e16987ed3833126efacef32831a200925f040fc2eeaf7b1f83817ed17954a993c2 -LLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/md5/e438402bcff0a77f20510badbb1f3c0f -LLVM.v12.0.0+1.aarch64-apple-darwin.tar.gz/sha512/14cafe77b353fbede64c736052032db77ced2757bb53696925899b79037a3b5a72d75f1ad8972a191e216a25a83f26517b0291fd246e0aad7a1ca040bdc7011d -LLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/md5/8ff58f44d6f27d3dfb2b3670533a472c -LLVM.v12.0.0+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/b9738d4b4f00c08cc06b3f1d73bdcaec96e578e02de08f14e2e084eabba934c24f9c4e65758e102515e3c9a1527612c468d8b178f2e87ca667f2e7a62343b1f2 -LLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/md5/f4994c8abfd4fe71004b499bd95140bc -LLVM.v12.0.0+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/fa01e3d6f154b695e9230c13365098af60ca5f6077d63e3cbc6c410a89615eb7634413532db4f93661289c590f4576c18488cae20ec5dfabe1c273cd97c18f7e -LLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/md5/52066c3a492d69cc0da23f0861f1f6a9 -LLVM.v12.0.0+1.aarch64-linux-musl-cxx03.tar.gz/sha512/db60079a09654f00a452c70862d1453c2ca8bf9b5ef055b66e99edfcc35a52a94245e21b0cd6acd88f556dd99c492b6f057dd48e3047286af0ed612493e895c7 -LLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/md5/b02a6d93f190aff2de4f03a1cd121a30 -LLVM.v12.0.0+1.aarch64-linux-musl-cxx11.tar.gz/sha512/3c0c9a3753b8e709361f1faceb02b3d19cc8e0c7a183601be528283c8871c92a234c3805206c37e1ec04577a53f57282b4874e4175e2ffb83b4b1ead744b9c0b -LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/88858237d7941887f27af62b7e249a62 -LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/342d4bd418547f3b6543182a5593e21fd4af84eaab0b91ae04723e485b48accb2a119c7c89d766fcee2fa13af9ec3454da310d452e1262aa0e97fab9aa498422 -LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/1cdef3420fc7fba9e74765c839742350 -LLVM.v12.0.0+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/d7af8ec5abdc1ff75efa3f4f0546efa7d2328893b11533cde68a515a0d117272efa5e8bb1e821996ad12214668644bdf7a9a3f5e7578b24a174b5b04bc0cf1db -LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/3ee4b9db085916dc73aa4131ff6a73a5 -LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/b456e096bbe2964f678f09edcfd49e0e8b4922984cfb1fc47358868eb099b82655ba8d5209ac31452af511d7c773de2a2f56a24ad0b36841d9f557ddb2c09a88 -LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/bcfe6505477413c52c3193dd8d0c22fc -LLVM.v12.0.0+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/50a2af7655acaa0e13f15cfcf490b334e104cdc847ddd5900fae04b322ecdecc69d85bd3b15b6170f584fe364dedea140e1fbd9a8835499067da59f4b665f849 -LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/c11d635651c82dbd5f0038f24afdcb03 -LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/da3676b598851f07a875fb3282f2a1c078d0f447213049dac6e33bb07b5334d332df6f26b1e0e851f85bba20a72e65e158f848c67563be9a6e23c9d06b1a7f19 -LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/a299db2b5337c8b79bb0f37a39929c13 -LLVM.v12.0.0+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/46c7f0737dd3f46cbd30173d39c268a4606b169d80b146070fd2c61f32eb31b1cc8ef509bd1bc7f0c197a4b7b4a6e3d45a320b4a11a27d6a0233bbc1d79dd90b -LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/3f8c17f38d47008ef26457ca29cd626e -LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/265dad34a231c55b07f9fcc059dde0ef72c156374d7334372f0ee486f9c1ebe95e8ec187cc4b07623dc94b8f8def7d3235fba0ee11a1b8419d9b7a7182a91d5e -LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/5e49fc12546f4b1deaefa249f7e1f77f -LLVM.v12.0.0+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/85940dac65199307fe6a571b7f369b02430c4ac980c7fe35c1ca4dae6d29a1e5ceaa72151ecc4d8fd29116b82e1d1d4b9054fc0fdc1de31becbdef1365164ecc -LLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/md5/74c5e7b4e2bb44879f8a907d54c57398 -LLVM.v12.0.0+1.i686-linux-gnu-cxx03.tar.gz/sha512/41124a32c83e19e0fbd0f0c870bdda7d9a8f59ae51ec1017eba203e01e7fbc33b43334e12154ab0be57892f5bf85faf0c76c375da77e7c9097caf54b45a0d19b -LLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/md5/6ff76e552a78453ac1e149a85179d7e8 -LLVM.v12.0.0+1.i686-linux-gnu-cxx11.tar.gz/sha512/8623d31b9bcc59ef3565db310e323e8b165c9c35a0ce170f5f5e2d58ff218974d2ad35ce1781a9558556a33247bcba2bcb1e1171254838fdc3780e9408df7525 -LLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/md5/8e097ffb90dfb3786ae1d9074314632c -LLVM.v12.0.0+1.i686-linux-musl-cxx03.tar.gz/sha512/96291e3c1620a358594be1dfd99354dcae76b9c7536ffb93bac93bf6523f323dc44d55b1faec85a763f1579f9ce0f1ae220f2943100d2f286dcb4cbd043ec088 -LLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/md5/bc19a91fcca8d8aad83f5b38c8db2a0c -LLVM.v12.0.0+1.i686-linux-musl-cxx11.tar.gz/sha512/ce5914eaa76e9eb21a218755211d613c4261ae284773222e40b383c20c5e7c6ef00be2836750cb1e85d2b1f6e65869e016d49f365d554ce845486fdd352c1b7c -LLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/md5/67f319faa58c136910cc6497eb73b234 -LLVM.v12.0.0+1.i686-w64-mingw32-cxx03.tar.gz/sha512/e5697c29f54bae9d9e551084ca702aafb09ff11f6de60aa723d90cad9675d18846c1cf2fc093ec1eb54c5db7f2328aa05555bf453f798cc3e96f79f2afebb283 -LLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/md5/e5d38ab0e686a0cc9452c1f1c81c21a7 -LLVM.v12.0.0+1.i686-w64-mingw32-cxx11.tar.gz/sha512/9cdfd778255faed49a53fcbc691a3a1c234b0649b13ba8499a90a61ffe7ee864ace982fd33e6e736f4466fc11d5a2c0b735bd68f7e5ac4eca5892ee76a5f0bd6 -LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/c300da4c0c1a26115756d5b34583b0c2 -LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/1ef72ad1007363f25a410733efd5ce8c69d47718bd3df8d3e00e8cf22fd8ec3dbc4a19d4211a72877f90767a9b5d46318d5c059642de21a32072dd8099225add -LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/32863e5fc4dbc7003326474e3b057412 -LLVM.v12.0.0+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/2f3b726d787a6bb7cf92e7e4e91a9f72eac0da7fbf61b5cb94a49de812ec07b05b2cdb37800fce556071b410328dd7db1ed375961684e141fc54bc632ff10df8 -LLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/md5/0bd322858942def11a7a331211782917 -LLVM.v12.0.0+1.x86_64-apple-darwin.tar.gz/sha512/a33160fdee69ca06bcc1fc6843d19f306dacbf88037108c9fe5a0c57e2e4176c9ec108bd286486029312617a86da4791e123e89407a2ae71cae6f1726f44e9b3 -LLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/md5/3efdba4e35e0c76b3d60bf8ad03fc321 -LLVM.v12.0.0+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/0018caf8c878b482a7621d950687018586b5c0aaaa08a68d26855b40bc9b2ba60600e83d6bfd729b69d25eee3f0e4126afab9f7f523b41d5532400f6289508f8 -LLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/md5/4ed4c4245ead0905cece3c5ac4c48886 -LLVM.v12.0.0+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/609fba22a5d438d039f77fbb8c726766e71da9c768df83033d9b7cc8f178d2b25175427a5adfa6a004d61b610e4303f2a301e4ff5af51cf90296b883bd33c824 -LLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/md5/d78fe12460c99fc47f9139325c19d377 -LLVM.v12.0.0+1.x86_64-linux-musl-cxx03.tar.gz/sha512/698fd57da10afef2c5c43915292a4e9778bb9a005694391273cd2c2184aa792f914bf3f9e37bc31bb541054ddbe75122d01d34a4ac688a8b87ea22c795369fd6 -LLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/md5/49855ae6aaa48f3b6d55cf6a8c354449 -LLVM.v12.0.0+1.x86_64-linux-musl-cxx11.tar.gz/sha512/06bec6da4dba5956b35571dec54f81ccbd55a0e88aafa4d2d4477f50ca8f4c875853ce25db5fee236a2cd8be9f4b98528d051690db61efafb51c964e1953f159 -LLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/md5/f2362ea7f927839c1a12724e11c721da -LLVM.v12.0.0+1.x86_64-unknown-freebsd.tar.gz/sha512/e42248a84d8bc52d3cb23cb8c5b5d51560480333ff367d95ba5390e956bc78b8a48d5d7f70809aaa9288997db4b99a13e0e99f484f97713da9b167666c2fa284 -LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/4115b1aed76cfab64e6327593be41e2e -LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/0c184e7e788dd5b9e76a10a6a0ca367eb0df76608d1d773abeec4583fcc8c59014eaf09ff9af67815c935a29816e055f9c4cf8d9c1ab5c98840bb24515f6ec22 -LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/2e663337eecbd7745e9decd60030f12d -LLVM.v12.0.0+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/198c8340de6ea5f01347d1465e0059ac6f83e23ab603c5789ed12a5a85eb738544cd490cf42a7799b44203fa19d55034c65b5a3f8e85eb2eade188d2bd32d43b +libLLVM_assert.v12.0.1+0.aarch64-apple-darwin.tar.gz/md5/c747bfdb199d77ba8c9a6984e114b007 +libLLVM_assert.v12.0.1+0.aarch64-apple-darwin.tar.gz/sha512/6ec360ce5d635e2e5841cdafb8290734d9ae28ff61ebc69e1bb621231e69c431ae93fd6798e70f02cc3476ba1a53a5317f75c57499b0e1e0feb4277a0e369a2f +libLLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/8b8345f6f0139dd07751cccdf636f1d6 +libLLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/b34ed1f91df7593b456e0e3fc2fa059c8d76f8e0bcff253d2675c02424be34905e44d7b824ae0d2c032510a9205db719c0c839dec5f121193376b251f338f505 +libLLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/f077d9bdd7c0a66053a3949141469007 +libLLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/91a68b1cc99339c438f73a1fdd85d3fc23b2ba5ceeeb3c5e6876ede22f53091c7f8da308a1cdc6d2a9d832ea2f4c2ece7536ce293570a1f639c043031926dc94 +libLLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/9b9b3101d9213a5a74e3a2704257961b +libLLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/36d78c7881e55113b7717b120a9a691b3fdcf41e7d69ec3c8a04995268f13bbf2c6cc4faef34e7e38535eb75bd5d12f004e85f38fab13d7deb08171a54104fad +libLLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/9a2084773d4bc35d914aeb388dcedcf3 +libLLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/08db23f8bc571d87e99fa7373ea582ca85827ac2b89caeb53cb91f6917d6c32b490e1c7604d8e31e9dd0448aa488b654e7e101cc5550632d762ce910616b1dd3 +libLLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/82c27f978b5f600df05eb43e31b17e94 +libLLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/689b0d3b5697268ed17b5824af67d9a55889e9ec578fce989275a6dc808cc806ab8e4a71bd4f2bd4b6bd5bf65973929ff14d8b1f7830c31052b59c80c72cd77c +libLLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/af0939467863fae96656e27968a83a4b +libLLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/4dce41fb4f24d2af99b6cfa30b40cfc00d6f547089551de6af7a44878559e6b412060a93358ce1ef41a1d3da7b522d0aa94f0c9f24c78e9a68c6e8e27ca7ef16 +libLLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/684c09fb69a415c292b4965669a21542 +libLLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/3a275e3a112e120c8e10b1563a4874664db95ca2d555229f48b6c31a7eb9407e74f890c3c37ba8f58ed37b38a91e3a775abee4a29508ef1531ba31a902f18458 +libLLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/e62d3df087506b8c3457fa77fbd018da +libLLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/67bdfaabc3107ff6b8a4813caa8dec38e94f4e6b297c353fea219e3695c20399466795fe5efc8bd46636ad68f1f25ac967135eb49b8ec4766720eeb282a574ab +libLLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/4f4010c5d82ca20e7064937a449e617a +libLLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/31cd440634cb00493be58a4eb711f9e89a362b870d5167d8baa6273d700a0001e414cf3427285cd6d8d31863c6a136f63efa27b1166d7b382fb7a33b2cc4f84e +libLLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/9d7f3017c1e21220c92c46449d41ba3c +libLLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/9e1b9b80bfc313d08cae8d62ebb055fa752f5fcb9ba42606e0e53028f6d5df372d535cf70da2c0d1cc86f6ce15981b1b5f9f721c24197232609638dcfbc73d48 +libLLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/9f74405d26debd6ed6743f6f8ca8bd5e +libLLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/12c2c415bdf7669f10f60f3ab61a506b864cc440886d55d4bfc6d588f0187e0a04de09f3da2b3fd00652ab3688a74771c06603e895c9f7de60bdf317e43e8837 +libLLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/0543b752e04125e97a087748785b9987 +libLLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/11e76a67c1f6deea206c644463a3a4660ccea97b79300e3430f10f86a7115f933bed78590033358c8a2ad04375ab7546b42a8730a9bb40e0a9b4352ffedbc481 +libLLVM_assert.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/e43db260c7b4f918da8b8e234437407a +libLLVM_assert.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/367b42e601d7684805ff627b32329aed091d02fd791ebd5d661a81baac79326f4c9b77de410f7bbf1ea2a7904e6f090efe81a145ca137dd4b01dfe2d5cd7ecf5 +libLLVM_assert.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/8dec2cb7eadd13aede78f9d5ce60296c +libLLVM_assert.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/0d36b28f5bfd35c2e0560da334430272ca0c70695f2d70f7e93edaa9308fe69f9a895615158805ab305603795deab0bb30a17f3f1690340cac064f35d2b1e6ab +libLLVM_assert.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/27c4856ac7778ed1c45c34695003a0ea +libLLVM_assert.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/1507d6f57c794c48678e8826b885917046db12457b7b9b188b334fe64303199f4170e7c536165c5660911e2ee41f8251cacf0a8ce0bc44fa74bd9ddd0b0f1265 +libLLVM_assert.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/ec26cc534387af2bda1d26988c805b93 +libLLVM_assert.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/b3b546fc5b3548d1513aca5dc442a3bd0c2a7d7b18507ce614c70de759f986a6ff999ad9dd8701752d8c9671d2d0343ee37c2de4de6b69672983827dc9d0c46c +libLLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/fb41f85924397c3511cf32375ad2ea6c +libLLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/b97e2e98e9e39cfc90a4b6a4e6c82027034f7fa24dc286e4df5add37308b64156c5a631543b9c674973d3205bc4ec3b9813ab66982cf3328195db19472f9f071 +libLLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/57b18de8e7d8dac8fdfb1bb65956eac6 +libLLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/21cb62852389bb9ab4bff38b1c073c6f46ae324757dea8f267a3826fc4db3918873d70a236431a8bd921db3f8d327d6f08ebfcd69a70123f761ab5af15ffb8c2 +libLLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/3ef3f53a78f5927dbd73331f43575129 +libLLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/92b9843e537ac5c15ef18c6e1e3b7b1e95f7638ad14ab9ecb20aacef2cb1062d87ac8de993abf404bcf06b5523e9f7060f6d419df282ff4e1833517832d93c33 +libLLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/e065f6bfa090d9d66b23ffd6f8e5285e +libLLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/778a990a0c4193d04077fda3e3bbf1420d96e689882a8bcfd24202c8f656eeec814f68cbe5de6fad4259ef0837ad773156885a5606d107b3371be278f4dd716a +libLLVM_assert.v12.0.1+0.x86_64-apple-darwin.tar.gz/md5/128dd6801aff034cbdf90c3a9d446954 +libLLVM_assert.v12.0.1+0.x86_64-apple-darwin.tar.gz/sha512/d8d4fbba77498abd154647edf5eea6d6ceecc6a836b1ce6b75e6d42949255e1e785ea9fea590e4f65df522aeb896843a52d39ad6f5f6cd80ac58f27bc9048786 +libLLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/f6cc8374c37872d6846c54b7bde44592 +libLLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/31e28ffa3d9a8c8a86d08b9a3e50d9e021c010fa9ec0222c284fc7af86aa6a71ee252d109cae8e02dbcbad09126e01ab2311d55e9dee9939a162a472f3f5e517 +libLLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/91df95adb9d0df769c7c530e7b558171 +libLLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/89fc4aad84ba13e4024e331f9da29a28b1651a69c4ef47c52fb2a20c6c0cbbb319e9ee82b9604d5a934147adb7b29a07d360bdb6f69a8e95255303ce0c7cc2e4 +libLLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/d7933d46280095ed61c0346a14c19f95 +libLLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/fb7fd1a0d254de08b7045421fa1aaf0f0594ccf50fecffe5c1c7c162553712cf401e66f76f34286669bbac034a6411bea9e9abb99b1a6f711c4d4f129c937ce9 +libLLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/298e051ca068f5b61a1851274451bc19 +libLLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/76517d5456d9cd5fcb75528fc2968f8a317e8660b73c9e5665c22dbf84efda107b16942c809167e0d7eb8457b21f3c20ce9de62f5d0e433ea7d21b8d3b54a811 +libLLVM_assert.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/cadc91e0a65bf719abfbae53ea8e0158 +libLLVM_assert.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/2097cfcf21ce2f37cb079934a9e7c8ef30739d20e1b8c2068e59b7e2d4254fa9cd051492b23e426c1f0c2831ad60612fa13f64fd30468826c9ffca25fcb5db82 +libLLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/fa0ce67539470c5a81912efc743f66c5 +libLLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/ef89f6230942c90d59e6169e538668cb39c22c64ca0c880224ac0bd856ffb9c0d8b573797351ccb28eee240371fc03617b192116a92926def586f4deae54fb6e +libLLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/a54594fb8bd760fa03d58f52532cf3cd +libLLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/4c750c00398ec35052b54610d0fa5459b28023db15c61149bd897bfc1af1330769c3845dcb54601bc5ba49644b8a9196893dc6b78b10aea9d36f2a3c4c759e9b +libLLVM.v12.0.1+0.aarch64-apple-darwin.tar.gz/md5/b2936e7dec075bb0074f5f315bfe86e2 +libLLVM.v12.0.1+0.aarch64-apple-darwin.tar.gz/sha512/c5c93d3e2cdcf28babbcbac2c4bbc681c03036f43b05e5699e6251e2d3a036543557e3828be40bbbd01f76d361e884b656099099712f7af742aa822e923d4cdb +libLLVM.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/b0f763bf80430e5064ce1a4910b52c95 +libLLVM.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/e024bce71447ac86a752d1e041ce86d68a25a131fd85fee607ce9e91eb2b185c2db6982bd89f04aa7ec4f238e49586f8413fbe1f10cfc94bbe32f05a5900be4d +libLLVM.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/648dfa6270a300d0d739218e76cb6e77 +libLLVM.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/50efed61e87dcacbb6b75b3a6413e522d5677c53f58def59fcc54b5d02d5e319b9bcb5d7e316611564f4845872902d870c4143b9f23e305629ba0e3b69dc81c7 +libLLVM.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/688b38b56b4d852735147b2a7dd6c772 +libLLVM.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/764042743772bcb10f873a0f6478b3b8cde5f150d64e72db9da27623359ee94876ac68fca15f64bdf79378a8c88b7c590d2548ebd55723e2517128a679a1b046 +libLLVM.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/ec00618e64ad972293c4d71978a92cf7 +libLLVM.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/670d2304f3db72d8b27c3acc682f3ff9e8f12f3797f80dead4cf6fad94a40f3307c2e534b1caf8392728b4768e3b216f322325eff86141502fa3359828c2b891 +libLLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/13abd32c8f473d13b8f90512b9d969ff +libLLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/28d3c5d161a63c07e069becf43c303f38794f54db8ff3723f0c30c4d240f3db8d6d08e013d64bc38f8deb8353b87e32e646e9ceed74a42ce066e8df7c9a4c328 +libLLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/ce3325b92fa32363bca54159693993d2 +libLLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/cc75076f095dfb59a51a3abd0ec5475b8b8495695c005a93c9fe721f5571b8d1801c0807691efad97c80e074f20c365e14ade7221cadae8de8779a1313d8aa49 +libLLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/7aaa8b88d7c2e0571731c5ab1f342a8b +libLLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/56c8c300d3e6407d638b3c77871c763133e5081cf78b9803269780290a34784bd9ca7b9ab4219e4b15d90f768d15dd3bbfb6a7fc4747dcb04a3a239f8874000a +libLLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/c345cbb3e3cca42fc5363f6fa90a3ac5 +libLLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/af037ac16498e5b09a21a31881c2f20792e0c191a1af852fa1159843484ee829eb7bdac25c27226cc726622504febe1ee06cf0c70a99ba7542d78b1f83a1415a +libLLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/03fddb9a5f0e4e6e9ad146918b5f9594 +libLLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/2698dde5f63a0ca2408430d23084c1fdba2b9cf86e106dba3b9711672e237e49f294b5ce4e4459ebdd7da0e748b067ade6cdeb7d004ff4c121c5d71e50af9abb +libLLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/d679753db557bddca088ca14537f4fa8 +libLLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/468943d42df129b61c758c5567d0838580611b06906fd36ed652cf0d7d58b6e23907a0591eb1e02425a54a55897e3845952b7d87c4dafd405b673c70a6240635 +libLLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/390e47b0ec2a37c3ec9a10f03fb0f369 +libLLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/7f2fcaa1afd00f52d20128ba55d1f919a8c8284b7f3de33c56d6c772a9cbbbeea8c433bbecedc20ce4ddf5631423fe44ad5f12c616df46f689519377416a799b +libLLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/161d18aab34df5b02fce7ed5eeedfce2 +libLLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/f403c9df31233b39d80c415cd69cdbbd0b38d2412d090edc41ef197de3c2c07bec1b19f7c1118c8c20fcdf372fe6cf26cca6065472783b534669d1ea8e3ac5bb +libLLVM.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/b6763e4a6ba177701dd84e019e0cc4c3 +libLLVM.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/15df17ab921aed3a84eb8fb5121df6fd6b091548eac978cd7101f8f0e342da6ef3ffad47d1cdca3a264e63bc19fc879a220ac23b8cef8ce666be66f2c78d69f7 +libLLVM.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/0c074540ba38c2f86c5bb5365455a8e0 +libLLVM.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/1fbb275226e859617deb45f239f5307d0ab1aae1fd69575793b900832ce5d15413e6e6d8ce659ec2376a71a3fd295c308c5e6d8f626f30a7d0642251fd78f8b3 +libLLVM.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/585ffb5cc1d49bccd3141092620d9903 +libLLVM.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/ced158b091a88bcedd23df1a9e08dde44ae1bac83d3416319311279fe25fa13ce92fb408ea7a2451f10d2a0fbbc2f4dad7afbc7cf790b2b78c1fba9bec53c46f +libLLVM.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/52783b24f1bca4cfc8446c1b6cf9390b +libLLVM.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/298ef4104e7958491687b6085b38ea67fa6ce319b35afa24c45a18f46709f96e9edcf5e897d6fe0d1b3bf8c64dd5cd92f49973378e151db263edaaca8fe9caf6 +libLLVM.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/02a50422d2b3fdaad78a6bcb809c792c +libLLVM.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/06d6ec3ecf8560210a0fd59e7d4f63e778de8c810d24b675c2655472f4272b9e85de18d848d79f31122bd1b62cd4a00666d62d3d012cf789804f29f90c555aa3 +libLLVM.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/1b678f74c6336a2870529bf6ec8ddd17 +libLLVM.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/86d6a0563497ea9121fe5bc92db738a03ca97c150f8343bdeba10e887f9c015b2b725fb9626c78babff9c633ae393b8323ff098b32d7225db67fb9053e6abbe7 +libLLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/72cbb46c59ce588587caf76e894a4f5a +libLLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/d6648d53c0dfd705d7ad46ae716e1db4a1d767317b79fe07b89a1a9d83e1d3e3f4416417f5538e8b86fbcec1d00002e4b069b0d16f6145ae5426ecb5a418a40e +libLLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/336c8d1eea9f7e9a3c8d82db6a4ee0bc +libLLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/fc2f286a5bd72b70c4416c3bbe0998be9a22b9ff6303a4dfabeda9e4acb393ae18c387d6a4fe05d41e352954f9dd5ef712614fdc51057e3ec37bf1a35b46e8e9 +libLLVM.v12.0.1+0.x86_64-apple-darwin.tar.gz/md5/7168391b6c79ab1ed805357dee26cc8f +libLLVM.v12.0.1+0.x86_64-apple-darwin.tar.gz/sha512/6fbe058c5e18d52b1ecabdf1bb89d616b1e5fce030eb076f35fd759c484dce6ce89c6b450cf82698e31e672826c55f9018a36ae5abdc306f7535ceca2ad8af2c +libLLVM.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/3c494d8f385a75960e18145cc64461e0 +libLLVM.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/1149364d65bb209e9d867fa65036e67a0300e70fe7fb2a351ad6f956c1f60bf3ef6437c96fd63985fd45b0e5412cefce3c94279b92f64826ddeabc8ef43bd071 +libLLVM.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/9797b1942c5d4fc33f207123856c8aa0 +libLLVM.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/080945439141816585a2bb35d9222bd940a6213e377a57636d165aef0029645397655beca2555831d53e7f933b7dbff35ef607b6410318880ff23e0f5b8f3db0 +libLLVM.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/14b68e9ef3aa2b407f74546cc4973aa8 +libLLVM.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/6e73da793d4d5162747b3bf04f3c74977e685c4b6b316f8b9e1de83c42ebd55a8dfc14e028f550b22231945eef8ba846dff9a7418b37b916ddb4b9a865dde778 +libLLVM.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/231fc8bf6f2b869a98a6be1c3c15cf84 +libLLVM.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/acc5125a0720372b32f2f38e2b6f1bc1fdfce4ecd557a475ebb783e01bbc1f5efeeeb08a4953be66973e947fc6f203295755e4eb41c2f968ec71bf1bdecbd0ed +libLLVM.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/936c10d179134961da65e94759f9eced +libLLVM.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/68d449bc9fdd1554835d6237db6643893c00176b4dcf570dbd31ec5662d6fcc916752a33e1713f20ead8499911153d25306cc9d1f0b3cee6113ec9b971c7e780 +libLLVM.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/4e6ce12e5f8850833f80fadc7d154928 +libLLVM.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/4801ffdff0d807dc7df2d076793ff4c3751c73eff5d208476861f1e790afb39b31ba4e1eeb15da07528aaa7c0e77ecfc545c989c5d3cca7edeb31bb6b6ce561c +libLLVM.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/414a7becaa5623dc0d7b4b4c15f848ad +libLLVM.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/8868f3890140cbdbfb2c11d34ada28c2ac09a49a45b306e4d99e868e1f20b6e91b3a39c4a743ace4bf32fbc87abd6226e9242d3192aabdf1e7f04a62f57dc4e2 +llvm-12.0.1.src.tar.xz/md5/72a257604efa1d32ef85a37cd9c66873 +llvm-12.0.1.src.tar.xz/sha512/ff674afb4c8eea699a4756f1bb463f15098a7fa354c733de83c024f8f0cf238cd5f19ae3ec446831c7109235e293e2bf31d8562567ede163c8ec53af7306ba0f +LLVM_assert.v12.0.1+0.aarch64-apple-darwin.tar.gz/md5/e36756cb0c80b0e113d445afb9b6a074 +LLVM_assert.v12.0.1+0.aarch64-apple-darwin.tar.gz/sha512/ba3daac19b9ad0b0bc70c0dba8093ecd97e667440a414409e0414960ab5870927a65755d116ebf106e529c396cef3cc074882b86debd978467ec533deceedba7 +LLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/828f9b84f074321b991708afb7320c09 +LLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/34efda2d8e07b2eecc19dc445a8ecdfdef2d3a17dfcb8ec839c76d1e4cde5b74240cd1d5d2518e312ace497672569b87d6beb08834861ea0aa1d8d3f48b990be +LLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/ba42d8486199e8b6789805891035ce9d +LLVM_assert.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/0e1e1e1a1e4ce7568b22beccbb693001e6c32bc82e45c862287b77f4756d0c97a8e74d6e77fa768dc2a4c4971e2ec31bfe08feeb0aff67f095bb3f93af2b3dde +LLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/95f562abd7fc60627d69ca9c870cd076 +LLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/58556d400148c2e28caadfc74722ff7dab35d1244c700fdd7da8daba9217eef78fe7cbddd94585c799942460e9fef731207ad3fb89b933125006fa58c66fb43a +LLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/d7c76a40a2f25357bac82d27e220f00e +LLVM_assert.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/4e6408703ef2e6c36c267d316efbdb1a514dbffe08ee69f598801bf2d002fa6d34a7efb4ec8f091bc9f0db5d47c443aee95b1e65138f3f5011c7c7a62ecae05e +LLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/2ed619623c717da7f6182c1a126d5e65 +LLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/2045fe4551457e350e16f0af6efafd8ff67e9540532535c6951627a72b21786ae69c993ff18b048a613f7f85fede279db9b8734c8e77ddf79a87d08c17f2d029 +LLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/cf0396c08a19433d326d4637cf0373a2 +LLVM_assert.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/c3d5a0c62dbd97084434bb549430fe7c8a27a6c49dea4e141ab84b369507019472aa7f2edafe56f85d828550c7c78398f95b82fbe6358fe96a7fc3fbbb5ed4f9 +LLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/198d203c3c469fe625a7878961692108 +LLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/b2c8da74ce54187fafb0cba187576bddb492f03aac5e310340e203204682301feb6604e9f282f22beb90e5e141d7f269b147085f4a099dcd6c1eacd89801b139 +LLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/17ddbda46f0e2c756fdecdbc80458662 +LLVM_assert.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/d12850485f037f080285aa78375b6c07fdbdccdb62c2abf68c6a7366a7bf29c0836776e81d3a73bdade71f78d1ed289f3c8c899052ea4e7dda4848e0ff159e0b +LLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/447fdf5003ddcb12595f657249ef04d6 +LLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/3dff913e74bbc3882adf2bb2c1bf2d7fd936304cd5f81ee9ab8c80544bd851185ef45160a04e7aca2fc4a9b6656f5616b3d301b533d7a3b40132346fd2c71c27 +LLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/a07d85ad41d9acbd1820c3e22cc94a2c +LLVM_assert.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/f2652066abe9f21f2c9d2e1d21d72a9f6dd576f9da67a5b675278ea3a129ebea2f2964b1badccc6992bbabdb4ee25bcebacfa885fb3485f8596ead48f610e230 +LLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/b793f725bf7c1e1e9f534aada1e97b64 +LLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d801cbad6c58227196372360f8920dbd25e553947b21f30e8e28ba28f39dffb546f492f4802eea1a8d45b08fb6f52cd49552f91668e967424c442e1b6461808e +LLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/cbf17dec00764c1e7d28b636b50f5b6c +LLVM_assert.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/fe70916536e9587fc3162e356a1a6d567bef10627b4659d529cfecc89ee23d77c7a5fcd78aaa966de475ee77882b58c8d8654c5a0ebf7aa2ac88da9587716ed5 +LLVM_assert.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/da27739a3fbe68c77ee71eb853560b68 +LLVM_assert.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/f5e73904693a63b1647fee476fc4b7445ccb57b053a035489adc3a679b32e34edada461bf00611b6a11f1f31e73785de7f6e62d759fdb2e4bdf4b8ee0b2be792 +LLVM_assert.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/061cff6ba872358714a921219d49da3e +LLVM_assert.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/2abbfa2949a7700b6d80cca0ced9499638fdf1d531c722727bd07462e81f6ae3b77273c399e1ec439665e09a34fdbe657847f215a3cff629bea784a3190d11f6 +LLVM_assert.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/4f20e6d98ff6c345401b1e33297ea399 +LLVM_assert.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/e06a309a2204d1e446385ea0580b376545aed503b9b80d5a3f6f9aff4a857acbeac1f3364173b3a38f9f3dadf1f8ea916a0e5876ebb07f557d56f37f63e8f326 +LLVM_assert.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/a440f471f69dd9b5eec203f0ebada4f7 +LLVM_assert.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/2e74cbf119de31673c5f706b189e2095af963455488fc7bf80eb2bbe2908dc0c2fa4222e72a1360c2c94962c401b82a90562736f815b4ae77265e7bbaa7b430d +LLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/ce9a8962fa72f49ddb3e308c496cc922 +LLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/af85ab008e537d74c6babb994e8e0bccd557ccb28ab96b02f9c3dea39d764e1f2a2b8f6db79bd20d346e1df262c22f2add337a3038d12d6ef8234a4ce8240ea3 +LLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/6dcb876e704dac48dab81f6d670d17a9 +LLVM_assert.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/1f0cf33673598d76303b9b88c6e14ae53d048a74df680ae79b443d59b289cb820d090be04533aef43fa501b776dd890a9da13d52dc964f3da1c0c1bf2999191e +LLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/69fb775889a1c37e17f4d39c7d91f7d1 +LLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/cc6746a1ba64464fba170c206a652e8726c1e68c5929cb215ef84c47c79ffb4e8bb224e8521779bf547ab2d984fc4f34e0eb66bf2ec619f7899c2ec103c2bb16 +LLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/20f6f2bdc44846e27eb6e48949abee17 +LLVM_assert.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/27d5bfa52012881364f761b99bd2de0f74ba486301f9c753bed47ff151cd33b9484be532f65e1b038da470f7995454c12f75fb5e908f43caa8f0929f266bf14f +LLVM_assert.v12.0.1+0.x86_64-apple-darwin.tar.gz/md5/4998b04416cecd78260eea1840b919b4 +LLVM_assert.v12.0.1+0.x86_64-apple-darwin.tar.gz/sha512/ec28bd785eea3d2e118e7a58fe787cbf2a40a3e3a45d9ba3c6ef876492f76a00f686881129fdcd34a0547321277a5a75d7c787b957833eaf4a78a02c8ec4b1de +LLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/3422a9ac5ca936ff35ff0a996acaa181 +LLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/0988ba7e639edeb83fce221bbefd44e039e9d31af9fc15f74e2b897f8e0bf9a4e6752ae3adf452025e0e2413c4f212abf7e0f76aa4633663ee6889dcea08aa86 +LLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/99d4b687edf92129bb0e113a3efe6f83 +LLVM_assert.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/cd464b130428e891df2f2cb9fb3995e71e6249138ccd96fd4d1932b96186d145ae555b7d5b3c214ac9974c995a4d288202c17482467b7934fc30514bae594f02 +LLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/344d868a03ae76a442a4e06e59584f89 +LLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/1f3dfa1a2999b3cb7a4c4f46a486168231a5dd56b2557f4ca3fd15d40f1b18b9cc32ff69b5ca657c4d5c1752068d351be078780fea8d4dc503a6b56e757798f0 +LLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/9024015d75a14278813ce9c65a237336 +LLVM_assert.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/5be1e537de5a0b24203373f21cc7d5878049322218c97baca1ea2da13dadafd03efff1fc817f8e314b032254356d5802e56d744b7f910dab75f41d4c8bd65449 +LLVM_assert.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/5b60dc9dd86fe85ee61352e91197f9bd +LLVM_assert.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/6601bc4b76856e98615bd9a41e853f2c94d3e56e91ace9ec7b900f62ba7902b0a4276e21de01186ff2198c445269a2c7622774912a24fed5f8e30615a3c200c1 +LLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/6f72147189a9fb2de7bc4fcc768a137a +LLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/c3c12a22c1e7dd80a15a9d8e5bf32d1352df943ddab7eaa75c85b26ba34a7f0a1df796e97bbfb1b95a134114d1ff14938fbaa6b6f8ef61188b53cd191ad206b4 +LLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/5c10619e2da3de264fdf27691aac5c3c +LLVM_assert.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/4da219139e6420926aa4f2bc51171884c60edb35ea22fc5673d43576ecc383cf060f13ddc8ee872ccee628099e7c01d8b4c3ca1205eb7a9b214ce2a2ad7542f5 +LLVM.v12.0.1+0.aarch64-apple-darwin.tar.gz/md5/d2fabb7dd75ccac17875fe838703c6c0 +LLVM.v12.0.1+0.aarch64-apple-darwin.tar.gz/sha512/933a281a212a72e815e94644d28e259c2529868fce5a07bb005109f8b964f4cdd2aa309c65dbf5a45786689e242064ca0bb1d3a01778f438f83e1a566003933f +LLVM.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/acc3db12b256c4d19309bd8a043c7490 +LLVM.v12.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/5f85f0f00c1c0db1b0cd816e7e1ce78d99ea91d886c67494489626c40417c72f49a6bdee2cb52b71b369172909481e92ab7d99bedf9a65589e02ac1001695838 +LLVM.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/a0e3e199206f4ac941bf1c668123ddaa +LLVM.v12.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/1a905dbf74f8ccce1ebf276b9a9f86478bf4e582be233bfebd6a12f78895ee014ce85b3a54fac382651abd461691643373f634efc41f923e76d02075d096c453 +LLVM.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/74d20c4eab17b1b78752ef1288fa72ee +LLVM.v12.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/19f1f83fae86468045ce0db8e9adcd76d7613b9bcb69bf2f63933020a0508cf6114bffb105c7280881b9504413ec88bb189c244a00ee4bb00a59e781f1ab10ae +LLVM.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/ec0d46c670124a577fec23373d1bf554 +LLVM.v12.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/6478e8060b5bd8f9dabf379a1f967f7e3c5b25382eedb45b5ba95f63b3c9c072c55bbe5ade9be55d27e5dcdd4cdda5cfbc24dff9e8a72ca0d338975c2769a0a2 +LLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/eeac65dd85aa6d66ef6cad2150d0906a +LLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/e66102d5103980d25781945e54cf5c50b9029b57df052a94b2c4481dcbee0c30cee0ec78f5da523385482204f9d9875575a14af21dc8dbb0cf08127f9a3225e8 +LLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/6ffc46886a2e730bbc7fcfdb76b627db +LLVM.v12.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/eca9686b54eeda7b539acb8437fb43e2676e72501bf677de103502bb41ab708f0abb759e8be11f1e845da34aa16aa3f365efbafd10c326a1f02978a954b607ae +LLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/4dc0d110eb0953835e7cb624d82e1688 +LLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/d49a4513f3fcd69c7b8521964d25f0747933561b41cb7c40058581d2feeb9f3ee5811784a93fab4784e594612415729835ae086c7b6a3235c0e506759e1d5b90 +LLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/19c73dafac806d36cb63c225ec8a0d2b +LLVM.v12.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/50b4c36d3ea6b6a8570ec85ca02b454b8912c025e0ff28a9232585a0bc54dc90e2ce5ff20db5b4bb01359100cb74aa65517336486fce9abe5c90d5b9440fd0bd +LLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/4ff58627dc352dc8dbcdddfe15e11dd1 +LLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/f5d1c2c92c5999797a0892d2ed0ff64fd2b9ccaec3f091d17b5c76896bd99faf24b2ee95605772364087e79522bfab54b4ad2d4327e4bdbd410cd6ef2f3488cb +LLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/4a9e0c6ad9bb5ddb511b246bd1794db7 +LLVM.v12.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/8ed5f76811231f5821fd192e7191187554ee770e6aa59794aef645d9a3fa3ac2b26ab1d0e849520c739171c41e7f00ce8872d868f5efad646f0feb16e2c0255f +LLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/7a03cf38fb4d11ceb2d67c282228f7d0 +LLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/65b84023e2dc8e4da55eca0ffbd0921c18ce3c4e9cf8b95d56442c0cc6bdec25bb1063a273aed390ddbf7839a84588df92ef7152c2bd999984e62f81b03e53b7 +LLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/b8abd832fbe5b103c7fc53eb3a62d0c9 +LLVM.v12.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/cf22eadec8131ec287bc72fdfc90e65f81ddd21ccb908c7c0a8aff79b72f17d5429f6a9e0748e9581e82d82d089f433b2bcdfe96d18b3cdbec3019150f91efc9 +LLVM.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/cb62fed90d93fd1caae4bffa8568a923 +LLVM.v12.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/e8459774501520179052ce27d6e28025776e81f90e64c6835671a82882f03c5835f6c0536c3d4742b8bf3456a787378a7883faf1592889d67c6b1861accb95fc +LLVM.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/cdd8eac17b0979f25579b5df14c22dac +LLVM.v12.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/51a92d27b676e755cc4ef5762a68ed323b9169bcc6891f1f979dcdceafa5d5a627abfd2a048726fc05bfe8063e678645e52499409143cb91fcc1640ae1a803db +LLVM.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/292dad78439e6adf32e4c52991e48ee4 +LLVM.v12.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/7c99a2a768c31a982d773a954109f2e1c6bd7c697e89e9b21a53fbdf91a46688a471cff2652fb7fd7809b0202526f8a94708958f1d1cbc49c000ad88c3c56a21 +LLVM.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/287b98d99f9cc1537206cef8e962babc +LLVM.v12.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/a7185740df4ab6e8de6d77c4cb810502fec5b5f4b1f24a5dd87f717ef8d881631fb25842236fb177a8fb193d349e9f0072f94632b080147af6dd451f3064dcce +LLVM.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/bde06b7de8bfe67bd17a3eddeceda181 +LLVM.v12.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/e08c227617f9baccaa3200d82bd98017a41fe4230d3eddce11e9224e63ed7206124931ffd2553d61d5a937213da74f605611f531dd14405de4d43873b9e32afe +LLVM.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/261802abe708e1ba66e31e5247c39c7f +LLVM.v12.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/779b8b78be912aed4e3ef52ffc9331ea94d223d86dbc470b4690c21869522937e9e52cbe325e7795bc92f1f5a4aaf26f5abfc2f24aa3a0314d5e19d8842d169b +LLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/b5ddd1f4eaead404012fafb404887817 +LLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/4b607174be6f39cecc39f71db661a207ea034192f652782c1a49a5d8efd3eec5488eb8d70554a9b2ab8a3dad74f90b243d5ff8651fd6e366064c06ded6cfb586 +LLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/5623d2d0a1f3b1de282d520a4345d9ee +LLVM.v12.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/ca7c2eda3a33682289b39dcff0d203927faa805b89ca2e452ecc98f3feac86ce0423ed8f53ca2ccde70f661e458e39023bb1bc702f1c3bfbed10e252a1914c1e +LLVM.v12.0.1+0.x86_64-apple-darwin.tar.gz/md5/eb59f57374df1072421a64f61b53eebe +LLVM.v12.0.1+0.x86_64-apple-darwin.tar.gz/sha512/4e05f3e0f4eb4f0240c44427b6e6207304e9828bb18be0741bcb794214c64f01b7464bd40f5ace49428f805b08b1b3ffd48b0f2b463f4df1f9441da0d0aa2986 +LLVM.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/a1ea1dd2b8a37e8cf1f50ab1d5a8727d +LLVM.v12.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/46423791f1fe0ae41868b6b2cecb4ed2cab818516e384fd74668b9ea60c0142b839ed559259e8af4aeef182d5179a001138f0f7ab8c0f2f71bfba1d087b5c8a0 +LLVM.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/0284dff55154d6d35a9c143e4b4da8ae +LLVM.v12.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/82bfc6ce434cdf0a8ef8df9a3af97bde370e14007bf42837446ab4561ea7d9336ff77853a2a5e6d8675f74d0739bff3729f3625e8a75bbc0aa469b11df156fcf +LLVM.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/9bbbb46e2b4cb35a038bc96e3f7c4621 +LLVM.v12.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/97a5ab75fdff62d85c5996286ffc30c757ca83d965ca7a9442b0a7be57d2daf4a0913442ed8db39b9712702ff21e4002df7df01e971c64e032767584f90febb7 +LLVM.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/3fbaf503543a175c681ff5a78e54683a +LLVM.v12.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/1a9b2774e8265f1d90b9eac051ff9841ae912bc9bef9b8871551b3a6dba0fb76ca87433ee2f5bac99c27d642afc54248cde5b32e3d4ed35e86d5ed104fc803ce +LLVM.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/e7661c57e4f198442b5f7142bdde26c7 +LLVM.v12.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/41380a4603d5b78035e8a3550826a69887ab0f0336384c7c6aa9d123c5aa68fbc780ff8142403a2e5b69d3bacc2a93f439bf3217335542a14380d13812bbe1d3 +LLVM.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/89400c38523fb8d13064beac9dc7dd20 +LLVM.v12.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/6de8dfaded2b61fa3780b08efce53252b8f4521fe2913fa278e2c17e3db988996de8d45c685357ec12ba770d321d93f39ed48909b5eb72c26987a0c516857e86 +LLVM.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/ad4454540db96568b4b5f4fd6ff3d782 +LLVM.v12.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/3a22f3ccd38201eda44c8fdc37495eb257027ccc73a1f08c8b6f3b90db218a69363c08b610b2590e7bc33c1aceeb9caf62a8f424599d2a3258c70cc215893489 diff --git a/doc/src/devdocs/llvm.md b/doc/src/devdocs/llvm.md index 7b8334e27ae59..fd14b0020ccbe 100644 --- a/doc/src/devdocs/llvm.md +++ b/doc/src/devdocs/llvm.md @@ -42,7 +42,7 @@ The default version of LLVM is specified in `deps/Versions.make`. You can overri a file called `Make.user` in the top-level directory and adding a line to it such as: ``` -LLVM_VER = 12.0.0 +LLVM_VER = 12.0.1 ``` Besides the LLVM release numerals, you can also use `LLVM_VER = svn` to build against the latest diff --git a/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml index 1321496e0695f..f50dc2262c24f 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.0+1" +version = "12.0.1+0" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 2ccbb1da726e8997c06bc5253c11a4f03d76eee7 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 18 Jul 2021 13:22:10 +0200 Subject: [PATCH 127/146] fix ASAN paths (cherry picked from commit 71308eb3981e7df78285d78ffcb5db1536c14a4f) --- Make.inc | 2 +- contrib/asan/Make.user.asan | 10 ++++++---- contrib/asan/build.sh | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Make.inc b/Make.inc index 5f8fcab2ede2c..3d61f5255ef1a 100644 --- a/Make.inc +++ b/Make.inc @@ -1390,7 +1390,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/tools/clang CXX=~+/../usr/tools/clang USECLANG=1 analyzegc +# make CC=~+/../usr/bin/clang CXX=~+/../usr/bin/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 3bcc34df68323..7277350074188 100644 --- a/contrib/asan/Make.user.asan +++ b/contrib/asan/Make.user.asan @@ -1,10 +1,12 @@ -TOOLCHAIN=$(BUILDROOT)/../toolchain/usr/tools +TOOLCHAIN=$(BUILDROOT)/../toolchain +BINDIR=$(TOOLCHAIN)/usr/bin +TOOLDIR=$(TOOLCHAIN)/usr/tools # use our new toolchain USECLANG=1 -override CC=$(TOOLCHAIN)/clang -override CXX=$(TOOLCHAIN)/clang++ -export ASAN_SYMBOLIZER_PATH=$(TOOLCHAIN)/llvm-symbolizer +override CC=$(BINDIR)/clang +override CXX=$(TOOLDIR)/clang++ +export ASAN_SYMBOLIZER_PATH=$(TOOLDIR)/llvm-symbolizer USE_BINARYBUILDER_LLVM=1 diff --git a/contrib/asan/build.sh b/contrib/asan/build.sh index d124e0a92f1e0..5ef75a78fa2b1 100755 --- a/contrib/asan/build.sh +++ b/contrib/asan/build.sh @@ -41,6 +41,10 @@ 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..." From 1016edddf276760a0301975c8cffa9ddf03d273c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 18 Jul 2021 13:31:57 +0200 Subject: [PATCH 128/146] fix clang path in analyzegc (cherry picked from commit 8fa8530c84782040ad468d8f8fbad26842df9589) --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index bb38a848ab12f..8da3e4e6687d5 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_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 $<) + @$(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 $<) clang-sa-%: $(SRCDIR)/%.cpp $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) | analyzegc-deps-check - @$(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++ $<) + @$(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++ $<) # Add C files as a target of `analyzegc` analyzegc: $(addprefix clang-sa-,$(RUNTIME_SRCS)) From 693313b2d918b31dd02c92d6f6040f58ae81a871 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Fri, 16 Jul 2021 15:53:46 +0200 Subject: [PATCH 129/146] [Distributed] Allow workers to be started with threading enabled Makes the worker struct threadsafe as well as flushing the GC messages (cherry picked from commit 0c073ccb19ab926e25a1ddb457472f43ef946aeb) --- stdlib/Distributed/src/cluster.jl | 66 +++++++++++++++++---- stdlib/Distributed/src/macros.jl | 10 +--- stdlib/Distributed/src/managers.jl | 2 +- stdlib/Distributed/src/messages.jl | 28 ++++----- stdlib/Distributed/src/remotecall.jl | 46 ++++++++++---- stdlib/Distributed/test/distributed_exec.jl | 1 + stdlib/Distributed/test/threads.jl | 63 ++++++++++++++++++++ 7 files changed, 169 insertions(+), 47 deletions(-) create mode 100644 stdlib/Distributed/test/threads.jl diff --git a/stdlib/Distributed/src/cluster.jl b/stdlib/Distributed/src/cluster.jl index ebe4cac0f3bbe..591ce3f850551 100644 --- a/stdlib/Distributed/src/cluster.jl +++ b/stdlib/Distributed/src/cluster.jl @@ -95,13 +95,14 @@ end @enum WorkerState W_CREATED W_CONNECTED W_TERMINATING W_TERMINATED mutable struct Worker id::Int + msg_lock::Threads.ReentrantLock # Lock for del_msgs, add_msgs, and gcflag del_msgs::Array{Any,1} add_msgs::Array{Any,1} gcflag::Bool state::WorkerState - c_state::Condition # wait for state changes - ct_time::Float64 # creation time - conn_func::Any # used to setup connections lazily + c_state::Threads.Condition # wait for state changes, lock for state + ct_time::Float64 # creation time + conn_func::Any # used to setup connections lazily r_stream::IO w_stream::IO @@ -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, Threads.Condition(), time(), conn_func) w.initialized = Event() register_worker(w) w @@ -143,12 +144,16 @@ mutable struct Worker end function set_worker_state(w, state) - w.state = state - notify(w.c_state; all=true) + lock(w.c_state) do + w.state = state + notify(w.c_state; all=true) + end end function check_worker_state(w::Worker) + lock(w.c_state) if w.state === W_CREATED + unlock(w.c_state) if !isclusterlazy() if PGRP.topology === :all_to_all # Since higher pids connect with lower pids, the remote worker @@ -168,6 +173,8 @@ function check_worker_state(w::Worker) errormonitor(t) wait_for_conn(w) end + else + unlock(w.c_state) end end @@ -186,13 +193,25 @@ function exec_conn_func(w::Worker) end function wait_for_conn(w) + lock(w.c_state) if w.state === W_CREATED + unlock(w.c_state) timeout = worker_timeout() - (time() - w.ct_time) timeout <= 0 && error("peer $(w.id) has not connected to $(myid())") - @async (sleep(timeout); notify(w.c_state; all=true)) - wait(w.c_state) - w.state === W_CREATED && error("peer $(w.id) didn't connect to $(myid()) within $timeout seconds") + T = Threads.@spawn begin + sleep($timeout) + lock(w.c_state) do + notify(w.c_state; all=true) + end + end + errormonitor(T) + lock(w.c_state) do + wait(w.c_state) + w.state === W_CREATED && error("peer $(w.id) didn't connect to $(myid()) within $timeout seconds") + end + else + unlock(w.c_state) end nothing end @@ -471,6 +490,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() @@ -483,7 +506,10 @@ function addprocs_locked(manager::ClusterManager; kwargs...) while true if isempty(launched) istaskdone(t_launch) && break - @async (sleep(1); notify(launch_ntfy)) + @async begin + sleep(1) + notify(launch_ntfy) + end wait(launch_ntfy) end @@ -636,7 +662,12 @@ function create_worker(manager, wconfig) # require the value of config.connect_at which is set only upon connection completion for jw in PGRP.workers if (jw.id != 1) && (jw.id < w.id) - (jw.state === W_CREATED) && wait(jw.c_state) + # wait for wl to join + lock(jw.c_state) do + if jw.state === W_CREATED + wait(jw.c_state) + end + end push!(join_list, jw) end end @@ -659,7 +690,12 @@ function create_worker(manager, wconfig) end for wl in wlist - (wl.state === W_CREATED) && wait(wl.c_state) + if wl.state === W_CREATED + # wait for wl to join + lock(wl.c_state) do + wait(wl.c_state) + end + end push!(join_list, wl) end end @@ -676,7 +712,11 @@ function create_worker(manager, wconfig) @async manage(w.manager, w.id, w.config, :register) # wait for rr_ntfy_join with timeout timedout = false - @async (sleep($timeout); timedout = true; put!(rr_ntfy_join, 1)) + @async begin + sleep($timeout) + timedout = true + put!(rr_ntfy_join, 1) + end wait(rr_ntfy_join) if timedout error("worker did not connect within $timeout seconds") 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 diff --git a/stdlib/Distributed/src/managers.jl b/stdlib/Distributed/src/managers.jl index ce99d85801e17..7ac8007951ddc 100644 --- a/stdlib/Distributed/src/managers.jl +++ b/stdlib/Distributed/src/managers.jl @@ -160,7 +160,7 @@ function launch(manager::SSHManager, params::Dict, launched::Array, launch_ntfy: # Wait for all launches to complete. @sync for (i, (machine, cnt)) in enumerate(manager.machines) let machine=machine, cnt=cnt - @async try + @async try launch_on_machine(manager, $machine, $cnt, params, launched, launch_ntfy) catch e print(stderr, "exception launching on machine $(machine) : $(e)\n") diff --git a/stdlib/Distributed/src/messages.jl b/stdlib/Distributed/src/messages.jl index 47f70e044a2c0..fcba709b4db4a 100644 --- a/stdlib/Distributed/src/messages.jl +++ b/stdlib/Distributed/src/messages.jl @@ -126,22 +126,20 @@ 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 + lock(w.msg_lock) do + w.gcflag || return # early exit if someone else got to this + w.gcflag = false + msgs = w.add_msgs + w.add_msgs = Any[] + if !isempty(msgs) + remote_do(add_clients, w, msgs) + 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) + msgs = w.del_msgs + w.del_msgs = Any[] + if !isempty(msgs) + remote_do(del_clients, w, msgs) + end end end diff --git a/stdlib/Distributed/src/remotecall.jl b/stdlib/Distributed/src/remotecall.jl index 91e5de36736bd..4f0e066ce26e0 100644 --- a/stdlib/Distributed/src/remotecall.jl +++ b/stdlib/Distributed/src/remotecall.jl @@ -247,22 +247,42 @@ 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 + wait(any_gc_flag) + flush_gc_msgs() # handles throws internally + end + end + end + ) end +# Function can be called within a finalizer 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) + msg = (remoteref_id(rr), myid()) + # We cannot acquire locks from finalizers + Threads.@spawn begin + lock(w.msg_lock) do + push!(w.del_msgs, msg) + w.gcflag = true + end + lock(any_gc_flag) do + notify(any_gc_flag) + end + end end end @@ -288,9 +308,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)) + w.gcflag = true + end + lock(any_gc_flag) do + notify(any_gc_flag) + end end end diff --git a/stdlib/Distributed/test/distributed_exec.jl b/stdlib/Distributed/test/distributed_exec.jl index 606b7fa81c3e7..547b035e8e6b9 100644 --- a/stdlib/Distributed/test/distributed_exec.jl +++ b/stdlib/Distributed/test/distributed_exec.jl @@ -1689,4 +1689,5 @@ include("splitrange.jl") # Run topology tests last after removing all workers, since a given # cluster at any time only supports a single topology. rmprocs(workers()) +include("threads.jl") include("topology.jl") diff --git a/stdlib/Distributed/test/threads.jl b/stdlib/Distributed/test/threads.jl new file mode 100644 index 0000000000000..57d99b7ea056c --- /dev/null +++ b/stdlib/Distributed/test/threads.jl @@ -0,0 +1,63 @@ +using Test +using Distributed, Base.Threads +using Base.Iterators: product + +exeflags = ("--startup-file=no", + "--check-bounds=yes", + "--depwarn=error", + "--threads=2") + +function call_on(f, wid, tid) + remotecall(wid) do + t = Task(f) + ccall(:jl_set_task_tid, Cvoid, (Any, Cint), t, tid - 1) + schedule(t) + @assert threadid(t) == tid + t + end +end + +# Run function on process holding the data to only serialize the result of f. +# This becomes useful for things that cannot be serialized (e.g. running tasks) +# or that would be unnecessarily big if serialized. +fetch_from_owner(f, rr) = remotecall_fetch(f ∘ fetch, rr.where, rr) + +isdone(rr) = fetch_from_owner(istaskdone, rr) +isfailed(rr) = fetch_from_owner(istaskfailed, rr) + +@testset "RemoteChannel allows put!/take! from thread other than 1" begin + ws = ts = product(1:2, 1:2) + @testset "from worker $w1 to $w2 via 1" for (w1, w2) in ws + @testset "from thread $w1.$t1 to $w2.$t2" for (t1, t2) in ts + # We want (the default) lazyness, so that we wait for `Worker.c_state`! + procs_added = addprocs(2; exeflags, lazy=true) + @everywhere procs_added using Base.Threads + + p1 = procs_added[w1] + p2 = procs_added[w2] + chan_id = first(procs_added) + chan = RemoteChannel(chan_id) + send = call_on(p1, t1) do + put!(chan, nothing) + end + recv = call_on(p2, t2) do + take!(chan) + end + + # Wait on the spawned tasks on the owner + @sync begin + Threads.@spawn fetch_from_owner(wait, recv) + Threads.@spawn fetch_from_owner(wait, send) + end + + # Check the tasks + @test isdone(send) + @test isdone(recv) + + @test !isfailed(send) + @test !isfailed(recv) + + rmprocs(procs_added) + end + end +end From f3da8d9cc6830b5b119e302112a6ea398adf3731 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 19 Jul 2021 22:42:45 +0200 Subject: [PATCH 130/146] fixup to pull request #38405 (#41641) (cherry picked from commit 5af1cf0faf10308857f319b17432b007e318516b) --- stdlib/Distributed/src/cluster.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/Distributed/src/cluster.jl b/stdlib/Distributed/src/cluster.jl index 591ce3f850551..52400a129efb4 100644 --- a/stdlib/Distributed/src/cluster.jl +++ b/stdlib/Distributed/src/cluster.jl @@ -690,10 +690,10 @@ function create_worker(manager, wconfig) end for wl in wlist - if wl.state === W_CREATED - # wait for wl to join - lock(wl.c_state) do - wait(wl.c_state) + lock(wl.c_state) do + if wl.state === W_CREATED + # wait for wl to join + wait(wl.c_state) end end push!(join_list, wl) From ac5b266a299879a5e390b690cb8ada499414c123 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 2 Jul 2021 10:28:41 -0400 Subject: [PATCH 131/146] deprecate unsafe_length for simply length (#40382) This seems to be a fairly arbitrary case for throwing exceptions, when the user might often use this value in arithmetic afterwards, which is not checked. It leads to awkward complexity in the API however, where it may be unclear which function to reach for, with no particular justification for why a particular usage is "safe". And it inhibits optimization and performance due to the additional checks and error cases (and is not even entirely type-stable). (cherry picked from commit 3eefaf0a52d1f537c512282a3027ead8e5e4f44e) --- NEWS.md | 4 + base/abstractarray.jl | 15 +- base/broadcast.jl | 2 +- base/checked.jl | 12 +- base/deprecated.jl | 3 + base/indices.jl | 8 +- base/multidimensional.jl | 2 +- base/range.jl | 147 +++++++++++++------ base/subarray.jl | 10 +- doc/src/base/collections.md | 1 + stdlib/Dates/test/ranges.jl | 2 +- test/ranges.jl | 217 +++++++++++++++++++++-------- test/testhelpers/Furlongs.jl | 15 +- test/testhelpers/InfiniteArrays.jl | 8 +- test/testhelpers/OffsetArrays.jl | 1 - 15 files changed, 307 insertions(+), 140 deletions(-) diff --git a/NEWS.md b/NEWS.md index 7b2d16c2d2dc5..4a4b30f6a0db1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -144,6 +144,10 @@ Standard library changes * `replace(::String)` now accepts multiple patterns, which will be applied left-to-right simultaneously, so only one pattern will be applied to any character, and the patterns will only be applied to the input text, not the replacements ([#40484]). +* The `length` function on certain ranges of certain specific element types no longer checks for integer + overflow in most cases. The new function `checked_length` is now available, which will try to use checked + arithmetic to error if the result may be wrapping. Or use a package such as SaferIntegers.jl when + constructing the range. ([#40382]) #### Package Manager diff --git a/base/abstractarray.jl b/base/abstractarray.jl index f5eb075241dc6..f622b07d56e44 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -116,9 +116,6 @@ axes1(A::AbstractArray{<:Any,0}) = OneTo(1) axes1(A::AbstractArray) = (@_inline_meta; axes(A)[1]) axes1(iter) = oneto(length(iter)) -unsafe_indices(A) = axes(A) -unsafe_indices(r::AbstractRange) = (oneto(unsafe_length(r)),) # Ranges use checked_sub for size - """ keys(a::AbstractArray) @@ -580,14 +577,14 @@ end function trailingsize(inds::Indices, n) s = 1 for i=n:length(inds) - s *= unsafe_length(inds[i]) + s *= length(inds[i]) end return s end # This version is type-stable even if inds is heterogeneous function trailingsize(inds::Indices) @_inline_meta - prod(map(unsafe_length, inds)) + prod(map(length, inds)) end ## Bounds checking ## @@ -688,7 +685,7 @@ function checkbounds_indices(::Type{Bool}, ::Tuple{}, I::Tuple) @_inline_meta checkindex(Bool, OneTo(1), I[1])::Bool & checkbounds_indices(Bool, (), tail(I)) end -checkbounds_indices(::Type{Bool}, IA::Tuple, ::Tuple{}) = (@_inline_meta; all(x->unsafe_length(x)==1, IA)) +checkbounds_indices(::Type{Bool}, IA::Tuple, ::Tuple{}) = (@_inline_meta; all(x->length(x)==1, IA)) checkbounds_indices(::Type{Bool}, ::Tuple{}, ::Tuple{}) = true throw_boundserror(A, I) = (@_noinline_meta; throw(BoundsError(A, I))) @@ -2590,8 +2587,8 @@ function _sub2ind_recurse(inds, L, ind, i::Integer, I::Integer...) end nextL(L, l::Integer) = L*l -nextL(L, r::AbstractUnitRange) = L*unsafe_length(r) -nextL(L, r::Slice) = L*unsafe_length(r.indices) +nextL(L, r::AbstractUnitRange) = L*length(r) +nextL(L, r::Slice) = L*length(r.indices) offsetin(i, l::Integer) = i-1 offsetin(i, r::AbstractUnitRange) = i-first(r) @@ -2617,7 +2614,7 @@ end _lookup(ind, d::Integer) = ind+1 _lookup(ind, r::AbstractUnitRange) = ind+first(r) _div(ind, d::Integer) = div(ind, d), 1, d -_div(ind, r::AbstractUnitRange) = (d = unsafe_length(r); (div(ind, d), first(r), d)) +_div(ind, r::AbstractUnitRange) = (d = length(r); (div(ind, d), first(r), d)) # Vectorized forms function _sub2ind(inds::Indices{1}, I1::AbstractVector{T}, I::AbstractVector{T}...) where T<:Integer diff --git a/base/broadcast.jl b/base/broadcast.jl index 7c87fef3f19e6..c6651e28489a3 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -566,7 +566,7 @@ an `Int`. """ Base.@propagate_inbounds newindex(arg, I::CartesianIndex) = CartesianIndex(_newindex(axes(arg), I.I)) Base.@propagate_inbounds newindex(arg, I::Integer) = CartesianIndex(_newindex(axes(arg), (I,))) -Base.@propagate_inbounds _newindex(ax::Tuple, I::Tuple) = (ifelse(Base.unsafe_length(ax[1])==1, ax[1][1], I[1]), _newindex(tail(ax), tail(I))...) +Base.@propagate_inbounds _newindex(ax::Tuple, I::Tuple) = (ifelse(length(ax[1]) == 1, ax[1][1], I[1]), _newindex(tail(ax), tail(I))...) Base.@propagate_inbounds _newindex(ax::Tuple{}, I::Tuple) = () Base.@propagate_inbounds _newindex(ax::Tuple, I::Tuple{}) = (ax[1][1], _newindex(tail(ax), ())...) Base.@propagate_inbounds _newindex(ax::Tuple{}, I::Tuple{}) = () diff --git a/base/checked.jl b/base/checked.jl index 840015861923f..ba23d4c5acd2b 100644 --- a/base/checked.jl +++ b/base/checked.jl @@ -6,14 +6,14 @@ module Checked export checked_neg, checked_abs, checked_add, checked_sub, checked_mul, checked_div, checked_rem, checked_fld, checked_mod, checked_cld, - add_with_overflow, sub_with_overflow, mul_with_overflow + checked_length, add_with_overflow, sub_with_overflow, mul_with_overflow import Core.Intrinsics: checked_sadd_int, checked_ssub_int, checked_smul_int, checked_sdiv_int, checked_srem_int, checked_uadd_int, checked_usub_int, checked_umul_int, checked_udiv_int, checked_urem_int -import ..no_op_err, ..@_inline_meta, ..@_noinline_meta +import ..no_op_err, ..@_inline_meta, ..@_noinline_meta, ..checked_length # define promotion behavior for checked operations checked_add(x::Integer, y::Integer) = checked_add(promote(x,y)...) @@ -349,4 +349,12 @@ The overflow protection may impose a perceptible performance penalty. """ checked_cld(x::T, y::T) where {T<:Integer} = cld(x, y) # Base.cld already checks +""" + Base.checked_length(r) + +Calculates `length(r)`, but may check for overflow errors where applicable when +the result doesn't fit into `Union{Integer(eltype(r)),Int}`. +""" +checked_length(r) = length(r) # for most things, length doesn't error + end diff --git a/base/deprecated.jl b/base/deprecated.jl index c2a717a403a90..92d07fadbaa77 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -246,6 +246,9 @@ const Any16{N} = Tuple{Any,Any,Any,Any,Any,Any,Any,Any, const All16{T,N} = Tuple{T,T,T,T,T,T,T,T, T,T,T,T,T,T,T,T,Vararg{T,N}} +@deprecate unsafe_indices(A) axes(A) false +@deprecate unsafe_length(r) length(r) false + # END 1.6 deprecations # BEGIN 1.7 deprecations diff --git a/base/indices.jl b/base/indices.jl index ef9e2c52ca6a3..817d9d435522b 100644 --- a/base/indices.jl +++ b/base/indices.jl @@ -352,17 +352,14 @@ struct Slice{T<:AbstractUnitRange} <: AbstractUnitRange{Int} end Slice(S::Slice) = S axes(S::Slice) = (IdentityUnitRange(S.indices),) -unsafe_indices(S::Slice) = (IdentityUnitRange(S.indices),) axes1(S::Slice) = IdentityUnitRange(S.indices) axes(S::Slice{<:OneTo}) = (S.indices,) -unsafe_indices(S::Slice{<:OneTo}) = (S.indices,) axes1(S::Slice{<:OneTo}) = S.indices first(S::Slice) = first(S.indices) last(S::Slice) = last(S.indices) size(S::Slice) = (length(S.indices),) length(S::Slice) = length(S.indices) -unsafe_length(S::Slice) = unsafe_length(S.indices) getindex(S::Slice, i::Int) = (@_inline_meta; @boundscheck checkbounds(S, i); i) getindex(S::Slice, i::AbstractUnitRange{<:Integer}) = (@_inline_meta; @boundscheck checkbounds(S, i); i) getindex(S::Slice, i::StepRange{<:Integer}) = (@_inline_meta; @boundscheck checkbounds(S, i); i) @@ -383,17 +380,14 @@ end IdentityUnitRange(S::IdentityUnitRange) = S # IdentityUnitRanges are offset and thus have offset axes, so they are their own axes axes(S::IdentityUnitRange) = (S,) -unsafe_indices(S::IdentityUnitRange) = (S,) axes1(S::IdentityUnitRange) = S axes(S::IdentityUnitRange{<:OneTo}) = (S.indices,) -unsafe_indices(S::IdentityUnitRange{<:OneTo}) = (S.indices,) axes1(S::IdentityUnitRange{<:OneTo}) = S.indices first(S::IdentityUnitRange) = first(S.indices) last(S::IdentityUnitRange) = last(S.indices) size(S::IdentityUnitRange) = (length(S.indices),) length(S::IdentityUnitRange) = length(S.indices) -unsafe_length(S::IdentityUnitRange) = unsafe_length(S.indices) getindex(S::IdentityUnitRange, i::Int) = (@_inline_meta; @boundscheck checkbounds(S, i); i) getindex(S::IdentityUnitRange, i::AbstractUnitRange{<:Integer}) = (@_inline_meta; @boundscheck checkbounds(S, i); i) getindex(S::IdentityUnitRange, i::StepRange{<:Integer}) = (@_inline_meta; @boundscheck checkbounds(S, i); i) @@ -479,7 +473,7 @@ convert(::Type{LinearIndices{N,R}}, inds::LinearIndices{N}) where {N,R} = # AbstractArray implementation IndexStyle(::Type{<:LinearIndices}) = IndexLinear() axes(iter::LinearIndices) = map(axes1, iter.indices) -size(iter::LinearIndices) = map(unsafe_length, iter.indices) +size(iter::LinearIndices) = map(length, iter.indices) function getindex(iter::LinearIndices, i::Int) @_inline_meta @boundscheck checkbounds(iter, i) diff --git a/base/multidimensional.jl b/base/multidimensional.jl index 2f277af36cdc1..8104cddb34387 100644 --- a/base/multidimensional.jl +++ b/base/multidimensional.jl @@ -849,7 +849,7 @@ function _unsafe_getindex(::IndexStyle, A::AbstractArray, I::Vararg{Union{Real, # This is specifically not inlined to prevent excessive allocations in type unstable code shape = index_shape(I...) dest = similar(A, shape) - map(unsafe_length, axes(dest)) == map(unsafe_length, shape) || throw_checksize_error(dest, shape) + map(length, axes(dest)) == map(length, shape) || throw_checksize_error(dest, shape) _unsafe_getindex!(dest, A, I...) # usually a generated function, don't allow it to impact inference result return dest end diff --git a/base/range.jl b/base/range.jl index 9e6d6c0946250..e6a53e30892f3 100644 --- a/base/range.jl +++ b/base/range.jl @@ -585,9 +585,11 @@ end ## interface implementations +length(r::AbstractRange) = error("length implementation missing") # catch mistakes size(r::AbstractRange) = (length(r),) isempty(r::StepRange) = + # steprange_last_empty(r.start, r.step, r.stop) == r.stop (r.start != r.stop) & ((r.step > zero(r.step)) != (r.stop > r.start)) isempty(r::AbstractUnitRange) = first(r) > last(r) isempty(r::StepRangeLen) = length(r) == 0 @@ -614,7 +616,7 @@ julia> step(range(2.5, stop=10.9, length=85)) ``` """ step(r::StepRange) = r.step -step(r::AbstractUnitRange{T}) where{T} = oneunit(T) - zero(T) +step(r::AbstractUnitRange{T}) where {T} = oneunit(T) - zero(T) step(r::StepRangeLen) = r.step step(r::StepRangeLen{T}) where {T<:AbstractFloat} = T(r.step) step(r::LinRange) = (last(r)-first(r))/r.lendiv @@ -622,60 +624,127 @@ step(r::LinRange) = (last(r)-first(r))/r.lendiv step_hp(r::StepRangeLen) = r.step step_hp(r::AbstractRange) = step(r) -unsafe_length(r::AbstractRange) = length(r) # generic fallback - -function unsafe_length(r::StepRange) - n = Integer(div((r.stop - r.start) + r.step, r.step)) - isempty(r) ? zero(n) : n -end -length(r::StepRange) = unsafe_length(r) -unsafe_length(r::AbstractUnitRange) = Integer(last(r) - first(r) + step(r)) -unsafe_length(r::OneTo) = Integer(r.stop - zero(r.stop)) -length(r::AbstractUnitRange) = unsafe_length(r) -length(r::OneTo) = unsafe_length(r) -length(r::StepRangeLen) = r.len -length(r::LinRange) = r.len +axes(r::AbstractRange) = (oneto(length(r)),) # Needed to fold the `firstindex` call in SimdLoop.simd_index firstindex(::UnitRange) = 1 firstindex(::StepRange) = 1 firstindex(::LinRange) = 1 -function length(r::StepRange{T}) where T<:Union{Int,UInt,Int64,UInt64,Int128,UInt128} - isempty(r) && return zero(T) - if r.step > 1 - return checked_add(convert(T, div(unsigned(r.stop - r.start), r.step)), one(T)) - elseif r.step < -1 - return checked_add(convert(T, div(unsigned(r.start - r.stop), -r.step)), one(T)) - elseif r.step > 0 - return checked_add(div(checked_sub(r.stop, r.start), r.step), one(T)) +# n.b. checked_length for these is defined iff checked_add and checked_sub are +# defined between the relevant types +function checked_length(r::OrdinalRange{T}) where T + s = step(r) + # s != 0, by construction, but avoids the division error later + start = first(r) + if s == zero(s) || isempty(r) + return Integer(start - start + zero(s)) + end + stop = last(r) + if isless(s, zero(s)) + diff = checked_sub(start, stop) + s = -s else - return checked_add(div(checked_sub(r.start, r.stop), -r.step), one(T)) + diff = checked_sub(stop, start) end + a = Integer(div(diff, s)) + return checked_add(a, one(a)) end -function length(r::AbstractUnitRange{T}) where T<:Union{Int,Int64,Int128} +function checked_length(r::AbstractUnitRange{T}) where T + # compiler optimization: remove dead cases from above + if isempty(r) + return Integer(first(r) - first(r)) + end + a = Integer(checked_add(checked_sub(last(r), first(r)))) + return checked_add(a, one(a)) +end + +function length(r::OrdinalRange{T}) where T + s = step(r) + # s != 0, by construction, but avoids the division error later + start = first(r) + if s == zero(s) || isempty(r) + return Integer(start - start + zero(s)) + end + stop = last(r) + if isless(s, zero(s)) + diff = start - stop + s = -s + else + diff = stop - start + end + a = Integer(div(diff, s)) + return a + one(a) +end + + +function length(r::AbstractUnitRange{T}) where T @_inline_meta - checked_add(checked_sub(last(r), first(r)), one(T)) + a = Integer(last(r) - first(r)) # even when isempty, by construction (with overflow) + return a + one(a) end -length(r::OneTo{T}) where {T<:Union{Int,Int64}} = T(r.stop) -length(r::AbstractUnitRange{T}) where {T<:Union{UInt,UInt64,UInt128}} = - r.stop < r.start ? zero(T) : checked_add(last(r) - first(r), one(T)) +length(r::OneTo) = Integer(r.stop - zero(r.stop)) +length(r::StepRangeLen) = r.len +length(r::LinRange) = r.len -# some special cases to favor default Int type -let smallint = (Int === Int64 ? - Union{Int8,UInt8,Int16,UInt16,Int32,UInt32} : - Union{Int8,UInt8,Int16,UInt16}) - global length - - function length(r::StepRange{<:smallint}) - isempty(r) && return Int(0) - div(Int(r.stop)+Int(r.step) - Int(r.start), Int(r.step)) +let bigints = Union{Int, UInt, Int64, UInt64, Int128, UInt128} + global length, checked_length + # compile optimization for which promote_type(T, Int) == T + length(r::OneTo{T}) where {T<:bigints} = r.stop + # slightly more accurate length and checked_length in extreme cases + # (near typemax) for types with known `unsigned` functions + function length(r::OrdinalRange{T}) where T<:bigints + s = step(r) + s == zero(s) && return zero(T) # unreachable, by construction, but avoids the error case here later + isempty(r) && return zero(T) + diff = last(r) - first(r) + # if |s| > 1, diff might have overflowed, but unsigned(diff)÷s should + # therefore still be valid (if the result is representable at all) + # n.b. !(s isa T) + if s isa Unsigned || -1 <= s <= 1 || s == -s + a = div(diff, s) + elseif s < 0 + a = div(unsigned(-diff), -s) % typeof(diff) + else + a = div(unsigned(diff), s) % typeof(diff) + end + return Integer(a) + one(a) + end + function checked_length(r::OrdinalRange{T}) where T<:bigints + s = step(r) + s == zero(s) && return zero(T) # unreachable, by construction, but avoids the error case here later + isempty(r) && return zero(T) + stop, start = last(r), first(r) + # n.b. !(s isa T) + if s > 1 + diff = stop - start + a = convert(T, div(unsigned(diff), s)) + elseif s < -1 + diff = start - stop + a = convert(T, div(unsigned(diff), -s)) + elseif s > 0 + a = div(checked_sub(stop, start), s) + else + a = div(checked_sub(start, stop), -s) + end + return checked_add(a, one(a)) end +end - length(r::AbstractUnitRange{<:smallint}) = Int(last(r)) - Int(first(r)) + 1 - length(r::OneTo{<:smallint}) = Int(r.stop) +# some special cases to favor default Int type +let smallints = (Int === Int64 ? + Union{Int8, UInt8, Int16, UInt16, Int32, UInt32} : + Union{Int8, UInt8, Int16, UInt16}) + global length, checked_length + # n.b. !(step isa T) + length(r::OrdinalRange{<:smallints}) = div(Int(last(r)) - Int(first(r)), step(r)) + 1 + length(r::AbstractUnitRange{<:smallints}) = Int(last(r)) - Int(first(r)) + 1 + length(r::OneTo{<:smallints}) = Int(r.stop) + checked_length(r::OrdinalRange{<:smallints}) = length(r) + checked_length(r::AbstractUnitRange{<:smallints}) = length(r) + checked_length(r::OneTo{<:smallints}) = length(r) end first(r::OrdinalRange{T}) where {T} = convert(T, r.start) diff --git a/base/subarray.jl b/base/subarray.jl index 32262058cb55b..89a4db4d65790 100644 --- a/base/subarray.jl +++ b/base/subarray.jl @@ -60,7 +60,7 @@ viewindexing(I::Tuple{Vararg{Any}}) = IndexCartesian() viewindexing(I::Tuple{AbstractArray, Vararg{Any}}) = IndexCartesian() # Simple utilities -size(V::SubArray) = (@_inline_meta; map(unsafe_length, axes(V))) +size(V::SubArray) = (@_inline_meta; map(length, axes(V))) similar(V::SubArray, T::Type, dims::Dims) = similar(V.parent, T, dims) @@ -362,7 +362,7 @@ compute_stride1(parent::AbstractArray, I::NTuple{N,Any}) where {N} = compute_stride1(s, inds, I::Tuple{}) = s compute_stride1(s, inds, I::Tuple{Vararg{ScalarIndex}}) = s compute_stride1(s, inds, I::Tuple{ScalarIndex, Vararg{Any}}) = - (@_inline_meta; compute_stride1(s*unsafe_length(inds[1]), tail(inds), tail(I))) + (@_inline_meta; compute_stride1(s*length(inds[1]), tail(inds), tail(I))) compute_stride1(s, inds, I::Tuple{AbstractRange, Vararg{Any}}) = s*step(I[1]) compute_stride1(s, inds, I::Tuple{Slice, Vararg{Any}}) = s compute_stride1(s, inds, I::Tuple{Any, Vararg{Any}}) = throw(ArgumentError("invalid strided index type $(typeof(I[1]))")) @@ -407,12 +407,12 @@ end function compute_linindex(f, s, IP::Tuple, I::Tuple{ScalarIndex, Vararg{Any}}) @_inline_meta Δi = I[1]-first(IP[1]) - compute_linindex(f + Δi*s, s*unsafe_length(IP[1]), tail(IP), tail(I)) + compute_linindex(f + Δi*s, s*length(IP[1]), tail(IP), tail(I)) end function compute_linindex(f, s, IP::Tuple, I::Tuple{Any, Vararg{Any}}) @_inline_meta Δi = first(I[1])-first(IP[1]) - compute_linindex(f + Δi*s, s*unsafe_length(IP[1]), tail(IP), tail(I)) + compute_linindex(f + Δi*s, s*length(IP[1]), tail(IP), tail(I)) end compute_linindex(f, s, IP::Tuple, I::Tuple{}) = f @@ -447,5 +447,5 @@ _indices_sub(::Real, I...) = (@_inline_meta; _indices_sub(I...)) _indices_sub() = () function _indices_sub(i1::AbstractArray, I...) @_inline_meta - (unsafe_indices(i1)..., _indices_sub(I...)...) + (axes(i1)..., _indices_sub(I...)...) end diff --git a/doc/src/base/collections.md b/doc/src/base/collections.md index f8ef12071171a..84e5702e0e396 100644 --- a/doc/src/base/collections.md +++ b/doc/src/base/collections.md @@ -66,6 +66,7 @@ Base.LinRange Base.isempty Base.empty! Base.length +Base.checked_length ``` Fully implemented by: diff --git a/stdlib/Dates/test/ranges.jl b/stdlib/Dates/test/ranges.jl index 6eb6371376867..52416fc95ec0c 100644 --- a/stdlib/Dates/test/ranges.jl +++ b/stdlib/Dates/test/ranges.jl @@ -515,7 +515,7 @@ end @test length(Dates.Year(1):Dates.Year(1):Dates.Year(10)) == 10 @test length(Dates.Year(10):Dates.Year(-1):Dates.Year(1)) == 10 @test length(Dates.Year(10):Dates.Year(-2):Dates.Year(1)) == 5 -@test_throws OverflowError length(typemin(Dates.Year):Dates.Year(1):typemax(Dates.Year)) +@test length(typemin(Dates.Year):Dates.Year(1):typemax(Dates.Year)) == 0 # overflow @test_throws MethodError Dates.Date(0):Dates.DateTime(2000) @test_throws MethodError Dates.Date(0):Dates.Year(10) @test length(range(Dates.Date(2000), step=Dates.Day(1), length=366)) == 366 diff --git a/test/ranges.jl b/test/ranges.jl index 783120c361bcd..b622fc05b3ca6 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1,5 +1,7 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license +using Base.Checked: checked_length + @testset "range construction" begin @test_throws ArgumentError range(start=1, step=1, stop=2, length=10) @test_throws ArgumentError range(start=1, step=1, stop=10, length=11) @@ -267,22 +269,28 @@ end end end @testset "length" begin - @test length(.1:.1:.3) == 3 - @test length(1.1:1.1:3.3) == 3 - @test length(1.1:1.3:3) == 2 - @test length(1:1:1.8) == 1 - @test length(1:.2:2) == 6 - @test length(1.:.2:2.) == 6 - @test length(2:-.2:1) == 6 - @test length(2.:-.2:1.) == 6 - @test length(2:.2:1) == 0 + @test length(.1:.1:.3) == checked_length(.1:.1:.3) == 3 + @test length(1.1:1.1:3.3) == checked_length(1.1:1.1:3.3) == 3 + @test length(1.1:1.3:3) == checked_length(1.1:1.3:3) == 2 + @test length(1:1:1.8) == checked_length(1:1:1.8) == 1 + @test length(1:.2:2) == checked_length(1:.2:2) == 6 + @test length(1.:.2:2.) == checked_length(1.:.2:2.) == 6 + @test length(2:-.2:1) == checked_length(2:-.2:1) == 6 + @test length(2.:-.2:1.) == checked_length(2.:-.2:1.) == 6 + @test length(2:.2:1) == checked_length(2:.2:1) == 0 @test length(2.:.2:1.) == 0 - @test length(1:0) == 0 - @test length(0.0:-0.5) == 0 - @test length(1:2:0) == 0 - @test length(Char(0):Char(0x001fffff)) == 2097152 - @test length(typemax(UInt64)//one(UInt64):1:typemax(UInt64)//one(UInt64)) == 1 + @test length(1:0) == checked_length(1:0) == 0 + @test length(0.0:-0.5) == checked_length(0.0:-0.5) == 0 + @test length(1:2:0) == checked_length(1:2:0) == 0 + let r = Char(0):Char(0x001fffff) + @test length(r) == 2097152 + @test_throws MethodError checked_length(r) == 2097152 # this would work if checked_sub is defined on Char + end + let r = typemax(UInt64)//one(UInt64):1:typemax(UInt64)//one(UInt64) + @test length(r) == 1 + @test_throws MethodError checked_length(r) == 1 # this would work if checked_sub is defined on Rational + end end @testset "keys/values" begin keytype_is_correct(r) = keytype(r) == eltype(keys(r)) @@ -501,22 +509,41 @@ for a=AbstractRange[3:6, 0:2:10], b=AbstractRange[0:1, 2:-1:0] end # avoiding intermediate overflow (#5065) -@test length(1:4:typemax(Int)) == div(typemax(Int),4) + 1 +@test length(1:4:typemax(Int)) == div(typemax(Int), 4) + 1 +@test checked_length(1:4:typemax(Int)) == div(typemax(Int), 4) + 1 # computed exactly in modulo arithmetic @testset "overflow in length" begin - Tset = Int === Int64 ? (Int,UInt,Int128,UInt128) : - (Int,UInt,Int64,UInt64,Int128, UInt128) + Tset = Int === Int64 ? (Int, UInt, Int128, UInt128) : + (Int, UInt, Int64, UInt64, Int128, UInt128) for T in Tset - @test_throws OverflowError length(zero(T):typemax(T)) - @test_throws OverflowError length(typemin(T):typemax(T)) - @test_throws OverflowError length(zero(T):one(T):typemax(T)) - @test_throws OverflowError length(typemin(T):one(T):typemax(T)) + @test length(zero(T):typemax(T)) == typemin(T) + @test length(typemin(T):typemax(T)) == T(0) + @test length(zero(T):one(T):typemax(T)) == typemin(T) + @test length(typemin(T):one(T):typemax(T)) == T(0) + @test_throws OverflowError checked_length(zero(T):typemax(T)) + @test_throws OverflowError checked_length(typemin(T):typemax(T)) + @test_throws OverflowError checked_length(zero(T):one(T):typemax(T)) + @test_throws OverflowError checked_length(typemin(T):one(T):typemax(T)) + @test length(one(T):typemax(T)) == checked_length(one(T):typemax(T)) == typemax(T) if T <: Signed - @test_throws OverflowError length(-one(T):typemax(T)-one(T)) - @test_throws OverflowError length(-one(T):one(T):typemax(T)-one(T)) + @test length(-one(T):typemax(T)-one(T)) == typemin(T) + @test length(-one(T):one(T):typemax(T)-one(T)) == typemin(T) + @test length(-one(T):typemax(T)) == typemin(T) + T(1) + @test length(zero(T):typemin(T):typemin(T)) == 2 + @test length(one(T):typemin(T):typemin(T)) == 2 + @test length(typemax(T):typemin(T):typemin(T)) == 2 + @test length(-one(T):typemin(T):typemin(T)) == 1 + @test length(zero(T):typemin(T):zero(T)) == 1 + @test length(zero(T):typemin(T):one(T)) == 0 + @test_throws OverflowError checked_length(-one(T):typemax(T)-one(T)) + @test_throws OverflowError checked_length(-one(T):one(T):typemax(T)-one(T)) + @test_throws InexactError checked_length(zero(T):typemin(T):typemin(T)) == 2 # this can be improved + @test_throws InexactError checked_length(one(T):typemin(T):typemin(T)) == 2 # this can be improved + @test_throws InexactError checked_length(typemax(T):typemin(T):typemin(T)) == 2 # this can be improved end end end + @testset "loops involving typemin/typemax" begin n = 0 s = 0 @@ -871,32 +898,45 @@ end end # issue #2959 @test 1.0:1.5 == 1.0:1.0:1.5 == 1.0:1.0 -#@test 1.0:(.3-.1)/.1 == 1.0:2.0 +@test_broken 1.0:(.3-.1)/.1 == 1.0:2.0 # (this is just shy of 2.0) @testset "length with typemin/typemax" begin - let r = typemin(Int64):2:typemax(Int64), s = typemax(Int64):-2:typemin(Int64) + let r = typemin(Int64):2:typemax(Int64) @test first(r) == typemin(Int64) - @test last(r) == (typemax(Int64)-1) - @test_throws OverflowError length(r) - - @test first(s) == typemax(Int64) - @test last(s) == (typemin(Int64)+1) - @test_throws OverflowError length(s) + @test last(r) == typemax(Int64) - 1 + @test length(r) == typemin(Int64) + @test_throws OverflowError checked_length(r) + end + let r = typemax(Int64):-2:typemin(Int64) + @test first(r) == typemax(Int64) + @test last(r) == typemin(Int64) + 1 + @test length(r) == typemin(Int64) + @test_throws OverflowError checked_length(r) end - @test length(typemin(Int64):3:typemax(Int64)) == 6148914691236517206 - @test length(typemax(Int64):-3:typemin(Int64)) == 6148914691236517206 + let r = typemin(Int64):3:typemax(Int64) + @test length(r) == checked_length(r) == 6148914691236517206 + end + let r = typemax(Int64):-3:typemin(Int64) + @test length(r) == checked_length(r) == 6148914691236517206 + end for s in 3:100 - @test length(typemin(Int):s:typemax(Int)) == length(big(typemin(Int)):big(s):big(typemax(Int))) - @test length(typemax(Int):-s:typemin(Int)) == length(big(typemax(Int)):big(-s):big(typemin(Int))) + r = typemin(Int):s:typemax(Int) + br = big(typemin(Int)):big(s):big(typemax(Int)) + @test length(r) == checked_length(r) == length(br) + + r = typemax(Int):-s:typemin(Int) + br = big(typemax(Int)):big(-s):big(typemin(Int)) + @test length(r) == checked_length(r) == length(br) end - @test length(UInt(1):UInt(1):UInt(0)) == 0 - @test length(typemax(UInt):UInt(1):(typemax(UInt)-1)) == 0 - @test length(typemax(UInt):UInt(2):(typemax(UInt)-1)) == 0 - @test length((typemin(Int)+3):5:(typemin(Int)+1)) == 0 + @test length(UInt(1):UInt(1):UInt(0)) == checked_length(UInt(1):UInt(1):UInt(0)) == 0 + @test length(typemax(UInt):UInt(1):(typemax(UInt)-1)) == checked_length(typemax(UInt):UInt(1):(typemax(UInt)-1)) == 0 + @test length(typemax(UInt):UInt(2):(typemax(UInt)-1)) == checked_length(typemax(UInt):UInt(2):(typemax(UInt)-1)) == 0 + @test length((typemin(Int)+3):5:(typemin(Int)+1)) == checked_length((typemin(Int)+3):5:(typemin(Int)+1)) == 0 end + # issue #6364 @test length((1:64)*(pi/5)) == 64 @@ -966,7 +1006,8 @@ end (Int8,UInt8,Int16,UInt16,Int32,UInt32) : (Int8,UInt8,Int16,UInt16)) for T in smallint - @test length(typemin(T):typemax(T)) == 2^(8*sizeof(T)) + s = typemin(T):typemax(T) + @test length(s) == checked_length(s) == 2^(8*sizeof(T)) end end @@ -974,7 +1015,7 @@ end @test (0:1//2:2)[1:2:3] == 0:1//1:1 # issue #12278 -@test length(1:UInt(0)) == 0 +@test length(1:UInt(0)) == checked_length(1:UInt(0)) == 0 @testset "zip" begin i = 0 @@ -1047,17 +1088,14 @@ end @test reverse(LinRange{Int}(0,3,4)) === LinRange{Int}(3,0,4) @test reverse(LinRange{Float64}(0.,3.,4)) === LinRange{Float64}(3.,0.,4) end -@testset "Issue #11245" begin - io = IOBuffer() - show(io, range(1, stop=2, length=3)) - str = String(take!(io)) -# @test str == "range(1.0, stop=2.0, length=3)" - @test str == "1.0:0.5:2.0" -end + +# issue #11245 +@test repr(range(1, stop=2, length=3)) == "1.0:0.5:2.0" @testset "issue 10950" begin r = 1//2:3 @test length(r) == 3 + @test_throws MethodError checked_length(r) == 3 # this would work if checked_sub is defined on Rational i = 1 for x in r @test x == i//2 @@ -1268,19 +1306,22 @@ end end r = 1f8-10:1f8 - @test_broken argmin(f) == argmin(collect(r)) - @test_broken argmax(f) == argmax(collect(r)) + rv = collect(r) + @test argmin(r) == argmin(rv) == 1 + @test r[argmax(r)] == r[argmax(rv)] == 1f8 + @test argmax(r) == lastindex(r) + @test argmax(rv) != lastindex(r) end @testset "OneTo" begin let r = Base.OneTo(-5) @test isempty(r) - @test length(r) == 0 + @test length(r) == checked_length(r) == 0 @test size(r) == (0,) end let r = Base.OneTo(3) @test !isempty(r) - @test length(r) == 3 + @test length(r) == checked_length(r) == 3 @test size(r) == (3,) @test step(r) == 1 @test first(r) == 1 @@ -1377,7 +1418,7 @@ end @testset "issue #20520" begin r = range(1.3173739f0, stop=1.3173739f0, length=3) - @test length(r) == 3 + @test length(r) == checked_length(r) == 3 @test first(r) === 1.3173739f0 @test last(r) === 1.3173739f0 @test r[2] === 1.3173739f0 @@ -1401,7 +1442,7 @@ using .Main.Furlongs @testset "dimensional correctness" begin @test length(Vector(Furlong(2):Furlong(10))) == 9 - @test length(range(Furlong(2), length=9)) == 9 + @test length(range(Furlong(2), length=9)) == checked_length(range(Furlong(2), length=9)) == 9 @test Vector(Furlong(2):Furlong(1):Furlong(10)) == Vector(range(Furlong(2), step=Furlong(1), length=9)) == Furlong.(2:10) @test Vector(Furlong(1.0):Furlong(0.5):Furlong(10.0)) == Vector(Furlong(1):Furlong(0.5):Furlong(10)) == Furlong.(1:0.5:10) @@ -1496,15 +1537,18 @@ module NonStandardIntegerRangeTest using Test +using Base.Checked: checked_length +import Base.Checked: checked_add, checked_sub + struct Position <: Integer val::Int end -Position(x::Position) = x # to resolve ambiguity with boot.jl:728 +Position(x::Position) = x # to resolve ambiguity with boot.jl:770 struct Displacement <: Integer val::Int end -Displacement(x::Displacement) = x # to resolve ambiguity with boot.jl:728 +Displacement(x::Displacement) = x # to resolve ambiguity with boot.jl:770 Base.:-(x::Displacement) = Displacement(-x.val) Base.:-(x::Position, y::Position) = Displacement(x.val - y.val) @@ -1521,14 +1565,67 @@ Base.Unsigned(x::Displacement) = Unsigned(x.val) Base.rem(x::Displacement, y::Displacement) = Displacement(rem(x.val, y.val)) Base.div(x::Displacement, y::Displacement) = Displacement(div(x.val, y.val)) -# required for collect (summing lengths); alternatively, should unsafe_length return Int by default? +# required for collect (summing lengths); alternatively, should length return Int by default? Base.promote_rule(::Type{Displacement}, ::Type{Int}) = Int Base.convert(::Type{Int}, x::Displacement) = x.val +# Unsigned complement, for testing checked_length +struct UPosition <: Unsigned + val::UInt +end +UPosition(x::UPosition) = x # to resolve ambiguity with boot.jl:770 + +struct UDisplacement <: Unsigned + val::UInt +end +UDisplacement(x::UDisplacement) = x # to resolve ambiguity with boot.jl:770 + +Base.show(io::IO, x::Union{Position, UPosition, Displacement, UDisplacement}) = + # should use show if we were to do this properly (instead of just a test-helper) + print(io, typeof(x).name.name, "(", x.val, ")") + +Base.:-(x::UPosition, y::UPosition) = UDisplacement(x.val - y.val) +Base.:-(x::UPosition, y::UDisplacement) = UPosition(x.val - y.val) +Base.:+(x::UPosition, y::UDisplacement) = UPosition(x.val + y.val) +Base.:+(x::UDisplacement, y::Displacement) = UDisplacement(x.val + y.val) +Base.:+(x::UDisplacement, y::UDisplacement) = UDisplacement(x.val + y.val) +checked_sub(x::UPosition, y::UPosition) = UDisplacement(checked_sub(x.val, y.val)) +checked_sub(x::UPosition, y::UDisplacement) = UPosition(checked_sub(x.val, y.val)) +checked_sub(x::UDisplacement, y::UDisplacement) = UDisplacement(checked_sub(x.val, y.val)) +checked_add(x::UPosition, y::UDisplacement) = UPosition(checked_add(x.val, y.val)) +checked_add(x::UDisplacement, y::UDisplacement) = UDisplacement(checked_add(x.val, y.val)) +Base.:+(x::UPosition, y::Displacement) = UPosition(x.val + y.val) +Base.:(<=)(x::UPosition, y::UPosition) = x.val <= y.val +Base.:(<)(x::UPosition, y::UPosition) = x.val < y.val +Base.:(<)(x::UDisplacement, y::UDisplacement) = x.val < y.val + +# for StepRange computation: +Base.rem(x::UDisplacement, y::Displacement) = UDisplacement(rem(x.val, y.val)) +Base.div(x::UDisplacement, y::Displacement) = UDisplacement(div(x.val, y.val)) +Base.rem(x::UDisplacement, y::UDisplacement) = UDisplacement(rem(x.val, y.val)) +Base.div(x::UDisplacement, y::UDisplacement) = UDisplacement(div(x.val, y.val)) + +#Base.promote_rule(::Type{UDisplacement}, ::Type{Int}) = Int +#Base.convert(::Type{Int}, x::UDisplacement) = Int(x.val) + @testset "Ranges with nonstandard Integers" begin for (start, stop) in [(2, 4), (3, 3), (3, -2)] - @test collect(Position(start) : Position(stop)) == Position.(start : stop) - end + r = Position(start) : Position(stop) + @test length(r) === Displacement(stop >= start ? stop - start + 1 : 0) + start >= 0 && stop >= 0 && @test UDisplacement(length(r).val) === + checked_length(UPosition(start) : UPosition(stop)) === + checked_length(UPosition(start) : Displacement(1) : UPosition(stop)) === + checked_length(UPosition(start) : UDisplacement(1) : UPosition(stop)) + @test collect(r) == Position.(start : stop) + end + + @test length(UPosition(3):Displacement(7):UPosition(100)) === checked_length(UPosition(3):Displacement(7):UPosition(100)) === UDisplacement(14) + @test length(UPosition(100):Displacement(7):UPosition(3)) === checked_length(UPosition(100):Displacement(7):UPosition(3)) === UDisplacement(0) + @test length(UPosition(100):Displacement(-7):UPosition(3)) === checked_length(UPosition(100):Displacement(-7):UPosition(3)) === UDisplacement(14) + @test length(UPosition(3):Displacement(-7):UPosition(100)) === checked_length(UPosition(3):Displacement(-7):UPosition(100)) === UDisplacement(0) + @test_throws OverflowError checked_length(zero(UPosition):UPosition(typemax(UInt))) + @test_throws OverflowError checked_length(zero(UPosition):Displacement(1):UPosition(typemax(UInt))) + @test_throws OverflowError checked_length(UPosition(typemax(UInt)):Displacement(-1):zero(UPosition)) for start in [3, 0, -2] @test collect(Base.OneTo(Position(start))) == Position.(Base.OneTo(start)) @@ -1550,7 +1647,7 @@ end end # module NonStandardIntegerRangeTest @testset "Issue #26619" begin - @test length(UInt(100) : -1 : 1) === UInt(100) + @test length(UInt(100) : -1 : 1) == checked_length(UInt(100) : -1 : 1) === UInt(100) @test collect(UInt(5) : -1 : 3) == [UInt(5), UInt(4), UInt(3)] let r = UInt(5) : -2 : 2 diff --git a/test/testhelpers/Furlongs.jl b/test/testhelpers/Furlongs.jl index 73d23a39d2d7b..f3583a532215a 100644 --- a/test/testhelpers/Furlongs.jl +++ b/test/testhelpers/Furlongs.jl @@ -20,7 +20,7 @@ Furlong{p}(x::Furlong{q}) where {p,q} = (@assert(p==q); Furlong{p,typeof(x.val)} Furlong{p,T}(x::Furlong{q}) where {T,p,q} = (@assert(p==q); Furlong{p,T}(T(x.val))) Base.promote_type(::Type{Furlong{p,T}}, ::Type{Furlong{p,S}}) where {p,T,S} = - (Base.@_pure_meta; Furlong{p,promote_type(T,S)}) + Furlong{p,promote_type(T,S)} Base.one(x::Furlong{p,T}) where {p,T} = one(T) Base.one(::Type{Furlong{p,T}}) where {p,T} = one(T) @@ -38,14 +38,12 @@ Base.floatmax(::Type{Furlong{p,T}}) where {p,T<:AbstractFloat} = Furlong{p}(floa Base.floatmax(::Furlong{p,T}) where {p,T<:AbstractFloat} = floatmax(Furlong{p,T}) Base.conj(x::Furlong{p,T}) where {p,T} = Furlong{p,T}(conj(x.val)) -# convert Furlong exponent p to a canonical form. This -# is not type stable, but it doesn't matter since it is used -# at compile time (in generated functions), not runtime +# convert Furlong exponent p to a canonical form canonical_p(p) = isinteger(p) ? Int(p) : Rational{Int}(p) Base.abs(x::Furlong{p}) where {p} = Furlong{p}(abs(x.val)) -@generated Base.abs2(x::Furlong{p}) where {p} = :(Furlong{$(canonical_p(2p))}(abs2(x.val))) -@generated Base.inv(x::Furlong{p}) where {p} = :(Furlong{$(canonical_p(-p))}(inv(x.val))) +Base.abs2(x::Furlong{p}) where {p} = Furlong{canonical_p(2p)}(abs2(x.val)) +Base.inv(x::Furlong{p}) where {p} = Furlong{canonical_p(-p)}(inv(x.val)) for f in (:isfinite, :isnan, :isreal, :isinf) @eval Base.$f(x::Furlong) = $f(x.val) @@ -64,11 +62,10 @@ end for op in (:(==), :(!=), :<, :<=, :isless, :isequal) @eval $op(x::Furlong{p}, y::Furlong{p}) where {p} = $op(x.val, y.val) end -# generated functions to allow type inference of the value of the exponent: for (f,op) in ((:_plus,:+),(:_minus,:-),(:_times,:*),(:_div,://)) - @eval @generated function $f(v::T, ::Furlong{p}, ::Union{Furlong{q},Val{q}}) where {T,p,q} + @eval function $f(v::T, ::Furlong{p}, ::Union{Furlong{q},Val{q}}) where {T,p,q} s = $op(p, q) - :(Furlong{$(canonical_p(s)),$T}(v)) + Furlong{canonical_p(s),T}(v) end end for (op,eop) in ((:*, :_plus), (:/, :_minus), (://, :_minus), (:div, :_minus)) diff --git a/test/testhelpers/InfiniteArrays.jl b/test/testhelpers/InfiniteArrays.jl index bc6de1afc5503..d69130f4d726a 100644 --- a/test/testhelpers/InfiniteArrays.jl +++ b/test/testhelpers/InfiniteArrays.jl @@ -39,13 +39,11 @@ struct OneToInf{T<:Integer} <: AbstractUnitRange{T} end OneToInf() = OneToInf{Int}() Base.axes(r::OneToInf) = (r,) -Base.unsafe_indices(r::OneToInf) = (r,) -Base.unsafe_length(r::OneToInf) = Infinity() Base.size(r::OneToInf) = (Infinity(),) Base.first(r::OneToInf{T}) where {T} = oneunit(T) -Base.length(r::OneToInf{T}) where {T} = Infinity() -Base.last(r::OneToInf{T}) where {T} = Infinity() +Base.length(r::OneToInf) = Infinity() +Base.last(r::OneToInf) = Infinity() Base.unitrange(r::OneToInf) = r Base.oneto(::Infinity) = OneToInf() -end \ No newline at end of file +end diff --git a/test/testhelpers/OffsetArrays.jl b/test/testhelpers/OffsetArrays.jl index 67de3ef476652..2f650808a12f2 100644 --- a/test/testhelpers/OffsetArrays.jl +++ b/test/testhelpers/OffsetArrays.jl @@ -68,7 +68,6 @@ offset_coerce(::Type{I}, r::AbstractUnitRange) where I<:AbstractUnitRange{T} whe @inline Base.parent(r::IdOffsetRange) = r.parent @inline Base.axes(r::IdOffsetRange) = (Base.axes1(r),) @inline Base.axes1(r::IdOffsetRange) = IdOffsetRange(Base.axes1(r.parent), r.offset) -@inline Base.unsafe_indices(r::IdOffsetRange) = (r,) @inline Base.length(r::IdOffsetRange) = length(r.parent) Base.reduced_index(i::IdOffsetRange) = typeof(i)(first(i):first(i)) # Workaround for #92 on Julia < 1.4 From be7ecbe9cf839d74057069d4677234e0f0c26867 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 23 Jul 2021 16:55:37 -0400 Subject: [PATCH 132/146] add length type parameter to StepRangeLen and LinRange (#41619) Allows creating these ranges for any type of integer lengths. Also need to be careful about using additive identity instead of multiplicative, and be even more consistent now about types in a few places. Fixes #41517 (cherry picked from commit 4f77aba13e5a6df1a8d255bbce472ac6934305c1) --- base/broadcast.jl | 21 +++-- base/range.jl | 193 +++++++++++++++++++++++------------------ base/twiceprecision.jl | 160 +++++++++++++++++++--------------- test/ranges.jl | 13 ++- 4 files changed, 223 insertions(+), 164 deletions(-) diff --git a/base/broadcast.jl b/base/broadcast.jl index c6651e28489a3..b34a73041708b 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -1121,19 +1121,20 @@ end ## scalar-range broadcast operations ## # DefaultArrayStyle and \ are not available at the time of range.jl -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::OrdinalRange) = r -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::StepRangeLen) = r -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::LinRange) = r +broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::AbstractRange) = r -broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::OrdinalRange) = range(-first(r), step=-step(r), length=length(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::AbstractRange) = range(-first(r), step=-step(r), length=length(r)) +broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::OrdinalRange) = range(-first(r), -last(r), step=-step(r)) broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::StepRangeLen) = StepRangeLen(-r.ref, -r.step, length(r), r.offset) broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::LinRange) = LinRange(-r.start, -r.stop, length(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Real, r::AbstractUnitRange) = range(x + first(r), length=length(r)) -broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::AbstractUnitRange, x::Real) = range(first(r) + x, length=length(r)) # 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::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 = @@ -1142,9 +1143,11 @@ broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r::LinRange, x::Number) = LinRa broadcasted(::DefaultArrayStyle{1}, ::typeof(+), x::Number, r::LinRange) = LinRange(x + r.start, x + r.stop, length(r)) broadcasted(::DefaultArrayStyle{1}, ::typeof(+), r1::AbstractRange, r2::AbstractRange) = r1 + r2 -broadcasted(::DefaultArrayStyle{1}, ::typeof(-), r::AbstractUnitRange, x::Number) = range(first(r)-x, length=length(r)) -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::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::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/base/range.jl b/base/range.jl index e6a53e30892f3..9a7c74e4d4088 100644 --- a/base/range.jl +++ b/base/range.jl @@ -24,9 +24,9 @@ _colon(::Ordered, ::Any, start::T, step, stop::T) where {T} = StepRange(start, step, stop) # for T<:Union{Float16,Float32,Float64} see twiceprecision.jl _colon(::Ordered, ::ArithmeticRounds, start::T, step, stop::T) where {T} = - StepRangeLen(start, step, floor(Int, (stop-start)/step)+1) + StepRangeLen(start, step, floor(Integer, (stop-start)/step)+1) _colon(::Any, ::Any, start::T, step, stop::T) where {T} = - StepRangeLen(start, step, floor(Int, (stop-start)/step)+1) + StepRangeLen(start, step, floor(Integer, (stop-start)/step)+1) """ (:)(start, [step], stop) @@ -415,10 +415,11 @@ oneto(r) = OneTo(r) ## Step ranges parameterized by length """ - StepRangeLen{T,R,S}(ref::R, step::S, len, [offset=1]) where {T,R,S} - StepRangeLen( ref::R, step::S, len, [offset=1]) where { R,S} + StepRangeLen( ref::R, step::S, len, [offset=1]) where { R,S} + StepRangeLen{T,R,S}( ref::R, step::S, len, [offset=1]) where {T,R,S} + StepRangeLen{T,R,S,L}(ref::R, step::S, len, [offset=1]) where {T,R,S,L} -A range `r` where `r[i]` produces values of type `T` (in the second +A range `r` where `r[i]` produces values of type `T` (in the first form, `T` is deduced automatically), parameterized by a `ref`erence value, a `step`, and the `len`gth. By default `ref` is the starting value `r[1]`, but alternatively you can supply it as the value of @@ -426,40 +427,45 @@ value `r[1]`, but alternatively you can supply it as the value of with `TwicePrecision` this can be used to implement ranges that are free of roundoff error. """ -struct StepRangeLen{T,R,S} <: AbstractRange{T} +struct StepRangeLen{T,R,S,L<:Integer} <: AbstractRange{T} ref::R # reference value (might be smallest-magnitude value in the range) step::S # step value - len::Int # length of the range - offset::Int # the index of ref + len::L # length of the range + offset::L # the index of ref - function StepRangeLen{T,R,S}(ref::R, step::S, len::Integer, offset::Integer = 1) where {T,R,S} + function StepRangeLen{T,R,S,L}(ref::R, step::S, len::Integer, offset::Integer = 1) where {T,R,S,L} if T <: Integer && !isinteger(ref + step) throw(ArgumentError("StepRangeLen{<:Integer} cannot have non-integer step")) end - len >= 0 || throw(ArgumentError("length cannot be negative, got $len")) - 1 <= offset <= max(1,len) || throw(ArgumentError("StepRangeLen: offset must be in [1,$len], got $offset")) - new(ref, step, len, offset) + len = convert(L, len) + len >= zero(len) || throw(ArgumentError("length cannot be negative, got $len")) + offset = convert(L, offset) + L1 = oneunit(typeof(len)) + L1 <= offset <= max(L1, len) || throw(ArgumentError("StepRangeLen: offset must be in [1,$len], got $offset")) + return new(ref, step, len, offset) end end +StepRangeLen{T,R,S}(ref::R, step::S, len::Integer, offset::Integer = 1) where {T,R,S} = + StepRangeLen{T,R,S,promote_type(Int,typeof(len))}(ref, step, len, offset) StepRangeLen(ref::R, step::S, len::Integer, offset::Integer = 1) where {R,S} = - StepRangeLen{typeof(ref+zero(step)),R,S}(ref, step, len, offset) + StepRangeLen{typeof(ref+zero(step)),R,S,promote_type(Int,typeof(len))}(ref, step, len, offset) StepRangeLen{T}(ref::R, step::S, len::Integer, offset::Integer = 1) where {T,R,S} = - StepRangeLen{T,R,S}(ref, step, len, offset) + StepRangeLen{T,R,S,promote_type(Int,typeof(len))}(ref, step, len, offset) ## range with computed step """ - LinRange{T} + LinRange{T,L} A range with `len` linearly spaced elements between its `start` and `stop`. The size of the spacing is controlled by `len`, which must -be an `Int`. +be an `Integer`. # Examples ```jldoctest julia> LinRange(1.5, 5.5, 9) -9-element LinRange{Float64}: +9-element LinRange{Float64, Int64}: 1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5 ``` @@ -483,26 +489,35 @@ julia> collect(LinRange(-0.1, 0.3, 5)) 0.3 ``` """ -struct LinRange{T} <: AbstractRange{T} +struct LinRange{T,L<:Integer} <: AbstractRange{T} start::T stop::T - len::Int - lendiv::Int + len::L + lendiv::L - function LinRange{T}(start,stop,len) where T + function LinRange{T,L}(start::T, stop::T, len::L) where {T,L<:Integer} len >= 0 || throw(ArgumentError("range($start, stop=$stop, length=$len): negative length")) - if len == 1 + onelen = oneunit(typeof(len)) + if len == onelen start == stop || throw(ArgumentError("range($start, stop=$stop, length=$len): endpoints differ")) - return new(start, stop, 1, 1) + return new(start, stop, len, len) end - lendiv = max(len-1, 1) + lendiv = max(len - onelen, onelen) if T <: Integer && !iszero(mod(stop-start, lendiv)) throw(ArgumentError("LinRange{<:Integer} cannot have non-integer step")) end - new(start,stop,len,lendiv) + return new(start, stop, len, lendiv) end end +function LinRange{T,L}(start, stop, len::Integer) where {T,L} + LinRange{T,L}(convert(T, start), convert(T, stop), convert(L, len)) +end + +function LinRange{T}(start, stop, len::Integer) where T + LinRange{T,promote_type(Int,typeof(len))}(start, stop, len) +end + function LinRange(start, stop, len::Integer) T = typeof((stop-start)/len) LinRange{T}(start, stop, len) @@ -621,6 +636,7 @@ step(r::StepRangeLen) = r.step step(r::StepRangeLen{T}) where {T<:AbstractFloat} = T(r.step) step(r::LinRange) = (last(r)-first(r))/r.lendiv +# high-precision step step_hp(r::StepRangeLen) = r.step step_hp(r::AbstractRange) = step(r) @@ -648,7 +664,7 @@ function checked_length(r::OrdinalRange{T}) where T diff = checked_sub(stop, start) end a = Integer(div(diff, s)) - return checked_add(a, one(a)) + return checked_add(a, oneunit(a)) end function checked_length(r::AbstractUnitRange{T}) where T @@ -657,7 +673,7 @@ function checked_length(r::AbstractUnitRange{T}) where T return Integer(first(r) - first(r)) end a = Integer(checked_add(checked_sub(last(r), first(r)))) - return checked_add(a, one(a)) + return checked_add(a, oneunit(a)) end function length(r::OrdinalRange{T}) where T @@ -675,14 +691,14 @@ function length(r::OrdinalRange{T}) where T diff = stop - start end a = Integer(div(diff, s)) - return a + one(a) + return a + oneunit(a) end function length(r::AbstractUnitRange{T}) where T @_inline_meta a = Integer(last(r) - first(r)) # even when isempty, by construction (with overflow) - return a + one(a) + return a + oneunit(a) end length(r::OneTo) = Integer(r.stop - zero(r.stop)) @@ -710,7 +726,7 @@ let bigints = Union{Int, UInt, Int64, UInt64, Int128, UInt128} else a = div(unsigned(diff), s) % typeof(diff) end - return Integer(a) + one(a) + return Integer(a) + oneunit(a) end function checked_length(r::OrdinalRange{T}) where T<:bigints s = step(r) @@ -729,7 +745,7 @@ let bigints = Union{Int, UInt, Int64, UInt64, Int128, UInt128} else a = div(checked_sub(start, stop), -s) end - return checked_add(a, one(a)) + return checked_add(a, oneunit(a)) end end @@ -803,10 +819,11 @@ copy(r::AbstractRange) = r ## iteration -function iterate(r::Union{LinRange,StepRangeLen}, i::Int=1) +function iterate(r::Union{StepRangeLen,LinRange}, i::Integer=zero(length(r))) @_inline_meta + i += oneunit(i) length(r) < i && return nothing - unsafe_getindex(r, i), i + 1 + unsafe_getindex(r, i), i end iterate(r::OrdinalRange) = isempty(r) ? nothing : (first(r), first(r)) @@ -897,7 +914,7 @@ function getindex(r::AbstractUnitRange, s::AbstractUnitRange{T}) where {T<:Integ @boundscheck checkbounds(r, s) if T === Bool - range(first(s) ? first(r) : last(r), length = Int(last(s))) + range(first(s) ? first(r) : last(r), length = Integer(last(s))) else f = first(r) st = oftype(f, f + first(s)-1) @@ -916,7 +933,7 @@ function getindex(r::AbstractUnitRange, s::StepRange{T}) where {T<:Integer} @boundscheck checkbounds(r, s) if T === Bool - range(first(s) ? first(r) : last(r), step=oneunit(eltype(r)), length = Int(last(s))) + range(first(s) ? first(r) : last(r), step=oneunit(eltype(r)), length = Integer(last(s))) else st = oftype(first(r), first(r) + s.start-1) return range(st, step=step(s), length=length(s)) @@ -949,24 +966,29 @@ function getindex(r::StepRangeLen{T}, s::OrdinalRange{S}) where {T, S<:Integer} @_inline_meta @boundscheck checkbounds(r, s) + len = length(s) + sstep = step_hp(s) + rstep = step_hp(r) + L = typeof(len) if S === Bool - if length(s) == 0 - return StepRangeLen{T}(first(r), step(r), 0, 1) - elseif length(s) == 1 + rstep *= one(sstep) + if len == 0 + return StepRangeLen{T}(first(r), rstep, zero(L), oneunit(L)) + elseif len == 1 if first(s) - return StepRangeLen{T}(first(r), step(r), 1, 1) + return StepRangeLen{T}(first(r), rstep, oneunit(L), oneunit(L)) else - return StepRangeLen{T}(first(r), step(r), 0, 1) + return StepRangeLen{T}(first(r), rstep, zero(L), oneunit(L)) end - else # length(s) == 2 - return StepRangeLen{T}(last(r), step(r), 1, 1) + else # len == 2 + return StepRangeLen{T}(last(r), rstep, oneunit(L), oneunit(L)) end else # Find closest approach to offset by s ind = LinearIndices(s) - offset = max(min(1 + round(Int, (r.offset - first(s))/step(s)), last(ind)), first(ind)) - ref = _getindex_hiprec(r, first(s) + (offset-1)*step(s)) - return StepRangeLen{T}(ref, r.step*step(s), length(s), offset) + offset = L(max(min(1 + round(L, (r.offset - first(s))/sstep), last(ind)), first(ind))) + ref = _getindex_hiprec(r, first(s) + (offset-1)*sstep) + return StepRangeLen{T}(ref, rstep*sstep, len, offset) end end @@ -974,22 +996,24 @@ function getindex(r::LinRange{T}, s::OrdinalRange{S}) where {T, S<:Integer} @_inline_meta @boundscheck checkbounds(r, s) + len = length(s) + L = typeof(len) if S === Bool - if length(s) == 0 - return LinRange(first(r), first(r), 0) - elseif length(s) == 1 + if len == 0 + return LinRange{T}(first(r), first(r), len) + elseif len == 1 if first(s) - return LinRange(first(r), first(r), 1) + return LinRange{T}(first(r), first(r), len) else - return LinRange(first(r), first(r), 0) + return LinRange{T}(first(r), first(r), zero(L)) end else # length(s) == 2 - return LinRange(last(r), last(r), 1) + return LinRange{T}(last(r), last(r), oneunit(L)) end else vfirst = unsafe_getindex(r, first(s)) vlast = unsafe_getindex(r, last(s)) - return LinRange{T}(vfirst, vlast, length(s)) + return LinRange{T}(vfirst, vlast, len) end end @@ -1153,8 +1177,8 @@ issubset(r::AbstractUnitRange{<:Integer}, s::AbstractUnitRange{<:Integer}) = ## linear operations on ranges ## -(r::OrdinalRange) = range(-first(r), step=-step(r), length=length(r)) --(r::StepRangeLen{T,R,S}) where {T,R,S} = - StepRangeLen{T,R,S}(-r.ref, -r.step, length(r), r.offset) +-(r::StepRangeLen{T,R,S,L}) where {T,R,S,L} = + StepRangeLen{T,R,S,L}(-r.ref, -r.step, r.len, r.offset) function -(r::LinRange) start = -r.start LinRange{typeof(start)}(start, -r.stop, length(r)) @@ -1168,12 +1192,12 @@ el_same(::Type{T}, a::Type{<:AbstractArray{S,n}}, b::Type{<:AbstractArray{T,n}}) el_same(::Type, a, b) = promote_typejoin(a, b) promote_rule(a::Type{UnitRange{T1}}, b::Type{UnitRange{T2}}) where {T1,T2} = - el_same(promote_type(T1,T2), a, b) + el_same(promote_type(T1, T2), a, b) UnitRange{T}(r::UnitRange{T}) where {T<:Real} = r UnitRange{T}(r::UnitRange) where {T<:Real} = UnitRange{T}(r.start, r.stop) promote_rule(a::Type{OneTo{T1}}, b::Type{OneTo{T2}}) where {T1,T2} = - el_same(promote_type(T1,T2), a, b) + el_same(promote_type(T1, T2), a, b) OneTo{T}(r::OneTo{T}) where {T<:Integer} = r OneTo{T}(r::OneTo) where {T<:Integer} = OneTo{T}(r.stop) @@ -1191,11 +1215,11 @@ OrdinalRange{T1, T2}(r::AbstractUnitRange{T1}) where {T1, T2<:Integer} = r OrdinalRange{T1, T2}(r::UnitRange) where {T1, T2<:Integer} = UnitRange{T1}(r) OrdinalRange{T1, T2}(r::OneTo) where {T1, T2<:Integer} = OneTo{T1}(r) -promote_rule(::Type{StepRange{T1a,T1b}}, ::Type{StepRange{T2a,T2b}}) where {T1a,T1b,T2a,T2b} = - el_same(promote_type(T1a,T2a), - # el_same only operates on array element type, so just promote second type parameter - StepRange{T1a, promote_type(T1b,T2b)}, - StepRange{T2a, promote_type(T1b,T2b)}) +function promote_rule(::Type{StepRange{T1a,T1b}}, ::Type{StepRange{T2a,T2b}}) where {T1a,T1b,T2a,T2b} + Tb = promote_type(T1b, T2b) + # el_same only operates on array element type, so just promote second type parameter + el_same(promote_type(T1a, T2a), StepRange{T1a,Tb}, StepRange{T2a,Tb}) +end StepRange{T1,T2}(r::StepRange{T1,T2}) where {T1,T2} = r promote_rule(a::Type{StepRange{T1a,T1b}}, ::Type{UR}) where {T1a,T1b,UR<:AbstractUnitRange} = @@ -1206,35 +1230,38 @@ StepRange(r::AbstractUnitRange{T}) where {T} = StepRange{T,T}(first(r), step(r), last(r)) (StepRange{T1,T2} where T1)(r::AbstractRange) where {T2} = StepRange{eltype(r),T2}(r) -promote_rule(::Type{StepRangeLen{T1,R1,S1}},::Type{StepRangeLen{T2,R2,S2}}) where {T1,T2,R1,R2,S1,S2} = - el_same(promote_type(T1,T2), - StepRangeLen{T1,promote_type(R1,R2),promote_type(S1,S2)}, - StepRangeLen{T2,promote_type(R1,R2),promote_type(S1,S2)}) -StepRangeLen{T,R,S}(r::StepRangeLen{T,R,S}) where {T,R,S} = r -StepRangeLen{T,R,S}(r::StepRangeLen) where {T,R,S} = - StepRangeLen{T,R,S}(convert(R, r.ref), convert(S, r.step), length(r), r.offset) +function promote_rule(::Type{StepRangeLen{T1,R1,S1,L1}},::Type{StepRangeLen{T2,R2,S2,L2}}) where {T1,T2,R1,R2,S1,S2,L1,L2} + R, S, L = promote_type(R1, R2), promote_type(S1, S2), promote_type(L1, L2) + el_same(promote_type(T1, T2), StepRangeLen{T1,R,S,L}, StepRangeLen{T2,R,S,L}) +end +StepRangeLen{T,R,S,L}(r::StepRangeLen{T,R,S,L}) where {T,R,S,L} = r +StepRangeLen{T,R,S,L}(r::StepRangeLen) where {T,R,S,L} = + StepRangeLen{T,R,S,L}(convert(R, r.ref), convert(S, r.step), convert(L, r.len), convert(L, r.offset)) StepRangeLen{T}(r::StepRangeLen) where {T} = - StepRangeLen(convert(T, r.ref), convert(T, r.step), length(r), r.offset) + StepRangeLen(convert(T, r.ref), convert(T, r.step), r.len, r.offset) -promote_rule(a::Type{StepRangeLen{T,R,S}}, ::Type{OR}) where {T,R,S,OR<:AbstractRange} = - promote_rule(a, StepRangeLen{eltype(OR), eltype(OR), eltype(OR)}) -StepRangeLen{T,R,S}(r::AbstractRange) where {T,R,S} = - StepRangeLen{T,R,S}(R(first(r)), S(step(r)), length(r)) +promote_rule(a::Type{StepRangeLen{T,R,S,L}}, ::Type{OR}) where {T,R,S,L,OR<:AbstractRange} = + promote_rule(a, StepRangeLen{eltype(OR), eltype(OR), eltype(OR), Int}) +StepRangeLen{T,R,S,L}(r::AbstractRange) where {T,R,S,L} = + StepRangeLen{T,R,S,L}(R(first(r)), S(step(r)), length(r)) StepRangeLen{T}(r::AbstractRange) where {T} = StepRangeLen(T(first(r)), T(step(r)), length(r)) StepRangeLen(r::AbstractRange) = StepRangeLen{eltype(r)}(r) -promote_rule(a::Type{LinRange{T1}}, b::Type{LinRange{T2}}) where {T1,T2} = - el_same(promote_type(T1,T2), a, b) -LinRange{T}(r::LinRange{T}) where {T} = r -LinRange{T}(r::AbstractRange) where {T} = LinRange{T}(first(r), last(r), length(r)) +function promote_rule(a::Type{LinRange{T1,L1}}, b::Type{LinRange{T2,L2}}) where {T1,T2,L1,L2} + L = promote_type(L1, L2) + el_same(promote_type(T1, T2), LinRange{T1,L}, LinRange{T2,L}) +end +LinRange{T,L}(r::LinRange{T,L}) where {T,L} = r +LinRange{T,L}(r::AbstractRange) where {T,L} = LinRange{T,L}(first(r), last(r), length(r)) +LinRange{T}(r::AbstractRange) where {T} = LinRange{T,typeof(length(r))}(first(r), last(r), length(r)) LinRange(r::AbstractRange{T}) where {T} = LinRange{T}(r) -promote_rule(a::Type{LinRange{T}}, ::Type{OR}) where {T,OR<:OrdinalRange} = - promote_rule(a, LinRange{eltype(OR)}) +promote_rule(a::Type{LinRange{T,L}}, ::Type{OR}) where {T,L,OR<:OrdinalRange} = + promote_rule(a, LinRange{eltype(OR),L}) -promote_rule(::Type{LinRange{L}}, b::Type{StepRangeLen{T,R,S}}) where {L,T,R,S} = - promote_rule(StepRangeLen{L,L,L}, b) +promote_rule(::Type{LinRange{A,L}}, b::Type{StepRangeLen{T2,R2,S2,L2}}) where {A,L,T2,R2,S2,L2} = + promote_rule(StepRangeLen{A,A,A,L}, b) ## concatenation ## @@ -1261,9 +1288,9 @@ function _reverse(r::StepRangeLen, ::Colon) # invalid. As `reverse(r)` is also empty, any offset would work so we keep # `r.offset` offset = isempty(r) ? r.offset : length(r)-r.offset+1 - StepRangeLen(r.ref, -r.step, length(r), offset) + return typeof(r)(r.ref, -r.step, length(r), offset) end -_reverse(r::LinRange{T}, ::Colon) where {T} = LinRange{T}(r.stop, r.start, length(r)) +_reverse(r::LinRange{T}, ::Colon) where {T} = typeof(r)(r.stop, r.start, length(r)) ## sorting ## diff --git a/base/twiceprecision.jl b/base/twiceprecision.jl index 55cdc59371674..a7ff116b56b36 100644 --- a/base/twiceprecision.jl +++ b/base/twiceprecision.jl @@ -194,6 +194,10 @@ function TwicePrecision{T}(x) where {T} TwicePrecision{T}(xT, T(Δx)) end +function TwicePrecision{T}(x::TwicePrecision) where {T} + TwicePrecision{T}(x.hi, x.lo) +end + TwicePrecision{T}(i::Integer) where {T<:AbstractFloat} = TwicePrecision{T}(canonicalize2(splitprec(T, i)...)...) @@ -207,7 +211,7 @@ end function TwicePrecision{T}(nd::Tuple{Any,Any}) where {T} n, d = nd - TwicePrecision{T}(n) / d + TwicePrecision{T}(TwicePrecision{T}(n) / d) end function TwicePrecision{T}(nd::Tuple{I,I}, nb::Integer) where {T,I} @@ -329,13 +333,13 @@ function steprangelen_hp(::Type{Float64}, ref::Tuple{Integer,Integer}, step::Tuple{Integer,Integer}, nb::Integer, len::Integer, offset::Integer) StepRangeLen(TwicePrecision{Float64}(ref), - TwicePrecision{Float64}(step, nb), Int(len), offset) + TwicePrecision{Float64}(step, nb), len, offset) end function steprangelen_hp(::Type{T}, ref::Tuple{Integer,Integer}, step::Tuple{Integer,Integer}, nb::Integer, len::Integer, offset::Integer) where {T<:IEEEFloat} - StepRangeLen{T}(ref[1]/ref[2], step[1]/step[2], Int(len), offset) + StepRangeLen{T}(ref[1]/ref[2], step[1]/step[2], len, offset) end # AbstractFloat constructors (can supply a single number or a 2-tuple @@ -347,14 +351,13 @@ function steprangelen_hp(::Type{Float64}, ref::F_or_FF, step::F_or_FF, nb::Integer, len::Integer, offset::Integer) StepRangeLen(TwicePrecision{Float64}(ref...), - twiceprecision(TwicePrecision{Float64}(step...), nb), Int(len), offset) + twiceprecision(TwicePrecision{Float64}(step...), nb), len, offset) end function steprangelen_hp(::Type{T}, ref::F_or_FF, step::F_or_FF, nb::Integer, len::Integer, offset::Integer) where {T<:IEEEFloat} - StepRangeLen{T}(asF64(ref), - asF64(step), Int(len), offset) + StepRangeLen{T}(asF64(ref), asF64(step), len, offset) end @@ -365,30 +368,33 @@ StepRangeLen(ref::TwicePrecision{T}, step::TwicePrecision{T}, # Construct range for rational start=start_n/den, step=step_n/den function floatrange(::Type{T}, start_n::Integer, step_n::Integer, len::Integer, den::Integer) where T + len = len + 0 # promote with Int if len < 2 || step_n == 0 - return steprangelen_hp(T, (start_n, den), (step_n, den), 0, Int(len), 1) + return steprangelen_hp(T, (start_n, den), (step_n, den), 0, len, oneunit(len)) end # index of smallest-magnitude value - imin = clamp(round(Int, -start_n/step_n+1), 1, Int(len)) + L = typeof(len) + imin = clamp(round(typeof(len), -start_n/step_n+1), oneunit(L), len) # Compute smallest-magnitude element to 2x precision ref_n = start_n+(imin-1)*step_n # this shouldn't overflow, so don't check nb = nbitslen(T, len, imin) - steprangelen_hp(T, (ref_n, den), (step_n, den), nb, Int(len), imin) + steprangelen_hp(T, (ref_n, den), (step_n, den), nb, len, imin) end function floatrange(a::AbstractFloat, st::AbstractFloat, len::Real, divisor::AbstractFloat) + len = len + 0 # promote with Int T = promote_type(typeof(a), typeof(st), typeof(divisor)) m = maxintfloat(T, Int) if abs(a) <= m && abs(st) <= m && abs(divisor) <= m ia, ist, idivisor = round(Int, a), round(Int, st), round(Int, divisor) if ia == a && ist == st && idivisor == divisor # We can return the high-precision range - return floatrange(T, ia, ist, Int(len), idivisor) + return floatrange(T, ia, ist, len, idivisor) end end # Fallback (misses the opportunity to set offset different from 1, # but otherwise this is still high-precision) - steprangelen_hp(T, (a,divisor), (st,divisor), nbitslen(T, len, 1), Int(len), 1) + steprangelen_hp(T, (a,divisor), (st,divisor), nbitslen(T, len, 1), len, oneunit(len)) end function (:)(start::T, step::T, stop::T) where T<:Union{Float16,Float32,Float64} @@ -407,7 +413,7 @@ function (:)(start::T, step::T, stop::T) where T<:Union{Float16,Float32,Float64} rem(den, start_d) == 0 && rem(den, step_d) == 0 # check lcm overflow start_n = round(Int, start*den) step_n = round(Int, step*den) - len = max(0, div(den*stop_n - stop_d*start_n + step_n*stop_d, step_n*stop_d)) + len = max(0, Int(div(den*stop_n - stop_d*start_n + step_n*stop_d, step_n*stop_d))) # Integer ops could overflow, so check that this makes sense if isbetween(start, start + (len-1)*step, stop + step/2) && !isbetween(start, start + len*step, stop) @@ -418,6 +424,7 @@ function (:)(start::T, step::T, stop::T) where T<:Union{Float16,Float32,Float64} end end # Fallback, taking start and step literally + # n.b. we use Int as the default length type for IEEEFloats lf = (stop-start)/step if lf < 0 len = 0 @@ -436,6 +443,7 @@ step(r::StepRangeLen{T,TwicePrecision{T},TwicePrecision{T}}) where {T<:AbstractF step(r::StepRangeLen{T,TwicePrecision{T},TwicePrecision{T}}) where {T} = T(r.step) function range_start_step_length(a::T, st::T, len::Integer) where T<:Union{Float16,Float32,Float64} + len = len + 0 # promote with Int start_n, start_d = rat(a) step_n, step_d = rat(st) if start_d != 0 && step_d != 0 && @@ -474,31 +482,38 @@ end function getindex(r::StepRangeLen{T,<:TwicePrecision,<:TwicePrecision}, s::OrdinalRange{S}) where {T, S<:Integer} @boundscheck checkbounds(r, s) + len = length(s) + L = typeof(len) + sstep = step_hp(s) + rstep = step_hp(r) if S === Bool - if length(s) == 0 - return StepRangeLen(r.ref, r.step, 0, 1) - elseif length(s) == 1 + #rstep *= one(sstep) + if len == 0 + return StepRangeLen{T}(first(r), rstep, zero(L), oneunit(L)) + elseif len == 1 if first(s) - return StepRangeLen(r.ref, r.step, 1, 1) + return StepRangeLen{T}(first(r), rstep, oneunit(L), oneunit(L)) else - return StepRangeLen(r.ref, r.step, 0, 1) + return StepRangeLen{T}(first(r), rstep, zero(L), oneunit(L)) end - else # length(s) == 2 - return StepRangeLen(r[2], step(r), 1, 1) + else # len == 2 + return StepRangeLen{T}(last(r), step(r), oneunit(L), oneunit(L)) end else - soffset = 1 + round(Int, (r.offset - first(s))/step(s)) - soffset = clamp(soffset, 1, length(s)) - ioffset = first(s) + (soffset-1)*step(s) - if step(s) == 1 || length(s) < 2 - newstep = r.step + soffset = round(L, (r.offset - first(s))/sstep + 1) + soffset = clamp(soffset, oneunit(L), len) + ioffset = L(first(s) + (soffset - oneunit(L)) * sstep) + if sstep == 1 || len < 2 + newstep = rstep #* one(sstep) else - newstep = twiceprecision(r.step*step(s), nbitslen(T, length(s), soffset)) + newstep = rstep * sstep + newstep = twiceprecision(newstep, nbitslen(T, len, soffset)) end + soffset = max(oneunit(L), soffset) if ioffset == r.offset - return StepRangeLen(r.ref, newstep, length(s), max(1,soffset)) + return StepRangeLen{T}(r.ref, newstep, len, soffset) else - return StepRangeLen(r.ref + (ioffset-r.offset)*r.step, newstep, length(s), max(1,soffset)) + return StepRangeLen{T}(r.ref + (ioffset-r.offset)*rstep, newstep, len, soffset) end end end @@ -509,30 +524,30 @@ end /(r::StepRangeLen{<:Real,<:TwicePrecision}, x::Real) = StepRangeLen(r.ref/x, twiceprecision(r.step/x, nbitslen(r)), length(r), r.offset) -StepRangeLen{T,R,S}(r::StepRangeLen{T,R,S}) where {T<:AbstractFloat,R<:TwicePrecision,S<:TwicePrecision} = r +StepRangeLen{T,R,S,L}(r::StepRangeLen{T,R,S,L}) where {T<:AbstractFloat,R<:TwicePrecision,S<:TwicePrecision,L} = r -StepRangeLen{T,R,S}(r::StepRangeLen) where {T<:AbstractFloat,R<:TwicePrecision,S<:TwicePrecision} = - _convertSRL(StepRangeLen{T,R,S}, r) +StepRangeLen{T,R,S,L}(r::StepRangeLen) where {T<:AbstractFloat,R<:TwicePrecision,S<:TwicePrecision,L} = + _convertSRL(StepRangeLen{T,R,S,L}, r) StepRangeLen{Float64}(r::StepRangeLen) = - _convertSRL(StepRangeLen{Float64,TwicePrecision{Float64},TwicePrecision{Float64}}, r) + _convertSRL(StepRangeLen{Float64,TwicePrecision{Float64},TwicePrecision{Float64},Int}, r) StepRangeLen{T}(r::StepRangeLen) where {T<:IEEEFloat} = - _convertSRL(StepRangeLen{T,Float64,Float64}, r) + _convertSRL(StepRangeLen{T,Float64,Float64,Int}, r) StepRangeLen{Float64}(r::AbstractRange) = - _convertSRL(StepRangeLen{Float64,TwicePrecision{Float64},TwicePrecision{Float64}}, r) + _convertSRL(StepRangeLen{Float64,TwicePrecision{Float64},TwicePrecision{Float64},Int}, r) StepRangeLen{T}(r::AbstractRange) where {T<:IEEEFloat} = - _convertSRL(StepRangeLen{T,Float64,Float64}, r) + _convertSRL(StepRangeLen{T,Float64,Float64,Int}, r) -function _convertSRL(::Type{StepRangeLen{T,R,S}}, r::StepRangeLen{<:Integer}) where {T,R,S} - StepRangeLen{T,R,S}(R(r.ref), S(r.step), length(r), r.offset) +function _convertSRL(::Type{StepRangeLen{T,R,S,L}}, r::StepRangeLen{<:Integer}) where {T,R,S,L} + StepRangeLen{T,R,S,L}(R(r.ref), S(r.step), L(length(r)), L(r.offset)) end -function _convertSRL(::Type{StepRangeLen{T,R,S}}, r::AbstractRange{<:Integer}) where {T,R,S} - StepRangeLen{T,R,S}(R(first(r)), S(step(r)), length(r)) +function _convertSRL(::Type{StepRangeLen{T,R,S,L}}, r::AbstractRange{<:Integer}) where {T,R,S,L} + StepRangeLen{T,R,S,L}(R(first(r)), S(step(r)), L(length(r))) end -function _convertSRL(::Type{StepRangeLen{T,R,S}}, r::AbstractRange{U}) where {T,R,S,U} +function _convertSRL(::Type{StepRangeLen{T,R,S,L}}, r::AbstractRange{U}) where {T,R,S,L,U} # if start and step have a rational approximation in the old type, # then we transfer that rational approximation to the new type f, s = first(r), step(r) @@ -546,17 +561,17 @@ function _convertSRL(::Type{StepRangeLen{T,R,S}}, r::AbstractRange{U}) where {T, rem(den, start_d) == 0 && rem(den, step_d) == 0 start_n = round(Int, f*den) step_n = round(Int, s*den) - return floatrange(T, start_n, step_n, length(r), den) + return floatrange(T, start_n, step_n, L(length(r)), den) end end - __convertSRL(StepRangeLen{T,R,S}, r) + return __convertSRL(StepRangeLen{T,R,S,L}, r) end -function __convertSRL(::Type{StepRangeLen{T,R,S}}, r::StepRangeLen{U}) where {T,R,S,U} - StepRangeLen{T,R,S}(R(r.ref), S(r.step), length(r), r.offset) +function __convertSRL(::Type{StepRangeLen{T,R,S,L}}, r::StepRangeLen{U}) where {T,R,S,L,U} + StepRangeLen{T,R,S,L}(R(r.ref), S(r.step), L(length(r)), L(r.offset)) end -function __convertSRL(::Type{StepRangeLen{T,R,S}}, r::AbstractRange{U}) where {T,R,S,U} - StepRangeLen{T,R,S}(R(first(r)), S(step(r)), length(r)) +function __convertSRL(::Type{StepRangeLen{T,R,S,L}}, r::AbstractRange{U}) where {T,R,S,L,U} + StepRangeLen{T,R,S,L}(R(first(r)), S(step(r)), L(length(r))) end function sum(r::StepRangeLen) @@ -567,7 +582,7 @@ function sum(r::StepRangeLen) np, nn = l - r.offset, r.offset - 1 # positive, negative # To prevent overflow in sum(1:n), multiply its factors by the step sp, sn = sumpair(np), sumpair(nn) - W = widen(Int) + W = widen(typeof(l)) Δn = W(sp[1]) * W(sp[2]) - W(sn[1]) * W(sn[2]) s = r.step * Δn # Add in contributions of ref @@ -603,19 +618,20 @@ function +(r1::StepRangeLen{T,R}, r2::StepRangeLen{T,R}) where T where R<:TwiceP imid = r1.offset ref = r1.ref + r2.ref else - imid = round(Int, (r1.offset+r2.offset)/2) + imid = round(typeof(len), (r1.offset+r2.offset)/2) ref1mid = _getindex_hiprec(r1, imid) ref2mid = _getindex_hiprec(r2, imid) ref = ref1mid + ref2mid end step = twiceprecision(r1.step + r2.step, nbitslen(T, len, imid)) - StepRangeLen{T,typeof(ref),typeof(step)}(ref, step, len, imid) + StepRangeLen{T,typeof(ref),typeof(step),typeof(len)}(ref, step, len, imid) end ## LinRange # For Float16, Float32, and Float64, this returns a StepRangeLen function range_start_stop_length(start::T, stop::T, len::Integer) where {T<:IEEEFloat} + len = len + 0 # promote with Int len < 2 && return _linspace1(T, start, stop, len) if start == stop return steprangelen_hp(T, start, zero(T), 0, len, 1) @@ -638,32 +654,35 @@ function range_start_stop_length(start::T, stop::T, len::Integer) where {T<:IEEE end function _linspace(start::T, stop::T, len::Integer) where {T<:IEEEFloat} + len = len + 0 # promote with Int (isfinite(start) && isfinite(stop)) || throw(ArgumentError("start and stop must be finite, got $start and $stop")) # Find the index that returns the smallest-magnitude element Δ, Δfac = stop-start, 1 if !isfinite(Δ) # handle overflow for large endpoints - Δ, Δfac = stop/len - start/len, Int(len) + Δ, Δfac = stop/len - start/len, len end tmin = -(start/Δ)/Δfac # t such that (1-t)*start + t*stop == 0 - imin = round(Int, tmin*(len-1)+1) # index approximately corresponding to t + L = typeof(len) + lenn1 = len - oneunit(L) + imin = round(L, tmin*lenn1 + 1) # index approximately corresponding to t if 1 < imin < len # The smallest-magnitude element is in the interior - t = (imin-1)/(len-1) + t = (imin - 1)/lenn1 ref = T((1-t)*start + t*stop) step = imin-1 < len-imin ? (ref-start)/(imin-1) : (stop-ref)/(len-imin) elseif imin <= 1 - imin = 1 + imin = oneunit(L) ref = start - step = (Δ/(len-1))*Δfac + step = (Δ/(lenn1))*Δfac else - imin = Int(len) + imin = len ref = stop - step = (Δ/(len-1))*Δfac + step = (Δ/(lenn1))*Δfac end if len == 2 && !isfinite(step) # For very large endpoints where step overflows, exploit the # split-representation to handle the overflow - return steprangelen_hp(T, start, (-start, stop), 0, 2, 1) + return steprangelen_hp(T, start, (-start, stop), 0, len, oneunit(L)) end # 2x calculations to get high precision endpoint matching while also # preventing overflow in ref_hi+(i-offset)*step_hi @@ -676,23 +695,28 @@ function _linspace(start::T, stop::T, len::Integer) where {T<:IEEEFloat} a, b = (start - x1_hi) - x1_lo, (stop - x2_hi) - x2_lo step_lo = (b - a)/(len - 1) ref_lo = a - (1 - imin)*step_lo - steprangelen_hp(T, (ref, ref_lo), (step_hi, step_lo), 0, Int(len), imin) + steprangelen_hp(T, (ref, ref_lo), (step_hi, step_lo), 0, len, imin) end # range for rational numbers, start = start_n/den, stop = stop_n/den # Note this returns a StepRangeLen _linspace(::Type{T}, start::Integer, stop::Integer, len::Integer) where {T<:IEEEFloat} = _linspace(T, start, stop, len, one(start)) function _linspace(::Type{T}, start_n::Integer, stop_n::Integer, len::Integer, den::Integer) where T<:IEEEFloat + len = len + 0 # promote with Int len < 2 && return _linspace1(T, start_n/den, stop_n/den, len) - start_n == stop_n && return steprangelen_hp(T, (start_n, den), (zero(start_n), den), 0, len, 1) + L = typeof(len) + start_n == stop_n && return steprangelen_hp(T, (start_n, den), (zero(start_n), den), 0, len, oneunit(L)) tmin = -start_n/(Float64(stop_n) - Float64(start_n)) - imin = round(Int, tmin*(len-1)+1) - imin = clamp(imin, 1, Int(len)) - ref_num = Int128(len-imin) * start_n + Int128(imin-1) * stop_n - ref_denom = Int128(len-1) * den + imin = round(typeof(len), tmin*(len-1)+1) + imin = clamp(imin, oneunit(L), len) + W = widen(L) + start_n = W(start_n) + stop_n = W(stop_n) + ref_num = W(len-imin) * start_n + W(imin-1) * stop_n + ref_denom = W(len-1) * den ref = (ref_num, ref_denom) - step_full = (Int128(stop_n) - Int128(start_n), ref_denom) - steprangelen_hp(T, ref, step_full, nbitslen(T, len, imin), Int(len), imin) + step_full = (stop_n - start_n, ref_denom) + steprangelen_hp(T, ref, step_full, nbitslen(T, len, imin), len, imin) end # For len < 2 @@ -704,7 +728,7 @@ function _linspace1(::Type{T}, start, stop, len::Integer) where T<:IEEEFloat # The output type must be consistent with steprangelen_hp if T<:Union{Float32,Float16} return StepRangeLen{T}(Float64(start), Float64(start) - Float64(stop), len, 1) - else + else # T == Float64 return StepRangeLen(TwicePrecision(start, zero(T)), TwicePrecision(start, -stop), len, 1) end end @@ -713,8 +737,8 @@ end ### Numeric utilities -# Approximate x with a rational representation. Guaranteed to return, -# but not guaranteed to return a precise answer. +# Approximate x with a rational representation as a pair of Int values. +# Guaranteed to return, but not guaranteed to return a precise answer. # https://en.wikipedia.org/wiki/Continued_fraction#Best_rational_approximations function rat(x) y = x @@ -722,7 +746,7 @@ function rat(x) b = c = 0 m = maxintfloat(narrow(typeof(x)), Int) while abs(y) <= m - f = trunc(Int,y) + f = trunc(Int, y) y -= f a, c = f*a + c, a b, d = f*b + d, b diff --git a/test/ranges.jl b/test/ranges.jl index b622fc05b3ca6..42a1c8a74ff6f 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -652,8 +652,8 @@ end @test broadcast(-, T(1):2:6, 0.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):-1:-T(3) broken=is_unsigned - @test broadcast(-, 2, T(1):3) == T(1):-1:-T(1) broken=is_unsigned + @test broadcast(-, T(1):3) == -T(1):-T(1):-T(3) + @test broadcast(-, 2, T(1):3) == T(1):-T(1):-T(1) end @testset "operations between ranges and arrays" for T in (Int, UInt, Int128) @test all(([T(1):5;] + (T(5):-1:1)) .=== T(6)) @@ -1108,10 +1108,11 @@ end # repr/show should display the range nicely # to test print_range in range.jl replrepr(x) = repr("text/plain", x; context=IOContext(stdout, :limit=>true, :displaysize=>(24, 80))) + nb = Sys.WORD_SIZE @test replrepr(1:4) == "1:4" @test repr("text/plain", 1:4) == "1:4" @test repr("text/plain", range(1, stop=5, length=7)) == "1.0:0.6666666666666666:5.0" - @test repr("text/plain", LinRange{Float64}(1,5,7)) == "7-element LinRange{Float64}:\n 1.0,1.66667,2.33333,3.0,3.66667,4.33333,5.0" + @test repr("text/plain", LinRange{Float64}(1,5,7)) == "7-element LinRange{Float64, Int$nb}:\n 1.0,1.66667,2.33333,3.0,3.66667,4.33333,5.0" @test repr(range(1, stop=5, length=7)) == "1.0:0.6666666666666666:5.0" @test repr(LinRange{Float64}(1,5,7)) == "range(1.0, stop=5.0, length=7)" @test replrepr(0:100.) == "0.0:1.0:100.0" @@ -1119,7 +1120,7 @@ end # only examines spacing of the left and right edges of the range, sufficient # to cover the designated screen size. @test replrepr(range(0, stop=100, length=10000)) == "0.0:0.010001000100010001:100.0" - @test replrepr(LinRange{Float64}(0,100, 10000)) == "10000-element LinRange{Float64}:\n 0.0,0.010001,0.020002,0.030003,0.040004,…,99.95,99.96,99.97,99.98,99.99,100.0" + @test replrepr(LinRange{Float64}(0,100, 10000)) == "10000-element LinRange{Float64, Int$nb}:\n 0.0,0.010001,0.020002,0.030003,0.040004,…,99.95,99.96,99.97,99.98,99.99,100.0" @test sprint(show, UnitRange(1, 2)) == "1:2" @test sprint(show, StepRange(1, 2, 5)) == "1:2:5" @@ -2045,3 +2046,7 @@ end @test_throws BoundsError r[Base.IdentityUnitRange(-1:100)] end end + +@test length(range(1, 100, length=big(100)^100)) == big(100)^100 +@test length(range(big(1), big(100)^100, length=big(100)^100)) == big(100)^100 +@test length(0 * (1:big(100)^100)) == big(100)^100 From eeaadce90161c531ef50a7adc24160cda0541844 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 14 Jul 2021 15:30:31 -0400 Subject: [PATCH 133/146] atomics: disable unordered RMW ordering This is not a particularly meaningful combination (LLVM dislikes it). (cherry picked from commit f7fdcac11a30ea0a794bb54a0cb00e13ad77536d) --- src/builtins.c | 2 +- test/atomics.jl | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index a6bcad48ab731..b186aadbed5d2 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -812,7 +812,7 @@ enum jl_memory_order jl_get_atomic_order(jl_sym_t *order, char loading, char sto { if (order == not_atomic_sym) return jl_memory_order_notatomic; - if (order == unordered_sym && (loading || storing)) + if (order == unordered_sym && (loading ^ storing)) return jl_memory_order_unordered; if (order == monotonic_sym && (loading || storing)) return jl_memory_order_monotonic; diff --git a/test/atomics.jl b/test/atomics.jl index e4202b5ce1aea..4c32fc12d87ed 100644 --- a/test/atomics.jl +++ b/test/atomics.jl @@ -184,7 +184,7 @@ test_field_operators(ARefxy{Float64}(123_10, 123_20)) @test getfield(r, :y) === x @test_throws ConcurrencyViolationError("invalid atomic ordering") swapfield!(r, :y, y, :u) - @test_throws ConcurrencyViolationError("swapfield!: non-atomic field cannot be written atomically") swapfield!(r, :y, y, :unordered) + @test_throws ConcurrencyViolationError("invalid atomic ordering") swapfield!(r, :y, y, :unordered) @test_throws ConcurrencyViolationError("swapfield!: non-atomic field cannot be written atomically") swapfield!(r, :y, y, :monotonic) @test_throws ConcurrencyViolationError("swapfield!: non-atomic field cannot be written atomically") swapfield!(r, :y, y, :acquire) @test_throws ConcurrencyViolationError("swapfield!: non-atomic field cannot be written atomically") swapfield!(r, :y, y, :release) @@ -193,7 +193,7 @@ test_field_operators(ARefxy{Float64}(123_10, 123_20)) @test swapfield!(r, :y, y, :not_atomic) === x @test_throws ConcurrencyViolationError("invalid atomic ordering") modifyfield!(r, :y, swap, y, :u) - @test_throws ConcurrencyViolationError("modifyfield!: non-atomic field cannot be written atomically") modifyfield!(r, :y, swap, y, :unordered) + @test_throws ConcurrencyViolationError("invalid atomic ordering") modifyfield!(r, :y, swap, y, :unordered) @test_throws ConcurrencyViolationError("modifyfield!: non-atomic field cannot be written atomically") modifyfield!(r, :y, swap, y, :monotonic) @test_throws ConcurrencyViolationError("modifyfield!: non-atomic field cannot be written atomically") modifyfield!(r, :y, swap, y, :acquire) @test_throws ConcurrencyViolationError("modifyfield!: non-atomic field cannot be written atomically") modifyfield!(r, :y, swap, y, :release) @@ -202,7 +202,7 @@ test_field_operators(ARefxy{Float64}(123_10, 123_20)) @test modifyfield!(r, :y, swap, x, :not_atomic) === (y, x) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :u, :not_atomic) - @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be written atomically") replacefield!(r, :y, y, y, :unordered, :not_atomic) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :y, y, y, :unordered, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be written atomically") replacefield!(r, :y, y, y, :monotonic, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be written atomically") replacefield!(r, :y, y, y, :acquire, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: non-atomic field cannot be written atomically") replacefield!(r, :y, y, y, :release, :not_atomic) @@ -223,8 +223,8 @@ test_field_operators(ARefxy{Float64}(123_10, 123_20)) @test_throws ConcurrencyViolationError("invalid atomic ordering") swapfield!(r, :x, x, :u) @test_throws ConcurrencyViolationError("swapfield!: atomic field cannot be written non-atomically") swapfield!(r, :x, x, :not_atomic) @test_throws ConcurrencyViolationError("swapfield!: atomic field cannot be written non-atomically") swapfield!(r, :x, x) - @test swapfield!(r, :x, x, :unordered) === y - @test swapfield!(r, :x, x, :monotonic) === x + @test_throws ConcurrencyViolationError("invalid atomic ordering") swapfield!(r, :x, x, :unordered) === y + @test swapfield!(r, :x, x, :monotonic) === y @test swapfield!(r, :x, x, :acquire) === x @test swapfield!(r, :x, x, :release) === x @test swapfield!(r, :x, x, :acquire_release) === x @@ -233,7 +233,7 @@ test_field_operators(ARefxy{Float64}(123_10, 123_20)) @test_throws ConcurrencyViolationError("invalid atomic ordering") modifyfield!(r, :x, swap, x, :u) @test_throws ConcurrencyViolationError("modifyfield!: atomic field cannot be written non-atomically") modifyfield!(r, :x, swap, x, :not_atomic) @test_throws ConcurrencyViolationError("modifyfield!: atomic field cannot be written non-atomically") modifyfield!(r, :x, swap, x) - @test modifyfield!(r, :x, swap, x, :unordered) === (x, x) + @test_throws ConcurrencyViolationError("invalid atomic ordering") modifyfield!(r, :x, swap, x, :unordered) @test modifyfield!(r, :x, swap, x, :monotonic) === (x, x) @test modifyfield!(r, :x, swap, x, :acquire) === (x, x) @test modifyfield!(r, :x, swap, x, :release) === (x, x) @@ -243,7 +243,7 @@ test_field_operators(ARefxy{Float64}(123_10, 123_20)) @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :u, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be written non-atomically") replacefield!(r, :x, x, x) @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be written non-atomically") replacefield!(r, :x, y, x, :not_atomic, :not_atomic) - @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be accessed non-atomically") replacefield!(r, :x, x, x, :unordered, :not_atomic) + @test_throws ConcurrencyViolationError("invalid atomic ordering") replacefield!(r, :x, x, x, :unordered, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be accessed non-atomically") replacefield!(r, :x, x, x, :monotonic, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be accessed non-atomically") replacefield!(r, :x, x, x, :acquire, :not_atomic) @test_throws ConcurrencyViolationError("replacefield!: atomic field cannot be accessed non-atomically") replacefield!(r, :x, x, x, :release, :not_atomic) @@ -288,21 +288,21 @@ end Base.convert(T::Type{<:UndefComplex}, S) = T() @noinline function _test_field_undef(r) r = r[] - T = fieldtype(typeof(r), :x) - x = convert(T, 12345_10) + TT = fieldtype(typeof(r), :x) + x = convert(TT, 12345_10) @test_throws UndefRefError getfield(r, :x) @test_throws UndefRefError getfield(r, :x, :sequentially_consistent) @test_throws UndefRefError modifyfield!(r, :x, add, 1, :sequentially_consistent) - @test_throws (T === Any ? UndefRefError : TypeError) replacefield!(r, :x, 1, 1.0, :sequentially_consistent) + @test_throws (TT === Any ? UndefRefError : TypeError) replacefield!(r, :x, 1, 1.0, :sequentially_consistent) @test_throws UndefRefError replacefield!(r, :x, 1, x, :sequentially_consistent) @test_throws UndefRefError getfield(r, :x, :sequentially_consistent) @test_throws UndefRefError swapfield!(r, :x, x, :sequentially_consistent) @test getfield(r, :x, :sequentially_consistent) === x === getfield(r, :x) nothing end -@noinline function test_field_undef(T) - _test_field_undef(Ref(T())) - _test_field_undef(Ref{Any}(T())) +@noinline function test_field_undef(TT) + _test_field_undef(Ref(TT())) + _test_field_undef(Ref{Any}(TT())) nothing end test_field_undef(ARefxy{BigInt}) From 5fa4b6a7a963a318863d7d887bd30b2e48d7bfde Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 14 Jul 2021 16:22:39 -0400 Subject: [PATCH 134/146] codegen: fix some atomic return types (cherry picked from commit 84641013fdd38973c153ab97cf821742063e6905) --- src/cgutils.cpp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 8c7bdad2a5903..4ae6c4b21594a 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -1549,10 +1549,25 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, bool needlock, bool issetfield, bool isreplacefield, bool maybe_null_if_boxed) { assert(!needlock || parent != nullptr); - jl_cgval_t oldval = rhs; Type *elty = isboxed ? T_prjlvalue : julia_type_to_llvm(ctx, jltype); - if (type_is_ghost(elty)) - return oldval; + if (type_is_ghost(elty)) { + if (isStrongerThanMonotonic(Order)) + ctx.builder.CreateFence(Order); + if (issetfield) { + return rhs; + } + else if (isreplacefield) { + Value *Success = emit_f_is(ctx, cmp, ghostValue(jltype)); + Success = ctx.builder.CreateZExt(Success, T_int8); + jl_cgval_t argv[2] = {ghostValue(jltype), mark_julia_type(ctx, Success, false, jl_bool_type)}; + // TODO: do better here + Value *instr = emit_jlcall(ctx, jltuple_func, V_rnull, argv, 2, JLCALL_F_CC); + return mark_julia_type(ctx, instr, true, jl_any_type); + } + else { + return ghostValue(jltype); + } + } Value *intcast = nullptr; if (!isboxed && Order != AtomicOrdering::NotAtomic && !elty->isIntOrPtrTy()) { const DataLayout &DL = jl_data_layout; @@ -1590,6 +1605,7 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx, BasicBlock *DoneBB = issetfield || (!isreplacefield && !isboxed) ? nullptr : BasicBlock::Create(jl_LLVMContext, "done_xchg", ctx.f); if (needlock) emit_lockstate_value(ctx, parent, true); + jl_cgval_t oldval = rhs; if (issetfield || Order == AtomicOrdering::NotAtomic) { if (!issetfield) { instr = ctx.builder.CreateAlignedLoad(elty, ptr, Align(alignment)); @@ -3230,6 +3246,12 @@ static jl_cgval_t emit_setfield(jl_codectx_t &ctx, } if (needlock) emit_lockstate_value(ctx, strct, false); + if (isreplacefield) { + jl_cgval_t argv[2] = {oldval, mark_julia_type(ctx, Success, false, jl_bool_type)}; + // TODO: do better here + Value *instr = emit_jlcall(ctx, jltuple_func, V_rnull, argv, 2, JLCALL_F_CC); + oldval = mark_julia_type(ctx, instr, true, jl_any_type); + } return oldval; } else { From e04e3e1932785d27a252ba95f8ebedd37f624094 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 14 Jul 2021 15:32:18 -0400 Subject: [PATCH 135/146] codegen: optimize setfield/arrayset with inline isa test (cherry picked from commit 471e89385fdff8e0033bbd6e795be6750e380ac7) --- src/codegen.cpp | 196 +++++++++++++++++++++++++----------------------- 1 file changed, 101 insertions(+), 95 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index acf7f1167cb14..e6505f7b67870 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -2880,7 +2880,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, else if (f == jl_builtin_arrayset && nargs >= 4) { const jl_cgval_t &ary = argv[2]; - const jl_cgval_t &val = argv[3]; + jl_cgval_t val = argv[3]; bool indices_ok = true; for (size_t i = 4; i <= nargs; i++) { if (argv[i].typ != (jl_value_t*)jl_long_type) { @@ -2893,101 +2893,103 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, jl_value_t *ety = jl_tparam0(aty_dt); jl_value_t *ndp = jl_tparam1(aty_dt); if (!jl_has_free_typevars(ety) && (jl_is_long(ndp) || nargs == 4)) { - if (jl_subtype(val.typ, ety)) { // TODO: probably should just convert this to a type-assert - size_t elsz = 0, al = 0; - int union_max = jl_islayout_inline(ety, &elsz, &al); - bool isboxed = (union_max == 0); - if (isboxed) - ety = (jl_value_t*)jl_any_type; - jl_value_t *ary_ex = jl_exprarg(ex, 2); - ssize_t nd = jl_is_long(ndp) ? jl_unbox_long(ndp) : -1; - jl_value_t *boundscheck = argv[1].constant; - emit_typecheck(ctx, argv[1], (jl_value_t*)jl_bool_type, "arrayset"); - Value *idx = emit_array_nd_index(ctx, ary, ary_ex, nd, &argv[4], nargs - 3, boundscheck); - if (!isboxed && jl_is_datatype(ety) && jl_datatype_size(ety) == 0) { - // no-op - } - else { - PHINode *data_owner = NULL; // owner object against which the write barrier must check - if (isboxed || (jl_is_datatype(ety) && ((jl_datatype_t*)ety)->layout->npointers > 0)) { // if elements are just bits, don't need a write barrier - Value *aryv = boxed(ctx, ary); - Value *flags = emit_arrayflags(ctx, ary); - // the owner of the data is ary itself except if ary->how == 3 - flags = ctx.builder.CreateAnd(flags, 3); - Value *is_owned = ctx.builder.CreateICmpEQ(flags, ConstantInt::get(T_int16, 3)); - BasicBlock *curBB = ctx.builder.GetInsertBlock(); - BasicBlock *ownedBB = BasicBlock::Create(jl_LLVMContext, "array_owned", ctx.f); - BasicBlock *mergeBB = BasicBlock::Create(jl_LLVMContext, "merge_own", ctx.f); - ctx.builder.CreateCondBr(is_owned, ownedBB, mergeBB); - ctx.builder.SetInsertPoint(ownedBB); - // load owner pointer - Instruction *own_ptr; - if (jl_is_long(ndp)) { - own_ptr = ctx.builder.CreateAlignedLoad(T_prjlvalue, - ctx.builder.CreateConstInBoundsGEP1_32(T_prjlvalue, - emit_bitcast(ctx, decay_derived(ctx, aryv), T_pprjlvalue), - jl_array_data_owner_offset(nd) / sizeof(jl_value_t*)), - Align(sizeof(void*))); - tbaa_decorate(tbaa_const, maybe_mark_load_dereferenceable(own_ptr, false, (jl_value_t*)jl_array_any_type)); - } - else { - own_ptr = ctx.builder.CreateCall( - prepare_call(jlarray_data_owner_func), - {aryv}); - } - ctx.builder.CreateBr(mergeBB); - ctx.builder.SetInsertPoint(mergeBB); - data_owner = ctx.builder.CreatePHI(T_prjlvalue, 2); - data_owner->addIncoming(aryv, curBB); - data_owner->addIncoming(own_ptr, ownedBB); + if (!jl_subtype(val.typ, ety)) { + emit_typecheck(ctx, val, ety, "arrayset"); + val = update_julia_type(ctx, val, ety); + } + size_t elsz = 0, al = 0; + int union_max = jl_islayout_inline(ety, &elsz, &al); + bool isboxed = (union_max == 0); + if (isboxed) + ety = (jl_value_t*)jl_any_type; + jl_value_t *ary_ex = jl_exprarg(ex, 2); + ssize_t nd = jl_is_long(ndp) ? jl_unbox_long(ndp) : -1; + jl_value_t *boundscheck = argv[1].constant; + emit_typecheck(ctx, argv[1], (jl_value_t*)jl_bool_type, "arrayset"); + Value *idx = emit_array_nd_index(ctx, ary, ary_ex, nd, &argv[4], nargs - 3, boundscheck); + if (!isboxed && jl_is_datatype(ety) && jl_datatype_size(ety) == 0) { + // no-op + } + else { + PHINode *data_owner = NULL; // owner object against which the write barrier must check + if (isboxed || (jl_is_datatype(ety) && ((jl_datatype_t*)ety)->layout->npointers > 0)) { // if elements are just bits, don't need a write barrier + Value *aryv = boxed(ctx, ary); + Value *flags = emit_arrayflags(ctx, ary); + // the owner of the data is ary itself except if ary->how == 3 + flags = ctx.builder.CreateAnd(flags, 3); + Value *is_owned = ctx.builder.CreateICmpEQ(flags, ConstantInt::get(T_int16, 3)); + BasicBlock *curBB = ctx.builder.GetInsertBlock(); + BasicBlock *ownedBB = BasicBlock::Create(jl_LLVMContext, "array_owned", ctx.f); + BasicBlock *mergeBB = BasicBlock::Create(jl_LLVMContext, "merge_own", ctx.f); + ctx.builder.CreateCondBr(is_owned, ownedBB, mergeBB); + ctx.builder.SetInsertPoint(ownedBB); + // load owner pointer + Instruction *own_ptr; + if (jl_is_long(ndp)) { + own_ptr = ctx.builder.CreateAlignedLoad(T_prjlvalue, + ctx.builder.CreateConstInBoundsGEP1_32(T_prjlvalue, + emit_bitcast(ctx, decay_derived(ctx, aryv), T_pprjlvalue), + jl_array_data_owner_offset(nd) / sizeof(jl_value_t*)), + Align(sizeof(void*))); + tbaa_decorate(tbaa_const, maybe_mark_load_dereferenceable(own_ptr, false, (jl_value_t*)jl_array_any_type)); } - if (!isboxed && jl_is_uniontype(ety)) { - Type *AT = ArrayType::get(IntegerType::get(jl_LLVMContext, 8 * al), (elsz + al - 1) / al); - Value *data = emit_bitcast(ctx, emit_arrayptr(ctx, ary, ary_ex), AT->getPointerTo()); - // compute tindex from val - jl_cgval_t rhs_union = convert_julia_type(ctx, val, ety); - Value *tindex = compute_tindex_unboxed(ctx, rhs_union, ety); - tindex = ctx.builder.CreateNUWSub(tindex, ConstantInt::get(T_int8, 1)); - Value *ndims = (nd == -1 ? emit_arrayndims(ctx, ary) : ConstantInt::get(T_int16, nd)); - Value *is_vector = ctx.builder.CreateICmpEQ(ndims, ConstantInt::get(T_int16, 1)); - Value *offset = emit_arrayoffset(ctx, ary, nd); - Value *selidx_v = ctx.builder.CreateSub(emit_vectormaxsize(ctx, ary), ctx.builder.CreateZExt(offset, T_size)); - Value *selidx_m = emit_arraylen(ctx, ary); - Value *selidx = ctx.builder.CreateSelect(is_vector, selidx_v, selidx_m); - Value *ptindex = ctx.builder.CreateInBoundsGEP(AT, data, selidx); - ptindex = emit_bitcast(ctx, ptindex, T_pint8); - ptindex = ctx.builder.CreateInBoundsGEP(T_int8, ptindex, offset); - ptindex = ctx.builder.CreateInBoundsGEP(T_int8, ptindex, idx); - tbaa_decorate(tbaa_arrayselbyte, ctx.builder.CreateStore(tindex, ptindex)); - if (jl_is_datatype(val.typ) && jl_datatype_size(val.typ) == 0) { - // no-op - } - else { - // copy data - Value *addr = ctx.builder.CreateInBoundsGEP(AT, data, idx); - emit_unionmove(ctx, addr, tbaa_arraybuf, val, nullptr); - } + else { + own_ptr = ctx.builder.CreateCall( + prepare_call(jlarray_data_owner_func), + {aryv}); + } + ctx.builder.CreateBr(mergeBB); + ctx.builder.SetInsertPoint(mergeBB); + data_owner = ctx.builder.CreatePHI(T_prjlvalue, 2); + data_owner->addIncoming(aryv, curBB); + data_owner->addIncoming(own_ptr, ownedBB); + } + if (!isboxed && jl_is_uniontype(ety)) { + Type *AT = ArrayType::get(IntegerType::get(jl_LLVMContext, 8 * al), (elsz + al - 1) / al); + Value *data = emit_bitcast(ctx, emit_arrayptr(ctx, ary, ary_ex), AT->getPointerTo()); + // compute tindex from val + jl_cgval_t rhs_union = convert_julia_type(ctx, val, ety); + Value *tindex = compute_tindex_unboxed(ctx, rhs_union, ety); + tindex = ctx.builder.CreateNUWSub(tindex, ConstantInt::get(T_int8, 1)); + Value *ndims = (nd == -1 ? emit_arrayndims(ctx, ary) : ConstantInt::get(T_int16, nd)); + Value *is_vector = ctx.builder.CreateICmpEQ(ndims, ConstantInt::get(T_int16, 1)); + Value *offset = emit_arrayoffset(ctx, ary, nd); + Value *selidx_v = ctx.builder.CreateSub(emit_vectormaxsize(ctx, ary), ctx.builder.CreateZExt(offset, T_size)); + Value *selidx_m = emit_arraylen(ctx, ary); + Value *selidx = ctx.builder.CreateSelect(is_vector, selidx_v, selidx_m); + Value *ptindex = ctx.builder.CreateInBoundsGEP(AT, data, selidx); + ptindex = emit_bitcast(ctx, ptindex, T_pint8); + ptindex = ctx.builder.CreateInBoundsGEP(T_int8, ptindex, offset); + ptindex = ctx.builder.CreateInBoundsGEP(T_int8, ptindex, idx); + tbaa_decorate(tbaa_arrayselbyte, ctx.builder.CreateStore(tindex, ptindex)); + if (jl_is_datatype(val.typ) && jl_datatype_size(val.typ) == 0) { + // no-op } else { - typed_store(ctx, - emit_arrayptr(ctx, ary, ary_ex, isboxed), - idx, val, jl_cgval_t(), ety, - isboxed ? tbaa_ptrarraybuf : tbaa_arraybuf, - ctx.aliasscope, - data_owner, - isboxed, - isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic, // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 - isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic, // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 - 0, - false, - true, - false, - false); + // copy data + Value *addr = ctx.builder.CreateInBoundsGEP(AT, data, idx); + emit_unionmove(ctx, addr, tbaa_arraybuf, val, nullptr); } } - *ret = ary; - return true; + else { + typed_store(ctx, + emit_arrayptr(ctx, ary, ary_ex, isboxed), + idx, val, jl_cgval_t(), ety, + isboxed ? tbaa_ptrarraybuf : tbaa_arraybuf, + ctx.aliasscope, + data_owner, + isboxed, + isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic, // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 + isboxed ? AtomicOrdering::Unordered : AtomicOrdering::NotAtomic, // TODO: we should do this for anything with CountTrackedPointers(elty).count > 0 + 0, + false, + true, + false, + false); + } } + *ret = ary; + return true; } } } @@ -3131,13 +3133,13 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, const jl_cgval_t undefval; const jl_cgval_t &obj = argv[1]; const jl_cgval_t &fld = argv[2]; - const jl_cgval_t &val = argv[isreplacefield ? 4 : 3]; + jl_cgval_t val = argv[isreplacefield ? 4 : 3]; const jl_cgval_t &cmp = isreplacefield ? argv[3] : undefval; enum jl_memory_order order = jl_memory_order_notatomic; + const std::string fname = issetfield ? "setfield!" : isreplacefield ? "replacefield!" : "swapfield!"; if (nargs >= (isreplacefield ? 5 : 4)) { const jl_cgval_t &ord = argv[isreplacefield ? 5 : 4]; - emit_typecheck(ctx, ord, (jl_value_t*)jl_symbol_type, - issetfield ? "setfield!" : isreplacefield ? "replacefield!" : "swapfield!"); + emit_typecheck(ctx, ord, (jl_value_t*)jl_symbol_type, fname); if (!ord.constant) return false; order = jl_get_atomic_order((jl_sym_t*)ord.constant, !issetfield, true); @@ -3145,7 +3147,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, enum jl_memory_order fail_order = order; if (isreplacefield && nargs == 6) { const jl_cgval_t &ord = argv[6]; - emit_typecheck(ctx, ord, (jl_value_t*)jl_symbol_type, "replacefield!"); + emit_typecheck(ctx, ord, (jl_value_t*)jl_symbol_type, fname); if (!ord.constant) return false; fail_order = jl_get_atomic_order((jl_sym_t*)ord.constant, true, false); @@ -3169,7 +3171,11 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } if (idx != -1) { jl_value_t *ft = jl_svecref(uty->types, idx); - if (!jl_has_free_typevars(ft) && jl_subtype(val.typ, ft)) { + if (!jl_has_free_typevars(ft)) { + if (!jl_subtype(val.typ, ft)) { + emit_typecheck(ctx, val, ft, fname); + val = update_julia_type(ctx, val, ft); + } // TODO: attempt better codegen for approximate types bool isboxed = jl_field_isptr(uty, idx); bool isatomic = jl_field_isatomic(uty, idx); From 3f5e41b5b7ec0965b93ccb9f1cd97214db0df7a5 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 27 Jul 2021 16:44:31 +0200 Subject: [PATCH 136/146] Init codegen during sysimg restore (#41676) (cherry picked from commit 2fbeef8d712ff9151370fd27a3ae07ea8b2e740d) --- src/init.c | 7 ++++--- src/staticdata.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/init.c b/src/init.c index 602583a9221fd..5c0ce45a77912 100644 --- a/src/init.c +++ b/src/init.c @@ -734,12 +734,13 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel) if (jl_options.cpu_target == NULL) jl_options.cpu_target = "native"; - if (jl_options.image_file) + if (jl_options.image_file) { jl_restore_system_image(jl_options.image_file); - else + } else { jl_init_types(); + jl_init_codegen(); + } - jl_init_codegen(); jl_init_common_symbols(); jl_init_flisp(); jl_init_serializer(); diff --git a/src/staticdata.c b/src/staticdata.c index d70e35542de2a..8fa1613b075a8 100644 --- a/src/staticdata.c +++ b/src/staticdata.c @@ -1839,6 +1839,7 @@ static void jl_restore_system_image_from_stream(ios_t *f) JL_GC_DISABLED } s.s = &sysimg; + jl_init_codegen(); jl_update_all_fptrs(&s); // fptr relocs and registration // reinit ccallables, which require codegen to be initialized s.s = f; From be3e80709a7b6abede4bbdd595ea6d25ad896e76 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 28 Jul 2021 13:48:24 -0400 Subject: [PATCH 137/146] upgrade libuv to v2-1.42.0 (#41710) (cherry picked from commit b50bf04ac0c59ede44fd230b2e1be5f18a29654f) --- Make.inc | 4 +++ Makefile | 3 ++ contrib/refresh_checksums.mk | 5 +++ deps/checksums/libuv | 68 +++++++++++++++++------------------ deps/libuv.version | 4 +-- stdlib/LibUV_jll/Project.toml | 2 +- 6 files changed, 49 insertions(+), 37 deletions(-) diff --git a/Make.inc b/Make.inc index 3d61f5255ef1a..668507dadad2c 100644 --- a/Make.inc +++ b/Make.inc @@ -87,6 +87,10 @@ endef COMMA:=, SPACE:=$(eval) $(eval) +# force a sane / stable configuration +export LC_ALL=C +export LANG=C + # We need python for things like BB triplet recognition and relative path computation. # We don't really care about version, generally, so just find something that works: PYTHON := "$(shell which python 2>/dev/null || which python3 2>/dev/null || which python2 2>/dev/null || echo "{python|python3|python2} not found")" diff --git a/Makefile b/Makefile index 51bb09b094f1c..62afa8e685529 100644 --- a/Makefile +++ b/Makefile @@ -573,3 +573,6 @@ endif @time $(call spawn,$(build_bindir)/julia$(EXE) -e '') @time $(call spawn,$(build_bindir)/julia$(EXE) -e '') @time $(call spawn,$(build_bindir)/julia$(EXE) -e '') + +print-locale: + @locale diff --git a/contrib/refresh_checksums.mk b/contrib/refresh_checksums.mk index 1ccbb16a9ba4f..5b8a25ab79b91 100644 --- a/contrib/refresh_checksums.mk +++ b/contrib/refresh_checksums.mk @@ -8,6 +8,11 @@ SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) JULIAHOME := $(abspath $(SRCDIR)/..) +# force a sane / stable configuration +export LC_ALL=C +export LANG=C +.SUFFIXES: + # Default target that will have everything else added to it as a dependency all: checksum pack-checksum diff --git a/deps/checksums/libuv b/deps/checksums/libuv index f03a3c6ce9a35..f3ecef6586547 100644 --- a/deps/checksums/libuv +++ b/deps/checksums/libuv @@ -1,34 +1,34 @@ -libuv-fb3e3364c33ae48c827f6b103e05c3f0e78b79a9.tar.gz/md5/dc93ae5119c8934f374570342ef036ed -libuv-fb3e3364c33ae48c827f6b103e05c3f0e78b79a9.tar.gz/sha512/29947c236aef8931be4767df1cd8404ee9b036ee107b31cbce6fad9a97743df57d068b15bc4bd00320b9b81cd879258a9ec9dc675853e424ccdb8d6bdd226240 -LibUV.v2.0.1+2.aarch64-apple-darwin.tar.gz/md5/ed00585eb80fd82c014e2a431269ccec -LibUV.v2.0.1+2.aarch64-apple-darwin.tar.gz/sha512/a98ffde4ff49a71699f798622c62b5f95d0dc010f1de88ad57ee437baa73cb25e263a8a6c4de86364fb31076993326d9bd0223db3e1ecf6904c1aa6e7e1f0120 -LibUV.v2.0.1+2.aarch64-linux-gnu.tar.gz/md5/3e75495795d5a4eee8ec9c1619a5caaa -LibUV.v2.0.1+2.aarch64-linux-gnu.tar.gz/sha512/c0f1396ccc7784772d4c40f3a62d6bb22c6859a3258b07727348f436b7991a8f6d51ec46c09569f17a7bd600a321ab3b3cd59538d39c228cd3e205c33e755a51 -LibUV.v2.0.1+2.aarch64-linux-musl.tar.gz/md5/c2899ea791cfcd37ff85c1182330168e -LibUV.v2.0.1+2.aarch64-linux-musl.tar.gz/sha512/b340ff4e28a5e566ee2640926265b2070acfcc4b3c87fc2e414e2b2a9ff23be852d92ff4f51e36e21de029f23bca5524e7e267ba091401b070f4d5cd9bd03c54 -LibUV.v2.0.1+2.armv6l-linux-gnueabihf.tar.gz/md5/6b6c080a88050051100af58a4e96f25d -LibUV.v2.0.1+2.armv6l-linux-gnueabihf.tar.gz/sha512/936a4f4baf21a0fe7492bc3fab3475f653824daa184030df764af1eb5e71d152aa5dd3449b1cf31f77a460169853d7371597056e641c440c7b3d4f5c6be1ce10 -LibUV.v2.0.1+2.armv6l-linux-musleabihf.tar.gz/md5/032010ad683931906d2467753cebea9e -LibUV.v2.0.1+2.armv6l-linux-musleabihf.tar.gz/sha512/b8050662775d75e59b072c688ae44f7a3d3f54d114270902a825e01f4d74c8e131a3a75cd95e31b9ebf4488d64ff6170a67e5986e02e5fcb105bf5d3cc28706b -LibUV.v2.0.1+2.armv7l-linux-gnueabihf.tar.gz/md5/e558bedc0b69d6575e43df0eec958ad9 -LibUV.v2.0.1+2.armv7l-linux-gnueabihf.tar.gz/sha512/d3404b20b7e8e8fe935ca1e7da55823a6ff6703c822acf622638dc5c744bfefe1745e8e3a67054abc3aec0c10793ac46dbab29ccf7269d8a3a0d857e3a1a93e7 -LibUV.v2.0.1+2.armv7l-linux-musleabihf.tar.gz/md5/1aa605d9930ba63874483defb35a96ba -LibUV.v2.0.1+2.armv7l-linux-musleabihf.tar.gz/sha512/927e710191e6b8d1c09054780b4af6336c6744ceb0885c7a5a0cec5e08bfb0d53ede75cc8bb145fda08f720d98a77e102a2903e08a0fef75a0b630631db6f35e -LibUV.v2.0.1+2.i686-linux-gnu.tar.gz/md5/4ec3415ef12615581f8b26ec374a35bf -LibUV.v2.0.1+2.i686-linux-gnu.tar.gz/sha512/fd37bb83cda297ec80332cdaed2a704ea43c3ec72fb539042ef09aa510275a0418c750278fca9e463bdecdca957f8457103f0be6eeae1017387141eb2b906694 -LibUV.v2.0.1+2.i686-linux-musl.tar.gz/md5/f24ea24837ef06be346d239cbb33ae7e -LibUV.v2.0.1+2.i686-linux-musl.tar.gz/sha512/e9388568b20fa71d95e331a336aa3b17396e87d99aef6d752cb48416cdc9501e2ea887702a5765a22dcf6b5f7b730f5666ed3a639e7fe0113e9032f0d760b352 -LibUV.v2.0.1+2.i686-w64-mingw32.tar.gz/md5/890d1f7963a5dc927c15f8433b69dcf7 -LibUV.v2.0.1+2.i686-w64-mingw32.tar.gz/sha512/7e7d2b6405bbb1b62725a61d649fcbd53c2dcb65b8a6deea5a186717f88dbab4198a0f58d4223500aa991976725f8e1c4272ab29866174c5f555ba75a2e9b0ee -LibUV.v2.0.1+2.powerpc64le-linux-gnu.tar.gz/md5/7fa0d0e9344f4a4c4d5075ec5d368b0a -LibUV.v2.0.1+2.powerpc64le-linux-gnu.tar.gz/sha512/b5587e9e1072bc6becd5d1354294a3afcfda1c52e9a5f56387d43c7300369106059a2bac8669a919ce25d888b2302711c7433a82e366648935481568420daeef -LibUV.v2.0.1+2.x86_64-apple-darwin.tar.gz/md5/716960539cbae1e38e1cf88c2670927d -LibUV.v2.0.1+2.x86_64-apple-darwin.tar.gz/sha512/7b064d99428b312302c698e73e8a7919147c0522857a24e08d16144aea83429c5ac9526b6553697f28784457a5b417958fc5e4e28b4191861004dddc3f95566c -LibUV.v2.0.1+2.x86_64-linux-gnu.tar.gz/md5/ff70887943a3fc68eddcb66ed941417e -LibUV.v2.0.1+2.x86_64-linux-gnu.tar.gz/sha512/00610022d700dd6b33c97decea43490fcd4218fde2e57c0d6317abec046adf220fdf4d03f132938ec78af85653a5262d1344527c632c06aec53750710a6b317c -LibUV.v2.0.1+2.x86_64-linux-musl.tar.gz/md5/a5834444d0b7e7d88cc87e5eb458bca3 -LibUV.v2.0.1+2.x86_64-linux-musl.tar.gz/sha512/e2e6e6726e8ef0962c35d7ff54a60b3370cd5b927fda8b4415e8d2f19b098ed9bd00e262eb18d11a73e2e27c88aefa72c3a6e9c193d27eab436c4d9d6531cd47 -LibUV.v2.0.1+2.x86_64-unknown-freebsd.tar.gz/md5/951d9da43208d2c48eb00c7ce300b4cf -LibUV.v2.0.1+2.x86_64-unknown-freebsd.tar.gz/sha512/87e578f6cf34c9cc1c965f4958048967740b4ab530836aff33b3339c0d927beccf1f0c58f7e256c9ba98bf1fa0362186a24fcc5bb79ae1f149f86183b4b7f5c1 -LibUV.v2.0.1+2.x86_64-w64-mingw32.tar.gz/md5/4e9c2f078ed7b617a1aa447e1c44abbf -LibUV.v2.0.1+2.x86_64-w64-mingw32.tar.gz/sha512/b3b14c5d447cd742cade43b56bf3867d530dd391c105ddbd7f2b9e0e26ee6a1f3e6fa11148a9ba1540fa598b155da3e56d369a96273a5ea1343b5c3cd4821953 +LibUV.v2.0.1+3.aarch64-apple-darwin.tar.gz/md5/7c1f08965b45726099a940ab28a79207 +LibUV.v2.0.1+3.aarch64-apple-darwin.tar.gz/sha512/9f9d170fc36e2e30c53e96cdf9ae7cd4eb969905db65119627d4a9e10abb5e41aeb4ab07705d571300d44d4894c9d179c6a9450e3e6415042a6131bae0971c26 +LibUV.v2.0.1+3.aarch64-linux-gnu.tar.gz/md5/8d59850a63ea71c4007d08f7d23ceda2 +LibUV.v2.0.1+3.aarch64-linux-gnu.tar.gz/sha512/f662b36ce6e336e724c6fd03482d91a70e7ae8cfe7a1fff98cbca2cdb99b0cd3475bf32e57547097ca625c1fceb57c989871f391faea9227a6d6d4faf7649175 +LibUV.v2.0.1+3.aarch64-linux-musl.tar.gz/md5/3ad43e49a7a996b50341e7150064f13d +LibUV.v2.0.1+3.aarch64-linux-musl.tar.gz/sha512/69c6675fee6647eb7a2c8c680bd49ba31c1dcda676530af1ad1ca979c0cf8d9c908e0cb246608718d4bbca4d73174751c608aa80e3f11557ed4d05cc1d270021 +LibUV.v2.0.1+3.armv6l-linux-gnueabihf.tar.gz/md5/fec375c1c45fbd1b2eb22fbd5f727e5f +LibUV.v2.0.1+3.armv6l-linux-gnueabihf.tar.gz/sha512/1b279406cdb43bf1c3fd6b1d2d24fe9b5ca75a65212b5720d5406af26a6b7551b18efb0471c884e98e97c50693412344fd733c3ef19ea8fecf1c2c26ae888492 +LibUV.v2.0.1+3.armv6l-linux-musleabihf.tar.gz/md5/07790f330f3394d0a3ea47aa56529be1 +LibUV.v2.0.1+3.armv6l-linux-musleabihf.tar.gz/sha512/4fd4bf7c1b333907fbbbfdca213c91cb6b387e56886b6349271d7a3c1ddb3f9349f0799c60178de507e039289662c310829d81be804c5076ce9ae16eb61c8cb1 +LibUV.v2.0.1+3.armv7l-linux-gnueabihf.tar.gz/md5/2ce38a69564e279b0deb32a6af1acc52 +LibUV.v2.0.1+3.armv7l-linux-gnueabihf.tar.gz/sha512/d520ef8c556db6a42534c4abdd59f4b64ebd77cdb7b2972385d6a90463e0a490ca168bb83128e66b13555128305f85d5c979a739f7c369a11f8217e49505ce0a +LibUV.v2.0.1+3.armv7l-linux-musleabihf.tar.gz/md5/034d903cb13a45278df742df23c46275 +LibUV.v2.0.1+3.armv7l-linux-musleabihf.tar.gz/sha512/f900fd47320628ac3cf0ba0b9d9408ef4e46ed508f5efc00b94b532c5d713fcf4695827f978f605b3d9f0a1db42abcd0b1fec6a6c5bb6a502ed5f0fed55f4a32 +LibUV.v2.0.1+3.i686-linux-gnu.tar.gz/md5/60c51d15d9ae2ac8418b71730dc093d0 +LibUV.v2.0.1+3.i686-linux-gnu.tar.gz/sha512/84841f6fb4c744e335d6ce25e3059d9aeeaa54b823fe714f43fa8b11caf209e539afb9605e96992d075ae16a664da6c3a3c3d4cdb905d42c0ddc8722267c19af +LibUV.v2.0.1+3.i686-linux-musl.tar.gz/md5/d70ffffd8e57dfbcb4265ad202722fca +LibUV.v2.0.1+3.i686-linux-musl.tar.gz/sha512/c76dc0df03f7a683e08313baa0d8471b45c64099e13cf71a6595cb50c9e8ff1e96c31c400f83144ee816e5a7c8f01ad6f48d8b50a6cd161e0d246737780c2a9e +LibUV.v2.0.1+3.i686-w64-mingw32.tar.gz/md5/aa634a6e49c5683dcca287f2cf1ac71e +LibUV.v2.0.1+3.i686-w64-mingw32.tar.gz/sha512/ac1b2b53cbd7e317866259c30de349c453deda2c970587e4f4b40605f966f722fe8250e9dd7677ded0c928c9398240b7e4867805bb1404fb9d0c7dfab8493c79 +LibUV.v2.0.1+3.powerpc64le-linux-gnu.tar.gz/md5/9233d6bb298bd5020b680c25f742de98 +LibUV.v2.0.1+3.powerpc64le-linux-gnu.tar.gz/sha512/172253d1e6ce888865f5fd2182aad6426ff9988313937c7abe80ccdba859289f7ec8997574bb853f9786596d90414c4a926a475c1817c17574e0dd2ea8ad68ad +LibUV.v2.0.1+3.x86_64-apple-darwin.tar.gz/md5/09b83fe0ced427136ea5680cea64b004 +LibUV.v2.0.1+3.x86_64-apple-darwin.tar.gz/sha512/1842df6b14f23cc42c1d29546aa00b4b07390646beb312092bceb00d1de855116368ddcdd4ccd8525741fb6ecd26312c90dc9342d2e1ef4d36fbb896bdd2cbd3 +LibUV.v2.0.1+3.x86_64-linux-gnu.tar.gz/md5/d54b4fbfd998228e80c42c89df2c14a1 +LibUV.v2.0.1+3.x86_64-linux-gnu.tar.gz/sha512/290b2432e72712e73f20aa0ea6f787f9ffbf9ab5e3249c708355f7d57fb3b40ec3913e0c9a7141197caf3a741d6edbb1788cdef7e1a9a8547117dcf40559e567 +LibUV.v2.0.1+3.x86_64-linux-musl.tar.gz/md5/7690b83baecf1b614f30c7c0b661d86d +LibUV.v2.0.1+3.x86_64-linux-musl.tar.gz/sha512/53950b56f87ea0acc13790bf3a82441ca4ccfcd66cf272c81915e999487e4973c8c474caa811584d5fa8873cdd18ac0944f3d6f415c483a26e38645eb1701cdb +LibUV.v2.0.1+3.x86_64-unknown-freebsd.tar.gz/md5/6d2a330a2e87b9b8564708fba963845f +LibUV.v2.0.1+3.x86_64-unknown-freebsd.tar.gz/sha512/f15daf2f5a1bda49234fe546e13f97280c843d6939c26c9f05133302ec81e38bd47a5098d4900e39290f913835cffbdaa0b2c6406d6a86dc2eb8d0159f461e9f +LibUV.v2.0.1+3.x86_64-w64-mingw32.tar.gz/md5/4f934cf8dd1d45b206af6a72c3e679f7 +LibUV.v2.0.1+3.x86_64-w64-mingw32.tar.gz/sha512/36ef56923d7cf5c31aba87fb75774ce68976f7b6b7971a4c86011da275a5472e28033a6d97b965887b7bbe335bedfb6970618b88f20c095228ffa5f783ab8eb1 +libuv-c6869fba163a1e04af64ede438a8fd0191e75e9e.tar.gz/md5/b60fc7b00bdfafcbbc66317858882058 +libuv-c6869fba163a1e04af64ede438a8fd0191e75e9e.tar.gz/sha512/197b386af51eb4456ce65e2951e033731e1194fca8bed08755a78360ebb3431ab4d8d69a75279e7995d2e4197133d613892e5b9b5d6411bffa692df35542420f diff --git a/deps/libuv.version b/deps/libuv.version index 339cba4441875..045f329a0c9f3 100644 --- a/deps/libuv.version +++ b/deps/libuv.version @@ -1,2 +1,2 @@ -LIBUV_BRANCH=julia-uv2-1.39.0 -LIBUV_SHA1=fb3e3364c33ae48c827f6b103e05c3f0e78b79a9 +LIBUV_BRANCH=julia-uv2-1.42.0 +LIBUV_SHA1=c6869fba163a1e04af64ede438a8fd0191e75e9e diff --git a/stdlib/LibUV_jll/Project.toml b/stdlib/LibUV_jll/Project.toml index d07970cd43603..6215781ec4177 100644 --- a/stdlib/LibUV_jll/Project.toml +++ b/stdlib/LibUV_jll/Project.toml @@ -1,6 +1,6 @@ name = "LibUV_jll" uuid = "183b4373-6708-53ba-ad28-60e28bb38547" -version = "2.0.1+2" +version = "2.0.1+3" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 84e6bb9b61c9459a525cbc49c32d8fea85eb9e20 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 29 Jul 2021 12:07:17 -0400 Subject: [PATCH 138/146] Revert "Merge pull request #38405 from JuliaLang/vc/distributed_ts" (#41722) Also reverts "fixup to pull request #38405 (#41641)" Seems to be causing hanging in CI testing. This reverts commit 5af1cf0faf10308857f319b17432b007e318516b and this reverts commit 5a1680533b461471f537f5f5d4ee3c2866b21e1f, reversing changes made to 02807b279a5e6d5acaeb7095e4c0527e2a5c190e. (cherry picked from commit 66f9b55e3bf40f03e49cd95008ba1d7c709ca127) --- stdlib/Distributed/src/cluster.jl | 66 ++++----------------- stdlib/Distributed/src/macros.jl | 10 +++- stdlib/Distributed/src/managers.jl | 2 +- stdlib/Distributed/src/messages.jl | 28 +++++---- stdlib/Distributed/src/remotecall.jl | 46 ++++---------- stdlib/Distributed/test/distributed_exec.jl | 1 - stdlib/Distributed/test/threads.jl | 63 -------------------- 7 files changed, 47 insertions(+), 169 deletions(-) delete mode 100644 stdlib/Distributed/test/threads.jl diff --git a/stdlib/Distributed/src/cluster.jl b/stdlib/Distributed/src/cluster.jl index 52400a129efb4..ebe4cac0f3bbe 100644 --- a/stdlib/Distributed/src/cluster.jl +++ b/stdlib/Distributed/src/cluster.jl @@ -95,14 +95,13 @@ end @enum WorkerState W_CREATED W_CONNECTED W_TERMINATING W_TERMINATED mutable struct Worker id::Int - msg_lock::Threads.ReentrantLock # Lock for del_msgs, add_msgs, and gcflag del_msgs::Array{Any,1} add_msgs::Array{Any,1} gcflag::Bool state::WorkerState - c_state::Threads.Condition # wait for state changes, lock for state - ct_time::Float64 # creation time - conn_func::Any # used to setup connections lazily + c_state::Condition # wait for state changes + ct_time::Float64 # creation time + conn_func::Any # used to setup connections lazily r_stream::IO w_stream::IO @@ -134,7 +133,7 @@ mutable struct Worker if haskey(map_pid_wrkr, id) return map_pid_wrkr[id] end - w=new(id, Threads.ReentrantLock(), [], [], false, W_CREATED, Threads.Condition(), time(), conn_func) + w=new(id, [], [], false, W_CREATED, Condition(), time(), conn_func) w.initialized = Event() register_worker(w) w @@ -144,16 +143,12 @@ mutable struct Worker end function set_worker_state(w, state) - lock(w.c_state) do - w.state = state - notify(w.c_state; all=true) - end + w.state = state + notify(w.c_state; all=true) end function check_worker_state(w::Worker) - lock(w.c_state) if w.state === W_CREATED - unlock(w.c_state) if !isclusterlazy() if PGRP.topology === :all_to_all # Since higher pids connect with lower pids, the remote worker @@ -173,8 +168,6 @@ function check_worker_state(w::Worker) errormonitor(t) wait_for_conn(w) end - else - unlock(w.c_state) end end @@ -193,25 +186,13 @@ function exec_conn_func(w::Worker) end function wait_for_conn(w) - lock(w.c_state) if w.state === W_CREATED - unlock(w.c_state) timeout = worker_timeout() - (time() - w.ct_time) timeout <= 0 && error("peer $(w.id) has not connected to $(myid())") - T = Threads.@spawn begin - sleep($timeout) - lock(w.c_state) do - notify(w.c_state; all=true) - end - end - errormonitor(T) - lock(w.c_state) do - wait(w.c_state) - w.state === W_CREATED && error("peer $(w.id) didn't connect to $(myid()) within $timeout seconds") - end - else - unlock(w.c_state) + @async (sleep(timeout); notify(w.c_state; all=true)) + wait(w.c_state) + w.state === W_CREATED && error("peer $(w.id) didn't connect to $(myid()) within $timeout seconds") end nothing end @@ -490,10 +471,6 @@ 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() @@ -506,10 +483,7 @@ function addprocs_locked(manager::ClusterManager; kwargs...) while true if isempty(launched) istaskdone(t_launch) && break - @async begin - sleep(1) - notify(launch_ntfy) - end + @async (sleep(1); notify(launch_ntfy)) wait(launch_ntfy) end @@ -662,12 +636,7 @@ function create_worker(manager, wconfig) # require the value of config.connect_at which is set only upon connection completion for jw in PGRP.workers if (jw.id != 1) && (jw.id < w.id) - # wait for wl to join - lock(jw.c_state) do - if jw.state === W_CREATED - wait(jw.c_state) - end - end + (jw.state === W_CREATED) && wait(jw.c_state) push!(join_list, jw) end end @@ -690,12 +659,7 @@ function create_worker(manager, wconfig) end for wl in wlist - lock(wl.c_state) do - if wl.state === W_CREATED - # wait for wl to join - wait(wl.c_state) - end - end + (wl.state === W_CREATED) && wait(wl.c_state) push!(join_list, wl) end end @@ -712,11 +676,7 @@ function create_worker(manager, wconfig) @async manage(w.manager, w.id, w.config, :register) # wait for rr_ntfy_join with timeout timedout = false - @async begin - sleep($timeout) - timedout = true - put!(rr_ntfy_join, 1) - end + @async (sleep($timeout); timedout = true; put!(rr_ntfy_join, 1)) wait(rr_ntfy_join) if timedout error("worker did not connect within $timeout seconds") diff --git a/stdlib/Distributed/src/macros.jl b/stdlib/Distributed/src/macros.jl index 24a24f4c08ed4..6603d627c3409 100644 --- a/stdlib/Distributed/src/macros.jl +++ b/stdlib/Distributed/src/macros.jl @@ -1,10 +1,14 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -let nextidx = Threads.Atomic{Int}(0) +let nextidx = 0 global nextproc function nextproc() - idx = Threads.atomic_add!(nextidx, 1) - return workers()[(idx % nworkers()) + 1] + p = -1 + if p == -1 + p = workers()[(nextidx % nworkers()) + 1] + nextidx += 1 + end + p end end diff --git a/stdlib/Distributed/src/managers.jl b/stdlib/Distributed/src/managers.jl index 7ac8007951ddc..ce99d85801e17 100644 --- a/stdlib/Distributed/src/managers.jl +++ b/stdlib/Distributed/src/managers.jl @@ -160,7 +160,7 @@ function launch(manager::SSHManager, params::Dict, launched::Array, launch_ntfy: # Wait for all launches to complete. @sync for (i, (machine, cnt)) in enumerate(manager.machines) let machine=machine, cnt=cnt - @async try + @async try launch_on_machine(manager, $machine, $cnt, params, launched, launch_ntfy) catch e print(stderr, "exception launching on machine $(machine) : $(e)\n") diff --git a/stdlib/Distributed/src/messages.jl b/stdlib/Distributed/src/messages.jl index fcba709b4db4a..47f70e044a2c0 100644 --- a/stdlib/Distributed/src/messages.jl +++ b/stdlib/Distributed/src/messages.jl @@ -126,20 +126,22 @@ function flush_gc_msgs(w::Worker) if !isdefined(w, :w_stream) return end - lock(w.msg_lock) do - w.gcflag || return # early exit if someone else got to this - w.gcflag = false - msgs = w.add_msgs - w.add_msgs = Any[] - if !isempty(msgs) - remote_do(add_clients, w, msgs) - 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 - msgs = w.del_msgs - w.del_msgs = Any[] - if !isempty(msgs) - remote_do(del_clients, w, msgs) - 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) end end diff --git a/stdlib/Distributed/src/remotecall.jl b/stdlib/Distributed/src/remotecall.jl index 4f0e066ce26e0..91e5de36736bd 100644 --- a/stdlib/Distributed/src/remotecall.jl +++ b/stdlib/Distributed/src/remotecall.jl @@ -247,42 +247,22 @@ function del_clients(pairs::Vector) end end -# 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() +const any_gc_flag = Condition() function start_gc_msgs_task() - errormonitor( - Threads.@spawn begin - while true - lock(any_gc_flag) do - wait(any_gc_flag) - flush_gc_msgs() # handles throws internally - end - end - end - ) + errormonitor(@async while true + wait(any_gc_flag) + flush_gc_msgs() + end) end -# Function can be called within a finalizer 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 - msg = (remoteref_id(rr), myid()) - # We cannot acquire locks from finalizers - Threads.@spawn begin - lock(w.msg_lock) do - push!(w.del_msgs, msg) - w.gcflag = true - end - lock(any_gc_flag) do - notify(any_gc_flag) - end - end + push!(w.del_msgs, (remoteref_id(rr), myid())) + w.gcflag = true + notify(any_gc_flag) end end @@ -308,13 +288,9 @@ 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) - lock(w.msg_lock) do - push!(w.add_msgs, (remoteref_id(rr), i)) - w.gcflag = true - end - lock(any_gc_flag) do - notify(any_gc_flag) - end + push!(w.add_msgs, (remoteref_id(rr), i)) + w.gcflag = true + notify(any_gc_flag) end end diff --git a/stdlib/Distributed/test/distributed_exec.jl b/stdlib/Distributed/test/distributed_exec.jl index 547b035e8e6b9..606b7fa81c3e7 100644 --- a/stdlib/Distributed/test/distributed_exec.jl +++ b/stdlib/Distributed/test/distributed_exec.jl @@ -1689,5 +1689,4 @@ include("splitrange.jl") # Run topology tests last after removing all workers, since a given # cluster at any time only supports a single topology. rmprocs(workers()) -include("threads.jl") include("topology.jl") diff --git a/stdlib/Distributed/test/threads.jl b/stdlib/Distributed/test/threads.jl deleted file mode 100644 index 57d99b7ea056c..0000000000000 --- a/stdlib/Distributed/test/threads.jl +++ /dev/null @@ -1,63 +0,0 @@ -using Test -using Distributed, Base.Threads -using Base.Iterators: product - -exeflags = ("--startup-file=no", - "--check-bounds=yes", - "--depwarn=error", - "--threads=2") - -function call_on(f, wid, tid) - remotecall(wid) do - t = Task(f) - ccall(:jl_set_task_tid, Cvoid, (Any, Cint), t, tid - 1) - schedule(t) - @assert threadid(t) == tid - t - end -end - -# Run function on process holding the data to only serialize the result of f. -# This becomes useful for things that cannot be serialized (e.g. running tasks) -# or that would be unnecessarily big if serialized. -fetch_from_owner(f, rr) = remotecall_fetch(f ∘ fetch, rr.where, rr) - -isdone(rr) = fetch_from_owner(istaskdone, rr) -isfailed(rr) = fetch_from_owner(istaskfailed, rr) - -@testset "RemoteChannel allows put!/take! from thread other than 1" begin - ws = ts = product(1:2, 1:2) - @testset "from worker $w1 to $w2 via 1" for (w1, w2) in ws - @testset "from thread $w1.$t1 to $w2.$t2" for (t1, t2) in ts - # We want (the default) lazyness, so that we wait for `Worker.c_state`! - procs_added = addprocs(2; exeflags, lazy=true) - @everywhere procs_added using Base.Threads - - p1 = procs_added[w1] - p2 = procs_added[w2] - chan_id = first(procs_added) - chan = RemoteChannel(chan_id) - send = call_on(p1, t1) do - put!(chan, nothing) - end - recv = call_on(p2, t2) do - take!(chan) - end - - # Wait on the spawned tasks on the owner - @sync begin - Threads.@spawn fetch_from_owner(wait, recv) - Threads.@spawn fetch_from_owner(wait, send) - end - - # Check the tasks - @test isdone(send) - @test isdone(recv) - - @test !isfailed(send) - @test !isfailed(recv) - - rmprocs(procs_added) - end - end -end From dd697eceff93abf929f928938cf8620a5aa80497 Mon Sep 17 00:00:00 2001 From: Kenta Sato Date: Mon, 2 Aug 2021 17:30:24 +0900 Subject: [PATCH 139/146] guard `isempty (close #41656) (#41752) (cherry picked from commit 4c3829d413a12c2b4a87952e0f6d1ecbbff63239) --- contrib/generate_precompile.jl | 2 +- test/misc.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl index b5ded199688ee..278dda2812559 100644 --- a/contrib/generate_precompile.jl +++ b/contrib/generate_precompile.jl @@ -1,6 +1,6 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -if isempty(Base.ARGS) || Base.ARGS[1] !== "0" +if Base.isempty(Base.ARGS) || Base.ARGS[1] !== "0" Sys.__init_build() # Prevent this from being put into the Main namespace @eval Module() begin diff --git a/test/misc.jl b/test/misc.jl index e765dc9279b86..411135ac63313 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -1000,3 +1000,5 @@ let script = :(let ptr = Ptr{Cint}(ccall(:jl_mmap, Ptr{Cvoid}, @test !success(`$(Base.julia_cmd()) -e $script`) end +# issue #41656 +@test success(`$(Base.julia_cmd()) -e 'isempty(x) = true'`) From 6153a7e8378276a7ea0653d5101ff61112b50f36 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Wed, 28 Jul 2021 11:53:28 +0200 Subject: [PATCH 140/146] Fix `length(::AbstractUnitRange)` and speed up `length(::AbstractUnitRange{<:Rational})` (#41479) * Fix length(::AbstractUnitRange), faster length(::AbstractUnitRange{<:Rational}) (cherry picked from commit 1c951f7fe8e5e923cc5f5b18c91e461b61641b14) --- base/range.jl | 17 ++++++++--------- base/rational.jl | 18 ++++++++++++++++++ test/ranges.jl | 15 ++++++++++++++- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/base/range.jl b/base/range.jl index 9a7c74e4d4088..1ab4f2c9f99ae 100644 --- a/base/range.jl +++ b/base/range.jl @@ -663,8 +663,8 @@ function checked_length(r::OrdinalRange{T}) where T else diff = checked_sub(stop, start) end - a = Integer(div(diff, s)) - return checked_add(a, oneunit(a)) + a = div(diff, s) + return Integer(checked_add(a, oneunit(a))) end function checked_length(r::AbstractUnitRange{T}) where T @@ -672,8 +672,8 @@ function checked_length(r::AbstractUnitRange{T}) where T if isempty(r) return Integer(first(r) - first(r)) end - a = Integer(checked_add(checked_sub(last(r), first(r)))) - return checked_add(a, oneunit(a)) + a = checked_sub(last(r), first(r)) + return Integer(checked_add(a, oneunit(a))) end function length(r::OrdinalRange{T}) where T @@ -690,15 +690,14 @@ function length(r::OrdinalRange{T}) where T else diff = stop - start end - a = Integer(div(diff, s)) - return a + oneunit(a) + a = div(diff, s) + return Integer(a + oneunit(a)) end - function length(r::AbstractUnitRange{T}) where T @_inline_meta - a = Integer(last(r) - first(r)) # even when isempty, by construction (with overflow) - return a + oneunit(a) + a = last(r) - first(r) # even when isempty, by construction (with overflow) + return Integer(a + oneunit(a)) end length(r::OneTo) = Integer(r.stop - zero(r.stop)) diff --git a/base/rational.jl b/base/rational.jl index 23c9298962f53..1c83443d10df3 100644 --- a/base/rational.jl +++ b/base/rational.jl @@ -533,3 +533,21 @@ function hash(x::Rational{<:BitInteger64}, h::UInt) h = hash_integer(num, h) return h end + +# These methods are only needed for performance. Since `first(r)` and `last(r)` have the +# same denominator (because their difference is an integer), `length(r)` can be calulated +# without calling `gcd`. +function length(r::AbstractUnitRange{T}) where T<:Rational + @_inline_meta + f = first(r) + l = last(r) + return div(l.num - f.num + f.den, f.den) +end +function checked_length(r::AbstractUnitRange{T}) where T<:Rational + f = first(r) + l = last(r) + if isempty(r) + return f.num - f.num + end + return div(checked_add(checked_sub(l.num, f.num), f.den), f.den) +end diff --git a/test/ranges.jl b/test/ranges.jl index 42a1c8a74ff6f..088d5746294c6 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -544,6 +544,19 @@ end end end +# A number type with the overflow behavior of `UInt8`. Conversion to `Integer` returns an +# `Int32`, i.e., a type with different `typemin`/`typemax`. See #41479 +struct OverflowingReal <: Real + val::UInt8 +end +OverflowingReal(x::OverflowingReal) = x +Base.:<=(x::OverflowingReal, y::OverflowingReal) = x.val <= y.val +Base.:+(x::OverflowingReal, y::OverflowingReal) = OverflowingReal(x.val + y.val) +Base.:-(x::OverflowingReal, y::OverflowingReal) = OverflowingReal(x.val - y.val) +Base.round(x::OverflowingReal, ::RoundingMode) = x +Base.Integer(x::OverflowingReal) = Int32(x.val) +@test length(OverflowingReal(1):OverflowingReal(0)) == 0 + @testset "loops involving typemin/typemax" begin n = 0 s = 0 @@ -1095,7 +1108,7 @@ end @testset "issue 10950" begin r = 1//2:3 @test length(r) == 3 - @test_throws MethodError checked_length(r) == 3 # this would work if checked_sub is defined on Rational + @test checked_length(r) == 3 i = 1 for x in r @test x == i//2 From f8bae15e3b06196d9a42be126d2975aafbe8dea5 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Mon, 19 Jul 2021 20:48:11 +0200 Subject: [PATCH 141/146] Fix for dimensionful numbers (#41595) (cherry picked from commit 472037839642ccd31f9ed4b540bd478d2f9d4b67) --- base/range.jl | 2 +- test/ranges.jl | 1 + test/testhelpers/Furlongs.jl | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/base/range.jl b/base/range.jl index 1ab4f2c9f99ae..07d9f598d4339 100644 --- a/base/range.jl +++ b/base/range.jl @@ -681,7 +681,7 @@ function length(r::OrdinalRange{T}) where T # s != 0, by construction, but avoids the division error later start = first(r) if s == zero(s) || isempty(r) - return Integer(start - start + zero(s)) + return Integer(div(start-start, oneunit(s))) end stop = last(r) if isless(s, zero(s)) diff --git a/test/ranges.jl b/test/ranges.jl index 088d5746294c6..d95bc6911e818 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1457,6 +1457,7 @@ using .Main.Furlongs @testset "dimensional correctness" begin @test length(Vector(Furlong(2):Furlong(10))) == 9 @test length(range(Furlong(2), length=9)) == checked_length(range(Furlong(2), length=9)) == 9 + @test @inferred(length(StepRange(Furlong(2), Furlong(1), Furlong(1)))) == 0 @test Vector(Furlong(2):Furlong(1):Furlong(10)) == Vector(range(Furlong(2), step=Furlong(1), length=9)) == Furlong.(2:10) @test Vector(Furlong(1.0):Furlong(0.5):Furlong(10.0)) == Vector(Furlong(1):Furlong(0.5):Furlong(10)) == Furlong.(1:0.5:10) diff --git a/test/testhelpers/Furlongs.jl b/test/testhelpers/Furlongs.jl index f3583a532215a..67c2023a0bc84 100644 --- a/test/testhelpers/Furlongs.jl +++ b/test/testhelpers/Furlongs.jl @@ -14,7 +14,7 @@ struct Furlong{p,T<:Number} <: Number end Furlong(x::T) where {T<:Number} = Furlong{1,T}(x) Furlong(x::Furlong) = x -(::Type{T})(x::Furlong) where {T<:Number} = T(x.val)::T +(::Type{T})(x::Furlong{0}) where {T<:Number} = T(x.val)::T Furlong{p}(v::Number) where {p} = Furlong{p,typeof(v)}(v) Furlong{p}(x::Furlong{q}) where {p,q} = (@assert(p==q); Furlong{p,typeof(x.val)}(x.val)) Furlong{p,T}(x::Furlong{q}) where {T,p,q} = (@assert(p==q); Furlong{p,T}(T(x.val))) From 6f8e1d3705694bf8c1c5af808486a0b2442d0390 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Tue, 3 Aug 2021 12:47:14 -0700 Subject: [PATCH 142/146] fix #40048, stack overflows in type intersection (#41687) (#41772) (cherry picked from commit ca0331f75182eb221a8a80000edb7a758fcbb87b) Co-authored-by: Jeff Bezanson --- src/subtype.c | 35 +++++++++++++++++++++-------------- test/subtype.jl | 13 +++++++++++++ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/subtype.c b/src/subtype.c index 0d87532e73c39..158a9dd70b3f3 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -2210,13 +2210,29 @@ static int subtype_in_env_existential(jl_value_t *x, jl_value_t *y, jl_stenv_t * return issub; } +// See if var y is reachable from x via bounds; used to avoid cycles. +static int reachable_var(jl_value_t *x, jl_tvar_t *y, jl_stenv_t *e) +{ + if (in_union(x, (jl_value_t*)y)) + return 1; + if (!jl_is_typevar(x)) + return 0; + jl_varbinding_t *xv = lookup(e, (jl_tvar_t*)x); + if (xv == NULL) + return 0; + return reachable_var(xv->ub, y, e) || reachable_var(xv->lb, y, e); +} + static jl_value_t *intersect_var(jl_tvar_t *b, jl_value_t *a, jl_stenv_t *e, int8_t R, int param) { jl_varbinding_t *bb = lookup(e, b); if (bb == NULL) return R ? intersect_aside(a, b->ub, e, 1, 0) : intersect_aside(b->ub, a, e, 0, 0); - if (bb->lb == bb->ub && jl_is_typevar(bb->lb) && bb->lb != (jl_value_t*)b) + if (reachable_var(bb->lb, b, e) || reachable_var(bb->ub, b, e)) + return a; + if (bb->lb == bb->ub && jl_is_typevar(bb->lb)) { return intersect(a, bb->lb, e, param); + } if (!jl_is_type(a) && !jl_is_typevar(a)) return set_var_to_const(bb, a, NULL); int d = bb->depth0; @@ -2521,7 +2537,11 @@ static jl_value_t *intersect_unionall_(jl_value_t *t, jl_unionall_t *u, jl_stenv // if the var for this unionall (based on identity) already appears somewhere // in the environment, rename to get a fresh var. // TODO: might need to look inside types in btemp->lb and btemp->ub + int envsize = 0; while (btemp != NULL) { + envsize++; + if (envsize > 150) + return t; if (btemp->var == u->var || btemp->lb == (jl_value_t*)u->var || btemp->ub == (jl_value_t*)u->var) { u = rename_unionall(u); @@ -2923,19 +2943,6 @@ static int subtype_by_bounds(jl_value_t *x, jl_value_t *y, jl_stenv_t *e) return compareto_var(x, (jl_tvar_t*)y, e, -1) || compareto_var(y, (jl_tvar_t*)x, e, 1); } -// See if var y is reachable from x via bounds; used to avoid cycles. -static int reachable_var(jl_value_t *x, jl_tvar_t *y, jl_stenv_t *e) -{ - if (x == (jl_value_t*)y) - return 1; - if (!jl_is_typevar(x)) - return 0; - jl_varbinding_t *xv = lookup(e, (jl_tvar_t*)x); - if (xv == NULL) - return 0; - return reachable_var(xv->ub, y, e) || reachable_var(xv->lb, y, e); -} - // `param` means we are currently looking at a parameter of a type constructor // (as opposed to being outside any type constructor, or comparing variable bounds). // this is used to record the positions where type variables occur for the diff --git a/test/subtype.jl b/test/subtype.jl index 244ce3c4b7900..17d2b491003fe 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -1914,3 +1914,16 @@ end f18985(x::T, y...) where {T<:Union{Int32,Int64}} = (length(y), f18985(y[1], y[2:end]...)...) f18985(x::T) where {T<:Union{Int32,Int64}} = 100 @test f18985(1, 2, 3) == (2, 1, 100) + +# issue #40048 +let A = Tuple{Ref{T}, Vararg{T}} where T, + B = Tuple{Ref{U}, Union{Ref{S}, Ref{U}, Int}, Union{Ref{S}, S}} where S where U, + C = Tuple{Ref{U}, Union{Ref{S}, Ref{U}, Ref{W}}, Union{Ref{S}, W, V}} where V<:AbstractArray where W where S where U + I = typeintersect(A, B) + @test I != Union{} + @test I <: A + @test I <: B + # avoid stack overflow + J = typeintersect(A, C) + @test_broken J != Union{} +end From 712b8012c567af06b7bbd855ade722fa9e09e5cf Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 4 Aug 2021 10:17:22 +0200 Subject: [PATCH 143/146] Set VERSION to 1.7.0-beta4 (#41767) --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4ccfeecee49f0..ee7ad5a0796a4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.0-beta3 +1.7.0-beta4 From ffc3974e09bbb45328f8e74ad4daa6f40c244dc7 Mon Sep 17 00:00:00 2001 From: Rafael Fourquet Date: Wed, 18 Aug 2021 23:06:03 +0200 Subject: [PATCH 144/146] add compat annotations for `replace` on tuples (#41746) The methods were added in #38216. (cherry-picked from 57ce0e66e9490dcfa01e1e1789fc07bdcac157be, PR #41701) --- NEWS.md | 2 ++ base/set.jl | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/NEWS.md b/NEWS.md index 4a4b30f6a0db1..7e55538d94cca 100644 --- a/NEWS.md +++ b/NEWS.md @@ -148,6 +148,7 @@ Standard library changes overflow in most cases. The new function `checked_length` is now available, which will try to use checked arithmetic to error if the result may be wrapping. Or use a package such as SaferIntegers.jl when constructing the range. ([#40382]) +* New `replace` methods to replace elements of a `Tuple` ([#38216]). #### Package Manager @@ -316,6 +317,7 @@ Tooling Improvements [#37971]: https://github.com/JuliaLang/julia/issues/37971 [#37978]: https://github.com/JuliaLang/julia/issues/37978 [#38041]: https://github.com/JuliaLang/julia/issues/38041 +[#38216]: https://github.com/JuliaLang/julia/issues/38216 [#38379]: https://github.com/JuliaLang/julia/issues/38379 [#38438]: https://github.com/JuliaLang/julia/issues/38438 [#38574]: https://github.com/JuliaLang/julia/issues/38574 diff --git a/base/set.jl b/base/set.jl index 5a744c556432c..e2e6a83b0a4c5 100644 --- a/base/set.jl +++ b/base/set.jl @@ -548,6 +548,9 @@ replaced. See also [`replace!`](@ref), [`splice!`](@ref), [`delete!`](@ref), [`insert!`](@ref). +!!! compat "Julia 1.7" + Version 1.7 is required to replace elements of a `Tuple`. + # Examples ```jldoctest julia> replace([1, 2, 1, 3], 1=>0, 2=>4, count=2) @@ -596,6 +599,9 @@ Return a copy of `A` where each value `x` in `A` is replaced by `new(x)`. If `count` is specified, then replace at most `count` values in total (replacements being defined as `new(x) !== x`). +!!! compat "Julia 1.7" + Version 1.7 is required to replace elements of a `Tuple`. + # Examples ```jldoctest julia> replace(x -> isodd(x) ? 2x : x, [1, 2, 3, 4]) From d0c90f37ba0d259d2231caa50171a61cd95d41fa Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 24 Aug 2021 08:35:08 -0400 Subject: [PATCH 145/146] [release-1.7] Bump the SuiteSparse stdlib from ec4b40a to b2d965a (#41982) --- .../md5 | 1 - .../sha512 | 1 - deps/checksums/suitesparse | 2 ++ stdlib/SuiteSparse.version | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/md5 delete mode 100644 deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/sha512 diff --git a/deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/md5 b/deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/md5 deleted file mode 100644 index 234424096e008..0000000000000 --- a/deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -62c5d890b62dc8825ff449dd229452b2 diff --git a/deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/sha512 b/deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/sha512 deleted file mode 100644 index 7833dea8238d1..0000000000000 --- a/deps/checksums/SuiteSparse-ec4b40ad9c0490ebf0969a41d4f880620db3f6f9.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -b822f84edaab9dce301803510ac6e597fd135620685544aa9e8fbc0bbb140784fb00012e5ccfe4836b4dc39bd75f8be54c4e1fffc29696991e3d78855bc7617c diff --git a/deps/checksums/suitesparse b/deps/checksums/suitesparse index 25123ba015294..9b7a572b1f38f 100644 --- a/deps/checksums/suitesparse +++ b/deps/checksums/suitesparse @@ -1,5 +1,7 @@ SuiteSparse-5.10.1.tar.gz/md5/68bb912f3cf3d2b01f30ebafef690302 SuiteSparse-5.10.1.tar.gz/sha512/8f85c6d63b76cba95707dfa732c51200df7794cb4c2599dbd92100475747b8d02b05089a47096e85c60b89bc852a8e768e0670f24902a82d29494a80ccf2bb5f +SuiteSparse-b2d965aa8493f5ef25d6c861ce9d06ed02978ccc.tar.gz/md5/f1e58aa2a3a5c7a8b6b550d5155055a3 +SuiteSparse-b2d965aa8493f5ef25d6c861ce9d06ed02978ccc.tar.gz/sha512/420cda533c3aa2d91add3e6937c6a7c9f0b7cc9a835b89e3ef96fe50fefbcc386c1cda1853f795d30bbf239f97dd807e0d0ec6a92c531c3bfe2965a386ca95c3 SuiteSparse.v5.10.1+0.aarch64-apple-darwin.tar.gz/md5/b9392f8e71c0c40d37489e7b2071c5ad SuiteSparse.v5.10.1+0.aarch64-apple-darwin.tar.gz/sha512/109d67cb009e3b2931b94d63cbdaaee29d60dc190b731ebe3737181cd48d913b8a1333043c67be8179c73e4d3ae32ed1361ab4e34312c0f42e4b29f8a7afda3e SuiteSparse.v5.10.1+0.aarch64-linux-gnu.tar.gz/md5/1b2651ede4a74cd57f65505a65093314 diff --git a/stdlib/SuiteSparse.version b/stdlib/SuiteSparse.version index da54441dc4041..b1853bbdace76 100644 --- a/stdlib/SuiteSparse.version +++ b/stdlib/SuiteSparse.version @@ -1,2 +1,2 @@ SUITESPARSE_BRANCH = master -SUITESPARSE_SHA1 = ec4b40ad9c0490ebf0969a41d4f880620db3f6f9 +SUITESPARSE_SHA1 = b2d965aa8493f5ef25d6c861ce9d06ed02978ccc From f9c4755f435bbcab79765f250971339181e76a2d Mon Sep 17 00:00:00 2001 From: Ian Atol Date: Tue, 21 Sep 2021 16:02:49 -0700 Subject: [PATCH 146/146] Fix problem with union spliting during inlining, add regression test --- base/compiler/ssair/inlining.jl | 6 ++---- test/compiler/inline.jl | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 78edef88439e9..99da842b402c4 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -508,9 +508,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) @@ -570,7 +568,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..11f7b8a425c2a 100644 --- a/test/compiler/inline.jl +++ b/test/compiler/inline.jl @@ -384,3 +384,7 @@ 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 +f(x) = (x...,) +code_typed(f, Tuple{Union{Int64, CartesianIndex{1}, CartesianIndex{3}}})