From 01de257b376c5eff46fefc3de2c4f7061629d0e2 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 28 Dec 2022 14:02:36 +0100 Subject: [PATCH] Don't use safepoint_on_entry cgparam on 1.9-beta1 and up. --- src/jlgen.jl | 2 +- test/native.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jlgen.jl b/src/jlgen.jl index b3fb3c31..a2f289f6 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -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...) diff --git a/test/native.jl b/test/native.jl index b6062831..9d07a9ab 100644 --- a/test/native.jl +++ b/test/native.jl @@ -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