File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -668,6 +668,19 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
668
668
cache_gbl = nothing
669
669
end
670
670
671
+ if VERSION >= v " 1.12.0-DEV.1703"
672
+ # on sufficiently recent versions of Julia, we can query the MIs compiled.
673
+ # this is required after the move to `invokce(::CodeInstance)`, because our
674
+ # lookup function (used to populate method_instances) isn't always called then.
675
+
676
+ num_mis = Ref {Csize_t} (0 )
677
+ @ccall jl_get_llvm_mis (native_code:: Ptr{Cvoid} , num_mis:: Ptr{Csize_t} ,
678
+ C_NULL :: Ptr{Cvoid} ):: Nothing
679
+ resize! (method_instances, num_mis[])
680
+ @ccall jl_get_llvm_mis (native_code:: Ptr{Cvoid} , num_mis:: Ptr{Csize_t} ,
681
+ method_instances:: Ptr{Cvoid} ):: Nothing
682
+ end
683
+
671
684
# process all compiled method instances
672
685
compiled = Dict ()
673
686
for mi in method_instances
You can’t perform that action at this time.
0 commit comments