Skip to content

Commit e94f023

Browse files
committed
Stub abstract interpretation support
1 parent 4178477 commit e94f023

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/driver.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ function codegen(output::Symbol, @nospecialize(job::CompilerJob);
163163
error("Unknown compilation output $output")
164164
end
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.

src/jlgen.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,17 @@ function CC.concrete_eval_eligible(interp::GPUInterpreter,
460460
end
461461
end
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
465476
using Core.Compiler: WorldView

0 commit comments

Comments
 (0)