Skip to content

Commit

Permalink
drop AbstractGPUInterpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Sep 26, 2024
1 parent a018c17 commit b37223e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/jlgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@ else
get_method_table_view(world::UInt, mt::MTType) = OverlayMethodTable(world, mt)
end

abstract type AbstractGPUInterpreter <: CC.AbstractInterpreter end
struct GPUInterpreter <: AbstractGPUInterpreter
struct GPUInterpreter <: CC.AbstractInterpreter
world::UInt
method_table::GPUMethodTableView

Expand Down Expand Up @@ -446,7 +445,7 @@ struct DeferredCallInfo <: CC.CallInfo
end

# recognize calls to gpuc.deferred and save DeferredCallInfo metadata
function CC.abstract_call_known(interp::AbstractGPUInterpreter, @nospecialize(f),
function CC.abstract_call_known(interp::GPUInterppreter, @nospecialize(f),
arginfo::CC.ArgInfo, si::CC.StmtInfo, sv::CC.AbsIntState,
max_methods::Int = CC.get_max_methods(interp, f, sv))
(; fargs, argtypes) = arginfo
Expand Down Expand Up @@ -519,7 +518,7 @@ function find_deferred_edges(ir::CC.IRCode)
end

if VERSION >= v"1.11.0-"
function CC.ipo_dataflow_analysis!(interp::AbstractGPUInterpreter, ir::CC.IRCode,
function CC.ipo_dataflow_analysis!(interp::GPUInterppreter, ir::CC.IRCode,
caller::CC.InferenceResult)
edges = find_deferred_edges(ir)
if !isempty(edges)
Expand All @@ -530,7 +529,7 @@ function CC.ipo_dataflow_analysis!(interp::AbstractGPUInterpreter, ir::CC.IRCode
end
else # v1.10
# 1.10 doesn't have stack_analysis_result or ipo_dataflow_analysis
function CC.finish(interp::AbstractGPUInterpreter, opt::CC.OptimizationState, ir::CC.IRCode,
function CC.finish(interp::GPUInterppreter, opt::CC.OptimizationState, ir::CC.IRCode,
caller::CC.InferenceResult)
edges = find_deferred_edges(ir)
if !isempty(edges)
Expand Down

0 comments on commit b37223e

Please sign in to comment.