3a8a9c6 | Shuhei Kadowaki | 20 October 2022, 05:19:58 UTC | optimize: parameterize `OptimizationState` with `InliningState` properly (#47224) Should improve the inlining pass performance a bit. External `AbstractInterpreter` has been required to recompile all inlining subroutines parameterized with `InliningState` anyway. | 20 October 2022, 05:19:58 UTC |
a311f4d | Jacob Quinn | 20 October 2022, 02:44:43 UTC | Ensure port in listenany stays UInt16 (#47213) As reported [here](https://discourse.julialang.org/t/test-failures-for-sockets-base-runtests-sockets/88898). My guess on the original issue reported is that, for some reason, the host where the tests are run is unable to listen on any ports, so we end up cycling through the entire UInt16 range (the test starts at port 11011), but when we fail on port 65535, we do `addr.port + 1` and instead of wrapping around as I believe this function intends to happen (as noted by the `addr.port == default_port` check before we error), it gets promoted to `Int(65536)` which then throws an (unexpected) error in the `InetAddr` constructor. I'm not quite sure how to test this exactly though, because we'd need to simulate not being able to listen on any ports? If anyone has any ideas, I'm all ears. | 20 October 2022, 02:44:43 UTC |
0d52506 | apaz | 19 October 2022, 17:24:13 UTC | Optimized heap snapshot json writing (#47217) * Combined ios_printf calls in serialize_heap_snapshot. * Optimized print_str_escape_json() | 19 October 2022, 17:24:13 UTC |
e1cbd11 | Valentin Churavy | 19 October 2022, 16:43:05 UTC | Ensure that we run late-lowering over ccallable funcs (#47226) | 19 October 2022, 16:43:05 UTC |
0aff6dd | Keno Fischer | 19 October 2022, 14:56:50 UTC | Add utility `IRCode()` constructor (#47218) Just to make it easy to get one. Right now, people tend to do `code_ircode` on something random and then strip it which is just silly. Should mostly be used in debug and utility code. Proper compile pipelines should still get it from the frontend or the cache, but it seems like a useful addition. | 19 October 2022, 14:56:50 UTC |
8181316 | Shuhei Kadowaki | 18 October 2022, 23:12:25 UTC | optimizer: simplify inlining algorithm (#47207) The main purpose of this commit is to try to simplify our inlining algorithm by removing the delayed callee resolving mechanism (i.e. `DelayedInliningSpec` stuff), since that kind of mechanism currently has no users and we provide more fine grained control with `inlining_policy` now. This commit also adds some more cleanups, changing argument ordering of some subroutines so that they are aligned with the other ones, and removing dead subroutines. | 18 October 2022, 23:12:25 UTC |
61ccb32 | Jameson Nash | 18 October 2022, 19:51:02 UTC | fix incorrect quiescent finalizer detection (#47214) We were checking and clearing the gc tag bits on a random memory location when running these quiescent finalizers (which do not point to julia memory, so they are not tag bits, but probably libc malloc metadata). Detected by ASAN (and also CI) Fixes #47171 Closes #47177 | 18 October 2022, 19:51:02 UTC |
e8aacc8 | Jameson Nash | 18 October 2022, 17:06:32 UTC | fix linkage of libuv (#47203) Only libjulia-internal is supposed to be linked against this, since it is a static library. Fix #47198 | 18 October 2022, 17:06:32 UTC |
94736a4 | apaz | 18 October 2022, 16:14:39 UTC | sysimg relocation lists now use LEB128 format (#47204) Appears to reduce the data size from about 165MB to 147MB! | 18 October 2022, 16:14:39 UTC |
bc7500b | apaz | 18 October 2022, 15:30:36 UTC | [Profile] Test heap snapshot in child process (#47205) Save memory (especially important for 32-bit) by running in a new process, and not one that has already run a lot of other test. This avoids a possible OOM situation. | 18 October 2022, 15:30:36 UTC |
b55c15e | Keno Fischer | 18 October 2022, 09:06:23 UTC | Fix insert_node! for insertion at pending nodes (#47189) We didn't handle this at all, now we at least handle insertions with `attach_after` an existing node. Attaching before is currently disallowed. We could have it attach before the node to which it is being attached, but it is not clear that this is what we want. We can revisit that if somebody has a usecase where they want that. Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> | 18 October 2022, 09:06:23 UTC |
2ca8d44 | Keno Fischer | 18 October 2022, 09:06:01 UTC | Thread through lattice in more places (#47188) It was missing in irinterp's `tmeet` for PiNodes as well as the optimizer (which I knew about but had just punted on until I needed it, which is now). Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> | 18 October 2022, 09:06:01 UTC |
dc3a2e8 | Jameson Nash | 17 October 2022, 15:17:06 UTC | fix spelling of :not_atomic symbol default value (#47187) | 17 October 2022, 15:17:06 UTC |
69f8a7b | Daniel Karrasch | 17 October 2022, 08:33:35 UTC | Products of `Givens` and `Rotations` (#47162) | 17 October 2022, 08:33:35 UTC |
c2dfe1d | Keno Fischer | 17 October 2022, 00:16:41 UTC | Also update phi counts in adce pass (#47181) The whole point of this pass is to compute and compare the counts of all SSA value uses vs those of only-phi uses to find SSA values that have no real uses. In #47080, I updated the code to properly account for removal of phi edges in the SSA count, but neglected to do the same in the phi-only count, leading to #47180. Fix that. Fixes #47180 | 17 October 2022, 00:16:41 UTC |
392bc97 | Mosรจ Giordano | 16 October 2022, 17:39:53 UTC | Revert "Add `jl_print_task_backtraces()`" (#47182) This reverts commit d89b96b3fc7ac13ed29ac1508ba302dc4f758d33. | 16 October 2022, 17:39:53 UTC |
e569459 | Mosรจ Giordano | 16 October 2022, 11:17:20 UTC | [MozillaCACerts_jll] Update to 2022-10-11 (#47175) | 16 October 2022, 11:17:20 UTC |
ccb0a02 | Jameson Nash | 16 October 2022, 08:00:40 UTC | remove kwfuncs from Julia (#47157) * remove kwfuncs from Julia These kwsorter methods only exist for dispatch, which means they do not need to be unique. We can optionally have the primary MethodTable contain an extra kwtable::MethodTable field, if this turns out to be slow, since this already introduces the concept of `jl_kwmethod_table_for` (for better reflection and max_args). * remove jl_f_kwinvoke builtin, reimplement in Julia This instantly grants total inference and inlining support, where previously this was a completely opaque call! | 16 October 2022, 08:00:40 UTC |
97d86f8 | Lilith Orion Hafner | 16 October 2022, 02:02:20 UTC | Remove some bootstrapping hacks from sort.jl (#47173) | 16 October 2022, 02:02:20 UTC |
277b1a5 | Keno Fischer | 15 October 2022, 21:50:05 UTC | Check inlining policy before inlining semi concrete eval IR (#47139) `inlining_policy!` recently gained the `info` argument to allow external AbstractInterpreters to decline inlining for certain CallInfos. This is for example used by Diffractor to avoid inlining any calls with a customized AD rule in its early optimization pass. However, we were missing a call to `inlining_policy!` in the path that was inlining semi concrete results, causing us to inline things that should have been forbidden by the external AbstractInterpreter's policies. | 15 October 2022, 21:50:05 UTC |
d89b96b | Kiran | 15 October 2022, 20:43:05 UTC | Add `jl_print_task_backtraces()` (#46845) Iterates through `jl_all_tls_states` and through all `live_tasks` in `ptls->heap`, printing backtraces. | 15 October 2022, 20:43:05 UTC |
532125d | Keno Fischer | 15 October 2022, 14:53:43 UTC | Add ability to not round-trip uncached inference results through IRCode (#47137) There's generally three reasons inference results end up uncached: 1. They come from typeinf_ext 2. We discover some validity limitation (generally due to recursion) 3. They are used for constant propagation Currently, we convert all such inference results back to CodeInfo, in case they come from 1. However, for inference results of kind 3, the only thing we ever do with them is turn them back into IRCode for inlining. This round-tripping through IRCode is quite wasteful. Stop doing that. This PR is the minimal change to accomplish that by marking those inference results that actually need to be converted back (for case 1). This probably needs some tweaking for external AbstractInterpreters, but let's make sure this works and has the right performance first. This commit just adds the capability, but doesn't turn it on by default, since the performance for base didn't quite look favorable yet. | 15 October 2022, 14:53:43 UTC |
8552543 | Shuhei Kadowaki | 15 October 2022, 09:52:19 UTC | compiler: fix minor issues detected by JET (#47163) | 15 October 2022, 09:52:19 UTC |
35431bf | Lilith Orion Hafner | 15 October 2022, 02:18:23 UTC | Stabilize, optimize, and increase robustness of QuickSort (#45222) * Change partitioning scheme to use scratch space * Randomize pivot selection with a hash-based fallback for when `rand` is unavailable * remove an unnecessary sorting operation in typealias construction in base/show.jl * Seed rng before generating precompile statements * Add presorted check to avoid performance regressions * test invalid `lt` to close #11429 & #32675 * test that PartialQuickSort is stable * update radix sort dispatch heuristics because quicksort is now faster and the primary competition Co-authored-by: Petr Vana <petvana@centrum.cz> Co-authored-by: Oscar Smith <oscardssmith@gmail.com> | 15 October 2022, 02:18:23 UTC |
05cfe24 | Keno Fischer | 14 October 2022, 21:54:37 UTC | Fix various bugs in maybe-undef handling (#47167) We weren't accounting for the possiblity that a slot could be undef in our effect handling and the recently introduced shortcut in the type lifting pass wasn't quite correct. Ironically, the test case I have here compiles correctly on master, because the compiler miscompiles itself (due to this issue) to always make the `@isdefined(last_val)` check `false` in this test case. We can still look at the IR though, which this does. Fixes #47127 | 14 October 2022, 21:54:37 UTC |
625aed1 | t-bltg | 14 October 2022, 20:58:37 UTC | disable `brotli` linkage (#47165) | 14 October 2022, 20:58:37 UTC |
3144a5b | Alex Arslan | 14 October 2022, 20:15:52 UTC | Implement `jl_rec_backtrace` for ASM/SETJMP on FreeBSD (#47156) This removes the message emitted while compiling on FreeBSD that says it isn't supported. | 14 October 2022, 20:15:52 UTC |
c63c1e4 | Jeff Bezanson | 14 October 2022, 20:15:25 UTC | Merge pull request #46609 from JuliaLang/jb/jn/mthreads support foreign threads | 14 October 2022, 20:15:25 UTC |
981f3d2 | Jameson Nash | 14 October 2022, 16:33:59 UTC | [REPL] tests: be better about correct IO ordering (#47160) Particularly relevant for COLUMNS being narrow for some cases, or the kernel being configured with small IO buffers, or both. Or someone setting a particularly long path for TMPDIR. Or so on. | 14 October 2022, 16:33:59 UTC |
f424431 | Jeff Bezanson | 13 October 2022, 17:37:17 UTC | make CodeInstance 1 word smaller by moving the trailing UInt8 field (#47146) | 13 October 2022, 17:37:17 UTC |
8bdd52d | Jeff Bezanson | 13 October 2022, 17:23:12 UTC | fix bug in --strip-ir when fields are replaced with NULL (#47145) | 13 October 2022, 17:23:12 UTC |
08d5b0d | Keno Fischer | 13 October 2022, 15:04:47 UTC | irshow: Fix CFG display with directly inserted new nodes (#47135) Slight fix to #47043 for the case where nodes where inserted using `insert_node_here!`. | 13 October 2022, 15:04:47 UTC |
40346e1 | Max Horn | 13 October 2022, 15:04:02 UTC | Improve the memory profiler documentation (#47144) - PProf is a package, not a library - mention PProf in the docstring and say how to invoke it - turn URLs into markdown links | 13 October 2022, 15:04:02 UTC |
01310a9 | Jerry Ling | 13 October 2022, 13:35:11 UTC | `map` of unequal length bitarray (#47013) * fix `bit_map!` with unequal length. * relax three-arg `bit_map!`. * add bit array test for unequal length. Co-authored-by: N5N3 <2642243996@qq.com> Co-authored-by: Cameron Bieganek <8310743+CameronBieganek@users.noreply.github.com> | 13 October 2022, 13:35:11 UTC |
186c0be | DilumAluthgeBot | 13 October 2022, 12:17:05 UTC | ๐ค Bump the SparseArrays stdlib from 1bae96d to 4694108 (#47147) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 13 October 2022, 12:17:05 UTC |
faa49a0 | apaz | 13 October 2022, 03:23:43 UTC | Avoid duplicating jl_datatype_layout_t (#46973) Co-authored-by: Jameson Nash <vtjnash@gmail.com> | 13 October 2022, 03:23:43 UTC |
b685edd | Dilum Aluthge | 13 October 2022, 01:34:20 UTC | Test system: Allow the "test set mutated ENV and did not restore..." check to be turned off (#47148) | 13 October 2022, 01:34:20 UTC |
b7201d6 | Jameson Nash | 25 July 2022, 20:14:42 UTC | threading: support more than nthreads at runtime Hook a couple functions (notably cfunction) to handle adopting foreign threads automatically when used. n.b. If returning an object pointer, we do not gc_unsafe_leave afterwards as that would render the pointer invalid. However, this means that it can be a long time before the next safepoint (if ever). We should look into ways of improving this bad situation, such as pinning only that specific object temporarily. n.b. There are some remaining issues to clean up. For example, we may trap pages in the ptls after GC to keep them "warm", and trap other pages in the unwind buffer, etc. | 12 October 2022, 21:32:22 UTC |
0b2a8a5 | Jishnu Bhattacharya | 12 October 2022, 13:06:56 UTC | Update patch version in readme (#47140) Change the version to be checked out from v1.8.0 to v1.8.2 Co-authored-by: Jishnu Bhattacharya <jishnub@users.noreply.github.com> | 12 October 2022, 13:06:56 UTC |
015874c | Sosuke | 12 October 2022, 10:04:19 UTC | add Bidiagonal/Tridiagonal constructor from its own type (#47115) | 12 October 2022, 10:04:19 UTC |
a7d446b | Jakob Nybo Nissen | 12 October 2022, 06:33:38 UTC | Do not use `Stateful` for `cmp` of `AbstractString` (#47125) PR #45924 fixed length of `Stateful`, but this change requires `Stateful` to call `length` on its wrapped iterator on instantiation. The current implementation of `cmp(::AbstractString, ::AbstractString)` wraps the strings in `Stateful` to efficiently check if one string is longer than the other without needing an O(N) call to `length`. However, with #45924 this length call is done anyway, which led to a performance regression. In this PR, the `cmp` method is changed so it no longer relies on `Stateful` to do the same thing. Fix #46719 | 12 October 2022, 06:33:38 UTC |
9104c20 | Jeff Bezanson | 12 October 2022, 06:07:13 UTC | fix #46918, unstable `jl_binding_type` behavior (#46994) Now it will return `nothing` before the binding has been resolved, and afterward fully look up the binding as declared by the owner. | 12 October 2022, 06:07:13 UTC |
e304cd5 | Jameson Nash | 12 October 2022, 00:30:59 UTC | dump: make serialization gc-safe (#47086) | 12 October 2022, 00:30:59 UTC |
a68235c | William Moses | 10 October 2022, 18:09:38 UTC | optimizer: fix alloc opt on unknown offset with references (#47076) Fixes issued mentioned in https://github.com/JuliaLang/julia/issues/47075#issuecomment-1269283426 | 10 October 2022, 18:09:38 UTC |
1cb70ff | Keno Fischer | 10 October 2022, 17:40:27 UTC | type_lift_pass: Don't introduce unnecessary phi nodes (#47119) Try to avoid introducing phi nodes whos edges all have the same value. This cuts down the generated IR a bit and exposes more optimization opportunities. While we're at it, also allow IncrementalCompact to fold :throw_undef_if_not nodes with constant condition (which happen more frequently now, since a condition that is proven defined on all reachable paths now has some chance to end up as a constant condition rather than a PhiNode SSAValue). | 10 October 2022, 17:40:27 UTC |
233a37d | Dilum Aluthge | 10 October 2022, 17:11:51 UTC | Fix whitespace (#47120) | 10 October 2022, 17:11:51 UTC |
18cbaba | Steven G. Johnson | 10 October 2022, 13:16:00 UTC | clarify common confusion about allocations (#46383) | 10 October 2022, 13:16:00 UTC |
6f595e6 | Udoh Jeremiah | 10 October 2022, 13:14:55 UTC | Explicitness on the ismutable(v) function. (#46466) | 10 October 2022, 13:14:55 UTC |
ea99174 | Lilith Orion Hafner | 10 October 2022, 13:10:06 UTC | Make print_sorted_stdlibs robust to stray files (#46697) | 10 October 2022, 13:10:06 UTC |
729cdb4 | Lilith Orion Hafner | 10 October 2022, 11:34:10 UTC | Test that *Error and *Exception types subtype Exception and fix cases where they don't (#47010) * Make PaddingError and UnwrapTaskFailedException subtype Exception and test that all such types do the same | 10 October 2022, 11:34:10 UTC |
abb1b2f | Lilith Orion Hafner | 10 October 2022, 11:33:27 UTC | Update manual heading for arrays (#47018) | 10 October 2022, 11:33:27 UTC |
0dada17 | Hendrik Ranocha | 10 October 2022, 11:30:58 UTC | fix invalidations when loading ForwardDiff.jl (#47091) | 10 October 2022, 11:30:58 UTC |
1471cd9 | Katharine Hyatt | 10 October 2022, 11:20:25 UTC | lu should throw on matrix of NaNs (#47098) | 10 October 2022, 11:20:25 UTC |
1c1dfa2 | Jerry Ling | 10 October 2022, 11:18:51 UTC | warn against `@irrational` (#47103) | 10 October 2022, 11:18:51 UTC |
cf44223 | Lilith Orion Hafner | 10 October 2022, 11:05:14 UTC | Remove unused `issorted` function from compiler (#46691) | 10 October 2022, 11:05:14 UTC |
7beeaf7 | Kristoffer Carlsson | 10 October 2022, 10:58:11 UTC | make REPL completions robust against `expanduser` throwing (#47058) | 10 October 2022, 10:58:11 UTC |
7bd8311 | Lilith Orion Hafner | 10 October 2022, 10:34:56 UTC | Add example for broadcasted โ (#47007) and update the last example so that order of application is relevant | 10 October 2022, 10:34:56 UTC |
6904559 | Shuhei Kadowaki | 10 October 2022, 08:05:48 UTC | tidy test cases added by #47066 (#47118) | 10 October 2022, 08:05:48 UTC |
d0b15c2 | Keno Fischer | 10 October 2022, 03:46:08 UTC | lattice: Thread through lattice argument for getfield_tfunc (#47097) Like `tuple`, `getfield` needs some lattice awareness to give the correct answer in the presence of extended lattices. Refactor to split and thread through the lattice argument through _getfield_tfunc so external lattices can provide `getfield` tfuncs for their custom elements. | 10 October 2022, 03:46:08 UTC |
25e3809 | Daniel Karrasch | 10 October 2022, 02:10:21 UTC | Check sizes in 3-arg diagonal (dot-)product (#47114) | 10 October 2022, 02:10:21 UTC |
b67adb1 | Keno Fischer | 09 October 2022, 22:02:10 UTC | Make @specialize actually work if the module was @nospecialize'd (#47106) In compiler/tfuncs.jl, we're assuming that after a `@nospecialize` at top level, a subsequent `@specialize` on the argument will override the toplevel `@nospecialize` (just like an argument-level `@nospecialize` overrides a toplevel `@specialize`). However, it turns out we never implemented that support, so the annotation was silently ignored. Fix that and add a test. | 09 October 2022, 22:02:10 UTC |
17afb66 | Oscar Smith | 08 October 2022, 20:15:41 UTC | Make Compiler use separate sorting algorithm. (#47066) * add Compiler sorting algorithm. Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> Co-authored-by: Lilith Hafner <Lilith.Hafner@gmail.com> Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> | 08 October 2022, 20:15:41 UTC |
2590712 | Lilith Orion Hafner | 08 October 2022, 15:37:27 UTC | make pending_perm a heap instead of sorted (#46586) Co-authored-by: Lilith Hafner <Lilith.Hafner@gmail.com> | 08 October 2022, 15:37:27 UTC |
60adc24 | Lilith Orion Hafner | 08 October 2022, 13:23:24 UTC | Replace Sorted Vector with BitSet in optimization passes (#46587) Co-authored-by: Jameson Nash <vtjnash@gmail.com> | 08 October 2022, 13:23:24 UTC |
0d90a0a | Daniel Karrasch | 08 October 2022, 08:30:25 UTC | Don't export `axp(b)y!` from `LinearAlgebra.BLAS` (#46851) | 08 October 2022, 08:30:25 UTC |
95cfd62 | Shuhei Kadowaki | 08 October 2022, 06:39:39 UTC | improve performance issue of `@nospecialize`-d keyword func call (#47059) This commit tries to fix and improve performance for calling keyword funcs whose arguments types are not fully known but `@nospecialize`-d. The final result would look like (this particular example is taken from our Julia-level compiler implementation): ```julia abstract type CallInfo end struct NoCallInfo <: CallInfo end struct NewInstruction stmt::Any type::Any info::CallInfo line::Int32 flag::UInt8 function NewInstruction(@nospecialize(stmt), @nospecialize(type), @nospecialize(info::CallInfo), line::Int32, flag::UInt8) return new(stmt, type, info, line, flag) end end @nospecialize function NewInstruction(newinst::NewInstruction; stmt=newinst.stmt, type=newinst.type, info::CallInfo=newinst.info, line::Int32=newinst.line, flag::UInt8=newinst.flag) return NewInstruction(stmt, type, info, line, flag) end @specialize using BenchmarkTools struct VirtualKwargs stmt::Any type::Any info::CallInfo end vkws = VirtualKwargs(nothing, Any, NoCallInfo()) newinst = NewInstruction(nothing, Any, NoCallInfo(), zero(Int32), zero(UInt8)) runner(newinst, vkws) = NewInstruction(newinst; vkws.stmt, vkws.type, vkws.info) @benchmark runner($newinst, $vkws) ``` > on master ``` BenchmarkTools.Trial: 10000 samples with 186 evaluations. Range (min โฆ max): 559.898 ns โฆ 4.173 ฮผs โ GC (min โฆ max): 0.00% โฆ 85.29% Time (median): 605.608 ns โ GC (median): 0.00% Time (mean ยฑ ฯ): 638.170 ns ยฑ 125.080 ns โ GC (mean ยฑ ฯ): 0.06% ยฑ 0.85% โโโโโ โโโโโ โ โโโโโโโ
โโโโโโโโโโโโโโโโโโโโโ
โโ
โโโโโ
โโโโโโโ
โโโโโ
โ
โโโโโโ
โโ
โ
โโ
โโ โ 560 ns Histogram: log(frequency) by time 1.23 ฮผs < Memory estimate: 32 bytes, allocs estimate: 2. ``` > on this commit ```julia BenchmarkTools.Trial: 10000 samples with 1000 evaluations. Range (min โฆ max): 3.080 ns โฆ 83.177 ns โ GC (min โฆ max): 0.00% โฆ 0.00% Time (median): 3.098 ns โ GC (median): 0.00% Time (mean ยฑ ฯ): 3.118 ns ยฑ 0.885 ns โ GC (mean ยฑ ฯ): 0.00% ยฑ 0.00% โโ
โโโโ
โโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ 3.08 ns Histogram: frequency by time 3.19 ns < Memory estimate: 0 bytes, allocs estimate: 0. ``` So for this particular case it achieves roughly 200x speed up. This is because this commit allows inlining of a call to keyword sorter as well as removal of `NamedTuple` call. Especially this commit is composed of the following improvements: - Add early return case for `structdiff`: This change improves the return type inference for a case when compared `NamedTuple`s are type unstable but there is no difference in their names, e.g. given two `NamedTuple{(:a,:b),T} where T<:Tuple{Any,Any}`s. And in such case the optimizer will remove `structdiff` and succeeding `pairs` calls, letting the keyword sorter to be inlined. - Tweak the core `NamedTuple{names}(args::Tuple)` constructor so that it directly forms `:splatnew` allocation rather than redirects to the general `NamedTuple` constructor, that could be confused for abstract input tuple type. - Improve `nfields_tfunc` accuracy as for abstract `NamedTuple` types. This improvement lets `inline_splatnew` to handle more abstract `NamedTuple`s, especially whose names are fully known but its fields tuple type is abstract. Those improvements are combined to allow our SROA pass to optimize away `NamedTuple` and `tuple` calls generated for keyword argument handling. E.g. the IR for the example `NewInstruction` constructor is now fairly optimized, like: ```julia julia> Base.code_ircode((NewInstruction,Any,Any,CallInfo)) do newinst, stmt, type, info NewInstruction(newinst; stmt, type, info) end |> only 2 1 โ %1 = Base.getfield(_2, :line)::Int32 โโปโท Type##kw โ %2 = Base.getfield(_2, :flag)::UInt8 โโโ getproperty โ %3 = %new(Main.NewInstruction, _3, _4, _5, %1, %2)::NewInstructionstruction โโโ return %3 โ => NewInstruction ``` | 08 October 2022, 06:39:39 UTC |
df5b081 | Keno Fischer | 08 October 2022, 03:57:32 UTC | Special purpose inliner for Core.ifelse (#47096) This function isn't used as much anymore now that Base.ifelse is an actual generic function, but it's still used in a few places across the ecosystem, and there currently isn't anything that would fold it for constant conditions, so add a special case inliner for it. This probably doesn't have a huge impact, but I happened to run into a case where it was causing annoying suboptimialities and it's a quick fix. | 08 October 2022, 03:57:32 UTC |
4c0f8de | Tim Besard | 07 October 2022, 21:12:22 UTC | Fix display of new after-attach IR nodes. (#47092) | 07 October 2022, 21:12:22 UTC |
f927d25 | Daniel Karrasch | 07 October 2022, 10:13:06 UTC | audit `copymutable_oftype` usage (#47063) | 07 October 2022, 10:13:06 UTC |
d498d36 | Jonathan Li | 07 October 2022, 07:11:51 UTC | Update eachsplit example, fixes #46751 (#47070) | 07 October 2022, 07:11:51 UTC |
f1b05c1 | Udoh Jeremiah | 07 October 2022, 07:10:06 UTC | doc: fix incorrect wordings on sentence (#47054) | 07 October 2022, 07:10:06 UTC |
8d783ef | Shuhei Kadowaki | 07 October 2022, 03:41:17 UTC | Merge pull request #47051 from JuliaLang/avi/ircleanup optimizer: refactors on SSAIR | 07 October 2022, 03:41:17 UTC |
5334fa8 | Daniel Karrasch | 07 October 2022, 03:30:12 UTC | Tests for bunchkaufman and cholesky of AbstractMatrix (#47081) | 07 October 2022, 03:30:12 UTC |
9e53f51 | Keno Fischer | 07 October 2022, 03:21:48 UTC | Fix IR corruption in cfg_simplify! (#47073) There were two issues here: 1. The code was assuming that any negative index in the BB rename array meant to skip the array, but the IncrementalCompact code was only processing -1. Adjust that to match the assumption. 2. A statement that was expected to be skipped was not properly erased. cfg_simplify overrode the `IncrementalCompact`-or's decision to skip a node, but didn't properly erase it. Since skipped nodes were not renamed, this would result in invalid IR. | 07 October 2022, 03:21:48 UTC |
0620361 | Keno Fischer | 07 October 2022, 03:21:33 UTC | Fix oracle check failure in adce_pass (#47080) This is probably a real issue, though I did not see it cause an actual issue, only an oracle check failure if the verification is turned on. The issue was that we were failing to count the removal of phi node edges during the adce pass, so we were left with excessive counts at completion. | 07 October 2022, 03:21:33 UTC |
b794a5a | Shuhei Kadowaki | 05 October 2022, 05:43:37 UTC | SSAIR: remove `effect_free_computed::Bool` option from `NewInstruction` Now the `flag` flag is typed as `::Union{Nothing,UInt8}` and `flag::Nothing` indicates it needs to be recomputed on insertion. | 07 October 2022, 02:20:14 UTC |
24bee81 | Shuhei Kadowaki | 04 October 2022, 04:10:47 UTC | SSAIR: make sure to propagate `info` from `NewInstruction` | 07 October 2022, 02:20:14 UTC |
2083888 | Shuhei Kadowaki | 04 October 2022, 03:30:02 UTC | SSAIR: disambiguate `Core.Compiler.add!` | 07 October 2022, 02:20:14 UTC |
4390918 | Shuhei Kadowaki | 04 October 2022, 03:24:17 UTC | SSAIR: refactor `NewInstruction` constructor Sets up keyword-arg based constructors: - `NewInstruction(::Instruction; stmt, type, info, line, flag, effect_free_computed)` - `NewInstruction(::NewInstruction; stmt, type, info, line, flag, effect_free_computed)` , inspired by the constructors of `Effects` and `EscapeInfo`. The previous main constructors `NewInstruction(stmt, type, [line])` remains there, so the most of the existing usages don't get changed. | 07 October 2022, 02:20:14 UTC |
ecfe8bc | Shuhei Kadowaki | 07 October 2022, 02:17:12 UTC | pass around `CallInfo` object to the inlining algorithm [alternative] (#46965) So that `inlining_policy` can see user-`CallInfo` object. It allows us to implement a customized inlining heuristics by just seeing a callsite information, without requiring the inlining cost of cached code to be tweaked. | 07 October 2022, 02:17:12 UTC |
aad2454 | Shuhei Kadowaki | 07 October 2022, 00:44:36 UTC | compiler: setup `CallInfo` interface type (#46961) This commit defines new `CallInfo` abstract type that is supposed to be interfaced by all callinfos like `MethodMatchInfo`. Actual interface features will be added in follow commits. | 07 October 2022, 00:44:36 UTC |
0bd717e | Keno Fischer | 07 October 2022, 00:13:44 UTC | Add missing check for Union{} argtypes in irinterp (#47079) | 07 October 2022, 00:13:44 UTC |
950ce91 | Kristoffer Carlsson | 06 October 2022, 20:44:46 UTC | quote variable name in `UndefVarError` and `UndefKeywordError` (#47077) | 06 October 2022, 20:44:46 UTC |
a27b3f8 | DilumAluthgeBot | 06 October 2022, 19:19:39 UTC | ๐ค Bump the Statistics stdlib from 0588f2c to 20fbe57 (#47046) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 06 October 2022, 19:19:39 UTC |
2c68ff9 | DilumAluthgeBot | 06 October 2022, 19:13:14 UTC | ๐ค Bump the Downloads stdlib from 0733701 to 11b6bb7 (#47024) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 06 October 2022, 19:13:14 UTC |
45b96c4 | Elliot Saba | 06 October 2022, 19:10:25 UTC | gc: add missing root for binding->ty field (#46806) Co-authored-by: Jameson Nash <vtjnash@gmail.com> | 06 October 2022, 19:10:25 UTC |
689bfe1 | Jeff Bezanson | 06 October 2022, 16:47:55 UTC | fix code for omitting `codeinst->inferred` from system image (#47067) also remove backedges, root_blocks, and callbacks arrays with --strip-ir | 06 October 2022, 16:47:55 UTC |
c1c2a69 | Katharine Hyatt | 06 October 2022, 14:23:59 UTC | Doctest for setindex (#47072) | 06 October 2022, 14:23:59 UTC |
c5b43bb | Katharine Hyatt | 06 October 2022, 14:22:59 UTC | Doctests for count (#47071) | 06 October 2022, 14:22:59 UTC |
3d8eb24 | Valentin Churavy | 06 October 2022, 13:54:09 UTC | Fixes for non-linearized cglobal (#47068) * Teach SSAIR verifier about not linearized cglobal * Fix stmt effects for non-linearized cglobal. Co-authored-by: Tim Besard <tim.besard@gmail.com> | 06 October 2022, 13:54:09 UTC |
dd298dc | Katharine Hyatt | 06 October 2022, 11:39:24 UTC | Doctest, typo fix, xrefs for abstract array docs (#47030) Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com> | 06 October 2022, 11:39:24 UTC |
84403cb | N5N3 | 06 October 2022, 10:46:29 UTC | Avoid unneeded allocation in `ldiv!(::`QRPivoted`, ...)`. (#47061) | 06 October 2022, 10:46:29 UTC |
f4c3eda | Katharine Hyatt | 06 October 2022, 07:32:53 UTC | Eig functions error on Hermitians of NaNs (#47074) | 06 October 2022, 07:32:53 UTC |
ce04b75 | Oscar Smith | 06 October 2022, 06:22:01 UTC | speed up Ryu.pow5 (#46764) | 06 October 2022, 06:22:01 UTC |
a3c7d7f | Tim Besard | 06 October 2022, 05:27:15 UTC | Merge pull request #46952 from JuliaLang/tb/ircompact_statefulness IncrementalCompact: fix stateful behavior when using multiple iterators. | 06 October 2022, 05:27:15 UTC |
92e68c8 | DilumAluthgeBot | 06 October 2022, 01:06:16 UTC | ๐ค Bump the Pkg stdlib from 3cbbd860a to ca9f44265 (#47069) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> | 06 October 2022, 01:06:16 UTC |
d797c00 | Shuhei Kadowaki | 05 October 2022, 23:32:56 UTC | use `_NAMEDTUPLE_NAME` instead of `NamedTuple_typename` [NFC] (#47057) | 05 October 2022, 23:32:56 UTC |
1755994 | Jameson Nash | 01 June 2022, 17:01:37 UTC | [Profile] allocate exactly the space requested With dynamic thread counts, we cannot ensure this count is constant after initialization, and we might like to even profile adding and removing threads. | 05 October 2022, 21:37:06 UTC |
956e0a3 | apaz | 05 October 2022, 18:18:38 UTC | [Profile] Add Heap Snapshot tool (#46862) We expose a function `Profile.take_heap_snapshot(file)`, which writes a heap snapshot in Chrome's .heapsnapshot JSON format to the given IO stream. This can be loaded into Chrome Devtools' snapshot viewer to explore the heap and find memory leaks. Co-Authored-By: Dean De Leo <dean.deleo@relational.ai> Co-Authored-By: Nathan Daly <NHDaly@gmail.com> Co-Authored-By: Pete Vilter <7341+vilterp@users.noreply.github.com> Co-Authored-By: Valentin Churavy <v.churavy@gmail.com> Co-Authored-By: Jameson Nash <vtjnash@gmail.com> | 05 October 2022, 18:18:38 UTC |
fbd5a72 | Jameson Nash | 05 October 2022, 16:00:56 UTC | precompile: serialize the full edges graph (#46920) Previously, we would flatten the edges graph during serialization, to simplify the deserialization codes, but that now was adding complexity and confusion and uncertainty to the code paths. Clean that all up, so that we do not do that. Validation is performed while they are represented as forward edges, so avoids needing to interact with backedges at all. This uses the same algorithm now as #46749 for cycle convergence. | 05 October 2022, 16:00:56 UTC |