Skip to content

Commit ac29e3a

Browse files
committed
inference: ensure source is saved for IRInterp when assumed to be available
1 parent 2e8d053 commit ac29e3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Compiler/src/typeinfer.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ function transform_result_for_cache(interp::AbstractInterpreter, result::Inferen
399399
if isa(src, OptimizationState)
400400
opt = src
401401
inlining_cost = compute_inlining_cost(interp, result, opt.optresult)
402-
discard_optimized_result(interp, opt, inlining_cost) && return nothing
402+
discard_optimized_result(interp, opt, inlining_cost, result.ipo_effects) && return nothing
403403
src = ir_to_codeinf!(opt)
404404
end
405405
if isa(src, CodeInfo)
@@ -409,7 +409,7 @@ function transform_result_for_cache(interp::AbstractInterpreter, result::Inferen
409409
return src
410410
end
411411

412-
function discard_optimized_result(interp::AbstractInterpreter, opt#=::OptimizationState=#, inlining_cost#=::InlineCostType=#)
412+
function discard_optimized_result(interp::AbstractInterpreter, opt#=::OptimizationState=#, inlining_cost#=::InlineCostType=#, effects::Effects)
413413
may_discard_trees(interp) || return false
414414
return inlining_cost == MAX_INLINE_COST
415415
end

0 commit comments

Comments
 (0)