Skip to content

Commit

Permalink
inlining: remove unused allow_abstract::Bool keyword argument
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Mar 21, 2024
1 parent 09400e4 commit 33da26a
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions base/compiler/ssair/inlining.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1296,16 +1296,16 @@ end
function handle_any_const_result!(cases::Vector{InliningCase},
@nospecialize(result), match::MethodMatch, argtypes::Vector{Any},
@nospecialize(info::CallInfo), flag::UInt32, state::InliningState;
allow_abstract::Bool, allow_typevars::Bool)
allow_typevars::Bool)
if isa(result, ConcreteResult)
return handle_concrete_result!(cases, result, match, info, state)
elseif isa(result, SemiConcreteResult)
return handle_semi_concrete_result!(cases, result, match, info, flag, state; allow_abstract)
return handle_semi_concrete_result!(cases, result, match, info, flag, state)
elseif isa(result, ConstPropResult)
return handle_const_prop_result!(cases, result, match, info, flag, state; allow_abstract, allow_typevars)
return handle_const_prop_result!(cases, result, match, info, flag, state; allow_typevars)
else
@assert result === nothing || result isa VolatileInferenceResult
return handle_match!(cases, match, argtypes, info, flag, state; allow_abstract, allow_typevars, volatile_inf_result = result)
return handle_match!(cases, match, argtypes, info, flag, state; allow_typevars, volatile_inf_result = result)
end
end

Expand Down Expand Up @@ -1370,7 +1370,7 @@ function compute_inlining_cases(@nospecialize(info::CallInfo), flag::UInt32, sig
handled_all_cases = false
else
handled_all_cases &= handle_any_const_result!(cases,
result, match, argtypes, info, flag, state; allow_abstract=true, allow_typevars=false)
result, match, argtypes, info, flag, state; allow_typevars=false)
end
end
fully_covered &= split_fully_covered
Expand All @@ -1386,7 +1386,7 @@ function compute_inlining_cases(@nospecialize(info::CallInfo), flag::UInt32, sig
match = getsplit(info, i)[j]
result = getresult(info, k)
handled_all_cases &= handle_any_const_result!(cases,
result, match, argtypes, info, flag, state; allow_abstract=true, allow_typevars=true)
result, match, argtypes, info, flag, state; allow_typevars=true)
end
elseif !isempty(cases)
# if we've not seen all candidates, union split is valid only for dispatch tuples
Expand All @@ -1409,10 +1409,8 @@ end
function handle_match!(cases::Vector{InliningCase},
match::MethodMatch, argtypes::Vector{Any}, @nospecialize(info::CallInfo), flag::UInt32,
state::InliningState;
allow_abstract::Bool, allow_typevars::Bool,
volatile_inf_result::Union{Nothing,VolatileInferenceResult})
allow_typevars::Bool, volatile_inf_result::Union{Nothing,VolatileInferenceResult})
spec_types = match.spec_types
allow_abstract || isdispatchtuple(spec_types) || return false
# We may see duplicated dispatch signatures here when a signature gets widened
# during abstract interpretation: for the purpose of inlining, we can just skip
# processing this dispatch candidate (unless unmatched type parameters are present)
Expand All @@ -1425,10 +1423,9 @@ end

function handle_const_prop_result!(cases::Vector{InliningCase}, result::ConstPropResult,
match::MethodMatch, @nospecialize(info::CallInfo), flag::UInt32, state::InliningState;
allow_abstract::Bool, allow_typevars::Bool)
allow_typevars::Bool)
mi = result.result.linfo
spec_types = match.spec_types
allow_abstract || isdispatchtuple(spec_types) || return false
if !validate_sparams(mi.sparam_vals)
(allow_typevars && !may_have_fcalls(mi.def::Method)) || return false
end
Expand Down Expand Up @@ -1462,11 +1459,9 @@ function semiconcrete_result_item(result::SemiConcreteResult,
end

function handle_semi_concrete_result!(cases::Vector{InliningCase}, result::SemiConcreteResult,
match::MethodMatch, @nospecialize(info::CallInfo), flag::UInt32, state::InliningState;
allow_abstract::Bool)
match::MethodMatch, @nospecialize(info::CallInfo), flag::UInt32, state::InliningState)
mi = result.mi
spec_types = match.spec_types
allow_abstract || isdispatchtuple(spec_types) || return false
validate_sparams(mi.sparam_vals) || return false
item = semiconcrete_result_item(result, info, flag, state)
item === nothing && return false
Expand Down

0 comments on commit 33da26a

Please sign in to comment.