Skip to content

Commit eae3a8a

Browse files
authored
CompilerDevTools: use transform_result_for_cache instead of optimize (JuliaLang#57640)
As a follow-up to JuliaLang#57193 now that JuliaLang#57375 is merged. --------- Co-authored-by: Cédric Belmant <[email protected]>
1 parent 2fd6db2 commit eae3a8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Compiler/extras/CompilerDevTools/src/CompilerDevTools.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ function lookup_method_instance(f, args...)
4545
@ccall jl_method_lookup(Any[f, args...]::Ptr{Any}, (1+length(args))::Csize_t, Base.tls_world_age()::Csize_t)::Ref{Core.MethodInstance}
4646
end
4747

48-
function Compiler.optimize(interp::SplitCacheInterp, opt::Compiler.OptimizationState, caller::Compiler.InferenceResult)
49-
@invoke Compiler.optimize(interp::Compiler.AbstractInterpreter, opt::Compiler.OptimizationState, caller::Compiler.InferenceResult)
48+
function Compiler.transform_result_for_cache(interp::SplitCacheInterp, result::Compiler.InferenceResult, edges::Compiler.SimpleVector)
49+
opt = result.src::Compiler.OptimizationState
5050
ir = opt.result.ir::Compiler.IRCode
5151
override = GlobalRef(@__MODULE__(), :with_new_compiler)
5252
for inst in ir.stmts
@@ -61,6 +61,7 @@ function Compiler.optimize(interp::SplitCacheInterp, opt::Compiler.OptimizationS
6161
insert!(stmt.args, 1, override)
6262
insert!(stmt.args, 3, interp.owner)
6363
end
64+
@invoke Compiler.transform_result_for_cache(interp::Compiler.AbstractInterpreter, result::Compiler.InferenceResult, edges::Compiler.SimpleVector)
6465
end
6566

6667
with_new_compiler(f, args...; owner::SplitCacheOwner = SplitCacheOwner()) = with_new_compiler(f, owner, args...)

0 commit comments

Comments
 (0)