From e8c2490de070c09a6320c885798155888aa1429b 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 --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 70daecb6fb61eb..a4ffb0a760e5ea 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4620,7 +4620,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());