Skip to content

Commit

Permalink
inlining: allow non-compileable result when handling ConcreteResult
Browse files Browse the repository at this point in the history
In rare cases, the system might decide to widen the signature of a call
that is determined to throw by concrete-evaluation.
We should remove this unnecessary assertion here.

closes #49050
  • Loading branch information
aviatesk committed Mar 21, 2023
1 parent ceffaee commit b36fe58
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions base/compiler/ssair/inlining.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,7 @@ end

function handle_concrete_result!(cases::Vector{InliningCase}, result::ConcreteResult, @nospecialize(info::CallInfo), state::InliningState)
case = concrete_result_item(result, info, state)
case === nothing && return false
push!(cases, InliningCase(result.mi.specTypes, case))
return true
end
Expand All @@ -1505,10 +1506,8 @@ function concrete_result_item(result::ConcreteResult, @nospecialize(info::CallIn
invokesig::Union{Nothing,Vector{Any}}=nothing)
if !may_inline_concrete_result(result)
et = InliningEdgeTracker(state.et, invokesig)
case = compileable_specialization(result.mi, result.effects, et, info;
return compileable_specialization(result.mi, result.effects, et, info;
compilesig_invokes=OptimizationParams(state.interp).compilesig_invokes)
@assert case !== nothing "concrete evaluation should never happen for uncompileable callsite"
return case
end
@assert result.effects === EFFECTS_TOTAL
return ConstantCase(quoted(result.result))
Expand Down

0 comments on commit b36fe58

Please sign in to comment.