@@ -12,24 +12,28 @@ Base.Experimental.@MethodTable(test_method_table)
12
12
13
13
struct CompilerParams <: AbstractCompilerParams
14
14
entry_safepoint:: Bool
15
+ use_jlplt:: Bool
15
16
method_table
16
17
17
- CompilerParams (entry_safepoint:: Bool = false , method_table= test_method_table) =
18
- new (entry_safepoint, method_table)
18
+ CompilerParams (entry_safepoint:: Bool = false , use_jlplt :: Bool = true , method_table= test_method_table) =
19
+ new (entry_safepoint, use_jlplt, method_table)
19
20
end
20
21
21
22
NativeCompilerJob = CompilerJob{NativeCompilerTarget,CompilerParams}
22
23
GPUCompiler. runtime_module (:: NativeCompilerJob ) = TestRuntime
23
24
24
25
GPUCompiler. method_table (@nospecialize (job:: NativeCompilerJob )) = job. config. params. method_table
25
26
GPUCompiler. can_safepoint (@nospecialize (job:: NativeCompilerJob )) = job. config. params. entry_safepoint
27
+ @static if VERSION > v " 1.11.0-DEV.398"
28
+ GPUCompiler. codegen_params (@nospecialize (job:: NativeCompilerJob )) = (;use_jlplt= job. config. params. use_jlplt)
29
+ end
26
30
27
31
function create_job (@nospecialize (func), @nospecialize (types); kernel:: Bool = false ,
28
- entry_abi= :specfunc , entry_safepoint:: Bool = false , always_inline= false ,
32
+ entry_abi= :specfunc , entry_safepoint:: Bool = false , use_jlplt :: Bool = true , always_inline= false ,
29
33
method_table= test_method_table, kwargs... )
30
34
source = methodinstance (typeof (func), Base. to_tuple_type (types), Base. get_world_counter ())
31
35
target = NativeCompilerTarget ()
32
- params = CompilerParams (entry_safepoint, method_table)
36
+ params = CompilerParams (entry_safepoint, use_jlplt, method_table)
33
37
config = CompilerConfig (target, params; kernel, entry_abi, always_inline)
34
38
CompilerJob (source, config), kwargs
35
39
end
0 commit comments