Closed ChenNingCong closed 1 year ago
The underlying issue is #15276 @aviatesk you have been looking with JET.jl at the base inference code, did JET catch this?
It does (see captured variable sv_method2 detected
, e.g., although it's still tricky to figure out them from these bunch of "problems")
julia> versioninfo()
Julia Version 1.8.0-DEV.1145
Commit a9579537aa (2021-12-17 06:39 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin21.1.0)
CPU: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, icelake-client)
Environment:
JULIA_PROJECT = @.
JULIA_EDITOR = code
JULIA_PKG_DEVDIR = /Users/aviatesk/julia/packages
julia> using JET
julia> function function_filter(@nospecialize(ft))
ft === typeof(Core.Compiler.widenconst) && return false
ft === typeof(Core.Compiler.widenconditional) && return false
ft === typeof(Core.Compiler.ignorelimited) && return false
ft === typeof(Core.Compiler.rewrap_unionall) && return false
ft === typeof(Core.Compiler.unwrapva) && return false
return true
end
function_filter (generic function with 1 method)
julia> report_opt(Core.Compiler.abstract_eval_statement, (CC.NativeInterpreter, Expr, CC.VarTable, CC.InferenceState); function_filter)
═════ 168 possible errors found ═════
┌ @ compiler/abstractinterpretation.jl:1648 callinfo = Core.Compiler.abstract_call(interp, Core.Compiler.ArgInfo(ea, argtypes), sv)
│┌ @ compiler/abstractinterpretation.jl:1634 rt = Core.Compiler.tmerge(rt, Core.Compiler.abstract_eval_special_value(interp, val, vtypes, sv))
││┌ @ compiler/typelimits.jl:313 suba = Core.Compiler.⊑(typea, typeb)
│││┌ @ compiler/typelattice.jl:172 Core.Compiler.issubconditional(%63, %64)
││││ runtime dispatch detected: Core.Compiler.issubconditional(%63::Union{Core.Compiler.Conditional, Core.InterConditional}, %64::Union{Core.Compiler.Conditional, Core.InterConditional})
│││└───────────────────────────────
││┌ @ compiler/typelimits.jl:314 Core.Compiler.issimpleenoughtype(typeb)
│││┌ @ compiler/typelimits.jl:302 Core.Compiler.unionlen(t)
││││┌ @ reflection.jl:886 Core.Compiler.unionlen(%1)
│││││ runtime dispatch detected: Core.Compiler.unionlen(%1::Any)
││││└─────────────────────
││││┌ @ reflection.jl:886 Core.Compiler.unionlen(%3)
│││││ runtime dispatch detected: Core.Compiler.unionlen(%3::Any)
││││└─────────────────────
│││┌ @ compiler/typelimits.jl:302 Core.Compiler.union_count_abstract(t)
││││┌ @ compiler/typelimits.jl:297 Core.Compiler.union_count_abstract(%1)
│││││ runtime dispatch detected: Core.Compiler.union_count_abstract(%1::Any)
││││└──────────────────────────────
││││┌ @ compiler/typelimits.jl:297 Core.Compiler.union_count_abstract(%3)
│││││ runtime dispatch detected: Core.Compiler.union_count_abstract(%3::Any)
││││└──────────────────────────────
│││┌ @ compiler/typelimits.jl:302 Core.Compiler.unionlen(%8)
││││ runtime dispatch detected: Core.Compiler.unionlen(%8::Any)
│││└──────────────────────────────
│││┌ @ compiler/typelimits.jl:302 Core.Compiler.union_count_abstract(%8)
││││ runtime dispatch detected: Core.Compiler.union_count_abstract(%8::Any)
│││└──────────────────────────────
│││┌ @ compiler/typelimits.jl:302 Core.Compiler.unioncomplexity(%8)
││││ runtime dispatch detected: Core.Compiler.unioncomplexity(%8::Any)
│││└──────────────────────────────
│││┌ @ compiler/typelimits.jl:302 Core.Compiler.<=(%30, Core.Compiler.MAX_TYPEUNION_COMPLEXITY)
││││ runtime dispatch detected: Core.Compiler.<=(%30::Any, Core.Compiler.MAX_TYPEUNION_COMPLEXITY)
│││└──────────────────────────────
││┌ @ compiler/typelimits.jl:445 Core.Compiler._uniontypes(typea, types)
│││┌ @ reflection.jl:889 Core.Compiler._uniontypes(%1, ts)
││││ runtime dispatch detected: Core.Compiler._uniontypes(%1::Any, ts::Vector{Any})
│││└─────────────────────
│││┌ @ reflection.jl:889 Core.Compiler._uniontypes(%3, ts)
││││ runtime dispatch detected: Core.Compiler._uniontypes(%3::Any, ts::Vector{Any})
│││└─────────────────────
││┌ @ compiler/typelimits.jl:482 widen = Core.Compiler.rewrap_unionall(Core.Compiler.rewrap_unionall(widen, ti), tj)
│││┌ @ essentials.jl:267 Core.Compiler.UnionAll(%6, %9)
││││ runtime dispatch detected: Core.Compiler.UnionAll(%6::TypeVar, %9::Any)
│││└─────────────────────
││┌ @ compiler/typelimits.jl:362 Core.Compiler.!=(%177, %182)
│││ runtime dispatch detected: Core.Compiler.!=(%177::Any, %182::Any)
││└──────────────────────────────
││┌ @ compiler/typelimits.jl:391 Core.Compiler.!=(%301, %306)
│││ runtime dispatch detected: Core.Compiler.!=(%301::Any, %306::Any)
││└──────────────────────────────
││┌ @ compiler/typelimits.jl:445 Core.Compiler._uniontypes(%819, %818)
│││ runtime dispatch detected: Core.Compiler._uniontypes(%819::Type, %818::Vector{Any})
││└──────────────────────────────
││┌ @ compiler/typelimits.jl:446 Core.Compiler._uniontypes(%821, %818)
│││ runtime dispatch detected: Core.Compiler._uniontypes(%821::Type, %818::Vector{Any})
││└──────────────────────────────
││┌ @ compiler/typelimits.jl:521 Core.Compiler.setindex!(%818, %1202, %1151)
│││ runtime dispatch detected: Core.Compiler.setindex!(%818::Vector{Any}, %1202::Union{Type{Tuple}, Type{Tuple{Vararg{Any, _A}}} where _A}, %1151::Int64)
││└──────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1709 t = Core.Compiler._opaque_closure_tfunc(Core.Compiler.getindex(argtypes, 1), Core.Compiler.getindex(argtypes, 2), Core.Compiler.getindex(argtypes, 3), Core.Compiler.getindex(argtypes, 4), Core.Compiler.getindex(argtypes, 5), Core.Compiler.getindex(argtypes, Core.Compiler.:(6, Core.Compiler.lastindex(argtypes))), Core.Compiler.getproperty(sv, :linfo))
││┌ @ compiler/tfuncs.jl:1517 Core.UnionAll(%18, %20)
│││ runtime dispatch detected: Core.UnionAll(%18::TypeVar, %20::Type{Core.OpaqueClosure{_A, T}} where _A)
││└───────────────────────────
││┌ @ compiler/tfuncs.jl:1517 Core.UnionAll(%13, %22)
│││ runtime dispatch detected: Core.UnionAll(%13::TypeVar, %22::Any)
││└───────────────────────────
││┌ @ compiler/tfuncs.jl:1518 Core.Compiler.==(%10, %12)
│││ runtime dispatch detected: Core.Compiler.==(%10::Any, %12::Any)
││└───────────────────────────
││┌ @ compiler/tfuncs.jl:1518 Core.UnionAll(%28, %29)
│││ runtime dispatch detected: Core.UnionAll(%28::TypeVar, %29::Any)
││└───────────────────────────
││┌ @ compiler/tfuncs.jl:1523 Core.Compiler.PartialOpaque(%31, %52, %53, linfo, %54)
│││ runtime dispatch detected: Core.Compiler.PartialOpaque(%31::Any, %52::Any, %53::Any, linfo::Core.MethodInstance, %54::Any)
││└───────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1714 argtypes = Core.Compiler.most_general_argtypes(t)
││┌ @ compiler/abstractinterpretation.jl:1500 Core.Compiler.typename(Core.Compiler.Tuple)
│││ runtime dispatch detected: Core.Compiler.typename(Core.Compiler.Tuple)
││└───────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1724 t = Core.Compiler.sp_type_rewrap(Core.Compiler.getindex(Core.Compiler.getproperty(e, :args), 2), Core.Compiler.getproperty(sv, :linfo), true)
││┌ @ compiler/abstractinterpretation.jl:1555 Core.Compiler.UnionAll(%145, %142)
│││ runtime dispatch detected: Core.Compiler.UnionAll(%145::TypeVar, %142::Any)
││└───────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1948 newstate_else = Core.Compiler.stupdate!(Core.Compiler.getindex(states, l), changes_else)
││┌ @ compiler/typelattice.jl:347 Core.Compiler.widenwrappedconditional(%48)
│││ runtime dispatch detected: Core.Compiler.widenwrappedconditional(%48::Any)
││└───────────────────────────────
││┌ @ compiler/typelattice.jl:371 Core.Compiler.widenwrappedconditional(%53)
│││ runtime dispatch detected: Core.Compiler.widenwrappedconditional(%53::Any)
││└───────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1928 Core.Compiler.maybe_extract_const_bool(%273)
││ runtime dispatch detected: Core.Compiler.maybe_extract_const_bool(%273::Any)
│└───────────────────────────────────────────
│┌ @ compiler/typeinfer.jl:239 Core.Compiler.finish(caller, interp)
││┌ @ compiler/typeinfer.jl:432 Core.Compiler.append!(%108, %112)
│││ runtime dispatch detected: Core.Compiler.append!(%108::Vector{Any}, %112::Vector)
││└─────────────────────────────
│┌ @ compiler/typeinfer.jl:255 analyzed = Core.Compiler.optimize(interp, opt, Core.Compiler.OptimizationParams(interp), result_type)
││┌ @ compiler/optimize.jl:436 ir = Core.Compiler.run_passes(Core.Compiler.getproperty(opt, :src), opt)
│││┌ @ compiler/optimize.jl:441 ir = Core.Compiler.convert_to_ircode(ci, sv)
││││┌ @ compiler/optimize.jl:517 linetable = Core.Compiler.collect(Core.Compiler.LineInfoNode, Core.typeassert(linetable, Core.apply_type(Core.Compiler.Vector, Core.Compiler.Any)))
│││││┌ @ array.jl:644 Core.Compiler._collect(_, itr, Core.Compiler.IteratorSize(itr))
││││││┌ @ array.jl:646 Core.Compiler.copyto!(Core.Compiler._array_for(_, isz, Core.Compiler._similar_shape(itr, isz)), itr)
│││││││┌ @ array.jl:343 Core.Compiler.copyto!(dest, 1, src, 1, Core.Compiler.length(src))
││││││││┌ @ array.jl:317 Core.Compiler._copyto_impl!(dest, doffs, src, soffs, n)
│││││││││┌ @ array.jl:331 Core.Compiler.unsafe_copyto!(dest, doffs, src, soffs, n)
││││││││││┌ @ array.jl:307 Core.Compiler._unsafe_copyto!(dest, doffs, src, soffs, n)
│││││││││││┌ @ array.jl:261 Core.Compiler.setindex!(dest, %74, %76)
││││││││││││ runtime dispatch detected: Core.Compiler.setindex!(dest::Vector{Core.LineInfoNode}, %74::Any, %76::Int64)
│││││││││││└────────────────
│││││││││││┌ @ array.jl:253 Core.Compiler.setindex!(dest, %168, %170)
││││││││││││ runtime dispatch detected: Core.Compiler.setindex!(dest::Vector{Core.LineInfoNode}, %168::Any, %170::Int64)
│││││││││││└────────────────
│││┌ @ compiler/optimize.jl:442 ir = Core.Compiler.slot2reg(ir, ci, sv)
││││┌ @ compiler/optimize.jl:540 domtree = Core.Compiler.construct_domtree(Core.Compiler.getproperty(Core.Compiler.getproperty(ir, :cfg), :blocks))
│││││┌ @ compiler/ssair/domtree.jl:204 Core.Compiler.update_domtree!(blocks, Core.Compiler.DomTree(), true, 0)
││││││┌ @ compiler/ssair/domtree.jl:210 Core.Compiler.DFS!(Core.Compiler.getproperty(domtree, :dfs_tree), blocks)
│││││││┌ @ compiler/ssair/domtree.jl:113 Core.Compiler.copy!(D, Core.Compiler.DFSTree(Core.Compiler.length(blocks)))
││││││││┌ @ compiler/ssair/domtree.jl:102 Core.Compiler.copy!(Core.Compiler.getproperty(dst, :to_pre), Core.Compiler.getproperty(src, :to_pre))
│││││││││┌ @ abstractarray.jl:879 Core.Compiler.eachindex(dst, src)
││││││││││┌ @ abstractarray.jl:334 Core.Compiler.eachindex(Core.Compiler.IndexStyle(A, B), A, B)
│││││││││││┌ @ abstractarray.jl:345 %24(Core.Compiler.eachindex, B)
││││││││││││ runtime dispatch detected: %24::Any(Core.Compiler.eachindex, B::Tuple{Vector{Int64}})
│││││││││││└────────────────────────
│││││││││││┌ @ abstractarray.jl:345 %26(%25)
││││││││││││ runtime dispatch detected: %26::Any(%25::Any)
│││││││││││└────────────────────────
││││││││││┌ @ abstractarray.jl:345 %23(Core.Compiler.eachindex, %1)
│││││││││││ runtime dispatch detected: %23::Any(Core.Compiler.eachindex, %1::Tuple{Vector{Int64}})
││││││││││└────────────────────────
││││││││││┌ @ abstractarray.jl:345 %25(%24)
│││││││││││ runtime dispatch detected: %25::Any(%24::Any)
││││││││││└────────────────────────
│││││││││┌ @ abstractarray.jl:345 %73(Core.Compiler.eachindex, %52)
││││││││││ runtime dispatch detected: %73::Any(Core.Compiler.eachindex, %52::Tuple{Vector{Int64}})
│││││││││└────────────────────────
│││││││││┌ @ abstractarray.jl:345 %75(%74)
││││││││││ runtime dispatch detected: %75::Any(%74::Any)
│││││││││└────────────────────────
││││││┌ @ compiler/ssair/domtree.jl:218 Core.Compiler.compute_domtree_nodes!(domtree)
│││││││┌ @ compiler/ssair/domtree.jl:224 Core.Compiler.copy!(Core.Compiler.getproperty(domtree, :nodes), Core.Compiler._array_for(Core.Compiler.DomTreeNode, Core.Compiler.:(1, Core.Compiler.length(Core.Compiler.getproperty(domtree, :idoms_bb))), Core.Compiler.IteratorSize(Core.Compiler.:(1, Core.Compiler.length(Core.Compiler.getproperty(domtree, :idoms_bb))))))
││││││││┌ @ abstractarray.jl:879 Core.Compiler.eachindex(dst, src)
│││││││││┌ @ abstractarray.jl:334 Core.Compiler.eachindex(Core.Compiler.IndexStyle(A, B), A, B)
││││││││││┌ @ abstractarray.jl:345 %24(Core.Compiler.eachindex, B)
│││││││││││ runtime dispatch detected: %24::Any(Core.Compiler.eachindex, B::Tuple{Vector{Core.Compiler.DomTreeNode}})
││││││││││└────────────────────────
│││││││││┌ @ abstractarray.jl:345 %23(Core.Compiler.eachindex, %1)
││││││││││ runtime dispatch detected: %23::Any(Core.Compiler.eachindex, %1::Tuple{Vector{Core.Compiler.DomTreeNode}})
│││││││││└────────────────────────
││││││││┌ @ abstractarray.jl:345 %73(Core.Compiler.eachindex, %52)
│││││││││ runtime dispatch detected: %73::Any(Core.Compiler.eachindex, %52::Tuple{Vector{Core.Compiler.DomTreeNode}})
││││││││└────────────────────────
││││┌ @ compiler/optimize.jl:542 ir = Core.Compiler.construct_ssa!(ci, ir, domtree, defuse_insts, Core.Compiler.getproperty(sv, :slottypes))
│││││┌ @ compiler/ssair/slot2ssa.jl:652 Core.Compiler.insert_node!(ir, Core.Compiler.first_insert_for_bb(code, cfg, li), Core.Compiler.NewInstruction(node, Core.apply_type(Core.Compiler.Union)))
││││││┌ @ compiler/ssair/ir.jl:519 #self#(ir, pos, inst, false)
│││││││┌ @ compiler/ssair/ir.jl:523 Core.Compiler.stmt_effect_free(Core.Compiler.getproperty(inst, :stmt), Core.Compiler.getproperty(inst, :type), ir)
││││││││┌ @ compiler/optimize.jl:224 Core.Compiler._builtin_nothrow(f, Core.Compiler._array_for(Core.Compiler.Any, Core.Compiler.:(2, Core.Compiler.length(args)), Core.Compiler.IteratorSize(Core.Compiler.:(2, Core.Compiler.length(args)))), rt)
│││││││││┌ @ compiler/tfuncs.jl:1563 Core.Compiler.array_builtin_common_nothrow(argtypes, 4)
││││││││││┌ @ compiler/tfuncs.jl:1547 Core.Compiler.array_type_undefable(atype)
│││││││││││┌ @ compiler/tfuncs.jl:1534 Core.Compiler.isbitsunion(%42)
││││││││││││ runtime dispatch detected: Core.Compiler.isbitsunion(%42::Type)
│││││││││││└───────────────────────────
│││││││││┌ @ compiler/tfuncs.jl:1587 Core.Compiler.apply_type_nothrow(argtypes, rt)
││││││││││┌ @ compiler/tfuncs.jl:1248 Core.Compiler.valid_tparam_type(Core.Compiler.widenconst(ai))
│││││││││││┌ @ compiler/tfuncs.jl:1206 Core.Compiler.valid_tparam_type(%1)
││││││││││││ runtime dispatch detected: Core.Compiler.valid_tparam_type(%1::Any)
│││││││││││└───────────────────────────
│││││││││││┌ @ compiler/tfuncs.jl:1206 Core.Compiler.valid_tparam_type(%4)
││││││││││││ runtime dispatch detected: Core.Compiler.valid_tparam_type(%4::Any)
│││││││││││└───────────────────────────
│││││││││││┌ @ compiler/tfuncs.jl:1207 Core.Compiler.valid_tparam_type(%2)
││││││││││││ runtime dispatch detected: Core.Compiler.valid_tparam_type(%2::Any)
│││││││││││└───────────────────────────
││││││││││┌ @ compiler/tfuncs.jl:1248 Core.Compiler.valid_tparam_type(%329)
│││││││││││ runtime dispatch detected: Core.Compiler.valid_tparam_type(%329::Any)
││││││││││└───────────────────────────
││││││││││┌ @ compiler/tfuncs.jl:1235 Core.Compiler.getindex(%365, 1)
│││││││││││ runtime dispatch detected: Core.Compiler.getindex(%365::Any, 1)
││││││││││└───────────────────────────
│││││││││┌ @ compiler/tfuncs.jl:1569 Core.Compiler.getindex(%29, 1)
││││││││││ runtime dispatch detected: Core.Compiler.getindex(%29::Any, 1)
│││││││││└───────────────────────────
│││││┌ @ compiler/ssair/slot2ssa.jl:723 = Core.Compiler.typ_for_val(incoming_val, ci, Core.Compiler.getproperty(ir, :sptypes), -1, slottypes)
││││││┌ @ compiler/ssair/slot2ssa.jl:212 Core.Compiler.getindex(sptypes, %9)
│││││││ runtime dispatch detected: Core.Compiler.getindex(sptypes::Vector{Any}, %9::Any)
││││││└──────────────────────────────────
││││││┌ @ compiler/ssair/slot2ssa.jl:218 Core.Compiler.getindex(%26, idx)
│││││││ runtime dispatch detected: Core.Compiler.getindex(%26::Any, idx::Int64)
││││││└──────────────────────────────────
││││││┌ @ compiler/ssair/slot2ssa.jl:221 Core.Compiler.getindex(%52, %54)
│││││││ runtime dispatch detected: Core.Compiler.getindex(%52::Any, %54::Int64)
││││││└──────────────────────────────────
│││││┌ @ compiler/ssair/slot2ssa.jl:775 Core.Compiler.make_ssa!(ci, code, idx, id, typ)
││││││┌ @ compiler/ssair/slot2ssa.jl:70 Core.Compiler.setindex!(%20, typ, idx)
│││││││ runtime dispatch detected: Core.Compiler.setindex!(%20::Any, typ::Any, idx::Int64)
││││││└─────────────────────────────────
│││││┌ @ compiler/ssair/slot2ssa.jl:907 ir = Core.Compiler.domsort_ssa!(ir, domtree)
││││││┌ @ compiler/ssair/slot2ssa.jl:400 Core.Compiler.sort(Core.Compiler.filter(#357, cs))
│││││││┌ @ sort.jl:770 Core.Compiler.Sort.#sort#9(Core.Compiler.pairs(Core.NamedTuple()), #self#, v)
││││││││┌ @ sort.jl:770 Core.Compiler.Sort.sort!(Core.Compiler.Sort.copymutable(v))
│││││││││┌ @ sort.jl:711 Core.Compiler.Sort.#sort!#8(Core.Compiler.Sort.defalg(v), Core.Compiler.Sort.isless, Core.Compiler.Sort.identity, Core.Compiler.Sort.nothing, Core.Compiler.Sort.Forward, #self#, v)
││││││││││┌ @ sort.jl:719 Core.Compiler.Sort.sort_int_range!(v, rangelen, min, _21)
│││││││││││┌ @ sort.jl:735 %68(x)
││││││││││││ runtime dispatch detected: %68::Any(x::Vector{Int64})
│││││││││││└───────────────
│││││││││││┌ @ sort.jl:737 Core.Compiler.Sort.+(%89, %90)
││││││││││││ runtime dispatch detected: Core.Compiler.Sort.+(%89::Any, %90::Int64)
│││││││││││└───────────────
│││││││││││┌ @ sort.jl:737 Core.Compiler.Sort.-(%91, 1)
││││││││││││ runtime dispatch detected: Core.Compiler.Sort.-(%91::Any, 1)
│││││││││││└───────────────
│││││││││││┌ @ sort.jl:739 Core.Compiler.Sort.:(%89, %92)
││││││││││││ runtime dispatch detected: Core.Compiler.Sort.:(%89::Any, %92::Any)
│││││││││││└───────────────
│││││││││││┌ @ sort.jl:739 Core.Compiler.iterate(%94)
││││││││││││ runtime dispatch detected: Core.Compiler.iterate(%94::Any)
│││││││││││└───────────────
│││││││││││┌ @ sort.jl:740 Core.Compiler.setindex!(x, %93, %100)
││││││││││││ runtime dispatch detected: Core.Compiler.setindex!(x::Vector{Int64}, %93::Int64, %100::Any)
│││││││││││└───────────────
│││││││││││┌ @ sort.jl:741 Core.Compiler.iterate(%94, %101)
││││││││││││ runtime dispatch detected: Core.Compiler.iterate(%94::Any, %101::Any)
│││││││││││└───────────────
│││││││││││┌ @ sort.jl:742 Core.Compiler.Sort.+(%92, 1)
││││││││││││ runtime dispatch detected: Core.Compiler.Sort.+(%92::Any, 1)
│││││││││││└───────────────
│││┌ @ compiler/optimize.jl:445 ir = Core.Compiler.ssa_inlining_pass!(ir, Core.Compiler.getproperty(ir, :linetable), Core.Compiler.getproperty(sv, :inlining), Core.Compiler.getproperty(ci, :propagate_inbounds))
││││┌ @ compiler/ssair/inlining.jl:77 todo = Core.Compiler.assemble_inline_todo!(ir, state)
│││││┌ @ compiler/ssair/inlining.jl:1274 simpleres = Core.Compiler.process_simple!(ir, idx, state, todo)
││││││┌ @ compiler/ssair/inlining.jl:1074 sig = Core.Compiler.inline_apply!(ir, idx, stmt, sig, state, todo)
│││││││┌ @ compiler/ssair/inlining.jl:967 Core.Compiler.is_valid_type_for_apply_rewrite(Core.Compiler.getindex(argtypes, i), Core.Compiler.getproperty(state, :params))
││││││││┌ @ compiler/ssair/inlining.jl:859 Core.Compiler.length(%8)
│││││││││ runtime dispatch detected: Core.Compiler.length(%8::Any)
││││││││└──────────────────────────────────
││││││││┌ @ compiler/ssair/inlining.jl:859 Core.Compiler.>(%9, %10)
│││││││││ runtime dispatch detected: Core.Compiler.>(%9::Any, %10::Int64)
││││││││└──────────────────────────────────
││││││││┌ @ compiler/ssair/inlining.jl:860 Core.Compiler.iterate(%15)
│││││││││ runtime dispatch detected: Core.Compiler.iterate(%15::Any)
││││││││└──────────────────────────────────
││││││││┌ @ compiler/ssair/inlining.jl:862 Core.Compiler.iterate(%15, %22)
│││││││││ runtime dispatch detected: Core.Compiler.iterate(%15::Any, %22::Any)
││││││││└──────────────────────────────────
│││││││┌ @ compiler/ssair/inlining.jl:978 argtypes = Core.Compiler.rewrite_apply_exprargs!(ir, idx, stmt, argtypes, arginfos, arg_start, state, todo)
││││││││┌ @ compiler/ssair/inlining.jl:675 Core.Compiler.maybe_handle_const_call!(ir, Core.Compiler.getproperty(state1, :id), new_stmt, new_info, flag, new_sig, istate, todo)
│││││││││┌ @ compiler/ssair/inlining.jl:1226 item = Core.Compiler.resolve_todo(item, state, flag)
││││││││││┌ @ compiler/ssair/inlining.jl:752 Core.Compiler.compileable_specialization(et, match)
│││││││││││┌ @ compiler/ssair/inlining.jl:714 mi = Core.kwfunc(Core.Compiler.specialize_method)(Core.apply_type(Core.NamedTuple, (:compilesig,))(Core.tuple(true)), Core.Compiler.specialize_method, Core.typeassert(Core.Compiler.getproperty(linfo, :def), Core.Compiler.Method), Core.Compiler.getproperty(linfo, :specTypes), Core.Compiler.getproperty(linfo, :sparam_vals))
││││││││││││┌ @ compiler/utilities.jl:187 Core.Compiler.#specialize_method#249(preexisting, compilesig, _3, method, atype, sparams)
│││││││││││││┌ @ compiler/utilities.jl:188 Core.Compiler.normalize_typevars(method, atype, sparams)
││││││││││││││┌ @ compiler/utilities.jl:176 at2 = Core.Compiler.subst_trivial_bounds(atype)
│││││││││││││││┌ @ compiler/utilities.jl:165 Core.Compiler.subst_trivial_bounds(subst)
││││││││││││││││┌ @ compiler/utilities.jl:168 Core.Compiler.UnionAll(%45, %48)
│││││││││││││││││ runtime dispatch detected: Core.Compiler.UnionAll(%45::TypeVar, %48::Any)
││││││││││││││││└─────────────────────────────
││││││││││┌ @ compiler/ssair/inlining.jl:755 src = Core.Compiler.inlining_policy(Core.Compiler.getproperty(state, :interp), src, flag, mi, argtypes)
│││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/abstractanalyzer.jl:633 Core.invoke(Core.Compiler.inlining_policy, Core.apply_type(JET.Tuple, JET.AbstractInterpreter, Core.Any, JET.UInt8, JET.MethodInstance, JET.Argtypes), analyzer, src, stmt_flag, mi, argtypes)
││││││││││││┌ @ compiler/optimize.jl:42 Core.Compiler.get_inference_cache(interp)
│││││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/typeinfer.jl:449 JET.get_native(analyzer)
││││││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/abstractanalyzer.jl:227 JET.AnalyzerState(analyzer)
│││││││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/abstractanalyzer.jl:360 Base.string("missing `", JET.AbstractAnalyzer, "` API:\n`", _, "` is required to implement the `", JET.AnalyzerState, "(analyzer::", _, ") -> ", JET.AnalyzerState, "` interface.\nSee the documentation of `", JET.AbstractAnalyzer, "` and `", JET.AnalyzerState, "`.\n")
││││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││││││┌ @ strings/io.jl:144 Base.print(s, x)
││││││││││││││││││┌ @ strings/io.jl:35 Base.show(io, x)
│││││││││││││││││││┌ @ show.jl:879 Base._show_type(io, Base.inferencebarrier(x))
││││││││││││││││││││┌ @ show.jl:882 Base.show_type_name(io, Base.getproperty(Base.unwrap_unionall(x), :name))
│││││││││││││││││││││┌ @ show.jl:969 Base.show(io, Base.getproperty(tn, :module))
││││││││││││││││││││││┌ @ show.jl:1101 Base.is_root_module(m)
│││││││││││││││││││││││┌ @ lock.jl:219 Base.lock(temp)
││││││││││││││││││││││││┌ @ lock.jl:101 slowlock(rl)
│││││││││││││││││││││││││┌ @ lock.jl:110 Base.wait(c)
││││││││││││││││││││││││││┌ @ condition.jl:126 Base.list_deletefirst!(Base.getproperty(ct, :queue), ct)
│││││││││││││││││││││││││││┌ @ linked_list.jl:145 Base.isequal(Base.getproperty(h, :value), val)
││││││││││││││││││││││││││││┌ @ gcutils.jl:4 Base.isequal(%1, v)
│││││││││││││││││││││││││││││ runtime dispatch detected: Base.isequal(%1::Any, v::Task)
││││││││││││││││││││││││││││└────────────────
││││││││││││││││││││││││││┌ @ condition.jl:126 Base.list_deletefirst!(%46, %40)
│││││││││││││││││││││││││││ runtime dispatch detected: Base.list_deletefirst!(%46::Any, %40::Task)
││││││││││││││││││││││││││└────────────────────
││││││││││││││││││││┌ @ show.jl:884 Base.show_typealias(io, x)
│││││││││││││││││││││┌ @ show.jl:721 alias = Base.make_typealias(properx)
││││││││││││││││││││││┌ @ show.jl:531 mods = Base.modulesof!(Core.apply_type(Base.Set, Base.Module)(), x)
│││││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, %20)
││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %20::Any)
│││││││││││││││││││││││└───────────────
│││││││││││││││││││││││┌ @ show.jl:507 Base.modulesof!(s, %30)
││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %30::Any)
│││││││││││││││││││││││└───────────────
││││││││││││││││││││││┌ @ show.jl:535 Base.uniontypes(Base.unwrap_unionall(x))
│││││││││││││││││││││││┌ @ reflection.jl:891 Base._uniontypes(x, Base.getindex(Base.Any))
││││││││││││││││││││││││┌ @ reflection.jl:889 Base._uniontypes(%1, ts)
│││││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(%1::Any, ts::Vector{Any})
││││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││││┌ @ reflection.jl:889 Base._uniontypes(%3, ts)
│││││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(%3::Any, ts::Vector{Any})
││││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││┌ @ reflection.jl:891 Base._uniontypes(x, %1)
││││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(x::Any, %1::Vector{Any})
│││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││┌ @ show.jl:566 applied = Base.rewrap_unionall(applied, p)
│││││││││││││││││││││││┌ @ essentials.jl:275 Base.rewrap_unionall(%8, %9)
││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%8::Any, %9::UnionAll)
│││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││┌ @ essentials.jl:267 Base.rewrap_unionall(t, %8)
││││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(t::Any, %8::Any)
│││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││┌ @ essentials.jl:267 Base.UnionAll(%6, %9)
││││││││││││││││││││││││ runtime dispatch detected: Base.UnionAll(%6::TypeVar, %9::Any)
│││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││┌ @ show.jl:566 Base.rewrap_unionall(%373, %371)
│││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%373::Any, %371::UnionAll)
││││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:724 Base.show_typealias(io, Base.getindex(alias, 1), x, Base.getindex(alias, 2), wheres)
││││││││││││││││││││││┌ @ show.jl:671 Base.show_typeparams(io, env, Core.svec(vars...), wheres)
│││││││││││││││││││││││┌ @ show.jl:635 Base.show(io, p)
││││││││││││││││││││││││┌ @ show.jl:2458 show_bound(io, lb)
│││││││││││││││││││││││││┌ @ show.jl:2450 Base.show(io, b)
││││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOContext{IOBuffer}, b::Any)
│││││││││││││││││││││││││└────────────────
│││││││││││││││││││││││┌ @ show.jl:630 Base.show(io, %266)
││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOContext{IOBuffer}, %266::Any)
│││││││││││││││││││││││└───────────────
│││││││││││││││││││││││┌ @ show.jl:633 Base.show(io, %324)
││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOContext{IOBuffer}, %324::Any)
│││││││││││││││││││││││└───────────────
│││││││││││││││││││││││┌ @ show.jl:638 Base.show(io, %207)
││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOContext{IOBuffer}, %207::Any)
│││││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:887 Base.show_datatype(io, x)
│││││││││││││││││││││┌ @ show.jl:987 #self#(io, x, Base.getindex(Base.TypeVar))
││││││││││││││││││││││┌ @ show.jl:1009 Base.show_typeparams(io, parameters, Base.getproperty(Base.unwrap_unionall(Base.getproperty(Base.getproperty(x, :name), :wrapper)), :parameters), wheres)
│││││││││││││││││││││││┌ @ show.jl:635 Base.show(io, p)
││││││││││││││││││││││││┌ @ show.jl:2458 show_bound(io, lb)
│││││││││││││││││││││││││┌ @ show.jl:2450 Base.show(io, b)
││││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOBuffer, b::Any)
│││││││││││││││││││││││││└────────────────
│││││││││││││││││││││││┌ @ show.jl:630 Base.show(io, %264)
││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOBuffer, %264::Any)
│││││││││││││││││││││││└───────────────
│││││││││││││││││││││││┌ @ show.jl:633 Base.show(io, %321)
││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOBuffer, %321::Any)
│││││││││││││││││││││││└───────────────
│││││││││││││││││││││││┌ @ show.jl:638 Base.show(io, %206)
││││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOBuffer, %206::Any)
│││││││││││││││││││││││└───────────────
││││││││││││││││││││││┌ @ show.jl:995 Base.show(io, %22)
│││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOBuffer, %22::Any)
││││││││││││││││││││││└───────────────
││││││││││││││││││││││┌ @ show.jl:1003 Base.show(io, %64)
│││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOBuffer, %64::Any)
││││││││││││││││││││││└────────────────
││││││││││││││││││││││┌ @ show.jl:1009 Base.getproperty(%121, :parameters)
│││││││││││││││││││││││ runtime dispatch detected: Base.getproperty(%121::Any, :parameters::Symbol)
││││││││││││││││││││││└────────────────
││││││││││││││││││││││┌ @ show.jl:1009 Base.show_typeparams(io, %1, %128, wheres)
│││││││││││││││││││││││ runtime dispatch detected: Base.show_typeparams(io::IOBuffer, %1::Core.SimpleVector, %128::Any, wheres::Vector{TypeVar})
││││││││││││││││││││││└────────────────
││││││││││││││││││││┌ @ show.jl:890 Base.show_unionaliases(io, x)
│││││││││││││││││││││┌ @ show.jl:811 Base.make_typealiases(properx)
││││││││││││││││││││││┌ @ show.jl:732 mods = Base.modulesof!(Core.apply_type(Base.Set, Base.Module)(), x)
│││││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, Base.getproperty(x, :a))
││││││││││││││││││││││││┌ @ show.jl:500 Base.modulesof!(s, %1)
│││││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %1::Any)
││││││││││││││││││││││││└───────────────
││││││││││││││││││││││┌ @ show.jl:768 ul = Base.unionlen(applied)
│││││││││││││││││││││││┌ @ reflection.jl:886 Base.unionlen(%1)
││││││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%1::Any)
│││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││││┌ @ reflection.jl:886 Base.unionlen(%3)
││││││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%3::Any)
│││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││┌ @ show.jl:788 Core.kwfunc(Base.sort!)(Core.apply_type(Core.NamedTuple, (:by, :rev))(Core.tuple(#479, true)), Base.sort!, aliases)
│││││││││││││││││││││││┌ @ sort.jl:711 Base.Sort.#sort!#8(alg, lt, by, rev, order, _3, v)
││││││││││││││││││││││││┌ @ sort.jl:723 Base.Sort.sort!(v, alg, ordr)
│││││││││││││││││││││││││┌ @ sort.jl:662 Base.Sort.sort!(v, Base.Sort.first(inds), Base.Sort.last(inds), alg, order)
││││││││││││││││││││││││││┌ @ sort.jl:591 #self#(v, lo, hi, a, o, Base.Sort.similar(v, 0))
│││││││││││││││││││││││││││┌ @ sort.jl:592 Base.Sort.sort!(v, lo, hi, Base.Sort.SMALL_ALGORITHM, o)
││││││││││││││││││││││││││││┌ @ sort.jl:507 Base.Sort.lt(o, x, Base.getindex(v, Base.Sort.-(j, 1)))
│││││││││││││││││││││││││││││┌ @ ordering.jl:119 Base.Order.lt($(QuoteNode(Base.Order.ReverseOrdering{Base.Order.ForwardOrdering}(Base.Order.ForwardOrdering()))), %9, %20)
││││││││││││││││││││││││││││││ runtime dispatch detected: Base.Order.lt($(QuoteNode(Base.Order.ReverseOrdering{Base.Order.ForwardOrdering}(Base.Order.ForwardOrdering())))::Base.Order.ReverseOrdering{Base.Order.ForwardOrdering}, %9::Any, %20::Any)
│││││││││││││││││││││││││││││└───────────────────
│││││││││││││││││││││┌ @ show.jl:811 Base.make_typealiases(%10)
││││││││││││││││││││││ runtime dispatch detected: Base.make_typealiases(%10::Union{Type{Any}, Union})
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:811 Base.indexed_iterate(%19, 1)
││││││││││││││││││││││ runtime dispatch detected: Base.indexed_iterate(%19::Union{Tuple{Vector{Core.SimpleVector}, Type}, Tuple{Core.SimpleVector, Core.TypeofBottom}}, 1)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:811 Base.indexed_iterate(%19, 2, %30)
││││││││││││││││││││││ runtime dispatch detected: Base.indexed_iterate(%19::Union{Tuple{Vector{Core.SimpleVector}, Type}, Tuple{Core.SimpleVector, Core.TypeofBottom}}, 2, %30::Int64)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:819 Base.rewrap_unionall(%77, %10)
││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%77::Any, %10::Union{Type{Any}, Union})
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:824 Base.show(io, %77)
││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOBuffer, %77::Any)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:828 Base.getindex(%183, 2)
││││││││││││││││││││││ runtime dispatch detected: Base.getindex(%183::Any, 2)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:828 Base.make_wheres(io, %184, x)
││││││││││││││││││││││ runtime dispatch detected: Base.make_wheres(io::IOBuffer, %184::Any, x::Union)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:829 Base.getindex(%183, 1)
││││││││││││││││││││││ runtime dispatch detected: Base.getindex(%183::Any, 1)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:829 Base.getindex(%183, 2)
││││││││││││││││││││││ runtime dispatch detected: Base.getindex(%183::Any, 2)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:829 Base.show_typealias(io, %194, x, %195, %193)
││││││││││││││││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %194::Any, x::Union, %195::Any, %193::Vector{TypeVar})
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:835 Base.getindex(%262, 2)
││││││││││││││││││││││ runtime dispatch detected: Base.getindex(%262::Any, 2)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:836 Base.getindex(%262, 2)
││││││││││││││││││││││ runtime dispatch detected: Base.getindex(%262::Any, 2)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:836 Base.make_wheres(io, %278, x)
││││││││││││││││││││││ runtime dispatch detected: Base.make_wheres(io::IOBuffer, %278::Any, x::Union)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:837 Base.getindex(%262, 1)
││││││││││││││││││││││ runtime dispatch detected: Base.getindex(%262::Any, 1)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:837 Base.getindex(%262, 2)
││││││││││││││││││││││ runtime dispatch detected: Base.getindex(%262::Any, 2)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:837 Base.show_typealias(io, %288, x, %289, %287)
││││││││││││││││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %288::Any, x::Union, %289::Any, %287::Vector{TypeVar})
│││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:894 Base.show_delim_array(io, Base.uniontypes(x), '{', ',', '}', false)
│││││││││││││││││││││┌ @ show.jl:1199 #self#(io, itr, op, delim, cl, delim_one, Base.first(Base.LinearIndices(itr)), Base.last(Base.LinearIndices(itr)))
││││││││││││││││││││││┌ @ show.jl:1210 Base.show(%6, %44)
│││││││││││││││││││││││ runtime dispatch detected: Base.show(%6::IOContext{IOBuffer}, %44::Any)
││││││││││││││││││││││└────────────────
││││││││││││││││││││┌ @ show.jl:921 Base.show_datatype(io, x, wheres)
│││││││││││││││││││││┌ @ show.jl:1008 Base.show_type_name(io, Base.getproperty(x, :name))
││││││││││││││││││││││┌ @ show.jl:968 Base.isvisible(%38, %86, %80)
│││││││││││││││││││││││ runtime dispatch detected: Base.isvisible(%38::Symbol, %86::Module, %80::Any)
││││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:995 Base.show(io, %22)
││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOContext{IOBuffer}, %22::Any)
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:1003 Base.show(io, %66)
││││││││││││││││││││││ runtime dispatch detected: Base.show(io::IOContext{IOBuffer}, %66::Any)
│││││││││││││││││││││└────────────────
│││││││││││││││││││││┌ @ show.jl:1009 Base.getproperty(%125, :parameters)
││││││││││││││││││││││ runtime dispatch detected: Base.getproperty(%125::Any, :parameters::Symbol)
│││││││││││││││││││││└────────────────
│││││││││││││││││││││┌ @ show.jl:1009 Base.show_typeparams(io, %1, %132, wheres)
││││││││││││││││││││││ runtime dispatch detected: Base.show_typeparams(io::IOContext{IOBuffer}, %1::Core.SimpleVector, %132::Any, wheres::Vector{TypeVar})
│││││││││││││││││││││└────────────────
││││││││││││││││││││┌ @ show.jl:882 Base.getproperty(%20, :name)
│││││││││││││││││││││ runtime dispatch detected: Base.getproperty(%20::Any, :name::Symbol)
││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:882 Base.show_type_name(io, %27)
│││││││││││││││││││││ runtime dispatch detected: Base.show_type_name(io::IOBuffer, %27::Any)
││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:923 Base.show(%92, %93)
│││││││││││││││││││││ runtime dispatch detected: Base.show(%92::IOContext{IOBuffer}, %93::Any)
││││││││││││││││││││└───────────────
││││││││││││┌ @ compiler/optimize.jl:42 inf_result = Core.Compiler.cache_lookup(mi, argtypes, Core.Compiler.get_inference_cache(interp))
│││││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/typeinfer.jl:460 inf_result = JET.cache_lookup(linfo, given_argtypes, Base.getproperty(cache, :cache))
││││││││││││││┌ @ compiler/inferenceresult.jl:213 Core.Compiler.is_argtype_match(Core.Compiler.getindex(given_argtypes, i), Core.Compiler.getindex(cache_argtypes, i), Core.Compiler.getindex(cache_overridden_by_const, i))
│││││││││││││││┌ @ compiler/inferenceresult.jl:7 Core.Compiler.is_lattice_equal(given_argtype, cache_argtype)
││││││││││││││││┌ @ compiler/typelattice.jl:263 Core.Compiler.==(%19, %21)
│││││││││││││││││ runtime dispatch detected: Core.Compiler.==(%19::Any, %21::Any)
││││││││││││││││└───────────────────────────────
│││││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/typeinfer.jl:473 restored = JET.add_cached_report!(caller, cached)
││││││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/abstractanalyzer.jl:574 JET.restore_cached_report(cached)
│││││││││││││││┌ @ /Users/aviatesk/julia/packages/JET/src/abstractinterpret/inferenceerrorreport.jl:359 JET._restore_cached_report(%1, %3, %4, %5, %6)
││││││││││││││││ runtime dispatch detected: JET._restore_cached_report(%1::DataType, %3::Vector{JET.VirtualFrame}, %4::String, %5::JET.Signature, %6::Vector{Any})
│││││││││││││││└────────────────────────────────────────────────────────────────────────────────────────
││││││││││┌ @ compiler/ssair/inlining.jl:766 Core.Compiler.InliningTodo(mi, src)
│││││││││││┌ @ compiler/ssair/inlining.jl:833 Core.Compiler.inflate_ir(src, mi)
││││││││││││┌ @ compiler/ssair/legacy.jl:4 sptypes = Core.Compiler.sptypes_from_meth_instance(linfo)
│││││││││││││┌ @ compiler/inferencestate.jl:311 Core.Compiler.UnionAll(%233, %234)
││││││││││││││ runtime dispatch detected: Core.Compiler.UnionAll(%233::TypeVar, %234::Type{Type{_A}} where _A)
│││││││││││││└──────────────────────────────────
││││││││││││┌ @ compiler/ssair/legacy.jl:6 Core.Compiler.matching_cache_argtypes(linfo, Core.Compiler.nothing, false)
│││││││││││││┌ @ compiler/inferenceresult.jl:197 cache_argtypes = Core.Compiler.most_general_argtypes(mthd, Core.Compiler.getproperty(linfo, :specTypes), _8)
││││││││││││││┌ @ compiler/inferenceresult.jl:97 #self#(method, specTypes, isva, true)
│││││││││││││││┌ @ compiler/inferenceresult.jl:108 Core.Compiler.==(specTypes, Core.Compiler.Tuple)
││││││││││││││││ runtime dispatch detected: Core.Compiler.==(specTypes::Any, Core.Compiler.Tuple)
│││││││││││││││└───────────────────────────────────
│││││││││││││┌ @ compiler/inferenceresult.jl:197 Core.Compiler.most_general_argtypes(%9, %10, %21)
││││││││││││││ runtime dispatch detected: Core.Compiler.most_general_argtypes(%9::Union{Nothing, Method}, %10::Any, %21::Bool)
│││││││││││││└───────────────────────────────────
││││││││││││┌ @ compiler/ssair/legacy.jl:10 Core.Compiler.inflate_ir(ci, sptypes, argtypes)
│││││││││││││┌ @ compiler/ssair/legacy.jl:37 Core.Compiler.collect(Core.Compiler.LineInfoNode, Core.Compiler.getproperty(ci, :linetable))
││││││││││││││┌ @ array.jl:644 Core.Compiler._collect(_, itr, Core.Compiler.IteratorSize(itr))
│││││││││││││││┌ @ array.jl:646 Core.Compiler._array_for(_, isz, Core.Compiler._similar_shape(itr, isz))
││││││││││││││││┌ @ array.jl:676 Core.Compiler._similar_shape(itr, isz)
│││││││││││││││││┌ @ array.jl:661 Core.Compiler.axes(itr)
││││││││││││││││││┌ @ abstractarray.jl:95 Core.Compiler.size(A)
│││││││││││││││││││ runtime dispatch detected: Core.Compiler.size(A::Core.Compiler.HasLength)
││││││││││││││││││└───────────────────────
│││││││││││││││││┌ @ array.jl:660 Core.Compiler.length(itr)
││││││││││││││││││ runtime dispatch detected: Core.Compiler.length(itr::Core.Compiler.HasLength)
│││││││││││││││││└────────────────
│││││││││││││┌ @ compiler/ssair/legacy.jl:26 Core.Compiler.block_for_inst(%3, %257)
││││││││││││││ runtime dispatch detected: Core.Compiler.block_for_inst(%3::Core.Compiler.CFG, %257::Any)
│││││││││││││└───────────────────────────────
│││││││││││││┌ @ compiler/ssair/legacy.jl:37 Core.Compiler.collect(Core.Compiler.LineInfoNode, %423)
││││││││││││││ runtime dispatch detected: Core.Compiler.collect(Core.Compiler.LineInfoNode, %423::Any)
│││││││││││││└───────────────────────────────
│││││││││││││┌ @ compiler/ssair/legacy.jl:37 Core.Compiler.IRCode(%422, %3, %424, argtypes, %425, sptypes)
││││││││││││││ runtime dispatch detected: Core.Compiler.IRCode(%422::Core.Compiler.InstructionStream, %3::Core.Compiler.CFG, %424::Any, argtypes::Vector{Any}, %425::Vector{Any}, sptypes::Vector{Any})
│││││││││││││└───────────────────────────────
││││┌ @ compiler/ssair/inlining.jl:80 ir = Core.Compiler.batch_inline!(todo, ir, linetable, propagate_inbounds)
│││││┌ @ compiler/ssair/inlining.jl:588 Core.Compiler.ir_inline_item!(compact, idx, argexprs, linetable, item, boundscheck, Core.Compiler.getproperty(state, :todo_bbs))
││││││┌ @ compiler/ssair/inlining.jl:339 vararg = Core.Compiler.mk_tuplecall!(compact, Core.Compiler.getindex(argexprs, Core.Compiler.:(nargs_def, Core.Compiler.lastindex(argexprs))), topline)
│││││││┌ @ compiler/ssair/inlining.jl:1344 Core.Compiler.insert_node_here!(compact, Core.Compiler.NewInstruction(e, etyp, line_idx))
││││││││┌ @ compiler/ssair/ir.jl:754 #self#(compact, inst, false)
│││││││││┌ @ compiler/ssair/ir.jl:772 Core.Compiler.setindex!(node, Core.Compiler.getproperty(inst, :line), :line)
││││││││││┌ @ compiler/ssair/ir.jl:241 Core.Compiler.setindex!(Core.Compiler.getfield(Core.Compiler.getfield(node, :data), fld), val, Core.Compiler.getfield(node, :idx))
│││││││││││┌ @ array.jl:963 Core.Compiler.convert(_, x)
││││││││││││ runtime dispatch detected: Core.Compiler.convert(_::Type{Int32}, x::Nothing)
│││││││││││└────────────────
│││││┌ @ compiler/ssair/inlining.jl:583 ninst = Core.Compiler.effect_free(Core.Compiler.NewInstruction(aexpr, Core.Compiler.argextype(aexpr, compact), Core.Compiler.getindex(Core.Compiler.getindex(Core.Compiler.getproperty(compact, :result), idx), :line)))
││││││┌ @ compiler/ssair/ir.jl:177 Core.Compiler.NewInstruction(%1, %2, nothing, %3, 0x10, true)
│││││││ runtime dispatch detected: Core.Compiler.NewInstruction(%1::Union{Expr, GlobalRef}, %2::Any, nothing, %3::Int32, 0x10, true)
││││││└────────────────────────────
│││┌ @ compiler/optimize.jl:448 ir = Core.Compiler.sroa_pass!(ir)
││││┌ @ compiler/ssair/passes.jl:733 struct_typ = Core.Compiler.unswitchtupleunion(struct_typ)
│││││┌ @ compiler/typeutils.jl:296 Core.Compiler.getindex(%154, %122)
││││││ runtime dispatch detected: Core.Compiler.getindex(%154::Any, %122::Int64)
│││││└─────────────────────────────
││││┌ @ compiler/ssair/passes.jl:778 lifted_result = Core.Compiler.lift_leaves(compact, result_t, field, leaves)
│││││┌ @ compiler/ssair/passes.jl:350 Core.Compiler.lift_arg!(compact, leaf, cache_key, def, Core.Compiler.+(1, field), lifted_leaves)
││││││┌ @ compiler/ssair/passes.jl:440 Core.Compiler.effect_free(Core.Compiler.NewInstruction(lifted, Core.Compiler.argextype(lifted, compact)))
│││││││┌ @ compiler/ssair/ir.jl:177 Core.Compiler.NewInstruction(%1, %2, nothing, nothing, 0x10, true)
││││││││ runtime dispatch detected: Core.Compiler.NewInstruction(%1::Union{Expr, GlobalRef}, %2::Any, nothing, nothing, 0x10, true)
│││││││└────────────────────────────
││││││┌ @ compiler/ssair/passes.jl:440 Core.Compiler.insert_node!(compact, leaf, %86)
│││││││ runtime dispatch detected: Core.Compiler.insert_node!(compact::Core.Compiler.IncrementalCompact, leaf::Any, %86::Core.Compiler.NewInstruction)
││││││└────────────────────────────────
│││││┌ @ compiler/ssair/passes.jl:360 Core.Compiler.fieldcount(typ)
││││││┌ @ reflection.jl:745 Core.Compiler.==(t, Union{})
│││││││ runtime dispatch detected: Core.Compiler.==(t::Any, Union{})
││││││└─────────────────────
│││││┌ @ compiler/ssair/passes.jl:353 Core.Compiler.getindex(%81, %55)
││││││ runtime dispatch detected: Core.Compiler.getindex(%81::Core.Compiler.TypesView{Core.Compiler.IncrementalCompact}, %55::Any)
│││││└────────────────────────────────
│││┌ @ compiler/optimize.jl:450 ir = Core.Compiler.type_lift_pass!(ir)
││││┌ @ compiler/ssair/passes.jl:1189 Core.Compiler.convert(Core.Compiler.Int, %340)
│││││ runtime dispatch detected: Core.Compiler.convert(Core.Compiler.Int, %340::Any)
││││└─────────────────────────────────
│││┌ @ compiler/optimize.jl:453 Core.Compiler.verify_ir(ir)
││││┌ @ compiler/ssair/verify.jl:67 #self#(ir, true)
│││││┌ @ compiler/ssair/verify.jl:130 Core.Compiler.println(Core.stderr, "Block ", idx, " successors (", Core.Compiler.getproperty(block, :succs), "), does not match fall-through terminator (", terminator, ")")
││││││┌ @ boot.jl:558 Core.print(Core.tuple(io), x...)
│││││││┌ @ boot.jl:556 Core.print(Core.tuple(io), a...)
││││││││┌ @ boot.jl:556 Core.print(Core.tuple(io), a...)
│││││││││┌ @ boot.jl:556 Core.print(Core.tuple(io), a...)
││││││││││┌ @ boot.jl:556 Core.print(Core.tuple(io), a...)
│││││││││││┌ @ boot.jl:556 Core.print(Core.tuple(io), a...)
││││││││││││┌ @ boot.jl:556 Core.print(io, x)
│││││││││││││┌ @ boot.jl:555 Core.show(io, x)
││││││││││││││ runtime dispatch detected: Core.show(io::Core.CoreSTDERR, x::Any)
│││││││││││││└───────────────
│││││┌ @ array.jl:413 Core.Compiler.setindex!(%422, %420, 1)
││││││ runtime dispatch detected: Core.Compiler.setindex!(%422::Vector{Int64}, %420::Any, 1)
│││││└────────────────
│││││┌ @ array.jl:413 Core.Compiler.setindex!(%449, %448, 2)
││││││ runtime dispatch detected: Core.Compiler.setindex!(%449::Vector{Int64}, %448::Any, 2)
│││││└────────────────
│││┌ @ compiler/optimize.jl:445 Core.Compiler.ssa_inlining_pass!(%22, %23, %24, %25)
││││ runtime dispatch detected: Core.Compiler.ssa_inlining_pass!(%22::Core.Compiler.IRCode, %23::Vector{Core.LineInfoNode}, %24::Core.Compiler.InliningState, %25::Bool)
│││└────────────────────────────
│┌ @ compiler/typeinfer.jl:817 frame = Core.Compiler.InferenceState(result, cache, interp)
││┌ @ compiler/inferencestate.jl:248 src = Core.Compiler.retrieve_code_info(Core.Compiler.getproperty(result, :linfo))
│││┌ @ compiler/utilities.jl:122 c = Core.Compiler.get_staged(linfo)
││││┌ @ compiler/utilities.jl:107 Core.Compiler.may_invoke_generator(mi)
│││││┌ @ reflection.jl:1103 Core.Compiler.may_invoke_generator(Core.typeassert(Core.Compiler.getproperty(method, :def), Core.Compiler.Method), Core.Compiler.getproperty(method, :specTypes), Core.Compiler.getproperty(method, :sparam_vals))
││││││┌ @ reflection.jl:1117 Core.Compiler.methods(%18)
│││││││ runtime dispatch detected: Core.Compiler.methods(%18::Any)
││││││└──────────────────────
│││┌ @ compiler/utilities.jl:129 c = Core.Compiler.copy(Core.typeassert(src, Core.Compiler.CodeInfo))
││││┌ @ expr.jl:77 Core.Compiler.copy(%41)
│││││ runtime dispatch detected: Core.Compiler.copy(%41::Vector)
││││└──────────────
│┌ @ compiler/abstractinterpretation.jl:504 newsig = Core.Compiler.limit_type_size(Core.getfield(sig, :contents), comparison, _41, Core.Compiler.getproperty(Core.Compiler.InferenceParams(interp), :TUPLE_COMPLEXITY_LIMIT_DEPTH), spec_len)
││┌ @ compiler/typelimits.jl:22 r = Core.Compiler._limit_type_size(t, compare, source, 1, allowed_tuplelen)
│││┌ @ compiler/typelimits.jl:109 Core.Compiler.UnionAll(%74, %66)
││││ runtime dispatch detected: Core.Compiler.UnionAll(%74::TypeVar, %66::Union{Core.TypeofVararg, Type})
│││└──────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1516 Core.Compiler.typename(%39)
││ runtime dispatch detected: Core.Compiler.typename(%39::Type{Core.OpaqueClosure})
│└───────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:598 inf_result = Core.Compiler.InferenceResult(mi, Core.tuple(arginfo, sv), va_override)
││┌ @ compiler/types.jl:40 Core.Compiler.matching_cache_argtypes(linfo, arginfo, va_override)
│││┌ @ compiler/inferenceresult.jl:27 Core.Compiler.convert(Core.Compiler.Int, %10)
││││ runtime dispatch detected: Core.Compiler.convert(Core.Compiler.Int, %10::Any)
│││└──────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:33 matches = Core.Compiler.find_matching_methods(argtypes, atype, Core.Compiler.method_table(interp, sv), Core.Compiler.getproperty(Core.Compiler.InferenceParams(interp), :MAX_UNION_SPLITTING), max_methods)
││┌ @ compiler/abstractinterpretation.jl:211 matches = Core.kwfunc(Core.Compiler.findall)(Core.apply_type(Core.NamedTuple, (:limit,))(Core.tuple(max_methods)), Core.Compiler.findall, sig_n, method_table)
│││┌ @ compiler/methodtable.jl:95 Core.Compiler.#findall#254(limit, _3, sig, table)
││││┌ @ compiler/methodtable.jl:96 Core.Compiler.get!(#255, Core.Compiler.getproperty(table, :cache), sig)
│││││┌ @ iddict.jl:178 val = default()
││││││┌ @ compiler/methodtable.jl:97 findall##kw(%2, Core.Compiler.findall, %4, %6)
│││││││ runtime dispatch detected: findall##kw(%2::NamedTuple{(:limit,), Tuple{Int64}}, Core.Compiler.findall, %4::Any, %6::Core.Compiler.InternalMethodTable)
││││││└──────────────────────────────
││││┌ @ compiler/methodtable.jl:95 box = Core.Box(sig)
│││││ captured variable `box` detected
││││└──────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1041 = Core.Compiler.uniontypes(Core.Compiler.getindex(aargtypes, i))
││┌ @ reflection.jl:891 Core.Compiler._uniontypes(x, %1)
│││ runtime dispatch detected: Core.Compiler._uniontypes(x::Any, %1::Vector{Any})
││└─────────────────────
│┌ @ compiler/abstractinterpretation.jl:1384 Core.Compiler.abstract_call_builtin(interp, f, arginfo, sv, max_methods)
││┌ @ compiler/abstractinterpretation.jl:1188 rt = Core.Compiler.builtin_tfunction(interp, f, Core.Compiler.getindex(argtypes, Core.Compiler.:(2, Core.Compiler.lastindex(argtypes))), sv)
│││┌ @ compiler/tfuncs.jl:1625 argvals = Core.Compiler.anymap(#290, argtypes)
││││┌ @ compiler/utilities.jl:39 f(%29)
│││││ runtime dispatch detected: f::Core.Compiler.var"#290#292"(%29::Any)
││││└────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1412 Core.Compiler.typevar_tfunc(n, lb_var, ub_var)
││┌ @ compiler/tfuncs.jl:452 Core.Compiler.TypeVar(%69, %37, %67)
│││ runtime dispatch detected: Core.Compiler.TypeVar(%69::Any, %37::Any, %67::Any)
││└──────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1414 Core.Compiler.abstract_call_unionall(argtypes)
││┌ @ compiler/abstractinterpretation.jl:1299 Core.Compiler.has_free_typevars(%42)
│││ runtime dispatch detected: Core.Compiler.has_free_typevars(%42::Union{TypeVar, Type})
││└───────────────────────────────────────────
││┌ @ compiler/abstractinterpretation.jl:1310 Core.Compiler.UnionAll(%74, %75)
│││ runtime dispatch detected: Core.Compiler.UnionAll(%74::TypeVar, %75::Union{TypeVar, Type})
││└───────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1463 Core.Compiler.typename_static(Core.Compiler.getindex(argtypes, 2))
││┌ @ compiler/tfuncs.jl:1801 Core.Compiler._typename(%4)
│││ runtime dispatch detected: Core.Compiler._typename(%4::Any)
││└───────────────────────────
││┌ @ compiler/tfuncs.jl:1804 Core.Compiler._typename(%38)
│││ runtime dispatch detected: Core.Compiler._typename(%38::Any)
││└───────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1467 val = Core.Compiler.pure_eval_call(f, argtypes)
││┌ @ compiler/abstractinterpretation.jl:1134 Core.Compiler.getindex(%167, 1)
│││ runtime dispatch detected: Core.Compiler.getindex(%167::Any, 1)
││└───────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1370 Core.Compiler.abstract_call_known(::Core.Compiler.NativeInterpreter, ::Any, ::Core.Compiler.ArgInfo, ::Core.Compiler.InferenceState, ::Int64)
││ failed to optimize: Core.Compiler.abstract_call_known(::Core.Compiler.NativeInterpreter, ::Any, ::Core.Compiler.ArgInfo, ::Core.Compiler.InferenceState, ::Int64)
│└───────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:875 Core.Compiler.length(%22)
││ runtime dispatch detected: Core.Compiler.length(%22::Union{Core.SimpleVector, Tuple})
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:875 Core.Compiler.getindex(%58, %55)
││ runtime dispatch detected: Core.Compiler.getindex(%58::Union{Core.SimpleVector, Tuple}, %55::Int64)
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:925 Core.Compiler.eltype(%135)
││ runtime dispatch detected: Core.Compiler.eltype(%135::Any)
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:396 sig = Core.Box(sig)
││ captured variable `sig` detected
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:396 hardlimit = Core.Box(:(_40::Bool))
││ captured variable `hardlimit` detected
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:396 sv_method2 = Core.Box()
││ captured variable `sv_method2` detected
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:458 Core.Compiler.==(%79, %84)
││ runtime dispatch detected: Core.Compiler.==(%79::Any, %84::Any)
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:474 %67(%69)
││ runtime dispatch detected: %67::Core.Compiler.var"#edge_matches_sv#298"{Method, Core.Compiler.var"#matches_sv#297"{Core.Compiler.InferenceState}}(%69::Core.Compiler.InferenceState)
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:491 Core.Compiler.length(%237)
││ runtime dispatch detected: Core.Compiler.length(%237::Any)
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:558 Core.Compiler.MethodCallResult(%393, %398, %399, %394)
││ runtime dispatch detected: Core.Compiler.MethodCallResult(%393::Any, %398::Bool, %399::Bool, %394::Union{Nothing, Core.MethodInstance})
│└──────────────────────────────────────────
│┌ @ compiler/abstractinterpretation.jl:1338 Core.Compiler.convert(Core.Compiler.SimpleVector, %313)
││ runtime dispatch detected: Core.Compiler.convert(Core.Compiler.SimpleVector, %313::Any)
│└───────────────────────────────────────────
│┌ @ compiler/tfuncs.jl:964 RT = Core.Compiler.modifyfield!_tfunc(o, f, Core.Compiler.Any, Core.Compiler.Any)
││┌ @ compiler/tfuncs.jl:949 T = Core.Compiler._fieldtype_tfunc(o, Core.Compiler.isconcretetype(o), f)
│││┌ @ compiler/tfuncs.jl:1104 Core.UnionAll(%51, %52)
││││ runtime dispatch detected: Core.UnionAll(%51::TypeVar, %52::Type{Type{_A}} where _A)
│││└───────────────────────────
│││┌ @ compiler/tfuncs.jl:1147 Core.UnionAll(%270, %271)
││││ runtime dispatch detected: Core.UnionAll(%270::TypeVar, %271::Type{Type{_A}} where _A)
│││└───────────────────────────
│││┌ @ compiler/tfuncs.jl:1177 Core.Compiler.has_free_typevars(%406)
││││ runtime dispatch detected: Core.Compiler.has_free_typevars(%406::Union{TypeVar, Type})
│││└───────────────────────────
│││┌ @ compiler/tfuncs.jl:1189 Core.UnionAll(%496, %497)
││││ runtime dispatch detected: Core.UnionAll(%496::TypeVar, %497::Type{Type{_A}} where _A)
│││└───────────────────────────
Core.Compiler.abstract_eval_statement(AbstractInterpreter, Any, VarTable, InferenceState)
Notably this code:
This capturing is already fixed in the latest master.
By the way, JET.jl also finds that issimpleenoughtype
is type unstable.
function issimpleenoughtype(@nospecialize t)
t = ignorelimited(t)
return ((unionlen(t)::Int + union_count_abstract(t) <= MAX_TYPEUNION_LENGTH) &&
(unioncomplexity(t) <= MAX_TYPEUNION_COMPLEXITY))
end
Here unioncomplexity(t)
should be marked as Int
.
It also finds out that make_ssa!
has a dynamic setindex!
called on frame.src.ssavaluetypes
, which might be nothing
. Most of the issues I discover can be found by JET.jl (not surprising, since I use code_typed to find issues).
I assume this is fixed now
This issues concerns about type instability in type inferencer caused by lambda function. I use Julia 1.8-dev (2 months old) and I am not quite sure whether these issues are already fixed in master. But it seems the related codes remain unchanged so I guess it's worthwhile to open an issue here.
Currently I identify the following function (method instance) that suffer from this issue:
Core.Compiler.abstract_call_method(NativeInterpreter, Method, Any, SimpleVector, Bool, InferenceState)
captured variable (actually an argument)hardlimit
is boxed, even if it's typed asBool
. I think this is because it's also assigned lately in the function body.sv_method2
andcallee_method2
are captured and read-only. They have typeUnion{Nothing, Method}
and I notice that Julia doesn't specialize closure on these two capture variable, instead it will infer a incomplete type and perform a dynamic dispatch using the real type of these variables. Maybe we should also avoid this?Core.Compiler.abstract_eval_statement(AbstractInterpreter, Any, VarTable, InferenceState)
Notably this code:Fixed by changing the code to:
Not sure what's the real cause of type instability. But it has something to do with lambda function.