https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
03f1759 Revert "Add `Base.` to make it more explicit (#44205)" This reverts commit 95f7ce243d734f3b5fc29427495b8ed4dc0c2ae6. 16 February 2022, 21:11:31 UTC
95f7ce2 Add `Base.` to make it more explicit (#44205) These names are NOT exported. Add `Base.` to make reader learn easier. 16 February 2022, 20:22:22 UTC
8207f5d optimizer: Julia-level escape analysis (#43800) This commit ports [EscapeAnalysis.jl](https://github.com/aviatesk/EscapeAnalysis.jl) into Julia base. You can find the documentation of this escape analysis at [this GitHub page](https://aviatesk.github.io/EscapeAnalysis.jl/dev/)[^1]. [^1]: The same documentation will be included into Julia's developer documentation by this commit. This escape analysis will hopefully be an enabling technology for various memory-related optimizations at Julia's high level compilation pipeline. Possible target optimization includes alias aware SROA (#43888), array SROA (#43909), `mutating_arrayfreeze` optimization (#42465), stack allocation of mutables, finalizer elision and so on[^2]. [^2]: It would be also interesting if LLVM-level optimizations can consume IPO information derived by this escape analysis to broaden optimization possibilities. The primary motivation for porting EA by this PR is to check its impact on latency as well as to get feedbacks from a broader range of developers. The plan is that we first introduce EA to Julia Base by this commit, and then merge the depending PRs built on top of this commit later. This commit simply defines EA inside Julia base compiler and enables the existing test suite with it. In this commit we don't run EA at all, and so this commit shouldn't affect Julia-level compilation latency. In the depending PRs, EA will run in two stages: - `IPO EA`: run EA on pre-inlining state to generate IPO-valid cache - `Local EA`: run EA on post-inlining state to generate local escape information used for various optimizations In order to integrate `IPO EA` with our compilation cache system, this commit also implements a new `CodeInstance.argescapes` field that keeps the IPO-valid cache generated by `IPO EA`. 16 February 2022, 16:04:29 UTC
2d1ea3c Fix `stride(A, i)` for 0-dim inputs (#44090) Fixes #44087 16 February 2022, 16:02:23 UTC
3e5cd3c Upgrade libgit2 to 1.3.0, libssh2 to 1.10.2, mbedtls to 2.28 and libcurl to 7.81.0 (#43250) 16 February 2022, 15:09:20 UTC
d85108a Add missing optimization for `iterate(::LogicalIndex{<:CartesianIndex,<:BitArray})` (#43448) * make `collect(::LogicalIndex)` faster by call `findall` * borrow code from findall borrow code from findall * Update base/multidimensional.jl Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> 16 February 2022, 14:33:16 UTC
1a3da30 Addition to release checklist in makefile (#43709) 16 February 2022, 11:57:28 UTC
76dc379 Tighten validation of `hvncat` implementation (#43940) 16 February 2022, 11:41:54 UTC
c839221 fix next prompt detector in `generate_precompile_statements` (#44196) 16 February 2022, 11:24:13 UTC
983598a remove `isva` field from OpaqueClosure (#44008) Instead allow specifying an argument tuple type separately. 15 February 2022, 22:45:39 UTC
2db86f2 completely initialize SystemError (#44192) 15 February 2022, 20:49:20 UTC
540a807 Redo: Add profiling of already running tasks via SIGINFO/SIGUSR1 (#44185) * Redo: Add profiling of already running tasks via SIGINFO/SIGUSR1 * fix precompile script 15 February 2022, 20:27:52 UTC
7cd11a6 Enable suppression of warnings from ambiguity & unbound tests (#43817) * Revert "filesystem & binaryplatforms: remove undefined vars from exports (#43631)" This reverts commit a3c27989cd03f32c428503d0a8b8f4f8e1057fe1. * Enable suppression of warnings in ambiguity & undefined tests 15 February 2022, 18:58:53 UTC
4842007 fix UndefRefError for documentation system (#44060) * fix UndefRefError for documentation system * add a test Co-authored-by: Jameson Nash <jameson@juliacomputing.com> 15 February 2022, 17:46:53 UTC
9542577 Add feature detection for ARM/MacOS (#41924) 15 February 2022, 13:17:15 UTC
cc345f6 fix error for assignment to global of wrong type (#44183) Accidentally missed this in #43671 15 February 2022, 07:41:30 UTC
8e8676d Add a compat entry for three argument div (#44181) 15 February 2022, 06:51:18 UTC
c656433 Revert "Add profiling of already running tasks via SIGINFO/SIGUSR1 (#43179)" (#44184) This reverts commit a9aad9784b5f94a518263172702379b390e8856d. 15 February 2022, 05:53:44 UTC
738066c macro deprecate: docs tweak (#44178) 15 February 2022, 05:52:05 UTC
88edb11 use specialized code when compiling opaque closure expressions (#44176) invoke specialization when an OC is created at run time 15 February 2022, 04:15:46 UTC
8d8d58f fix escaping of `gen_call_with_extracted_types_and_kwargs` docstring(#44177) 15 February 2022, 03:40:57 UTC
a9aad97 Add profiling of already running tasks via SIGINFO/SIGUSR1 (#43179) 15 February 2022, 03:11:18 UTC
07f0fdb simplify reinterpret array code (#43955) Avoid one of the memcpy calls, when possible. 15 February 2022, 02:00:52 UTC
3897667 Change PATH_MAX to JL_PATH_MAX (#43986) 15 February 2022, 01:27:37 UTC
99aab66 Re-export `jl_add_optimization_passes` (#44169) 14 February 2022, 21:09:44 UTC
b5f1a19 add type annotations for non-constant Base globals (#44166) * add type annotations for non-constant Base globals * remove no-longer needed callsite annotations 14 February 2022, 20:43:43 UTC
ed19129 fix #44086, missing field reordering in `NamedTuple{n,T}(::NamedTuple)` (#44132) 14 February 2022, 20:36:26 UTC
17a4024 [REPLCompletions] set working directory to \ (#44157) Using C: would try to go to ENV["=C:"], which we might have rmdir earlier. We just need the root here for the test, so specify that exactly so we go to C:\ and not the last working directory on C. 14 February 2022, 20:11:02 UTC
d0b8590 Bump version number in README (#44167) Update the version tag in the `git checkout` instruction from `v1.7.0` to `v1.7.2` 14 February 2022, 16:39:05 UTC
f7b2c3d [Distributed] exec remote process from shell (#44156) Keeps the job management a bit cleaner, since we will reuse the pid from sh, rather than appearing as a separate subprocess. 14 February 2022, 09:29:48 UTC
5e7b6dd inference: look for `:terminate_globally` override in backedge termination check (#44106) Now we can "fix" #41694: ```julia Base.@assume_effects :terminates_globally function issue41694(x) res = 1 1 < x < 20 || throw("bad") while x > 1 res *= x x -= 1 end return res end @test fully_eliminated() do issue41694(2) end ``` 14 February 2022, 01:06:55 UTC
2842fe1 put default schedule first in `@threads` docstring (#44163) 14 February 2022, 00:23:32 UTC
3cfe5ca Merge pull request #44162 from jpsamaroo/jps/alloc-ns-ct Profile.Allocs: Add task and timestamp (take 2) 14 February 2022, 00:21:08 UTC
1e86463 faster inv and div for Complex{Union{Float16, Float32}} (#44111) * faster inv and div for Complex{Union{Float16, Float32}} * fix float64 division bug 13 February 2022, 23:52:41 UTC
befe38f add errorshow for DimensionMismatch (#44121) Close #44117 13 February 2022, 21:59:51 UTC
1813978 Polish comments prose in processor.h (#44161) 13 February 2022, 21:58:11 UTC
2d6a84e Add internal docs for staticdata.c (#44129) 13 February 2022, 20:53:53 UTC
c5fa1f7 build: remove duplicate julia args in generate_precompile (#44154) 13 February 2022, 20:50:50 UTC
3c52e71 Merge pull request #44134 from JuliaLang/jn/win64-UnwindData debuginfo: fix offset to UnwindData on Win64 13 February 2022, 20:46:35 UTC
6e18a14 CI: increase the linux32 timeout (#44159) 13 February 2022, 19:46:33 UTC
ea84398 Do not create or update the GitHub commit status for the `whitespace` job (#44160) 13 February 2022, 19:46:13 UTC
6463613 cycleclock: Not a safepoint 13 February 2022, 13:20:27 UTC
bd25c76 Profile.Allocs: Add task and timestamp 13 February 2022, 13:20:27 UTC
635449d Make `cholesky` handle AbstractMatrix (#44076) Co-authored-by: Sheehan Olver <s.olver@imperial.ac.uk> 13 February 2022, 12:15:19 UTC
5cff625 Revert "Profile.Allocs: Add task and timestamp (#44055)" (#44158) This reverts commit bfc94311badd3be87b49ef446473a058235fa19a. 13 February 2022, 08:27:45 UTC
8a9884d `InteractiveUtils.versioninfo()`: print the value of `Base.Threads.nthreads()` (#43806) Co-authored-by: Jameson Nash <vtjnash@gmail.com> 13 February 2022, 07:51:51 UTC
976dcc8 Make `@threads :dynamic` default (#44136) Co-authored-by: Takafumi Arakaki <takafumi.a@gmail.com> 13 February 2022, 06:34:59 UTC
d7dccc5 fix #44153, limit input types of reflection utilities (#44155) After #43113 Julia compiler can inline `@nospecialize ::AbstractType` signature, so we can reintroduce the input type annotations. Still I want to keep the current `::Any` signature for those utility functions heavily in `Core.Compiler` (e.g. `isbitstype`) because `isa(t, Type)` check inserted by the inliner otherwise might involve some cost. But I agree that the other non-performance sensitive functions like `which` is better to have input type restrictions. 13 February 2022, 06:34:00 UTC
d65fd0f 🤖 Bump the SHA stdlib from d30dbf6 to 57c3a8c (#44141) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:28:35 UTC
6a0bf4b 🤖 Bump the SparseArrays stdlib from 8d397cc to aa51c9b (#44142) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:28:24 UTC
1978580 🤖 Bump the Statistics stdlib from 2048f5b to 61a021b (#44143) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:28:14 UTC
9962b6e 🤖 Bump the SuiteSparse stdlib from cea4d37 to f63732c (#44144) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:28:02 UTC
5b2a4b1 🤖 Bump the Tar stdlib from 6a94602 to 0f8a73d (#44145) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:27:51 UTC
c672979 🤖 Bump the Downloads stdlib from 43899e7 to 2a21b15 (#44148) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:27:35 UTC
a7e6038 🤖 Bump the Pkg stdlib from c991ce0a to b4da4946 (#44140) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:27:22 UTC
ec17361 🤖 Bump the LibCURL stdlib from 04c450c to fd8af64 (#44139) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 13 February 2022, 06:26:36 UTC
3827d74 [MozillaCACerts_jll] Update to latest certificates (2022-02-01) (#44057) 13 February 2022, 06:15:12 UTC
cac90b5 win,debug: add missing jl_refresh_dbg_module_list call Because we might not have synchronized the list again yet. 13 February 2022, 04:56:08 UTC
0c44d23 build,win: workaround for echo sometimes interpreting \\ from tr 13 February 2022, 04:56:08 UTC
2f1f2f6 debuginfo: fix offset to UnwindData on Win64 We have 2 copies of this data, and so need to make sure we are pointing at the correct one for runtime. 13 February 2022, 04:56:08 UTC
d395659 inlining: avoid `Union` computations in the inliner call analysis (#44095) 13 February 2022, 04:43:32 UTC
6c16f71 Merge pull request #44135 from JuliaLang/vc/LLVM_13.0.1 Upgrade LLVM to 13.0.1 13 February 2022, 00:33:24 UTC
bfc9431 Profile.Allocs: Add task and timestamp (#44055) 12 February 2022, 21:35:13 UTC
071ae18 doc: add note about `reduce([hv]cat, x)` in `[hv]cat` (#44049) 12 February 2022, 18:17:56 UTC
7826ac8 Generalize storage of factorizations. (#42594) Introduce additional type parameters to remove hard-coded arrays from structures. 12 February 2022, 17:46:05 UTC
4c101a1 fix asyncmap docs typo (#43571) 12 February 2022, 17:09:55 UTC
e422590 clarify mkpath docstring (#43987) Close #43964 12 February 2022, 17:07:42 UTC
3326cc3 Revert "use specialized code when compiling opaque closure expressions (#43320)" (#44149) This reverts commit 5cb0f14a1beb65fe562ef24d27741e9ec92d1feb due to failing on CI (analyzegc). 12 February 2022, 17:04:24 UTC
e7f2307 Fix docstring for keepat! (#44128) `keepat!` also works with `BitVector` 12 February 2022, 17:02:45 UTC
aad5c1c doc: improve docstring of eachsplit (#43745) 12 February 2022, 14:41:50 UTC
f6aab71 RFC: Add description to load a local module and using it in example codes. (#41398) * Add description to load a local module and using it in example codes. * make example codes to doctests. Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com> 12 February 2022, 13:47:51 UTC
0a91e71 Docs: clarify `JULIA_NUM_THREADS=auto` compat 1.7 (#43842) 12 February 2022, 03:00:46 UTC
b1d152d improve Channel special constructor docstring (#43979) 12 February 2022, 02:57:05 UTC
e376fcc Add a `:dynamic` scheduling option for `Threads.@threads` (#43919) Co-authored-by: Julian Samaroo <jpsamaroo@jpsamaroo.me> Co-authored-by: Takafumi Arakaki <29282+tkf@users.noreply.github.com> Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> 12 February 2022, 02:17:45 UTC
a4e2cfb Upgrade LLVM to 13.0.1 11 February 2022, 23:59:56 UTC
4409a1b remove tuple indexing by non-integer (#43760) Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Simeon Schaub <schaub@mit.edu> 11 February 2022, 21:00:58 UTC
a557536 Add a few missing effects taints (#44125) Should fix Downloads test (it decided Downloads' easy_hook didn't do anything and accidentally deleted it). 11 February 2022, 17:51:10 UTC
5cb0f14 use specialized code when compiling opaque closure expressions (#43320) invoke specialization when an OC is created at run time 11 February 2022, 16:47:35 UTC
98e60ff Add `allequal` (#43354) * Add `allequal`. 11 February 2022, 14:41:52 UTC
32a026a Test: document and export `TestLogger` and `LogRecord`. (#44080) 10 February 2022, 19:24:53 UTC
85c83a7 some improvements to GC stat printing (#44098) - line up `elapsed time` - print most numbers unconditionally - print minor/full collections instead of all/full collections - count `free` calls for arrays, since we count `malloc`s for them 10 February 2022, 19:19:03 UTC
0bf6ce3 Fix doctests for CodeUnits indexing. (#44105) 10 February 2022, 15:07:51 UTC
94bbfd4 [Docs] Add missing code block (#44094) * [Docs] Add missing code block * Fix block order 10 February 2022, 14:02:00 UTC
aae68a5 alloc profiler: add compat note to docstring (#44100) 10 February 2022, 08:04:01 UTC
c360a58 Fixed inference on String and Symbol causing invalidations in show.jl (#44091) 10 February 2022, 07:16:20 UTC
fed4544 inference: follow up #43852 (#44101) This commit consists of minor follow up tweaks for #43852: - inlining: use `ConstResult` if available - refactor tests - simplify `CodeInstance` constructor signature - tweak `concrete_eval_const_proven_total_or_error` signature for JET integration 10 February 2022, 05:58:41 UTC
708873a actually add the atributes (#44097) Co-authored-by: oscarddssmith <oscar.smith@juliacomputing.com> 10 February 2022, 05:03:03 UTC
93a5f69 Test.TestLogger: add `respect_maxlog` option (#44085) 09 February 2022, 22:59:56 UTC
f090992 Take purity modeling seriously (#43852) * Implement new effect system * TLDR Before: ``` julia> let b = Expr(:block, (:(y += sin($x)) for x in randn(1000))...) @eval function f_sin_perf() y = 0.0 $b y end end f_sin_perf (generic function with 1 method) julia> @time @code_typed f_sin_perf() 15.707267 seconds (25.95 M allocations: 1.491 GiB, 3.30% gc time) [lots of junk] ``` After: ``` julia> @time @code_typed f_sin_perf() 0.016818 seconds (187.35 k allocations: 7.901 MiB, 99.73% compilation time) CodeInfo( 1 ─ return 27.639138714768546 ) => Float64 ``` so roughly a 1000x improvement in compile time performance for const-prop heavy functions. There are also run time improvements for functions that have patterns like: ``` function some_function_to_big_to_be_inlined_but_pure(x) .... end function foo(x) some_function_to_big_to_be_inlined_but_pure(x) return x end ``` The inliner will now be able to see that some_function_to_big_to_be_inlined_but_pure is effect free, even without inlining it and just delete it, improving runtime performance (if some_function_to_big_to_be_inlined_but_pure is small enough to be inlined, there is a small compile time throughput win, by being able to delete it without inlining, but that's a smaller gain than the compile time gain above). * Motivation / Overview There are two motivations for this work. The first is the above mentioned improvement in compiler performance for const-prop heavy functions. This comes up a fair bit in various Modeling & Simulation codes we have where Julia code is often auto-generated from some combination of parameterized model codes and data. This ends up creating enormous functions with significant need for constant propagation (~50k statements with ~20k constant calls are not uncommon). Our current compiler was designed for people occasionally throwing a `sqrt(2)` or something in a function, not 20k of them, so performance is quite bad. The second motivation is to have finer grained control over our purity modeling. We have `@Base.pure`, but that has somewhat nebulous semantics and is quite a big hammer that is not appropriate in most situations. These may seem like orthogonal concerns at first, but they are not. The compile time issues fundamentally stem from us running constant propagation in inference's abstract interpreter. However, for simple, pure functions, that is entirely unnecessary, because we have a super-fast, JIT compiler version of that function just laying around in general. The issue is that we currently, we generally do not know when it is legal to run the JIT-compiled version of the function and when we need to abstractly interpret it. However, if the compiler were able to figure out an appropriate notion of purity, it could start doing that (which is what it does now for `@Base.pure` functions). This PR adds that kind of notion of purity, converges it along with type information during inference and then makes use of it to speed up evaluation of constant propagation (where it is legal to do so), as well as improving the inliner. * The new purity notions The new purity model consists of four different kinds flags per code instance. For builtins and intrinsics the existing effect free and nothrow models are re-used. There is also a new macro `@Base.assume_effects` available, which can set the purity base case for methods or `:foreigncall`s. Here is the docstring for that macro, which also explains the semantics of the new purity flags: ``` @assume_effects setting... ex @assume_effects(setting..., ex) `@assume_effects` overrides the compiler's effect modeling for the given method. `ex` must be a method definition. WARNING: Improper use of this macro causes undefined behavior (including crashes, incorrect answers, or other hard to track bugs). Use with care an only if absolutely required. In general, each `setting` value makes an assertion about the behavior of the function, without requiring the compiler to prove that this behavior is indeed true. These assertions are made for all world ages. It is thus advisable to limit the use of generic functions that may later be extended to invalidate the assumption (which would cause undefined behavior). The following `settings` are supported. ** `:idempotent` The `:idempotent` setting asserts that for egal inputs: - The manner of termination (return value, exception, non-termination) will always be the same. - If the method returns, the results will always be egal. Note: This in particular implies that the return value of the method must be immutable. Multiple allocations of mutable objects (even with identical contents) are not egal. Note: The idempotency assertion is made world-arge wise. More formally, write fₐ for the evaluation of `f` in world-age `a`, then we require: ∀ a, x, y: x === y → fₐ(x) === fₐ(y) However, for two world ages `a, b` s.t. `a != b`, we may have `fₐ(x) !== fₐ(y)`` Note: A further implication is that idempontent functions may not make their return value dependent on the state of the heap or any other global state that is not constant for a given world age. Note: The idempontency includes all legal rewrites performed by the optimizizer. For example, floating-point fastmath operations are not considered idempotent, because the optimizer may rewrite them causing the output to not be idempotent, even for the same world age (e.g. because one ran in the interpreter, while the other was optimized). ** `:effect_free` The `:effect_free` setting asserts that the method is free of externally semantically visible side effects. The following is an incomplete list of externally semantically visible side effects: - Changing the value of a global variable. - Mutating the heap (e.g. an array or mutable value), except as noted below - Changing the method table (e.g. through calls to eval) - File/Network/etc. I/O - Task switching However, the following are explicitly not semantically visible, even if they may be observable: - Memory allocations (both mutable and immutable) - Elapsed time - Garbage collection - Heap mutations of objects whose lifetime does not exceed the method (i.e. were allocated in the method and do not escape). - The returned value (which is externally visible, but not a side effect) The rule of thumb here is that an externally visible side effect is anything that would affect the execution of the remainder of the program if the function were not executed. Note: The effect free assertion is made both for the method itself and any code that is executed by the method. Keep in mind that the assertion must be valid for all world ages and limit use of this assertion accordingly. ** `:nothrow` The `:nothrow` settings asserts that this method does not terminate abnormally (i.e. will either always return a value or never return). Note: It is permissible for :nothrow annotated methods to make use of exception handling internally as long as the exception is not rethrown out of the method itself. Note: MethodErrors and similar exceptions count as abnormal termination. ** `:terminates_globally` The `:terminates_globally` settings asserts that this method will eventually terminate (either normally or abnormally), i.e. does not infinite loop. Note: The compiler will consider this a strong indication that the method will terminate relatively *quickly* and may (if otherwise legal), call this method at compile time. I.e. it is a bad idea to annotate this setting on a method that *technically*, but not *practically*, terminates. Note: The `terminates_globally` assertion, covers any other methods called by the annotated method. ** `:terminates_locally` The `:terminates_locally` setting is like `:terminates_globally`, except that it only applies to syntactic control flow *within* the annotated method. It is this a much weaker (and thus safer) assertion that allows for the possibility of non-termination if the method calls some other method that does not terminate. Note: `terminates_globally` implies `terminates_locally`. * `:total` The `setting` combines the following other assertions: - `:idempotent` - `:effect_free` - `:nothrow` - `:terminates_globally` and is a convenient shortcut. Note: `@assume_effects :total` is similar to `@Base.pure` with the primary distinction that the idempotency requirement applies world-age wise rather than globally as described above. However, in particular, a method annotated `@Base.pure` is always total. ``` * Changes to data structures - Each CodeInstance gains two sets of four flags corresponding to the notions above (except terminates_locally, which is just a type inference flag). One set of flags tracks IPO-valid information (as determined by inference), the other set of flags tracks optimizer-valid information (as determined after optimization). Otherwise they have identical semantics. - Method and CodeInfo each gain 5 bit flags corresponding 1:1 to the purity notions defined above. No separate distinction is made between IPO valid and optimizer valid flags here. We might in the future want such a distinction, but I'm hoping to get away without it for now, since the IPO-vs-optimizer distinction is a bit subtle and I don't really want to expose that to the user. - `:foreigncall` gains an extra argument (after `cconv`) to describe the effects of the call. * Algorithm Relatively straightforward. - Every call or builtin accumulates its effect information into the current frame. - Finding an effect (throw/global side effect/non-idempotenct, etc.) taints the entire frame. Idempotency is technically a dataflow property, but that is not modeled here and any non-idempotent intrinsic will taint the idempotency flag, even if it does not contribute to the return value. I don't think that's a huge problem in practice, because currently we only use idempotency if effect-free is also set and in effect-free functions you'd generally expect every statement to contribute to the return value. - Any backedge taints the termination effect, as does any recursion - Unknown statements (generic calls, things I haven't gotten around to) taint all effects * Make INV_2PI a tuple Without this, the compiler cannot assume that the range reduction is idempotent to make use of the new fast constprop code path. In the future this could potentially be an ImmutableArray, but since this is relatively small, a tuple is probably fine. * Evalute :total function in the proper world * Finish effects implementation for ccall * Add missing `esc` * Actually make use of terminates_locally override * Mark ^(x::Float64, n::Integer) as locally terminating * Shove effects into calling convention field * Make inbounds taint consistency Inbounds and `--check-bounds=no` basically make the assertion: If this is dynamically reached during exceution then the index will be inbounds. However, effects on a function are a stronger statement. In particular, for *any* input values (not just the dynamically reached ones), the effects need to hold. This is in particular true, because inference can run functions that are dynamically dead, e.g. ``` if unknown_bool_return() # false at runtime, but inference doesn't know x = sin(1.0) end ``` Inference will (and we want it to) run the `sin(1.0)` even though it is not dynamically reached. For the moment, make any use of `--check-bounds=no` or `@inbounds` taint the consistency effect, which is semantically meaningful and prevents inference from running the function. In the future, we may want more precise tracking of inbounds that would let us recover some precision here. * Allow constprop to refine effects * Properly taint unknown call in apply * Add NEWS and doc anchor * Correct effect modeling for arraysize * Address Shuhei's review * Fix regression on inference time benchmark The issue wasn't actually the changes here, they just added additional error paths which bridged inference into the Base printing code, which as usual takes a fairly long time to infer. Add some judicious barriers and nospecialize statements to bring inference time back down. * refine docstrings of `@assume_effects` This commit tries to render the docstring of `@assume_effects` within Documenter.jl-generated HTML: - render bullet points - codify the names of settings - use math syntax - use note admonitions * improve effect analysis on allocation Improves `:nothrow` assertion for mutable allocations. Also adds missing `IR_FLAG_EFFECT_FREE` flagging for non-inlined callees in `handle_single_case!` so that we can do more dead code elimination. * address some reviews * Address Jameson's review feedback * Fix tests - address rebase issues Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 09 February 2022, 22:24:00 UTC
76fa182 alloc profiler: adjust warnings in docs; remove logged warning from implementation (#44077) * docs: update warning in the manual; add to reference * remove missed allocs warning from `fetch` since we think we've gotten all the allocs * remove tests of warning message, since it's no longer there 09 February 2022, 22:23:13 UTC
6b16eba doc: remind users that versioninfo may include secrets (#43839) Add a warning to the docstring of `InteractiveUtils.versioninfo()` reminding users to remove sensitive information before sharing the output text. 09 February 2022, 21:37:22 UTC
a84a058 Merge pull request #43953 from JuliaLang/jn/43636 impose stricter and earlier validation on ccall/cfunction types 09 February 2022, 19:50:41 UTC
dc0aa61 Manual for `JULIA_EDITOR`: note `code.cmd` for vscode on Windows (#44083) 09 February 2022, 16:53:16 UTC
2118a08 Add an option to not emit unionsplit fallback blocks (#43923) When union splitting, we currently emit a fallback block that prints `fatal error in type inference (type bound)`. This has always been an oddity, because there are plenty of other places in the compiler that we rely on the correctness of inference, but it has caught a number of issues over the years and we do still have a few issues (e.g. #43064) that show this error. Nevertheless, the occurrence of issues like this has become less frequent, so it might be time to turn it off soon. At the same time, we have downstream users of the compiler infrastructure that get confused by having extra `throw` calls inserted into functions that (post-#43852) were inferred as `:nothrow`. Here we add an optimization param (defaulted to on) to determine whether or not to insert the unionsplit fallback block. Because of the conservative default, we can decide later what the correct default is (maybe turn it on in `debug` mode?), while letting downstream consumers play with the setting for now to see if any issues crop up. 09 February 2022, 11:19:23 UTC
0bdf24f Move `reinterpret`-based optimization for complex matrix * real vec/mat to lower level. (#44052) 09 February 2022, 09:11:36 UTC
33a71b7 Allow negative `stride(A,2)` in `gemv!` (#42054) 09 February 2022, 09:00:55 UTC
a947fc7 Add a donotdelete builtin (#44036) In #43852 we noticed that the compiler is getting good enough to completely DCE a number of our benchmarks. We need to add some sort of mechanism to prevent the compiler from doing so. This adds just such an intrinsic. The intrinsic itself doesn't do anything, but it is considered effectful by our optimizer, preventing it from being DCE'd. At the LLVM level, it turns into call to an external varargs function. The docs for the new intrinsic are as follows: ``` donotdelete(args...) This function prevents dead-code elimination (DCE) of itself and any arguments passed to it, but is otherwise the lightest barrier possible. In particular, it is not a GC safepoint, does model an observable heap effect, does not expand to any code itself and may be re-ordered with respect to other side effects (though the total number of executions may not change). A useful model for this function is that it hashes all memory `reachable` from args and escapes this information through some observable side-channel that does not otherwise impact program behavior. Of course that's just a model. The function does nothing and returns `nothing`. This is intended for use in benchmarks that want to guarantee that `args` are actually computed. (Otherwise DCE may see that the result of the benchmark is unused and delete the entire benchmark code). **Note**: `donotdelete` does not affect constant foloding. For example, in `donotdelete(1+1)`, no add instruction needs to be executed at runtime and the code is semantically equivalent to `donotdelete(2).` *# Examples function loop() for i = 1:1000 # The complier must guarantee that there are 1000 program points (in the correct # order) at which the value of `i` is in a register, but has otherwise # total control over the program. donotdelete(i) end end ``` 09 February 2022, 06:36:07 UTC
2e2b1d2 Fixed inference on String causing invalidations in binaryplatform (#44084) 09 February 2022, 03:46:26 UTC
7ccc83e Add USDTs for the task runtime (#43453) Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com> 09 February 2022, 01:36:22 UTC
0639d0d 🤖 Bump the Pkg stdlib from 89517355 to c991ce0a (#44075) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 09 February 2022, 00:07:44 UTC
back to top