Skip to content

Commit

Permalink
Don't use safepoint_on_entry cgparam on 1.9-beta1 and up. (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Dec 28, 2022
1 parent 3a36c99 commit d1a400a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/jlgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function compile_method_instance(@nospecialize(job::CompilerJob),
gnu_pubnames = false,
debug_info_kind = Cint(debug_info_kind),
lookup = Base.unsafe_convert(Ptr{Nothing}, lookup_cb))
@static if VERSION >= v"1.9.0-DEV.1660"
@static if v"1.9.0-DEV.1660" <= VERSION < v"1.9.0-beta1" || VERSION >= v"1.10-"
cgparams = merge(cgparams, (;safepoint_on_entry = can_safepoint(job)))
end
params = Base.CodegenParams(;cgparams...)
Expand Down
2 changes: 1 addition & 1 deletion test/native.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ end
ir = sprint(io->native_code_llvm(io, identity, Tuple{Nothing}; entry_safepoint=false, optimize=false, dump_module=true))
@test !occursin("%safepoint", ir)

@static if VERSION >= v"1.9.0-DEV.1660"
if v"1.9.0-DEV.1660" <= VERSION < v"1.9.0-alpha1.57" || VERSION >= v"1.10-"
ir = sprint(io->native_code_llvm(io, identity, Tuple{Nothing}; entry_safepoint=true, optimize=false, dump_module=true))
@test occursin("%safepoint", ir)
end
Expand Down

0 comments on commit d1a400a

Please sign in to comment.