Skip to content

Commit e9ef411

Browse files
committed
Name the native test back-end JIT mode explicitly
1 parent 610cfb4 commit e9ef411

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

test/helpers/native.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Base.Experimental.@MethodTable(test_method_table)
1010
struct CompilerParams <: AbstractCompilerParams
1111
entry_safepoint::Bool
1212
method_table
13-
relocatable::Bool
13+
jit::Bool
1414

1515
CompilerParams(entry_safepoint::Bool=false, method_table=test_method_table,
16-
relocatable::Bool=false) =
17-
new(entry_safepoint, method_table, relocatable)
16+
jit::Bool=false) =
17+
new(entry_safepoint, method_table, jit)
1818
end
1919

2020
module Runtime end
@@ -27,7 +27,7 @@ GPUCompiler.can_safepoint(@nospecialize(job::NativeCompilerJob)) = job.config.pa
2727
function GPUCompiler.lower_host_references!(@nospecialize(job::NativeCompilerJob),
2828
mod::LLVM.Module,
2929
refs::GPUCompiler.HostReferences)
30-
if job.config.params.relocatable
30+
if job.config.params.jit
3131
GPUCompiler.emit_host_reference_declarations!(mod, refs)
3232
else
3333
invoke(GPUCompiler.lower_host_references!,
@@ -37,7 +37,7 @@ end
3737

3838
function GPUCompiler.mcgen(@nospecialize(job::NativeCompilerJob), mod::LLVM.Module,
3939
format=LLVM.API.LLVMAssemblyFile)
40-
if job.config.params.relocatable
40+
if job.config.params.jit
4141
target = job.config.target
4242
@dispose tm=JITTargetMachine(GPUCompiler.llvm_triple(target), target.cpu,
4343
target.features) begin
@@ -51,11 +51,11 @@ end
5151

5252
function create_job(@nospecialize(func), @nospecialize(types);
5353
entry_safepoint::Bool=false, method_table=test_method_table,
54-
relocatable::Bool=false, kwargs...)
54+
jit::Bool=false, kwargs...)
5555
config_kwargs, kwargs = split_kwargs(kwargs, GPUCompiler.CONFIG_KWARGS)
5656
source = methodinstance(typeof(func), Base.to_tuple_type(types), Base.get_world_counter())
5757
target = NativeCompilerTarget(;jlruntime=true)
58-
params = CompilerParams(entry_safepoint, method_table, relocatable)
58+
params = CompilerParams(entry_safepoint, method_table, jit)
5959
config = CompilerConfig(target, params; kernel=false, config_kwargs...)
6060
CompilerJob(source, config), kwargs
6161
end

test/native.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ end
740740
mod = @eval module $(gensym())
741741
f() = UInt(pointer_from_objref(:host_ref_probe))
742742
end
743-
job, _ = Native.create_job(mod.f, Tuple{}; relocatable=true)
743+
job, _ = Native.create_job(mod.f, Tuple{}; jit=true)
744744
JuliaContext() do ctx
745745
obj, meta = GPUCompiler.compile(:obj, job)
746746
refs = meta.host_references

0 commit comments

Comments
 (0)