Skip to content

Commit 1f161b4

Browse files
authored
only time inference if any work is actually done (#49817)
1 parent 15d7bd8 commit 1f161b4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/gf.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ jl_datatype_t *jl_mk_builtin_func(jl_datatype_t *dt, const char *name, jl_fptr_a
344344
// if inference doesn't occur (or can't finish), returns NULL instead
345345
jl_code_info_t *jl_type_infer(jl_method_instance_t *mi, size_t world, int force)
346346
{
347-
JL_TIMING(INFERENCE, INFERENCE);
348347
if (jl_typeinf_func == NULL)
349348
return NULL;
350349
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)
361360
#ifdef ENABLE_INFERENCE
362361
if (mi->inInference && !force)
363362
return NULL;
364-
363+
JL_TIMING(INFERENCE, INFERENCE);
365364
jl_value_t **fargs;
366365
JL_GC_PUSHARGS(fargs, 3);
367366
fargs[0] = (jl_value_t*)jl_typeinf_func;

0 commit comments

Comments
 (0)