What does "deoptimized" mean (in Cthulhu.jl)?

I don’t have a small MWE to generate it, but I occasionally see “deoptimized” in the menu of Cthulhu.jl, e.g.

Advanced: dump [P]arams cache.
   %3  = invoke alias_continue(…,…,…)::Any
   %4  = call #!(::Any)::Any
   %25  = invoke push!(::typename(DiscretePathSearch.NodeHandle){…},::typename(DiscretePathSearch.NodeAugmentation){…})::Any
   %31  = invoke throw_inexacterror(::Symbol,::Type{Int32},::Int64)::Union{}
   %40  = invoke error(::String)::Union{}
   %56  = invoke alias_tally!(…,…,…)::Any
   %78  = call ArgumentError(::String)::Any
   %115  = invoke throw_inexacterror(::Symbol,::Type{UInt64},::Int64)::Union{}
 • %133  = deoptimized successors!(::typename(DiscretePathSearch.PathAndSummary){…},::typename(DiscretePathSearch.Algorithm){…})::Any

What does this mean? I tried searching for “deoptimized” (in Julia and in Cthulh) and I cannot even see what code emits it.

I opened an issue to document it, but figured I should ask here too, since its meaning is not Cthulhu specific

IIRC, Cthulhu.jl works based on @code_typed, and if you check its documentation, @code_typed optimize=false/true foo(a,b) corresponds to (de)optimize options in @descend foo(a,b).

1 Like