From 63ec332cd5fbfc42eb8e8952c11afc3072d98594 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 18 Jan 2021 13:50:49 -0500 Subject: [PATCH] aotcompile: avoid cache lookup when disallowed (#39265) Fix #38548 (cherry picked from commit 29f2f896363c43a9d01758b75e2b2b5882d8ba80) --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 2f565740975f24..c7f8f4b942c19b 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4623,7 +4623,7 @@ static Function *emit_tojlinvoke(jl_code_instance_t *codeinst, Module *M, jl_cod ctx.builder.SetInsertPoint(b0); Function *theFunc; Value *theFarg; - if (codeinst->invoke != NULL) { + if (params.cache && codeinst->invoke != NULL) { StringRef theFptrName = jl_ExecutionEngine->getFunctionAtAddress((uintptr_t)codeinst->invoke, codeinst); theFunc = cast( M->getOrInsertFunction(theFptrName, jlinvoke_func->_type(jl_LLVMContext)).getCallee());