sort by:
Revision Author Date Message Commit Date
7735556 Name LLVM function arguments (#50500) This makes it easier to correlate LLVM IR with the originating source code by including both argument name and argument type in the LLVM argument variable. <details> <summary>Example 1</summary> ```julia julia> function f(a, b, c, d, g...) e = a + b + c + d f = does_not_exist(e) + e f end f (generic function with 1 method) julia> @code_llvm f(0,0,0,0,0) ``` ```llvm ; @ REPL[1]:1 within `f` define nonnull {}* @julia_f_141(i64 signext %"a::Int64", i64 signext %"b::Int64", i64 signext %"c::Int64", i64 signext %"d::Int64", i64 signext %"g[0]::Int64") #0 { top: %0 = alloca [2 x {}*], align 8 %gcframe3 = alloca [4 x {}*], align 16 %gcframe3.sub = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 0 %1 = bitcast [4 x {}*]* %gcframe3 to i8* call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 32, i1 true) %thread_ptr = call i8* asm "movq %fs:0, $0", "=r"() #7 %tls_ppgcstack = getelementptr i8, i8* %thread_ptr, i64 -8 %2 = bitcast i8* %tls_ppgcstack to {}**** %tls_pgcstack = load {}***, {}**** %2, align 8 ; @ REPL[1]:3 within `f` %3 = bitcast [4 x {}*]* %gcframe3 to i64* store i64 8, i64* %3, align 16 %4 = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 1 %5 = bitcast {}** %4 to {}*** %6 = load {}**, {}*** %tls_pgcstack, align 8 store {}** %6, {}*** %5, align 8 %7 = bitcast {}*** %tls_pgcstack to {}*** store {}** %gcframe3.sub, {}*** %7, align 8 %Main.does_not_exist.cached = load atomic {}*, {}** @0 unordered, align 8 %iscached.not = icmp eq {}* %Main.does_not_exist.cached, null br i1 %iscached.not, label %notfound, label %found notfound: ; preds = %top %Main.does_not_exist.found = call {}* @ijl_get_binding_or_error({}* nonnull inttoptr (i64 139831437630272 to {}*), {}* nonnull inttoptr (i64 139831600565400 to {}*)) store atomic {}* %Main.does_not_exist.found, {}** @0 release, align 8 br label %found found: ; preds = %notfound, %top %Main.does_not_exist = phi {}* [ %Main.does_not_exist.cached, %top ], [ %Main.does_not_exist.found, %notfound ] %8 = bitcast {}* %Main.does_not_exist to {}** %does_not_exist.checked = load atomic {}*, {}** %8 unordered, align 8 %.not = icmp eq {}* %does_not_exist.checked, null br i1 %.not, label %err, label %ok err: ; preds = %found call void @ijl_undefined_var_error({}* inttoptr (i64 139831600565400 to {}*)) unreachable ok: ; preds = %found %.sub = getelementptr inbounds [2 x {}*], [2 x {}*]* %0, i64 0, i64 0 ; @ REPL[1]:2 within `f` ; ┌ @ operators.jl:587 within `+` @ int.jl:87 %9 = add i64 %"b::Int64", %"a::Int64" %10 = add i64 %9, %"c::Int64" ; │ @ operators.jl:587 within `+` ; │┌ @ operators.jl:544 within `afoldl` ; ││┌ @ int.jl:87 within `+` %11 = add i64 %10, %"d::Int64" %12 = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 3 store {}* %does_not_exist.checked, {}** %12, align 8 ; └└└ ; @ REPL[1]:3 within `f` %13 = call nonnull {}* @ijl_box_int64(i64 signext %11) %14 = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 2 store {}* %13, {}** %14, align 16 store {}* %13, {}** %.sub, align 8 %15 = call nonnull {}* @ijl_apply_generic({}* nonnull %does_not_exist.checked, {}** nonnull %.sub, i32 1) store {}* %15, {}** %12, align 8 %16 = call nonnull {}* @ijl_box_int64(i64 signext %11) store {}* %16, {}** %14, align 16 store {}* %15, {}** %.sub, align 8 %17 = getelementptr inbounds [2 x {}*], [2 x {}*]* %0, i64 0, i64 1 store {}* %16, {}** %17, align 8 %18 = call nonnull {}* @ijl_apply_generic({}* inttoptr (i64 139831370516384 to {}*), {}** nonnull %.sub, i32 2) %19 = load {}*, {}** %4, align 8 %20 = bitcast {}*** %tls_pgcstack to {}** store {}* %19, {}** %20, align 8 ; @ REPL[1]:4 within `f` ret {}* %18 } ``` </details> <details> <summary>Example 2</summary> ```julia julia> function g(a, b, c, d; kwarg=0) a + b + c + d + kwarg end g (generic function with 1 method) julia> @code_llvm g(0,0,0,0,kwarg=0) ``` ```llvm ; @ REPL[3]:1 within `g` define i64 @julia_g_160([1 x i64]* nocapture noundef nonnull readonly align 8 dereferenceable(8) %"#1::NamedTuple", i64 signext %"a::Int64", i64 signext %"b::Int64", i64 signext %"c::Int64", i64 signext %"d::Int64") #0 { top: %0 = getelementptr inbounds [1 x i64], [1 x i64]* %"#1::NamedTuple", i64 0, i64 0 ; ┌ @ REPL[3]:2 within `#g#1` ; │┌ @ operators.jl:587 within `+` @ int.jl:87 %1 = add i64 %"b::Int64", %"a::Int64" %2 = add i64 %1, %"c::Int64" ; ││ @ operators.jl:587 within `+` ; ││┌ @ operators.jl:544 within `afoldl` ; │││┌ @ int.jl:87 within `+` %3 = add i64 %2, %"d::Int64" ; │││└ ; │││ @ operators.jl:545 within `afoldl` ; │││┌ @ int.jl:87 within `+` %unbox = load i64, i64* %0, align 8 %4 = add i64 %3, %unbox ; └└└└ ret i64 %4 } ``` </details> 15 July 2023, 15:36:26 UTC
f15eb4e Make `Broadcast.flatten(bc).f` more complier frendly. (better inferred and inlined) (#43322) A follow up attemp to fix #27988. (close #47493 close #50554) Examples: ```julia julia> using LazyArrays julia> bc = @~ @. 1*(1 + 1) + 1*1; julia> bc2 = @~ 1 .* 1 .- 1 .* 1 .^2 .+ 1 .* 1 .+ 1 .^ 3; ``` On master: <details><summary> click for details </summary> <p> ```julia julia> @code_typed Broadcast.flatten(bc).f(1,1,1,1,1) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 4)::Int64 │ %5 = Core.getfield(args, 5)::Int64 │ %6 = invoke Base.Broadcast.var"#13#14"{Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(+)}}(Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(+)}(Base.Broadcast.var"#15#17"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"())), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), +))(%1::Int64, %2::Int64, %3::Vararg{Int64}, %4, %5)::Tuple{Int64, Int64, Vararg{Int64}} │ %7 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %6)::Tuple{Int64, Int64} │ %8 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %6)::Tuple{Vararg{Int64}} │ %9 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#16#18"{Base.Broadcast.var"#9#11", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(*)}(Base.Broadcast.var"#9#11"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"())), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), *), %8)::Tuple{Int64} │ %10 = Core.getfield(%7, 1)::Int64 │ %11 = Core.getfield(%7, 2)::Int64 │ %12 = Base.mul_int(%10, %11)::Int64 │ %13 = Core.getfield(%9, 1)::Int64 │ %14 = Base.add_int(%12, %13)::Int64 └── return %14 ) => Int64 julia> @code_typed Broadcast.flatten(bc2).f(1,1,1,^,1,Val(2),1,1,^,1,Val(3)) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 5)::Int64 │ %5 = Core.getfield(args, 7)::Int64 │ %6 = Core.getfield(args, 8)::Int64 │ %7 = Core.getfield(args, 10)::Int64 │ %8 = invoke Base.Broadcast.var"#13#14"{Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}, typeof(Base.literal_pow)}}(Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}, typeof(Base.literal_pow)}(Base.Broadcast.var"#15#17"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"()))), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"()))), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"()))), Base.literal_pow))(%3::Int64, ^::Function, %4::Vararg{Any}, $(QuoteNode(Val{2}())), %5, %6, ^, %7, $(QuoteNode(Val{3}())))::Tuple{Int64, Any, Vararg{Any}} │ %9 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %8)::Tuple{Int64, Any} │ %10 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %8)::Tuple │ %11 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#15#17"(), %10)::Tuple │ %12 = Core.getfield(%9, 1)::Int64 │ %13 = Core.getfield(%9, 2)::Any │ %14 = (*)(%12, %13)::Any │ %15 = Core.tuple(%14)::Tuple{Any} │ %16 = Core._apply_iterate(Base.iterate, Core.tuple, %15, %11)::Tuple{Any, Vararg{Any}} │ %17 = Base.mul_int(%1, %2)::Int64 │ %18 = Core.tuple(%17)::Tuple{Int64} │ %19 = Core._apply_iterate(Base.iterate, Core.tuple, %18, %16)::Tuple{Int64, Any, Vararg{Any}} │ %20 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %19)::Tuple{Int64, Any} │ %21 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %19)::Tuple │ %22 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(*)}(Base.Broadcast.var"#15#17"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"())), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), *), %21)::Tuple{Any, Vararg{Any}} │ %23 = Core.getfield(%20, 1)::Int64 │ %24 = Core.getfield(%20, 2)::Any │ %25 = (-)(%23, %24)::Any │ %26 = Core.tuple(%25)::Tuple{Any} │ %27 = Core._apply_iterate(Base.iterate, Core.tuple, %26, %22)::Tuple{Any, Any, Vararg{Any}} │ %28 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %27)::Tuple{Any, Any} │ %29 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %27)::Tuple │ %30 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#16#18"{Base.Broadcast.var"#9#11", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}, typeof(Base.literal_pow)}(Base.Broadcast.var"#9#11"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"()))), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"()))), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"()))), Base.literal_pow), %29)::Tuple{Any} │ %31 = Core.getfield(%28, 1)::Any │ %32 = Core.getfield(%28, 2)::Any │ %33 = (+)(%31, %32)::Any │ %34 = Core.getfield(%30, 1)::Any │ %35 = (+)(%33, %34)::Any └── return %35 ) => Any ``` </p> </details> On this PR ```julia julia> @code_typed Broadcast.flatten(bc).f(1,1,1,1,1) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 4)::Int64 │ %5 = Core.getfield(args, 5)::Int64 │ %6 = Base.add_int(%2, %3)::Int64 │ %7 = Base.mul_int(%1, %6)::Int64 │ %8 = Base.mul_int(%4, %5)::Int64 │ %9 = Base.add_int(%7, %8)::Int64 └── return %9 ) => Int64 julia> @code_typed Broadcast.flatten(bc2).f(1,1,1,^,1,Val(2),1,1,^,1,Val(3)) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 5)::Int64 │ %5 = Core.getfield(args, 7)::Int64 │ %6 = Core.getfield(args, 8)::Int64 │ %7 = Core.getfield(args, 10)::Int64 │ %8 = Base.mul_int(%1, %2)::Int64 │ %9 = Base.mul_int(%4, %4)::Int64 │ %10 = Base.mul_int(%3, %9)::Int64 │ %11 = Base.sub_int(%8, %10)::Int64 │ %12 = Base.mul_int(%5, %6)::Int64 │ %13 = Base.add_int(%11, %12)::Int64 │ %14 = Base.mul_int(%7, %7)::Int64 │ %15 = Base.mul_int(%14, %7)::Int64 │ %16 = Base.add_int(%13, %15)::Int64 └── return %16 ) => Int64 ``` 15 July 2023, 12:40:08 UTC
d406c7e make flattened `Broadcasted` more compiler friendly. 1. make `cat_nested` better inferred by switching to direct self-recursion. 2. `make_makeargs` now create a tuple of functions which take in the whole argument list and return the corresponding input for the broadcasted function. 15 July 2023, 02:11:49 UTC
22ac24a Remove mentions of “home project” in documentation and output (#50527) The concept of “home project” was removed in #36434. 14 July 2023, 21:33:45 UTC
ae08077 improve some assertions in base/compiler/ssair/passes.jl (#50547) 14 July 2023, 15:18:15 UTC
b9da60f improve some assertions in base/compiler/ssair/passes.jl 14 July 2023, 09:17:05 UTC
7662661 gf: remove unnecessary assert cycle==depth (#50542) We do not care about this condition (the point of this fast path is to skip checking it). Fix #50450 14 July 2023, 06:48:53 UTC
15bcf1b gf: remove unnecessary assert cycle==depth We do not care about this condition (the point of this fast path is to skip checking it). Fix #50450 13 July 2023, 21:01:33 UTC
fabc519 gc: remove over-eager assertion (#50540) Fixes #50451. Fortunately, this wasn't anything more than an unnecessary assertion. 13 July 2023, 20:51:28 UTC
5a922fa improve cat design / performance (#49322) This used to make a lot of references to design issues with the SparseArrays package (https://github.com/JuliaLang/julia/issues/2326 / https://github.com/JuliaLang/julia/pull/20815), which result in a non-sensical dispatch arrangement, and contribute to a slow loading experience do to the nonsense Unions that must be checked by subtyping. 13 July 2023, 18:24:30 UTC
f4f1ecf gc: remove over-eager assertion Fixes #50451 13 July 2023, 18:16:13 UTC
dcca46b gc: fix conservative GC support (#50533) Ensure `internal_obj_base_ptr` checks whether objects past freelist pointer are in freelist. Fixes #50434 13 July 2023, 17:24:32 UTC
1a7fb51 Use `oneto` in CartesianIndices when given sizes (#50534) 13 July 2023, 17:21:35 UTC
cdec4c2 ssair: Correctly handle stmt insertion at end of basic block (#50528) In the presence of `attach_after` insertions, we have to be careful to extend the basic block to include everything up to the last insertion. We were accounting for "new" nodes (before the compaction point), but not "pending" nodes (after the compaction point). Fixes https://github.com/JuliaLang/julia/issues/50379. 13 July 2023, 15:54:09 UTC
9091cb0 cleanups to copyuntil (#50485) * remove duplicate readuntil(s::IO, delim::UInt8) method, some cleanup * more conservative ensureroom in copyuntil * whoops * tweak * test fallbacks 13 July 2023, 11:58:56 UTC
9b73611 SROA: don't use `unswitchtupleunion` and explicitly use type name only (#50522) Since construction of `UnionAll` of `Union`s can be expensive. The SROA pass just needs to look at type name information and do not need to propagate full type objects. - xref: <https://github.com/JuliaLang/julia/pull/50511#issuecomment-1632384357> - closes #50511 13 July 2023, 07:50:15 UTC
824cdf1 Merge pull request #50525 from oscardssmith/fix-generic_lu_fact-check=false only check that values are finite in `generic_lufact` when `check=true` 13 July 2023, 03:50:40 UTC
2984f9c Couple of extra comments 13 July 2023, 02:39:38 UTC
9122376 remove unnecessary `::REPLDisplay == ::REPLDisplay` method (#50520) 13 July 2023, 02:34:50 UTC
6ef6a0c typo 12 July 2023, 20:45:31 UTC
66f9f9c Remove mentions of “home project” in documentation and output The concept of “home project” was removed in #36434. 12 July 2023, 19:36:24 UTC
bfbff0f add tests 12 July 2023, 19:33:25 UTC
1c71fda only check that values are finite when check=true 12 July 2023, 19:25:32 UTC
9f62658 Address review comments 12 July 2023, 14:53:57 UTC
4995d3f REPLCompletions: allow field completions for `Union` results (#50503) This generalizes the idea of #50483 and enables field completions when the result type is inferred to be `Union{A,B}` where `A` is not necessarily the same type as `B`. 12 July 2023, 06:09:15 UTC
e64d201 fix typo in the --gcthreads argument description (#50461) 12 July 2023, 02:36:22 UTC
5baaafd Rework introduction to SSA-IR in dev docs (#49796) Primary authorship credits for this go to Oscar Smith. This reworks the introduction to the SSA-IR section of the manual to give a brief introduction to SSA to prepare the reader with a short example. We also rework the Background and IR Node types sections. Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 11 July 2023, 19:32:47 UTC
5a33c70 Clarify definition of cyclic permutation in randcycle docstring (#50487) 11 July 2023, 18:57:16 UTC
3995278 SROA: generalize `unswitchtupleunion` optimization (#50502) This commit improves SROA pass by extending the `unswitchtupleunion` optimization to handle the general parametric types, e.g.: ```julia julia> struct A{T} x::T end; julia> function foo(a1, a2, c) t = c ? A(a1) : A(a2) return getfield(t, :x) end; julia> only(Base.code_ircode(foo, (Int,Float64,Bool); optimize_until="SROA")) ``` > Before ``` 2 1 ─ goto #3 if not _4 │ 2 ─ %2 = %new(A{Int64}, _2)::A{Int64} │╻ A └── goto #4 │ 3 ─ %4 = %new(A{Float64}, _3)::A{Float64} │╻ A 4 ┄ %5 = φ (#2 => %2, #3 => %4)::Union{A{Float64}, A{Int64}} │ 3 │ %6 = Main.getfield(%5, :x)::Union{Float64, Int64} │ └── return %6 │ => Union{Float64, Int64} ``` > After ``` julia> only(Base.code_ircode(foo, (Int,Float64,Bool); optimize_until="SROA")) 2 1 ─ goto #3 if not _4 │ 2 ─ nothing::A{Int64} │╻ A └── goto #4 │ 3 ─ nothing::A{Float64} │╻ A 4 ┄ %8 = φ (#2 => _2, #3 => _3)::Union{Float64, Int64} │ │ nothing::Union{A{Float64}, A{Int64}} 3 │ %6 = %8::Union{Float64, Int64} │ └── return %6 │ => Union{Float64, Int64} ``` 11 July 2023, 17:53:28 UTC
39638cf Minor fixes 11 July 2023, 17:26:23 UTC
cab1fe3 Fix some test issues 11 July 2023, 15:13:26 UTC
0f6bfd6 Profile: Add specifying dir for `take_heap_snapshot` and handling if current dir is unwritable (#50476) Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> 11 July 2023, 12:33:41 UTC
2d4d096 unify `shuffle` and `randperm` (#50318) 11 July 2023, 07:22:55 UTC
680e3b3 REPLCompletions: unswitch `Union` of same `UnionAll` results (#50483) With this commit the inference-base REPL completion algorithm converts `Union` result of same `UnionAll` instances to `UnionAll` of `Union`s so that it can use the field information of the `UnionAll`. This allows us to get completions for cases like: ```julia julia> union_somes() = rand() < 0.5 ? Some(1) : Some(2.); julia> union_somes().| # completes to `value` ``` 11 July 2023, 04:57:30 UTC
25eeba4 🤖 [master] Bump the Pkg stdlib from e8197dd0e to 80e64bcd3 (#50501) 11 July 2023, 03:51:26 UTC
3a36e1a sroa: Don't use unwrapped type for type constraint (#50499) In SROA, when we lift getfields over branches (ifelse or phi), we try to exclude branches that we know to not contribute by their types. However, we were incorrectly using the `unwrap_unionall`'ed version of the type. Type intersection has a bunch of fallbacks for free typevars, but the results are not necessarily correct (e.g. in the test case where `hasintersect(Wrap1{Wrap{Int}}, Wrap1{Wrap{T}})` gives false). We should ideally get around to just making type-quries for things with free typevars an error, but for now, just fix the particular issue in sroa, by using the non-unwrapped type. 11 July 2023, 02:59:50 UTC
b26f3b2 Update SparseArrays.jl stdlib for SuiteSparse 7 (#48977) * Use SparseArrays.jl updated to work with SuiteSparse 7, and with Int32 indices * SuiteSparse_jll Update to v7.2.0 (Using @Wimmerer's SuiteSparse fork for 32-bit QR) --------- Co-authored-by: Francois-Xavier Coudert <fxcoudert@gmail.com> Co-authored-by: Will Kimmerer <kimmerer@mit.edu> 11 July 2023, 01:01:40 UTC
39aff78 Name LLVM function arguments 11 July 2023, 00:24:23 UTC
a134076 Revise sort.md and docstrings in sort.jl (#48363) Co-authored-by: Jeremie Knuesel <knuesel@gmail.com> 10 July 2023, 22:30:48 UTC
8dd58a4 whitespace fix in randcycle (#50493) 10 July 2023, 16:45:27 UTC
e2e34f6 correction in `Base.isassigned` with `Tridiagonal` boundscheck error (#50488) See https://github.com/JuliaLang/julia/pull/49827#discussion_r1252566082 10 July 2023, 14:21:37 UTC
db6193c doc: add spaces after commas in some function calls (#50478) 10 July 2023, 12:22:02 UTC
7530a63 Clarify compat note in randcycle (#50482) 10 July 2023, 11:46:54 UTC
4051769 clarify documentation for r"..."x mode (#50462) 10 July 2023, 10:17:48 UTC
206e59a Fix compat annotation for italic printstyled (#50490) 10 July 2023, 10:16:28 UTC
7b435d0 Fix minor typos in comments / docs (#50489) 10 July 2023, 10:15:23 UTC
8e877cb relax assertion involving pg->nold to reflect that it may be a bit inaccurate with parallel marking (#50466) 10 July 2023, 00:40:14 UTC
84ef74f minor cleanup on `Core.Compiler.type_annotate!` (#50484) 10 July 2023, 00:39:01 UTC
7c80589 maximum is for array reduction, not max. (#50481) 09 July 2023, 19:17:01 UTC
fe2eead Document llvm passes in more depth (#50319) 09 July 2023, 14:12:08 UTC
236c23b docs: Fix a `!!! note` which was miscapitalized (#50474) 08 July 2023, 19:54:20 UTC
2e0e3d5 report if task has started in show method (#50464) 08 July 2023, 17:32:07 UTC
d60f9b3 Refactor and pass correct interpreter to typeinf finish loop (#50469) When we have an inference loop with different interpreters, the current code was trying to cache everything with the top level interpreter of the loop, yielding some unexpected behavior. I don't think that it's necessarily super well defined what should happen here, as it depends on the interpreters, in question, but I think it's better to try to cache each frame with the interpreter that created it, since they may have different lattices, etc. Doing this fixes an error I saw downstream that had just such a situation. --------- Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 08 July 2023, 06:52:22 UTC
e20274f Remove FATAL_TYPE_BOUND_ERROR (#50465) 08 July 2023, 02:34:18 UTC
085c3d1 Make `(1:3:4)[6148914691236517207]` throw (#50118) 07 July 2023, 22:16:25 UTC
a660798 Improve documentation of sort-related functions (#48387) * document the `order` keyword in `sort!` * list explicitly the required properties of `lt` in `sort!` * clarify the sequence of "by" transformations if both `by` and `order` are given * show default values in the signatures for `searchsorted` and related functions * note that `by` is also applied to searched value in `searchsorted` and related * add `isunordered` to the manual (it's already exported) --------- Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com> 07 July 2023, 22:14:40 UTC
b99f251 Merge new `reinterpret` with essentials.jl `reinterpret` (#50367) 07 July 2023, 19:11:29 UTC
930838b Add exports to `Example` module for the test workflow in the docs (#50459) The tests are not supposed to work if the toy module `Example` does not export its functions See https://discourse.julialang.org/t/workflow-for-testing-packages/101305 07 July 2023, 17:59:39 UTC
21bb0c7 Remove union penalties for inlining cost (#50429) I added this code back in #27057, when I first made Union-full signatures inlineable. The justification was to try to encourage the union splitting to happen on the outside. However (and I believe this changed since this code was introduced), these days inference is in complete control of union splitting and we do not take inlineability or non-inlineability of the non-unionsplit function into account when deciding how to inline. As a result, the only effect of the union split penalties was to prevent inlining of functions that are not union-split eligible (e.g. `+(::Vararg{Union{Int, Missing}, 3})`), but are nevertheless cheap by our inlining metric. There is really no reason not to try to inline such functions, so delete this logic. 07 July 2023, 15:43:52 UTC
0718995 Optimize getfield lowering to avoid boxing in some cases (#50444) 07 July 2023, 14:55:56 UTC
4cce2a2 Add some documentation about ahead of time compilation mechanics (#50376) 07 July 2023, 13:34:55 UTC
d9ad6d2 docs: fix link in `AbstractString` docstring (#50436) 06 July 2023, 22:23:35 UTC
2a406b2 Add pattern matching for `typeof` into field type tparam (#50422) * Add pattern matching for `typeof` into field type tparam This PR allows full elimination of the following, even in ill-typed code. ``` struct TParamTypeofTest{T} x::T @eval TParamTypeofTest(x) = $(Expr(:new, :(TParamTypeofTest{typeof(x)}), :x)) end function tparam_typeof_test_elim(x) TParamTypeofTest(x).x end ``` Before this PR, we would get: ``` julia> code_typed(tparam_typeof_test_elim, Tuple{Any}) 1-element Vector{Any}: CodeInfo( 1 ─ %1 = Main.typeof(x)::DataType │ %2 = Core.apply_type(Main.TParamTypeofTest, %1)::Type{TParamTypeofTest{_A}} where _A │ %new(%2, x)::TParamTypeofTest └── return x ``` Where the `new` is non-eliminable, because the compiler did not know that `x::_A`. Fix this by pattern matching this particular pattern (where the condition is guaranteed, because we computed `_A` by `typeof`). This is not particularly general, but this pattern comes up a lot, so it's surprisingly effective. * add test case for optimizing multiple abstract fields * improve robustness --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 06 July 2023, 21:20:40 UTC
46477cc Delete `trust_inference` option (#50432) * Flip trust_inference option I think the time has come to flip this. This was added when the type system was much less reliable at producing intersections. It is true that we still have the occasional type sytem bug, but we're already trusting inference in a bunch of other places. At the same time, the cost of this has grown in terms of bloated IR needing to be visited in places like irinterp, so let's flip the bit and we'll deal with type system bugs the way we usually due. * refactor to remove trust_inference entirely --------- Co-authored-by: oscarddssmith <oscar.smith@juliacomputing.com> 06 July 2023, 21:18:59 UTC
c09efd9 More consistent findall output type (take 2) (#48976) Fixup for #45538 Helps with #45495 06 July 2023, 20:42:14 UTC
6d44707 retrieve `splice!` item via `only` rather than `getindex` (#50430) Because `only` uses iteration, similar to the other branches here, rather than assuming it supports one-based-indexing. 06 July 2023, 20:36:37 UTC
b6bfe98 Define `Base.isstored` for Diagonals and Triangular matrices (#50391) X-ref #50377 06 July 2023, 20:05:43 UTC
c14d4bb copyuntil(out::IO, in::IO, delim) (#48273) Note that this defines the lock order as `out` then `in` for streams which may try to take both locks. This is now a mandatory API convention for all future streams. Co-authored-by: Rafael Fourquet <fourquet.rafael@gmail.com> 06 July 2023, 19:50:32 UTC
64ab537 Add GC metric `last_incremental_sweep` (#50190) * Add GC metric `last_incremental_sweep` * Update gc.c * Update gc.c 06 July 2023, 18:45:02 UTC
feb2988 remove type parameter from AbstractTriangular (#26307) Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 06 July 2023, 08:41:15 UTC
77ce343 Fix some inference checks in reduce tests (#50437) 06 July 2023, 08:31:12 UTC
5579566 Add paragraph on abstract `Function` fields to performance tips (#50421) Co-authored-by: Steven G. Johnson <stevenj@mit.edu> 06 July 2023, 08:01:18 UTC
0b54ded avoid potential type-instability in _replace_(str, ...) (#50424) 06 July 2023, 07:58:09 UTC
2360140 Merge pull request #50428 from JuliaLang/kf/divinlinecost Lower inlining cost of floating point div 06 July 2023, 00:08:45 UTC
c09a199 update halfpages pointer after actually sweeping pages (#50387) 05 July 2023, 20:33:43 UTC
8d62b40 Lower inlining cost of floating point div Our inlining cost model is extremely primitive, though surprisingly functional given its limitations. The basic idea for it was just that we'd give every intrinsic the approximate cost in cycles, such that for sufficiently large functions (>100 cycles), the cost of the extra call would be dwarfed by the cost of the function. However, there's a few problems with this. For one, the real issue is usually not the extra overhead of the call (which is small and well-predicated), but rather the inhibition of optimizations that inlining might have allowed. Additionally, the relevant cost comparison is not generally latency, but rather the size of the resulting binary. Lastly, the latency metric is misleading on modern superscalar architectures, because the core will perform other tasks while the operation is executing. In fact, somewhat counter-intuitively, this means that it is *more* important to inline high-latency instructions to allow the compiler to perform better latency hiding by spreading out the high-latency instructions. We probably need a full-on rethink of the inlining model at some point, but for the time being, this fixes a problem that I ran into in real code by reducing the inlining cost for floating point division to be the same as that of floating point multiplication. The particular case where I saw this was the batched forward AD rule for division, which had 6 calls to div_float. Inlining these provided substantially better performance. 05 July 2023, 20:28:32 UTC
23c0418 gc: fix time unit in jl_print_gc_stats (#50417) 05 July 2023, 13:30:42 UTC
435c1c1 Add CPU feature helper function (#50402) 05 July 2023, 11:32:13 UTC
fcb3110 REPL/latex_symbols: define commands for « and » (#50399) The new commands are \guillemotleft and \guillemotright, respectively. These commands are in line with the corresponding commands defined in the LaTeΧ package csquotes. Co-authored-by: Steven G. Johnson <stevenj@mit.edu> 05 July 2023, 11:03:10 UTC
fb2ceea enhance Timer call taking callback to accept any `timeout` arg and kwargs (#50027) 05 July 2023, 10:54:03 UTC
929a845 Docs: Windows build devdocs clean up (#49760) 05 July 2023, 10:22:33 UTC
877b368 Use tempdir() to store heap snapshot files instead of abspatch ~= rootdir (#50026) 05 July 2023, 10:16:01 UTC
7e3c706 Check input expresion in numbered prompt (#50064) 05 July 2023, 10:12:43 UTC
e025877 Remove dynamic dispatch from _wait/wait2 (#50202) Co-authored-by: Gabriel Baraldi <baraldigabriel@gmail.com> 05 July 2023, 10:11:13 UTC
1279de6 fix conversion of empty `Dates.CompoundPeriod()` to zero units (#50259) * fix(stdlib/Dates/periods.jl): conversion of empty CompoundPeriod to zero units * add(stdlib/Dates/test/periods.jl): add test for empty CompoundPeriod 05 July 2023, 10:10:08 UTC
63fefe0 Add devdocs/jit.md to the menu (#50310) Added in https://github.com/JuliaLang/julia/pull/50168 05 July 2023, 10:09:10 UTC
d70ee20 Fix weird dispatch of * with zero arguments (#50411) 05 July 2023, 10:06:41 UTC
7fc8646 Extend ifelse lifting to regular SROA (#50403) * Extend ifelse lifting to regular SROA * Fix oracle violation This is a pre-existing bug, but was exposed by my improvements to SROA. 04 July 2023, 15:10:54 UTC
02272f0 allow `show_tuple_as_call` to be used for abstract call signature (#50398) 04 July 2023, 04:59:29 UTC
ce1b420 add replace(io, str, patterns...) (#48625) 03 July 2023, 18:27:12 UTC
8a4ab11 Set `VERSION` to `1.11.0-DEV` (#50314) * Set `VERSION` to `1.11.0-DEV` * move NEWS to HISTORY Co-authored-by: KristofferC <kristoffer.carlsson@juliacomputing.com> 03 July 2023, 11:48:00 UTC
0ba6ec2 Restore link to list of packages in Base docs (#50353) This link used to exist in the docs up to v0.2, but it was removed in e91294f47516787ac8648f59e6c6f1abb9e47557 as it was pointing to a doc page that was removed in ef0c44d0fa865a38aefc26b138367ba6c0b4cda5. This change restores the link in the original place, pointing to the up-to-date location. 03 July 2023, 09:20:58 UTC
43bf2c8 ensure GC_FINAL_STATS is consistent with new page metadata layout (#50374) * ensure GC_FINAL_STATS is consistent with new page metadata layout 02 July 2023, 22:27:41 UTC
ecca2c5 Expose PassBuilder callback registration via C api (#50390) 02 July 2023, 13:10:38 UTC
6336f68 🤖 [master] Bump the Pkg stdlib from 4de1826bc to e8197dd0e (#50388) 02 July 2023, 11:00:42 UTC
36e188f Parse pass options in opt/PassBuilder (#50383) 01 July 2023, 22:40:56 UTC
27e21c8 `hvncat`: Added inbounds annotations that improve performance (#41200) * Added judicious inbounds/inline decorations * add inline to other one * bump * grammar Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com> * Remove `@inline` * bump CI * bump CI 2 * Merge fix * Ensure `hvncat_fill!` can't execute when N < 2 * Bounds check in three-arg `hvncat_fill!` * Narrow inbounds * Moved bounds check up --------- Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com> 01 July 2023, 12:01:49 UTC
36a39b0 add note to CONTRIBUTING.md about making issues and PR names self explanatory (#50370) 01 July 2023, 10:08:38 UTC
a40dec1 sroa: Mark dead setfields as EFFECT_FREE (#50373) sroa tries to delete any `setfield!` call for allocations that it knows it can remove. However, if it does not know that the type is correct for the allocation, it may not be able to remove the setfield!. If the type later gets improved (e.g. by irinterp), the statement becomes eligible for removal, but it currently requires another sroa pass to actually remove it. Improve that situation my marking such a statement that is known-dead as IR_FLAG_EFFECT_FREE, so if we later also prove it nothrow, it (and the corresponding allocation) immediately become DCE-eligible. 30 June 2023, 21:37:06 UTC
196a5b4 use a single uv_cond_t to coordinate wakeup of GC threads (#50339) * Should avoid going to the kernel multiple times to wake GC threads up. 30 June 2023, 18:45:09 UTC
back to top