You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like this might be related to the compile-time OpaqueClosure optimization (#55035 is probably related)
If we make sure that optimization doesn't apply:
make_oc2(x) =begin
x = Base.inferencebarrier(true) ? x : [] # non-concrete closure environment prevents optimizationreturn Base.Experimental.@opaque ()->some_method(x)
endprecompile(make_oc2, (Int,))
Then the constructor itself is fine - we only see inference for the OpaqueClosure method itself:
julia> tinf =@snoop_inference Foo.make_oc2(1)
julia>only(tinf.children).mi_timing.mi_info.mi
MethodInstance for (::Tuple{Int64})()
That inference is expected since it wasn't included in the precompile (it only ends up inferred/pre-compiled if the compile-time optimization applies).
Maybe we're messing up our caches when performing the compile-time optimization, in a way that breaks pre-compilation?
When using this, I am surprised to see that
make_oc()
was not pre-compiled after all (or at least is not usable as-is):The text was updated successfully, but these errors were encountered: