Skip to content

Commit

Permalink
improve inlining cost analysis for invoke (#47671)
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Nov 29, 2022
1 parent edc8241 commit 54a9c2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ function statement_cost(ex::Expr, line::Int, src::Union{CodeInfo, IRCode}, sptyp
end
return T_IFUNC_COST[iidx]
end
if isa(f, Builtin)
if isa(f, Builtin) && f !== invoke
# The efficiency of operations like a[i] and s.b
# depend strongly on whether the result can be
# inferred, so check the type of ex
Expand Down

0 comments on commit 54a9c2f

Please sign in to comment.