Skip to content

Commit 678b21f

Browse files
committed
Revert "fix #45440, improve the robustness of concrete-evaled callsite inlining (#45451)"
This reverts commit 08a9c12.
1 parent 84e9989 commit 678b21f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

base/compiler/ssair/inlining.jl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -788,20 +788,20 @@ end
788788

789789
function compileable_specialization(et::Union{EdgeTracker, Nothing}, match::MethodMatch, effects::Effects)
790790
mi = specialize_method(match; compilesig=true)
791+
mi !== nothing && et !== nothing && push!(et, mi::MethodInstance)
791792
mi === nothing && return nothing
792-
et !== nothing && push!(et, mi)
793793
return InvokeCase(mi, effects)
794794
end
795795

796796
function compileable_specialization(et::Union{EdgeTracker, Nothing}, linfo::MethodInstance, effects::Effects)
797797
mi = specialize_method(linfo.def::Method, linfo.specTypes, linfo.sparam_vals; compilesig=true)
798+
mi !== nothing && et !== nothing && push!(et, mi::MethodInstance)
798799
mi === nothing && return nothing
799-
et !== nothing && push!(et, mi)
800800
return InvokeCase(mi, effects)
801801
end
802802

803-
function compileable_specialization(et::Union{EdgeTracker, Nothing}, result::InferenceResult, effects::Effects)
804-
return compileable_specialization(et, result.linfo, effects)
803+
function compileable_specialization(et::Union{EdgeTracker, Nothing}, (; linfo)::InferenceResult, effects::Effects)
804+
return compileable_specialization(et, linfo, effects)
805805
end
806806

807807
function resolve_todo(todo::InliningTodo, state::InliningState, flag::UInt8)
@@ -1283,11 +1283,7 @@ function handle_const_call!(
12831283
any_fully_covered |= match.fully_covers
12841284
if isa(result, ConcreteResult)
12851285
case = concrete_result_item(result, state)
1286-
if case === nothing
1287-
handled_all_cases = false
1288-
else
1289-
push!(cases, InliningCase(result.mi.specTypes, case))
1290-
end
1286+
push!(cases, InliningCase(result.mi.specTypes, case))
12911287
elseif isa(result, ConstPropResult)
12921288
handled_all_cases &= handle_const_prop_result!(result, argtypes, flag, state, cases, true)
12931289
else

0 commit comments

Comments
 (0)