Skip to content

Commit d30ceb0

Browse files
committed
Stub abstract interpretation support
1 parent 7143d02 commit d30ceb0

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
@@ -130,6 +130,9 @@ function codegen(output::Symbol, @nospecialize(job::CompilerJob);
130130
error("Unknown compilation output $output")
131131
end
132132

133+
@noinline function var"gpuc.deferred"(f, args...) end
134+
@noinline function var"gpuc.lookup"(mi, f, args...) end
135+
133136
# primitive mechanism for deferred compilation, for implementing CUDA dynamic parallelism.
134137
# this could both be generalized (e.g. supporting actual function calls, instead of
135138
# 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
@@ -435,6 +435,17 @@ function CC.concrete_eval_eligible(interp::GPUInterpreter,
435435
return ret
436436
end
437437

438+
function CC.abstract_call_known(interp::GPUInterpreter, @nospecialize(f),
439+
arginfo::CC.ArgInfo, si::CC.StmtInfo, sv::CC.AbsIntState,
440+
max_methods::Int = CC.get_max_methods(interp, f, sv))
441+
if f === var"gpuc.deferred" ||
442+
f === var"gpuc.lookup"
443+
return CC.CallMeta(Ptr{Cvoid}, Union{}, CC.Effects(), CC.NoCallInfo())
444+
end
445+
return @invoke CC.abstract_call_known(interp::CC.AbstractInterpreter, f,
446+
arginfo::CC.ArgInfo, si::CC.StmtInfo, sv::CC.AbsIntState,
447+
max_methods::Int)
448+
end
438449

439450
## world view of the cache
440451
using Core.Compiler: WorldView

0 commit comments

Comments
 (0)