Skip to content

Commit 6407c33

Browse files
vtjnashKristofferC
authored andcommitted
inference: avoid adding duplicate edges as invoke targets (#53121)
This was inefficient, though not wrong. Fixes #53020
1 parent 00aa65e commit 6407c33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/compiler/ssair/inlining.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ function compileable_specialization(mi::MethodInstance, effects::Effects,
837837
end
838838
end
839839
add_inlining_backedge!(et, mi) # to the dispatch lookup
840-
push!(et.edges, method.sig, mi_invoke) # add_inlining_backedge to the invoke call
840+
mi_invoke !== mi && push!(et.edges, method.sig, mi_invoke) # add_inlining_backedge to the invoke call, if that is different
841841
return InvokeCase(mi_invoke, effects, info)
842842
end
843843

0 commit comments

Comments
 (0)