From 6407c3379b9dc38327a759b2f6324f0b3e927695 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 30 Jan 2024 20:28:11 -0500 Subject: [PATCH] inference: avoid adding duplicate edges as invoke targets (#53121) This was inefficient, though not wrong. Fixes #53020 --- base/compiler/ssair/inlining.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 232112fc4cd1b..019df328ab9a1 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -837,7 +837,7 @@ function compileable_specialization(mi::MethodInstance, effects::Effects, end end add_inlining_backedge!(et, mi) # to the dispatch lookup - push!(et.edges, method.sig, mi_invoke) # add_inlining_backedge to the invoke call + mi_invoke !== mi && push!(et.edges, method.sig, mi_invoke) # add_inlining_backedge to the invoke call, if that is different return InvokeCase(mi_invoke, effects, info) end