412
412
CC. may_optimize (interp:: GPUInterpreter ) = true
413
413
CC. may_compress (interp:: GPUInterpreter ) = true
414
414
CC. may_discard_trees (interp:: GPUInterpreter ) = true
415
+ @static if VERSION <= v " 1.12.0-DEV.1531"
415
416
CC. verbose_stmt_info (interp:: GPUInterpreter ) = false
417
+ end
416
418
CC. method_table (interp:: GPUInterpreter ) = interp. method_table
417
419
418
420
# semi-concrete interepretation is broken with overlays (JuliaLang/julia#47349)
@@ -615,9 +617,11 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
615
617
prefer_specsig = true ,
616
618
gnu_pubnames = false ,
617
619
debug_info_kind = Cint (debug_info_kind),
618
- lookup = Base. unsafe_convert (Ptr{Nothing}, lookup_cb),
619
620
safepoint_on_entry = can_safepoint (job),
620
621
gcstack_arg = false )
622
+ if VERSION < v " 1.12.0-DEV.1667"
623
+ cgparams = (; lookup = Base. unsafe_convert (Ptr{Nothing}, lookup_cb), cgparams... )
624
+ end
621
625
params = Base. CodegenParams (; cgparams... )
622
626
623
627
# generate IR
@@ -635,9 +639,15 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
635
639
Metadata (ConstantInt (DEBUG_METADATA_VERSION ()))
636
640
end
637
641
638
- native_code = ccall (:jl_create_native , Ptr{Cvoid},
642
+ native_code = if VERSION >= v " 1.12.0-DEV.1667"
643
+ ccall (:jl_create_native , Ptr{Cvoid},
644
+ (Vector{MethodInstance}, LLVM. API. LLVMOrcThreadSafeModuleRef, Ptr{Base. CodegenParams}, Cint, Cint, Cint, Csize_t, Ptr{Cvoid}),
645
+ [job. source], ts_mod, Ref (params), CompilationPolicyExtern, #= imaging mode=# 0 , #= external linkage=# 0 , job. world, Base. unsafe_convert (Ptr{Nothing}, lookup_cb))
646
+ else
647
+ ccall (:jl_create_native , Ptr{Cvoid},
639
648
(Vector{MethodInstance}, LLVM. API. LLVMOrcThreadSafeModuleRef, Ptr{Base. CodegenParams}, Cint, Cint, Cint, Csize_t),
640
649
[job. source], ts_mod, Ref (params), CompilationPolicyExtern, #= imaging mode=# 0 , #= external linkage=# 0 , job. world)
650
+ end
641
651
@assert native_code != C_NULL
642
652
643
653
llvm_mod_ref =
0 commit comments