File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ function codegen(output::Symbol, @nospecialize(job::CompilerJob);
163163 error (" Unknown compilation output $output " )
164164end
165165
166+ @noinline function var"gpuc.deferred" (f, args... ) end
167+ @noinline function var"gpuc.lookup" (mi, f, args... ) end
168+
166169# primitive mechanism for deferred compilation, for implementing CUDA dynamic parallelism.
167170# this could both be generalized (e.g. supporting actual function calls, instead of
168171# returning a function pointer), and be integrated with the nonrecursive codegen.
Original file line number Diff line number Diff line change @@ -460,6 +460,17 @@ function CC.concrete_eval_eligible(interp::GPUInterpreter,
460460end
461461end
462462
463+ function CC. abstract_call_known (interp:: GPUInterpreter , @nospecialize (f),
464+ arginfo:: CC.ArgInfo , si:: CC.StmtInfo , sv:: CC.AbsIntState ,
465+ max_methods:: Int = CC. get_max_methods (interp, f, sv))
466+ if f === var"gpuc.deferred" ||
467+ f === var"gpuc.lookup"
468+ return CC. CallMeta (Ptr{Cvoid}, Union{}, CC. Effects (), CC. NoCallInfo ())
469+ end
470+ return @invoke CC. abstract_call_known (interp:: CC.AbstractInterpreter , f,
471+ arginfo:: CC.ArgInfo , si:: CC.StmtInfo , sv:: CC.AbsIntState ,
472+ max_methods:: Int )
473+ end
463474
464475# # world view of the cache
465476using Core. Compiler: WorldView
You can’t perform that action at this time.
0 commit comments