swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40

sort by:
Revision Author Date Message Commit Date
036e28d allow to use SubString{String} in TOML parser 29 September 2022, 21:09:34 UTC
6e1e6fa Add `filter(func)` method (#41173) Add `filter(func)` method 29 September 2022, 19:13:05 UTC
f346735 avoid timing race in async test (#46941) This is the test from #27164. The test was checking whether sleep(1) (which is started first) or sleep(0.05) (which is nominally shorter) returned first. Use an Event instead so that they are explicitly ordered. Fixes #46360 29 September 2022, 18:52:37 UTC
6863249 [LBT] Bump to v5.2.0 (#46960) This should fix issues on i686 linux and using Accelerate on aarch64 darwin. LBT itself is now much more thoroughly tested [0]. [0] https://buildkite.com/julialang/libblastrampoline 29 September 2022, 16:20:59 UTC
9fd4087 Generalize 2-arg `eigen` towards `AbstractMatrix` (#46797) 29 September 2022, 08:30:58 UTC
9118373 [FileWatching] improve lock_times test (#46942) Make this test slightly stricter to pass, to try to investigate #45982 better. 29 September 2022, 07:02:14 UTC
4b042c8 gf: detect more ambiguities (#46922) As long as we find at least one other method that conflicts fully, we know they will exist together for all subtypes, and always be ambiguous for all subtypes too. This is already the algorithm used by method insertion to decide if the new method is ambiguous with a "missing" method. Fix #46601 29 September 2022, 07:00:45 UTC
5588623 remove bad test from get_updated_dict (#46944) PR #42328 (21ebabf7904061b4283b4428efa8fa4d6e8d0bc6) already fixed issue #35217 by removing the bad test. Now also remove the nonsensical comment condition from loading.jl. 29 September 2022, 06:53:32 UTC
170d643 codegen: fix compute_va_type issue with Type (#46953) Issue noted in #42498. This should be the same as Core.Compiler.tuple_tfunc. Otherwise we might accidentally constant-fold something like: code_llvm((x...) -> x isa Tuple{Type{Tuple{Any}},Int}, (Type{Tuple{Any}}, Int)) to return true. This is rarely a compile-sig in practice, so it does not usually affect code, but is observable there in the IR. 29 September 2022, 06:51:37 UTC
8e44510 doc: add return type for ^ operator for strings (#46884) 29 September 2022, 06:44:54 UTC
7364207 function signature for the "^" operator for regex (#46885) 29 September 2022, 06:43:31 UTC
ebaf4c8 doc: update example on % for integers (#46893) 29 September 2022, 06:42:46 UTC
594fcd8 doc: ndigits relationship with zero (#46900) 29 September 2022, 06:39:29 UTC
c548bd3 irinterp: clean up IR abstract interpretation subroutines [NFC] (#46917) * clean up `reprocess_instruction!` * setup `IRInterpretationState` for irinterp state management 29 September 2022, 06:33:28 UTC
75e96c5 Correct typographical error in comment (#46959) 29 September 2022, 01:41:57 UTC
e7a5c36 reland "Fix serialization of code instances" (#46939) If they are encountered in a Julia object directly, as opposed to e.g. during serialization of a method instance, we'll have first populated the backref table as part of jl_serialize_value, so we need to skip that check during code instance serialization. 28 September 2022, 15:01:17 UTC
b2c2abf Revert "Inlining: Remove outdated code path for GlobalRef movement (#46880)" (#46951) This reverts commit cda61ef68f49cab66f45b731b7cffbb79a1d3c90. This seems to be exposing (or less likely actually causing) some problems with GC rooting, dead-code elimination, and/or valid IR: #46940 and #46943 28 September 2022, 14:18:20 UTC
3e0cd2c IncrementalCompact: always show the separator. (#46946) There was an off-by-one error, but always showing the separator is even clearer, and consistent with how it's shown at the top when nothing has been compacted yet. 28 September 2022, 14:17:48 UTC
1afa368 Revert "Fix serialization of code instances. (#46373)" (#46936) This reverts commit ff4f86dce6660f717b2978ef9d9123f1ec3393ea. 28 September 2022, 06:36:02 UTC
d575b2e avoid a spurious use-after-realloc warning from gcc [NFC] (#46923) Co-authored-by: apaz-cli <Aaron.Pazdera@JuliaComputing.com> 28 September 2022, 00:09:47 UTC
6db1006 irinterp: Don't try to access undefined phi values (#46930) We don't see this case very often (or at all) on master, because complicated control flow structures are often not eligible for semi-concrete eval. But let's fix it anyway. 27 September 2022, 22:09:51 UTC
f1c4d54 Fix shift direction of circshift! for vectors (#46759) This patch fixes the shifting direction for circshift!(x::AbstractVector, n::Integer), which was opposite the direction of circshift(x, n) and circshift!(y, x, n). In addition, this patch fixes the method to also work correctly with offset arrays. Fixes #46533. 27 September 2022, 19:15:51 UTC
757f21e Don't error when transposing an empty buffer (#46925) 27 September 2022, 17:24:46 UTC
cda61ef Inlining: Remove outdated code path for GlobalRef movement (#46880) * Inlining: Remove outdated code path for GlobalRef movement We used to not allow GlobalRef in PhiNode at all (because they could have side effects). However, we then change the IR to make side-effecting GlobalRefs illegal in statement position in general, so now PhiNodes values are just regular value position, so there's no reason any more to try to move GlobalRefs out to statement position in inlining. Moreover, doing so introduces a bunch of unnecesary GlobalRefs that weren't being moved back. We could fix that separately by setting appropriate flags, but it's simpler to just get rid of this special case entirely. * Update test/compiler/inline.jl 27 September 2022, 15:48:05 UTC
ff4f86d Fix serialization of code instances. (#46373) If they are encountered in a Julia object directly, as opposed to e.g. during serialization of a method instance, we'll have first populated the backref table as part of jl_serialize_value, so we need to skip that check during code instance serialization. 27 September 2022, 13:47:48 UTC
cb46d71 🤖 Bump the SuiteSparse stdlib from ed89e0f to e8285dd (#46919) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 27 September 2022, 13:20:15 UTC
418edd3 Reorder FileEvent field names in the documentation (#46905) When printing a FileEvent the user sees a text in the format `"path" => FileWatching.FileEvent(bool, bool, bool)` and by reading the documentation the user expect the three booleans to correspond to `changed`, `renamed`, `timedout` while instead the correct order is `renamed`, `changed`, `timedout`. This is just a correction to that. 27 September 2022, 11:44:31 UTC
698beed Precompile correct invoke-targets (#46907) This fixes backedge-based invalidation when a precompiled `invoke` is followed by loading a package that adds new specializations for the `invoke`d method. An example is LowRankApprox.jl, where FillArrays adds a specialization to `unique`. 27 September 2022, 09:54:25 UTC
6fdcfd4 Update SparseArrays dependency (#46790) This patch updates SparseArrays. In particular it contains https://github.com/JuliaSparse/SparseArrays.jl/pull/260 which is necessary to make progress in #46759. All changes: - Fix ambiguities with Base. (https://github.com/JuliaSparse/SparseArrays.jl/pull/268) - add == for vectors (https://github.com/JuliaSparse/SparseArrays.jl/pull/248) - add undef initializers (https://github.com/JuliaSparse/SparseArrays.jl/pull/263) - Make sure reductions benefit from sparsity (https://github.com/JuliaSparse/SparseArrays.jl/pull/244) - Remove fkeep! from the documentation (https://github.com/JuliaSparse/SparseArrays.jl/pull/261) - Fix direction of circshift (https://github.com/JuliaSparse/SparseArrays.jl/pull/260) - Fix `vcat` of sparse vectors with numbers (https://github.com/JuliaSparse/SparseArrays.jl/pull/253) - decrement should always return a vector (https://github.com/JuliaSparse/SparseArrays.jl/pull/241) - change order of arguments in fkeep, fix bug with fixed elements (https://github.com/JuliaSparse/SparseArrays.jl/pull/240) - Sparse matrix/vectors with fixed sparsity pattern. (https://github.com/JuliaSparse/SparseArrays.jl/pull/201) 27 September 2022, 08:37:50 UTC
6c0aa6d improve type stability of `handle_message(logger, ...` (#46906) 27 September 2022, 06:50:50 UTC
8003563 Don't crash on variable sized gc allocations (#46914) 26 September 2022, 21:35:04 UTC
d97f248 [win] Disable MSYS2 path munging when calling `is.exe` (#46867) Tragically, I believe MSYS2 is messing with options such as `/VERYSILENT` turning them instead into `C:\msys2\VERYSILENT` or similar. 26 September 2022, 18:23:15 UTC
26304f7 lattice: Properly percolate down `tmerge` (#46881) We were skipping the parent lattice of the partials lattice, which may make external lattice implementation nonfunctional. Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 26 September 2022, 12:02:57 UTC
c0d5ffb irinterp: Add a hook for control-dependent phi evaluation (#46883) External AbstractInterpreters may want to modify the lattice elements of a phi to track additional information (e.g. by inspecting the branch condition of the idom). Currently, we don't pass enough information down to make this happen, so add a hook function that also takes (ir, idx) and a lazy domtree. Admittedly this is a bit ad-hoc, and would probably be better with some sort of general analysis manager, but this'll do for now. 26 September 2022, 07:27:47 UTC
60ee22c follow up #46897, improve type stability (#46909) 26 September 2022, 06:51:07 UTC
d5cde86 Don't prompt field names for tuples at the REPL (#46897) 25 September 2022, 09:55:10 UTC
e6d9979 Set `intersection = 1` during `intersect_sub_datatype` (#46882) 24 September 2022, 14:32:19 UTC
b43bc62 Improve attribution of backedge-triggered invalidation (#46756) SnoopCompile attempts to attribute invalidations to specific causes, but until now it has not generally been able to handle what it called "delayed" invalidations, which arose when a MethodInstance backedge wasn't valid anymore. This dumps more data to the reporting stream and should allow SnoopCompile to assemble the full chain of causes. This also adds invalidation of the backedges of methods that fail to validate their external edges. 24 September 2022, 13:00:24 UTC
24cb92d use `invokelatest` to call `REPL.active_module` (#46866) REPL_MODULE_REF might be populated during execution, in which case we won't be able to see REPL methods yet. 23 September 2022, 06:14:47 UTC
ea9914e add simple test cases for [post-]domination analysis (#46860) 22 September 2022, 17:30:59 UTC
45623a8 staticdata: avoid needing unaligned loads, support 64-bit images (#46683) No functional changes intended here. 22 September 2022, 16:33:49 UTC
15f8fad Uncomment out bitset test (#46847) 22 September 2022, 11:10:48 UTC
a959ed8 Fix small logic bug in finalizer inlining Found while testing bigger examples. Fixes the logic introduced in #46651 22 September 2022, 09:29:13 UTC
e636342 Add assume_fatal_throw optimizer option (#46856) This option frees the optimizer from having to prove nothrow in order to move certain side effects across call sites. It is currently enabled in finalizer inlining, but there may be opportunities to use it elsewhere in the future, as well as potentially plumbing it down to LLVM. The intended use case is not in the main compilation pipeline, but rather for alternative compilation modes where thrown errors are fatal and the state of the heap can not be observed after a thrown error. 22 September 2022, 09:28:25 UTC
70fa9b1 Update to 14.0.6+0 (#46842) 22 September 2022, 06:15:36 UTC
892f76e Minor cleanup to follow up 45062 (#46832) 22 September 2022, 04:32:15 UTC
62ac26a inlining: relax `finalizer` inlining control-flow restriction (#46651) Eager `finalizer` inlining (#45272) currently has a restriction that requires all the def/uses to be in a same basic block. This commit relaxes that restriction a bit by allowing def/uses to involve control flow when all of them are dominated by a `finalizer` call to be inlined, since in that case it is safe to insert the body of `finalizer` at the end of all the def/uses, e.g. ```julia const FINALIZATION_COUNT = Ref(0) init_finalization_count!() = FINALIZATION_COUNT[] = 0 get_finalization_count() = FINALIZATION_COUNT[] @noinline add_finalization_count!(x) = FINALIZATION_COUNT[] += x @noinline Base.@assume_effects :nothrow safeprint(io::IO, x...) = (@nospecialize; print(io, x...)) mutable struct DoAllocWithFieldInter x::Int end function register_finalizer!(obj::DoAllocWithFieldInter) finalizer(obj) do this add_finalization_count!(this.x) end end function cfg_finalization3(io) for i = -999:1000 o = DoAllocWithFieldInter(i) register_finalizer!(o) if i == 1000 safeprint(io, o.x, '\n') elseif i > 0 safeprint(io, o.x) end end end let src = code_typed1(cfg_finalization3, (IO,)) @test count(isinvoke(:add_finalization_count!), src.code) == 1 end let init_finalization_count!() cfg_finalization3(IOBuffer()) @test get_finalization_count() == 1000 end ``` To support this transformation, the domtree code also gains the ability to represent post-dominator trees, which is generally useful. 21 September 2022, 22:59:37 UTC
72be01b Insert bitcast after any additional phi nodes (#46854) Adjust bitcast insertion point to after any phi nodes 21 September 2022, 22:10:49 UTC
ff62f84 🤖 Bump the NetworkOptions stdlib from 4d3df64 to 8ce1e10 (#46853) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 21 September 2022, 21:50:07 UTC
2bd5a44 Track JITLink-allocated bytes (#46823) * Track JITLink-allocated bytes * Address review formatting 21 September 2022, 17:49:24 UTC
d093a1a Remove unused optimizer params (#46848) 21 September 2022, 15:36:21 UTC
d4f0567 dump: implement cycle handling in has_backedge_to_worklist (#46749) 21 September 2022, 13:01:33 UTC
ed01ee0 ccall: handle Union appearing as a field-type without crashing (#46787) We disallow union as the direct type, so perhaps we should disallow it as a field-type also, but since we do allow references in those cases typically, we will allow this also. Also DRY the emit_global code, since it had bit-rotted relative to the usual code path through emit_globalref (and apparently could still be run though for handling the first argument to cfunction). Fix #46786 21 September 2022, 11:27:34 UTC
bb7c7eb [GCChecker] report FunctionDecl and type for missing JL_NOTSAFEPOINT calls (#46834) In C++, some calls are implicit, which makes the call alone ambiguous and the message unclear. This helps clarify it. 21 September 2022, 11:27:15 UTC
91d8e38 inference: remove allocation hot-spot exposed by Profile.Allocs examination (#46843) This Union{Pair,Nothing} accounted for several % of total inference allocations, and might stack-overflow on very large numbers of basic blocks with very unusual structures. 21 September 2022, 11:26:57 UTC
d7158dc Update interfaces.md (#46833) AbstractArrays have never been required to be mutable, and we have many subtypes of `AbstractArray` in `Base` and `LinearAlgebra` that do not implement `setindex!` since they are immutable, or only implement it for a subset of their indices (e.g. `CartesianIndices`, the various range types, `Symmetric`, `Hermitian`, `Diagonal`, ). There is also a lot of hope and plans for more immutable, dynamic array support from Base, and of course a rich set of immutable arrays out there in the package ecosystem which do not have `setindex!` 21 September 2022, 01:28:02 UTC
ffa76f9 consistency on typemax and typemin docs (#46827) * consistency on typemax and typemin docs The `typemax` and `typemin` docs isn't consistent with each other on its examples and `see also` section (see reasons below). While this isn't an issue when looking up the function with `help>` to work with integers, for floating-point types, its a big deal because: - On the `typemax` examples, there is a very good example there with a great comment, pointing users on to look into `floatmax`, if `typemax` doesn't serves them; but the `typemin` doesn't have this - which isn't great, since both `typemax` and `typemin` have great use. - The `see also` section on `typemax` point users to other available functions which might prove or introduce other points to consider if `typemax` isn't what they're looking for; for `typemin`, this isn't present. I provided examples on integers, just so the function isn't thought of like working for only floating points. Moreover, I feel like the current docs were written assuming users would always lookup `typemin` and `typemax` in `help>`, before using anyone of them. Most time this is true, but I think it's best not to assume. 21 September 2022, 01:26:00 UTC
67f994c Fix SROA miscompile in large functions (#46819) * Fix SROA miscompile in large functions During the development of #46775, we saw a miscompile in the compiler, specifically, we saw SROA failing to provide a proper PHI nest. The root cause of this turned out to be an incorrect dominance query. In particular, during incremental compaction, the non-compacted portion of the IncrementalCompact cfg is allocated, but not valid, so we must not query it for basic block information. Unfortunately, I don't really have a good test case for this. This code has grown mostly organically for a few years, and I think it's probably overdue for an overhaul. * optimizer: address TODO for computing `joint_effects` more efficiently Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 20 September 2022, 23:11:31 UTC
caf544b Deduplicate lifted PHI node edges (#46662) * Deduplicate lifted PHI node edges * Add gc lowering test * Simplify and clean up test case * Remove assertion for now 20 September 2022, 17:02:56 UTC
276af84 use native Julia code in round example (#46841) 20 September 2022, 12:57:34 UTC
89c4a2a Merge pull request #46796 from JuliaLang/tb/libuv Expose constrained memory limits and have the GC use them. 20 September 2022, 07:05:38 UTC
b6d2434 set number of openblas threads to 1 while precompiling (#46792) 20 September 2022, 06:07:35 UTC
417cdca clear info on the exponent function (#46815) Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 20 September 2022, 03:38:18 UTC
88ec96a compiler: some minor NFC clean-ups (#46835) 20 September 2022, 00:21:13 UTC
d354662 Adapt GC to new APIs. 19 September 2022, 20:28:53 UTC
00f8938 Expose constrained memory as Sys.(total|free)_memory; add Sys.physical_(total_free)_memory. 19 September 2022, 20:28:53 UTC
22f8faf Bump libuv. 19 September 2022, 20:25:20 UTC
8af6731 typeassert `get` from `IOContext` (#46828) 19 September 2022, 13:13:19 UTC
eea2ca7 elaborate on how to check `:compact` on `IOContext` (#46826) * elaborate on how to check `:compact` on `IOContext` Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 19 September 2022, 11:42:03 UTC
21e8c7c Merge pull request #46781 from JuliaLang/kc/output_prompts Redo of "Add ability to add output prefixes to the REPL output and use that to implement an IPython mode" 19 September 2022, 08:16:31 UTC
16e9f4b follow up #46775, add missing annotations (#46817) 19 September 2022, 01:35:40 UTC
f794bdd follow up #46799, add test case for `CachedMethodTable` (#46818) 18 September 2022, 10:14:10 UTC
86e0c6a fix typo on TwicePrecision docs (#46813) 18 September 2022, 01:00:01 UTC
433b11f NFC: simplify the default `limit` setting of `Core.Compiler.findall` (#46809) Use `limit=-1` instead of `limit=Int(typemax(Int32))`. 18 September 2022, 00:49:25 UTC
b3f25d7 inlining: Also apply statement effects when declining to inline (#46775) * inlining: Also apply statement effects when declining to inline When inlining, we already determine what the effects for all the different cases are, so that we can apply appropriate statement flags on each of the edges. However, if for some reason we decided to decline to inline, we weren't making use of this information. Fix that. * make it work. Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 17 September 2022, 22:01:55 UTC
b6cabf3 Use more of the actual inliner in finalizer inlining (#46753) * Use more of the actual inliner in finalizer inlining Currently the special-case inliner for finalizer generated incorrect code for unmatched sparams (which we had a test for, but which was unfortunately broken) and varargs (which we did not have a test for). Of course, we handle these cases correctly in actual inlining, so do some light refactoring to share more code between the two inlining paths. * Update base/compiler/ssair/inlining.jl Co-authored-by: Ian Atol <ian.atol@juliacomputing.com> Co-authored-by: Ian Atol <ian.atol@juliacomputing.com> 17 September 2022, 22:01:06 UTC
defc396 Disable MSYS2's path munging for `stringreplace` (#46803) This was causing our rewriting of the loader's RPATH emulation to fail after running `make install`, as MSYS2 was rewriting our list that looks like: ``` ../bin/libgcc_s_seh-1.dll:../bin/libopenlibm.dll:@../bin/libjulia-internal.dll:@../bin/libjulia-codegen.dll: ``` Into one that looked like: ``` ..\bin\libgcc_s_seh-1.dll;..\bin\libopenlibm.dll;@..\bin\libjulia-internal.dll;@..\bin\libjulia-codegen.dll; ``` By exporting `MSYS2_ARG_CONV_EXCL='*'` for all `stringreplace` invocations, we dodge this issue, as documented by MSYS2 [0]. [0] https://www.msys2.org/wiki/Porting/#filesystem-namespaces 17 September 2022, 17:36:26 UTC
c165aeb REPL docs: Document existing ^U keybind (#46811) This keybinding currently exists in Julia and is functional, but it wasn't mentioned in the manual. 17 September 2022, 12:31:36 UTC
1843ea3 Typo error on REPL section (#46807) 17 September 2022, 05:49:08 UTC
2ef4aba Changes to support LLVM15 compilation (#46788) 17 September 2022, 05:47:13 UTC
e24dd3b inference: make `limit::Int` as a caching key of `CachedMethodTable` (#46799) Sometimes `Core.Compiler.findall(::Type, ::CachedMethodTable; limit::Int)` is called with different `limit` setting (in particularity `return_type_tfunc` calls it with `limit=-1`). The query should return different results given different `limit` settings, so its cache should also have different keys per different `limit` settings. fix #46722 17 September 2022, 02:59:15 UTC
81f6c23 Windows build improvements (#46793) * Include unistd.h to silence compilation warning. * Error when running in a MSYS shell. 16 September 2022, 19:52:42 UTC
260e986 Add julia pass pipeline to opt (#46191) * Use NewPM for optimization unless ASAN is in effect * Disable NewPM by default * Add julia pass pipeline to opt * Update llvm devdocs 16 September 2022, 16:18:04 UTC
54b4a53 add an ipython mode on top of the output prefix functionality 16 September 2022, 14:01:46 UTC
03ed550 Remove unnecessary `reducedim_init` specialization (#46777) 16 September 2022, 10:50:19 UTC
a7bef77 Make the "system image too large" error message more descriptive (#46570) 16 September 2022, 09:46:16 UTC
8c00e17 Fix `mapreduce` on `AdjOrTrans` (#46605) Co-authored-by: Daniel Karrasch <Daniel.Karrasch@posteo.de> Co-authored-by: Daniel Karrasch <Daniel.Karrasch@posteo.de> Co-authored-by: Martin Holters <martin.holters@hsu-hh.de> 16 September 2022, 09:43:59 UTC
174b893 doc: guard release branch regex with ^...$ (#46647) 16 September 2022, 09:41:22 UTC
0fabe54 Help inference of uninferred callers of `read(::IO, ::Type{String})` (#46577) 15 September 2022, 15:29:38 UTC
3d3f9ae add ability to add an output prefix to the REPL output 15 September 2022, 14:48:29 UTC
4026246 Add effect modeling for Core.compilerbarrier (#46772) The compiler barrier itself doesn't have any effects, though of course by pessimizing type information, it may prevent the compiler from discovering effect information it would have otherwise obtained. Nevertheless, particularly the weaker barriers like `:const` and `:conditional` should not, by themselves taint any effects. 15 September 2022, 14:46:08 UTC
00ea165 Cache binding pointer in GlobalRef (#46729) On certain workloads, profiling shows a surprisingly high fraction of inference time spent looking up bindings in modules. Bindings use a hash table, so they're expected to be quite fast, but certainly not zero. A big contributor to the problem is that we do basically treat it as zero, looking up bindings for GlobalRefs multiple times for each statement (e.g. in `isconst`, `isdefined`, to get the types, etc). This PR attempts to improve the situation by adding an extra field to GlobalRef that caches this lookup. This field is not serialized and if not set, we fallback to the previous behavior. I would expect the memory overhead to be relatively small, since we do intern GlobalRefs in memory to only have one per binding (rather than one per use). # Benchmarks The benchmarks look quite promising. Consider this artifical example (though it's actually not all that far fetched, given some of the generated code we see): ``` using Core.Intrinsics: add_int const ONE = 1 @eval function f(x, y) z = 0 $([:(z = add_int(x, add_int(z, ONE))) for _ = 1:10000]...) return add_int(z, y) end g(y) = f(ONE, y) ``` On master: ``` julia> @time @code_typed g(1) 1.427227 seconds (1.31 M allocations: 58.809 MiB, 5.73% gc time, 99.96% compilation time) CodeInfo( 1 ─ %1 = invoke Main.f(Main.ONE::Int64, y::Int64)::Int64 └── return %1 ) => Int64 ``` On this PR: ``` julia> @time @code_typed g(1) 0.503151 seconds (1.19 M allocations: 53.641 MiB, 5.10% gc time, 33.59% compilation time) CodeInfo( 1 ─ %1 = invoke Main.f(Main.ONE::Int64, y::Int64)::Int64 └── return %1 ) => Int64 ``` I don't expect the same speedup on other workloads, but there should be a few % speedup on most workloads still. # Future extensions The other motivation for this is that with a view towards #40399, we will want to more clearly define when bindings get resolved. The idea here would then be that binding resolution replaces generic `GlobalRefs` by GlobalRefs with a set binding cache, and any unresolved bindings would be treated conservatively by inference and optimization. 15 September 2022, 14:45:47 UTC
6bbc006 Add LLVM pipeline tests (#46542) * Add LLVM pipeline tests * Create per-pipeline optimization tests * Actually run the tests, drop unnecessary output * Move to lit tests instead of julia tests * Apply suggestions from code review `=` -> `in` Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> 15 September 2022, 14:36:24 UTC
5e3e58e Revert "Add ability to add output prefixes to the REPL output and use that to implement an IPython mode (#46474)" (#46780) This reverts commit e1188455456035ff6a80ed20e424aa5c8ebf437d. 15 September 2022, 14:13:17 UTC
e118845 Add ability to add output prefixes to the REPL output and use that to implement an IPython mode (#46474) 15 September 2022, 12:24:25 UTC
6557542 Also merge var with unchanged bounds. (#46757) * Also merge var with unchanged bounds. The current `env` might not be valid if the var's bounds get fixed by another Unions decision. * Replace `v->var->lb` with `simple_meet` * Remove the unneeded NUll check. Co-Authored-By: Jameson Nash <vtjnash+github@gmail.com> 15 September 2022, 11:43:57 UTC
aae8c48 Specialize `inv` for cholesky of `Diagonal` (#46763) 15 September 2022, 10:30:02 UTC
997e336 inference: fixes and improvements for backedge computation (#46741) This commit consists of the following changes: * inference: setup separate functions for each backedge kind Also changes the argument list so that they are ordered as `(caller, [backedge information])`. * inference: fix backedge computation for const-prop'ed callsite With this commit `abstract_call_method_with_const_args` doesn't add backedge but rather returns the backedge to the caller, letting the callers like `abstract_call_gf_by_type` and `abstract_invoke` take the responsibility to add backedge to current context appropriately. As a result, this fixes the backedge calculation for const-prop'ed `invoke` callsite. For example, for the following call graph, ```julia foo(a::Int) = a > 0 ? :int : println(a) foo(a::Integer) = a > 0 ? "integer" : println(a) bar(a::Int) = @invoke foo(a::Integer) ``` Previously we added the wrong backedge `nothing, bar(Int64) from bar(Int64)`: ```julia julia> last(only(code_typed(()->bar(42)))) String julia> let m = only(methods(foo, (UInt,))) @eval Core.Compiler for (sig, caller) in BackedgeIterator($m.specializations[1].backedges) println(sig, ", ", caller) end end Tuple{typeof(Main.foo), Integer}, bar(Int64) from bar(Int64) nothing, bar(Int64) from bar(Int64) ``` but now we only add `invoke`-backedge: ```julia julia> last(only(code_typed(()->bar(42)))) String julia> let m = only(methods(foo, (UInt,))) @eval Core.Compiler for (sig, caller) in BackedgeIterator($m.specializations[1].backedges) println(sig, ", ", caller) end end Tuple{typeof(Main.foo), Integer}, bar(Int64) from bar(Int64) ``` * inference: make `BackedgePair` struct * add invalidation test for `invoke` call * optimizer: fixup inlining backedge calculation Should fix the following backedge calculation: ```julia julia> m = which(unique, Tuple{Any}) unique(itr) @ Base set.jl:170 julia> specs = collect(Iterators.filter(m.specializations) do mi mi === nothing && return false return mi.specTypes.parameters[end] === Vector{Int} # find specialization of `unique(::Any)` for `::Vector{Int}` end) Any[] julia> Base._unique_dims([1,2,3],:) # no existing callers with specialization `Vector{Int}`, let's make one 3-element Vector{Int64}: 1 2 3 julia> mi = only(Iterators.filter(m.specializations) do mi mi === nothing && return false return mi.specTypes.parameters[end] === Vector{Int} # find specialization of `unique(::Any)` for `::Vector{Int}` end) MethodInstance for unique(::Vector{Int64}) julia> mi.def unique(itr) @ Base set.jl:170 julia> mi.backedges 3-element Vector{Any}: Tuple{typeof(unique), Any} MethodInstance for Base._unique_dims(::Vector{Int64}, ::Colon) MethodInstance for Base._unique_dims(::Vector{Int64}, ::Colon) # <= now we don't register this backedge ``` 15 September 2022, 06:56:19 UTC
94c3a15 Improve nothrow analysis of :new with missing sparam (#46754) Similar to #46693, but for :new, rather than getfield. Unfortunately, this is somewhat limited as we don't really have the ability to encode type equality constraints in the lattice. In particular, it would be nice to analyze: ``` struct Foo{T} x::T Foo(x::T) where {T} = new{T}(x) end ``` and be able to prove this nothrow. If it's really important, we could probably pattern match it, but for the moment, this is not easy to do. Nevertheless, we can do something about the similar, but simpler pattern ``` struct Foo{T} x Foo(x::T) where {T} = new{T}(x) end ``` which is what this PR does. 15 September 2022, 05:24:11 UTC
e758982 improve type stability of `tail/front(::NamedTuple)` (#46762) This fixes some invalidations when loading ChainRulesCore.jl. 15 September 2022, 03:18:52 UTC
back to top