swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40

sort by:
Revision Author Date Message Commit Date
af34539 wip: scratch compiler plugin 12 April 2022, 12:41:05 UTC
6c22265 more test coverage 12 April 2022, 07:39:13 UTC
7aa4a7d Merge branch 'master' into jb/ircode2oc 12 April 2022, 06:32:05 UTC
c2da085 Round from zero support for non-BigFloats (#41246) Co-authored-by: Steven G. Johnson <stevenj@alum.mit.edu> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 12 April 2022, 05:40:47 UTC
8020549 [src] Fix compilation of `crc32.c` on aarch64 with Clang (#44915) Compilation of this file on aarch64 Linux with Clang currently fails with ```console $ make crc32c.o CC=clang CC src/crc32c.o In file included from /home/mose/repo/julia/src/crc32c.c:45: In file included from ./julia_internal.h:1021: In file included from /home/mose/repo/julia/usr/include/libunwind.h:7: /home/mose/repo/julia/usr/include/libunwind-aarch64.h:60:9: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat] typedef struct ^ /home/mose/repo/julia/usr/include/libunwind-aarch64.h:169:9: warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat] typedef struct unw_tdep_save_loc ^ /home/mose/repo/julia/src/crc32c.c:339:22: warning: unused function 'crc32c_dispatch' [-Wunused-function] static crc32c_func_t crc32c_dispatch(unsigned long hwcap) ^ '++crc' is not a recognized feature for this target (ignoring feature) '++crc' is not a recognized feature for this target (ignoring feature) /home/mose/repo/julia/src/crc32c.c:212:9: error: instruction requires: crc asm("crc32cx %w0, %w1, %2" : "=r"(res) : "r"(crc), "r"(val)); ^ <inline asm>:1:2: note: instantiated into assembly here crc32cx w0, w0, x1 ^ /home/mose/repo/julia/src/crc32c.c:218:9: error: instruction requires: crc asm("crc32cw %w0, %w1, %w2" : "=r"(res) : "r"(crc), "r"(val)); ^ <inline asm>:1:2: note: instantiated into assembly here crc32cw w0, w0, w1 ^ /home/mose/repo/julia/src/crc32c.c:224:9: error: instruction requires: crc asm("crc32ch %w0, %w1, %w2" : "=r"(res) : "r"(crc), "r"(val)); ^ <inline asm>:1:2: note: instantiated into assembly here crc32ch w0, w0, w1 ^ /home/mose/repo/julia/src/crc32c.c:230:9: error: instruction requires: crc asm("crc32cb %w0, %w1, %w2" : "=r"(res) : "r"(crc), "r"(val)); ^ <inline asm>:1:2: note: instantiated into assembly here crc32cb w0, w0, w1 ^ 3 warnings and 4 errors generated. make: *** [Makefile:217: crc32c.o] Error 1 ``` Compilation on aarch64 macOS with Apple Clang is successful, but there is still the message about the unrecognized feature: ```console % rm -f crc32c.o; make crc32c.o CC src/crc32c.o '++crc' is not a recognized feature for this target (ignoring feature) '++crc' is not a recognized feature for this target (ignoring feature) ``` It appears GCC and Clang disagrees on how the target attribute should be specified: GCC wants `"+crc"`, while Clang wants `"crc"`. Also Android's zlib uses `"crc"` only when building for Clang: <https://android.googlesource.com/platform/external/zlib/+/refs/tags/android-platform-12.1.0_r2/crc32_simd.c#187>. With this change, compilation of Julia on aarch64 Linux with Clang is now successful. Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 12 April 2022, 05:25:49 UTC
d9e6eaf Remove a few unobjectionable codegen lock calls (#44924) 12 April 2022, 05:17:33 UTC
2ae677d [Distributed] Set stdin to devnull before closing it (#44881) * [Distributed] Set stdin to devnull before closing it Distributed closes and destroys stdin, but some tests attempted to explicitly use it, leading to test problems. We previously interpreted this as passing devnull, but this is better to be explicit. * Revert "Testsystem: for now, move the REPL tests to node 1 (#44880)" This reverts commit 7401e92a930ab51ff74e67a27152df5c2acd459b. 12 April 2022, 05:11:29 UTC
b5bbb9f distributed docs (#44940) 12 April 2022, 02:06:42 UTC
d4e26c8 predicate function negation with ComposedFunction (#44752) Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> 12 April 2022, 02:02:17 UTC
c0c60e8 Pool more JIT resources to reduce memory usage/contention (#44912) 12 April 2022, 01:59:07 UTC
4c858f8 Fix 44921 by properly setting Vboxed field (#44942) 12 April 2022, 01:54:13 UTC
990c21a Updated 32 bit heuristics (#44805) Co-authored-by: Christine H. Flood <christineflood@juliacomputing.com> Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 12 April 2022, 01:44:58 UTC
0c2722e Use context lock instead of codegen lock (#44923) 11 April 2022, 20:44:58 UTC
691d310 fixes to OpaqueClosure argument count handling and MethodError display 11 April 2022, 16:55:37 UTC
1fe7cfa add `@nospecialize` for `identity` (#44929) 11 April 2022, 16:10:32 UTC
dfe0e34 replace `@pure` annotations in Base with effect settings (#44776) This commit replaces `@pure`/`@_pure_meta` annotations used in `Base` with corresponding effect settings (`:total` or `:total_or_throw`). The concrete evaluation mechanism based on the effect system (#43852) has the following benefits over the `@pure`-based optimization: - it can fold cases when consistent exception is thrown - it can handle constant union-split situation as well - effects can be propagated inter-procedurally While revisiting the existing annotations, I removed some unnecessary ones and also added some more hopefully new annotations (mostly for reflection utilities). In theory this should give us some performance benefits, e.g. now we can concrete-evaluate union-spit `typeintersect`: ```julia @test Base.return_types((Union{Int,Nothing},)) do x typeintersect(String, typeof(x)) end |> only === Type{Union{}} ``` Though this commit ends up bigger than I expected -- we should carefully check a benchmark result so that it doesn't come with any regressions. 11 April 2022, 14:34:37 UTC
0deb326 inference: don't widen `DataType`/`UninAll` to `Type` within `tuple_tfunc` (#44896) Follows up #44725. 11 April 2022, 02:41:35 UTC
bb91e62 Fix "anonymous types declared in an anonymous union" warnings (#44807) They look like this: ``` CC src/processor.o In file included from /Users/mhorn/Projekte/Julia/julia.master/src/processor.cpp:10: In file included from ./processor.h:5: ./julia.h:395:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] struct { ^ ./julia.h:405:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] struct { ^ 2 warnings generated. ``` and come from code that was introduced by @keno in PR #43852. But it turns out that the union is not used at all! So I'm simply removing the offending union. Perhaps it is needed for some future work, but it should be trivial to add it back if needed. If that happens, I suggest a comment is added that explain why this looks similar to but has different layout compared to the `typedef _jl_purity_overrides_t` also in `julia.h`. 10 April 2022, 23:28:41 UTC
992b261 Move to a pool of threadsafecontexts (#44605) * Use pooled contexts * Allow move construction of the resource pool 10 April 2022, 18:47:02 UTC
3d87815 CI (`Create Buildbot Statuses`): remove `tester_macos64` from the list (#44918) 09 April 2022, 23:50:31 UTC
73c9863 Add `skip(::BufferStream, n)` (#44917) The lack of this method means that we can't use `Tar` with a `BufferStream` which seems a shame. A minimal example: ``` julia> using Tar mktempdir() do dir touch("$(dir)/foo") touch("$(dir)/bar") mkdir("$(dir)/baz") open("$(dir)/baz/qux", write=true) do io println(io, rand(UInt8, 1000)) end bs = Base.BufferStream() tar_stream = open(`tar c $(dir)`; read=true).out @async begin write(bs, read(tar_stream)) close(bs) end Tar.list(bs) end ``` Results in: ``` ERROR: MethodError: no method matching skip(::Base.BufferStream, ::Int64) Closest candidates are: skip(::Base.GenericIOBuffer, ::Integer) at iobuffer.jl:243 skip(::IOStream, ::Integer) at iostream.jl:184 skip(::Base.Filesystem.File, ::Integer) at filesystem.jl:251 ``` Whereas adding the definition in this PR instead yields: ``` tar: Removing leading `/' from member names 5-element Vector{Tar.Header}: Tar.Header("tmp/jl_7b01pO/", :directory, 0o700, 0, "") Tar.Header("tmp/jl_7b01pO/foo", :file, 0o664, 0, "") Tar.Header("tmp/jl_7b01pO/bar", :file, 0o664, 0, "") Tar.Header("tmp/jl_7b01pO/baz/", :directory, 0o775, 0, "") Tar.Header("tmp/jl_7b01pO/baz/qux", :file, 0o664, 6006, "") ``` 09 April 2022, 15:06:38 UTC
74314a0 ASAN: Minimal system image to reduce CI time. (#44908) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 09 April 2022, 00:55:53 UTC
385762b allow slurping in any position (#42902) This extends the current slurping syntax by allowing the slurping to not only occur at the end, but anywhere on the lhs. This allows syntax like `a, b..., c = x` to work as expected. The feature is implemented using a new function called `split_rest` (definitely open to better names), which takes as arguments the iterator, the number of trailing variables at the end as a `Val` and possibly a previous iteration state. It then spits out a vector containing all slurped arguments and a tuple with the n values that get assigned to the rest of the variables. The plan would be to customize this for different finite collection, so that the first argument won't always be a vector, but that has not been implemented yet. `split_rest` differs from `rest` of course in that it always needs to be eager, since the trailing values need to be known immediately. This is why the slurped part has to be a vector for most iterables, instead of a lazy iterator as is the case for `rest`. 08 April 2022, 21:50:53 UTC
8890aea Use EmittedUndefVarErrors Statistic (#44901) 08 April 2022, 11:47:33 UTC
6d78404 remove `isvarargtype` assertions from `subtype` and `intersect` (#44761) fix #44735 08 April 2022, 01:42:38 UTC
244ada3 fallback randn/randexp for AbstractFloat (#44714) * fallback randn/randexp for AbstractFloat 07 April 2022, 23:30:59 UTC
f536b81 Make some islocked methods better annotated for DRF (#44874) This implements the `islocked`-`trylock` API documented in #44820 for `ReentrantLock` and `SpinLock`. 07 April 2022, 18:40:09 UTC
315a5dd [REPL] replace \sqspne with \sqsupsetneq (#44899) 07 April 2022, 18:39:04 UTC
d055d96 codegen: remove the imaging mode global (#44600) 07 April 2022, 17:53:08 UTC
a1e93a3 Merge pull request #44578 from JuliaLang/pc/float-stat Add statistics and verification to our floating point passes 07 April 2022, 17:52:23 UTC
d127b5e mach: use 64-bit error handlers (#44837) While the legacy (32-bit) handlers still will work, we should switch to the modern handlers. 07 April 2022, 17:49:39 UTC
5f2abf6 fix missing field type initialization vars (#44797) We were accidentally passing the start of the list instead of the end of the list, resulting in some values passing through uninitialized. Fix #42297 regression 07 April 2022, 17:48:04 UTC
b4bed71 fix Libc.rand and seed problems (#44432) Continuation from #43606 - Replaces thread-unsafe function `rand` with `jl_rand`. - Fixes `_ad_hoc_entropy_source` fallback in Random. - Uses uv_random for more direct access to quality-randomness (usually a syscall rather than a file.) - Ensures Array{Bool} are valid when created from RandomDevice. 07 April 2022, 17:47:50 UTC
badad9d Implements flatmap (#44792) flatmap is the composition of map and flatten. It is important for functional programming patterns. Some tasks that can be easily attained with list-comprehensions, including the composition of filter and mapping, or flattening a list of computed lists, can only be attained with do-syntax style if a flatmap functor is available. (Or appending a `|> flatten`, etc.) Filtering can be implemented by outputing empty lists or singleton lists for the values to be removed or kept. 07 April 2022, 07:39:46 UTC
ad047d0 [src] Use `JL_CFLAGS` and `JL_CXXFLAGS` variables to build Julia (#44867) * [src] Use `JCFLAGS_add` and `JCXXFLAGS_add` variables to build Julia These variables are always used, they don't mess up with `JCFLAGS` and `JCXXFLAGS` and are specific to building Julia's source code only (not the dependencies). * [src] Rename `JC*FLAGS_add` to `JL_C*FLAGS` 07 April 2022, 06:22:32 UTC
7401e92 Testsystem: for now, move the REPL tests to node 1 (#44880) 06 April 2022, 21:54:09 UTC
2944ee9 fix trailing whitespace from #44849 (#44884) 06 April 2022, 21:32:12 UTC
559244b Add \neq tab completion to ≠ (#44849) 06 April 2022, 16:01:37 UTC
7014681 Small doc clearifications on embedding and the GC, plus information on threading restrictions (#43966) * Small clarifications on embedding and the GC, plus more information on restrictions when embedding in a multi-thread environment * Fix wide code blocks, add syntax highlight, small tweaks to text * Trim trailing whitespace Co-authored-by: Paul Melis <paul.melis@surfsara.nl> 06 April 2022, 12:36:50 UTC
f41eed8 Instrument various parts of codegen (#44595) * Instrument cgutils with statistics * Instrument ccall.cpp * Instrument intrinsics * Instrument codegen 06 April 2022, 12:17:39 UTC
2c8c0a4 Simplify InsertionSort (#44862) 06 April 2022, 00:38:18 UTC
0a7d5d1 Show `dlerror()` only if it's actually non-NULL (#44856) This prevents a segmentation fault when showing an error message when libjulia can't be loaded. 05 April 2022, 20:11:31 UTC
0ba4c07 Remove unused variable and invalidate less frequently in muladd 05 April 2022, 16:52:51 UTC
1a004d1 Instrument simdloop and multiversioning 05 April 2022, 16:50:24 UTC
14bedc1 Refactor and instrument muladd 05 April 2022, 16:50:24 UTC
568a6b7 Instrument DemoteFloat16 05 April 2022, 16:50:24 UTC
3fb132f Update Pkg, and move tests to node 1 (#44828) * 🤖 Bump the Pkg stdlib from 53cefb5c to b5d23482 * Move `Pkg` to node 1 Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 05 April 2022, 16:02:02 UTC
6774185 Check if `_POSIX_C_SOURCE` is defined before using its value (#44850) 05 April 2022, 15:51:36 UTC
c5fae67 Merge branch 'master' into jb/ircode2oc 05 April 2022, 11:33:15 UTC
dacf9d6 Remove disturbing `@show` output in tests (#44860) 05 April 2022, 09:04:45 UTC
aa497b5 Add statistics/verification to cpufeatures and julia-licm (#44592) 05 April 2022, 08:01:35 UTC
038c2bb Support TATAS-like usage in `islocked` and `trylock` spec (#44820) 05 April 2022, 04:16:52 UTC
e9150a1 add `@nospecialize` annotations for Returns (#44853) 05 April 2022, 02:40:23 UTC
7a61fc0 fix `getglobal_nothrow` (#44855) 05 April 2022, 02:21:08 UTC
f8f83da Fix leftover indentation TODOs (#44854) 04 April 2022, 23:32:45 UTC
81e7cfc [Zlib_jll] Update to v1.2.12+3 (#44810) Note: this is the first build of the real upstream version 1.2.12 which was released a few days ago. 04 April 2022, 20:11:25 UTC
2f9e3a5 faster `_log_ext` (#44717) * faster _log_ext * test subnormal^float 04 April 2022, 15:46:54 UTC
0c9f130 Instrument AllocOpt (#44577) 04 April 2022, 14:43:45 UTC
51271e0 Detect multiple concurent writes to Dict + remove dead code (#44778) Thanks to #38180, the removed code seems to be dead because no finalizers should be used anymore to modify dictionaries (it was dangerous). Furthermore, it may help users to detect illegal concurrent writes, since it doesn't recurse and have new error message. There should be no, or even a positive, performance effect. 04 April 2022, 04:17:56 UTC
209aad1 restore MSVC support to julia.h file (#44842) Put back a few lines that were removed by PR $42703 because they are required to successfully embed Julia with MSVC. 04 April 2022, 03:57:30 UTC
62dd14e Fix #42929 (#44838) 03 April 2022, 04:15:13 UTC
f84b49a Stricter tests in int.jl (#44522) * Stricter tests in int.jl * More tests for coverage. 03 April 2022, 03:05:44 UTC
5dfd6c9 Add radix sort (#44230) * Add radix sort 03 April 2022, 02:26:38 UTC
41c2c7c graphemes(s, m:n) substring slicing (#44266) * graphemes(s, m:n) substring slicing * variable naming * whoops * consolidate tests * empty-range test * note complexity * Update stdlib/Unicode/src/Unicode.jl Co-authored-by: Sebastian Stock <42280794+sostock@users.noreply.github.com> * news fix Co-authored-by: Sebastian Stock <42280794+sostock@users.noreply.github.com> 02 April 2022, 21:27:09 UTC
daa2101 Delete trailing whitespace (#44836) 02 April 2022, 18:10:08 UTC
8823058 improve str macro doc help (#39110) * improve str macro doc help * add string macro search result 02 April 2022, 17:17:25 UTC
020c2de clarification of export list (#44744) * clarification of export list Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> 02 April 2022, 14:51:09 UTC
567ae8c Seperate `LinearAlgebra.axp(b)y!` and `BLAS.axp(b)y!`. (#44758) * Seperate `LinearAlgebra.axpy!` and `BLAS.axpy!` * Make more `dot` based on `BLAS`. * Doc fix. 02 April 2022, 14:13:18 UTC
5916faf Tests for bad arguments to at-threads (#30937) 02 April 2022, 12:17:59 UTC
dbe41d4 Fix implicit binding import for aliased bindings (#44827) `b->name` is used to lookup in `b->owner`, not `var`. 02 April 2022, 09:39:38 UTC
78d9dd0 add new `:total_may_throw` utility setting for `@assume_effects` (#44775) This setting is particularly useful since it allows the compiler to evaluate a call of the applied method when all the call arguments are fully known, no matter if the call results in an error or not. This commit also adds some more explanations on the difference between `@pure` and `@assume_effects`. 01 April 2022, 22:39:36 UTC
4422a1d Migrate codegen to operate on orc::ThreadSafeModule (#44440) * Move to TSModule, round 2 * Pass in modules to codegen * Rename jl_create_datalayout * Get unlocked modules once * Pass along module data layout and target more frequently * Remove jl_get_ee_context * Add note about context locks 01 April 2022, 22:02:52 UTC
48ae154 Fix typo in documentation (#44831) 01 April 2022, 18:24:52 UTC
081ae64 Mark as `inline` functions implemented in `src/serialize.h` (#44739) * Mark as `inline` functions implemented in `src/serialize.h` Also, remove duplicate definitions from `src/staticdata.c` and include `serialize.h` in there. 01 April 2022, 17:59:06 UTC
05340a8 fix typo in line 38 in tuple.jl (#44817) 01 April 2022, 15:53:26 UTC
20d29f4 Added Pluto.jl to Browser workflow in docs (#44683) * Added Pluto.jl to Browser workflow Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com> 01 April 2022, 13:28:42 UTC
cf649a7 effects: replaces usages of `ALWAYS_FALSE` with `TRISTATE_UNKNOWN` (#44808) Although they are basically equivalent in the current implementation, it would be more correct conceptually if we propagate `TRISTATE_UNKNOWN` instead of `ALWAYS_TRUE`, as it is hard or impossible to derive a global conclusion from a local analysis on each statement in most places. This commit also adds a docstring that simply explains the design of the effect analysis. 01 April 2022, 04:54:43 UTC
3888176 follow up #44786, fix `findsup` to return correct `overlayed` value (#44804) 01 April 2022, 01:01:45 UTC
70406c9 Makefile wildcard globs only work at end (#34879) This implements the same logic in the choosetests.jl. Co-authored-by: Jameson Nash <vtjnash@gmail.com> 31 March 2022, 23:45:01 UTC
ef835ac abs2(::Number) fallback (#44110) 31 March 2022, 21:01:10 UTC
3c08483 Silence all warnings when building with GCC on Linux (#44350) * Silence all warnings when building with GCC on Linux * Replace `#warning` with `#pragma message` The former causes a compiler warning with Clang about it being a language extension, which then causes an error if building with `-Werror`. * Silence warning about unused variable when doing a non-debug build * Initialise another variable which can be detected as uninitialised * Fix more warnings introduced by recent changes 31 March 2022, 17:53:38 UTC
66c95f3 Fix typo in a docstring (#44806) 31 March 2022, 15:24:46 UTC
82ce311 effects: add reflection utility for the new effect analysis (#44785) This commit adds new reflection utility named `Base.infer_effects` that works in the same way as `Base.return_types` but returns inferred effects instead. It would be helpful to test that certain method call has an expected effects. For example, we can now remove `Base.@pure` annotation from the definition of `BroadcastStyle(a::A, b::B) where {A<:AbstractArrayStyle{M},B<:AbstractArrayStyle{N}} where {M,N}` and checks it's still eligible for concrete evaluation like this (see <https://github.com/JuliaLang/julia/pull/44776#discussion_r836756190> for the context): ```julia julia> import Base.Broadcast: AbstractArrayStyle, DefaultArrayStyle, Unknown julia> function BroadcastStyle(a::A, b::B) where {A<:AbstractArrayStyle{M},B<:AbstractArrayStyle{N}} where {M,N} if Base.typename(A) === Base.typename(B) return A(Val(max(M, N))) end return Unknown() end BroadcastStyle (generic function with 1 method) julia> # test that the above definition is eligible for concrete evaluation @test Base.infer_effects(BroadcastStyle, (DefaultArrayStyle{1},DefaultArrayStyle{2},)) |> Core.Compiler.is_total_or_error Test Passed ``` Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com> 31 March 2022, 07:28:03 UTC
3f23c45 Propagate `TMPDIR` in `Distributed` tests (#44799) On our macOS CI systems, `TMPDIR` is set to a special path (not `/tmp`) and the CI processes are not allowed to write into `/tmp`. This causes this `Distributed` test to fail, as it loses the special `TMPDIR` setting. This explicitly sets `TMPDIR` to ensure that it propagates correctly. 30 March 2022, 19:57:52 UTC
516a404 Merge pull request #44798 from JuliaLang/kf/bugpoint Make julia bootstrap bugpointable 30 March 2022, 19:52:19 UTC
dab3019 LICENSE.md: update copyright years (#44802) 30 March 2022, 14:23:14 UTC
dcc0efe RFC: Rework `copy_oftype` a bit (#44756) 30 March 2022, 13:50:08 UTC
967b974 Restrict `size(::AbstractQ)` to concrete types (#44751) 30 March 2022, 13:47:58 UTC
bad450f Change type of donotdelete intrinsics (#44793) 30 March 2022, 11:52:04 UTC
3e1ae47 optimizer: inline abstract union-split callsite (#44512) Currently the optimizer handles abstract callsite only when there is a single dispatch candidate (in most cases), and so inlining and static-dispatch are prohibited when the callsite is union-split (in other word, union-split happens only when all the dispatch candidates are concrete). However, there are certain patterns of code (most notably our Julia-level compiler code) that inherently need to deal with abstract callsite. The following example is taken from `Core.Compiler` utility: ```julia julia> @inline isType(@nospecialize t) = isa(t, DataType) && t.name === Type.body.name isType (generic function with 1 method) julia> code_typed((Any,)) do x # abstract, but no union-split, successful inlining isType(x) end |> only CodeInfo( 1 ─ %1 = (x isa Main.DataType)::Bool └── goto #3 if not %1 2 ─ %3 = π (x, DataType) │ %4 = Base.getfield(%3, :name)::Core.TypeName │ %5 = Base.getfield(Type{T}, :name)::Core.TypeName │ %6 = (%4 === %5)::Bool └── goto #4 3 ─ goto #4 4 ┄ %9 = φ (#2 => %6, #3 => false)::Bool └── return %9 ) => Bool julia> code_typed((Union{Type,Nothing},)) do x # abstract, union-split, unsuccessful inlining isType(x) end |> only CodeInfo( 1 ─ %1 = (isa)(x, Nothing)::Bool └── goto #3 if not %1 2 ─ goto #4 3 ─ %4 = Main.isType(x)::Bool └── goto #4 4 ┄ %6 = φ (#2 => false, #3 => %4)::Bool └── return %6 ) => Bool ``` (note that this is a limitation of the inlining algorithm, and so any user-provided hints like callsite inlining annotation doesn't help here) This commit enables inlining and static dispatch for abstract union-split callsite. The core idea here is that we can simulate our dispatch semantics by generating `isa` checks in order of the specialities of dispatch candidates: ```julia julia> code_typed((Union{Type,Nothing},)) do x # union-split, unsuccessful inlining isType(x) end |> only CodeInfo( 1 ─ %1 = (isa)(x, Nothing)::Bool └── goto #3 if not %1 2 ─ goto #9 3 ─ %4 = (isa)(x, Type)::Bool └── goto #8 if not %4 4 ─ %6 = π (x, Type) │ %7 = (%6 isa Main.DataType)::Bool └── goto #6 if not %7 5 ─ %9 = π (%6, DataType) │ %10 = Base.getfield(%9, :name)::Core.TypeName │ %11 = Base.getfield(Type{T}, :name)::Core.TypeName │ %12 = (%10 === %11)::Bool └── goto #7 6 ─ goto #7 7 ┄ %15 = φ (#5 => %12, #6 => false)::Bool └── goto #9 8 ─ Core.throw(ErrorException("fatal error in type inference (type bound)"))::Union{} └── unreachable 9 ┄ %19 = φ (#2 => false, #7 => %15)::Bool └── return %19 ) => Bool ``` Inlining/static-dispatch of abstract union-split callsite will improve the performance in such situations (and so this commit will improve the latency of our JIT compilation). Especially, this commit helps us avoid excessive specializations of `Core.Compiler` code by statically-resolving `@nospecialize`d callsites, and as the result, the # of precompiled statements is now reduced from `2005` ([`master`](f782430c5b)) to `1912` (this commit). And also, as a side effect, the implementation of our inlining algorithm gets much simplified now since we no longer need the previous special handlings for abstract callsites. One possible drawback would be increased code size. This change seems to certainly increase the size of sysimage, but I think these numbers are in an acceptable range: > [`master`](f782430c5b) ``` ❯ du -shk usr/lib/julia/* 17604 usr/lib/julia/corecompiler.ji 194072 usr/lib/julia/sys-o.a 169424 usr/lib/julia/sys.dylib 23784 usr/lib/julia/sys.dylib.dSYM 103772 usr/lib/julia/sys.ji ``` > this commit ``` ❯ du -shk usr/lib/julia/* 17512 usr/lib/julia/corecompiler.ji 195588 usr/lib/julia/sys-o.a 170908 usr/lib/julia/sys.dylib 23776 usr/lib/julia/sys.dylib.dSYM 105360 usr/lib/julia/sys.ji ``` 30 March 2022, 11:46:45 UTC
f782430 effects: change the `overlayed::Bool` property to `nonoverlayed::Bool` (#44786) The current naming of `overlayed` is a bit confusing since `overlayed === true`, which is the conservative default value, actually means "it _may_ be overlayed" while `overlayed === false` means "this is absolutely not overlayed". I think it should be named as `nonoverlayed`, and then a query name like `is_nonoverlayed` would be more sensible than the alternative `is_overlayed`, which actually should be something like `can_be_overlayed`. 30 March 2022, 11:12:11 UTC
18a2031 improve return-type reflections of opaque closure (#44743) 30 March 2022, 10:43:28 UTC
54be1ce Fix static show for Base.Colon (#44726) As noted in 44635, we current static show `Base.Colon()` as `Base.Any`, which is very confusing. Try to improve the situation by only using the special function printing if the binding actually matches the value we're trying to print. 30 March 2022, 05:48:54 UTC
7c2edc5 Remove some frivolous (p)*jl types (#44469) 30 March 2022, 04:05:36 UTC
1b3435b Make multiversioning bugpoint robust Bugpoint can introduce IR forms that would cause multiversioning to fail and that julia should never emit. However, if we actually crash on those, then bugpoint will get confused. To work around this, add a "bugpoint" mode to multiversioning where it accepts somewhat corrupted IR and tries to do something reasonable. This mode is not enabled from julia internally, but is enabled when run through the external pass interface. Of course the result of a bugpoint reduction won't be a loadable system image as a result, but bugpoint already is basically guaranteed to generate a non-loadable image, so that isn't an issue (since bugpoint is for debugging the compiler itself). 30 March 2022, 03:07:00 UTC
926f18f Register dump_native=true versions of passes for opt The pass pipeline for dump_native=true (which is used when building the sysimage) is slightly different than the JIT pipeline, which can affect behavior. Expose versions of the julia passes with dump_native=true set, to make it easy to reproduce LLVM issues using `opt`. 30 March 2022, 03:06:49 UTC
f562ad0 Initialize jl_page_size when not calling julia_init. (#44699) If we load libjulia-codegen directly, e.g. from opt or llc, we don't call julia_init but init_llvm. Co-authored-by: Keno Fischer <keno@juliacomputing.com> 30 March 2022, 03:06:31 UTC
8e12f70 fix potential error within `multiq_sift_down` (#44788) This commit fixes the following error possibility: ``` julia> using JET julia> @report_call println(nothing) ═════ 1 possible error found ═════ ┌ @ coreio.jl:4 Base.println(Core.tuple(Base.stdout), xs...) │┌ @ strings/io.jl:75 Base.print(Core.tuple(io), xs, Core.tuple("\n")...) ││┌ @ strings/io.jl:43 Base.lock(io) │││┌ @ show.jl:334 Base.lock(Base.getproperty(io, :io)) ││││┌ @ stream.jl:283 Base.lock(Base.getproperty(s, :lock)) │││││┌ @ lock.jl:103 slowlock(rl) ││││││┌ @ lock.jl:112 Base.wait(c) │││││││┌ @ condition.jl:124 = Base.wait() ││││││││┌ @ task.jl:940 Base.poptask(W) │││││││││┌ @ task.jl:929 task = Base.trypoptask(W) ││││││││││┌ @ task.jl:923 Base.Partr.multiq_deletemin() │││││││││││┌ @ partr.jl:162 Base.Partr.multiq_sift_down(heap, Base.Partr.Int32(1)) ││││││││││││┌ @ partr.jl:55 Base.Partr.multiq_sift_down(heap, child) │││││││││││││ no matching method found for call signature (Tuple{typeof(Base.Partr.multiq_sift_down), Base.Partr.taskheap, UInt32}): Base.Partr.multiq_sift_down(heap::Base.Partr.taskheap, child::UInt32) ││││││││││││└─────────────── ``` 30 March 2022, 00:38:23 UTC
4115686 fix `tuple_tfunc` on `Union` containing `Type{...}` (#44725) fix #44705 30 March 2022, 00:27:41 UTC
4b58679 Fewer warnings in 'make clean' in clean directory (#44450) * Fewer warnings in 'make clean' in clean directory * Don't ignore exit code for 'rm -rf' 30 March 2022, 00:16:31 UTC
back to top