Skip to content

Commit

Permalink
remove CachedMethodTable
Browse files Browse the repository at this point in the history
Apologize for the confusion!
In <JuliaLang/julia#44240>, we figured out that
`CachedMethodTable` doesn't give us any performance benefit (both in
time and space), and so we removed that from Julia Base.
This commit updates the (newly updated) GPUCompiler's overloads accordingly.
  • Loading branch information
aviatesk committed Feb 23, 2022
1 parent dc7685e commit e145095
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/jlgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ end

## interpreter

using Core.Compiler: AbstractInterpreter, InferenceResult, InferenceParams, InferenceState,
OptimizationParams, CachedMethodTable
using Core.Compiler:
AbstractInterpreter, InferenceResult, InferenceParams, InferenceState, OptimizationParams

struct GPUInterpreter <: AbstractInterpreter
global_cache::CodeCache
Expand Down Expand Up @@ -220,17 +220,17 @@ end
Core.Compiler.may_optimize(interp::GPUInterpreter) = true
Core.Compiler.may_compress(interp::GPUInterpreter) = true
Core.Compiler.may_discard_trees(interp::GPUInterpreter) = true
if VERSION >= v"1.7.0-DEV.577"
@static if VERSION >= v"1.7.0-DEV.577"
Core.Compiler.verbose_stmt_info(interp::GPUInterpreter) = false
end

if isdefined(Base.Experimental, Symbol("@overlay"))
@static if isdefined(Base.Experimental, Symbol("@overlay"))
using Core.Compiler: OverlayMethodTable
Core.Compiler.method_table(interp::GPUInterpreter, sv::InferenceState) =
CachedMethodTable(OverlayMethodTable(interp.world, interp.method_table))
OverlayMethodTable(interp.world, interp.method_table)
else
Core.Compiler.method_table(interp::GPUInterpreter, sv::InferenceState) =
CachedMethodTable(WorldOverlayMethodTable(interp.world))
WorldOverlayMethodTable(interp.world)
end


Expand Down

0 comments on commit e145095

Please sign in to comment.