From 63574a88a015d2fd788872e149a3e96c8f6a9469 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Mon, 15 May 2023 11:33:55 +0200 Subject: [PATCH] only time inference if any work is actually done --- src/gf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gf.c b/src/gf.c index 6d55e479babfe..5a720e45756a6 100644 --- a/src/gf.c +++ b/src/gf.c @@ -344,7 +344,6 @@ jl_datatype_t *jl_mk_builtin_func(jl_datatype_t *dt, const char *name, jl_fptr_a // if inference doesn't occur (or can't finish), returns NULL instead jl_code_info_t *jl_type_infer(jl_method_instance_t *mi, size_t world, int force) { - JL_TIMING(INFERENCE, INFERENCE); if (jl_typeinf_func == NULL) return NULL; jl_task_t *ct = jl_current_task; @@ -361,7 +360,7 @@ jl_code_info_t *jl_type_infer(jl_method_instance_t *mi, size_t world, int force) #ifdef ENABLE_INFERENCE if (mi->inInference && !force) return NULL; - + JL_TIMING(INFERENCE, INFERENCE); jl_value_t **fargs; JL_GC_PUSHARGS(fargs, 3); fargs[0] = (jl_value_t*)jl_typeinf_func;