From 001c666086de77101b6937c3d31f0888a35325db Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 11 Nov 2024 20:58:30 -0500 Subject: [PATCH] infer_compilation_signatures for more cases (#56495) This seems to have negligible impact on size or performance, but makes code quality much better. --- Compiler/src/abstractinterpretation.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Compiler/src/abstractinterpretation.jl b/Compiler/src/abstractinterpretation.jl index d9319c02b110a..edeb5d805b3d5 100644 --- a/Compiler/src/abstractinterpretation.jl +++ b/Compiler/src/abstractinterpretation.jl @@ -207,10 +207,9 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), rettype = from_interprocedural!(interp, rettype, sv, arginfo, conditionals) # Also considering inferring the compilation signature for this method, so - # it is available to the compiler in case it ends up needing it. + # it is available to the compiler in case it ends up needing it for the invoke. if (isa(sv, InferenceState) && infer_compilation_signature(interp) && - (seenall && 1 == napplicable) && rettype !== Any && rettype !== Bottom && - !is_removable_if_unused(all_effects)) + (seenall && 1 == napplicable) && !is_removable_if_unused(all_effects)) (; match) = applicable[1] method = match.method sig = match.spec_types