MCPcopy Create free account
hub / github.com/apache/cloudberry / load_module_cached

Function load_module_cached

src/backend/jit/llvm/llvmjit_inline.cpp:467–478  ·  view source on GitHub ↗

* Return a module identified by modPath, caching it in memory. * * Note that such a module may *not* be modified without copying, otherwise * the cache state would get corrupted. */

Source from the content-addressed store, hash-verified

465 * the cache state would get corrupted.
466 */
467static llvm::Module*
468load_module_cached(llvm::StringRef modPath)
469{
470 auto it = module_cache->find(modPath);
471 if (it == module_cache->end())
472 {
473 it = module_cache->insert(
474 std::make_pair(modPath, load_module(modPath))).first;
475 }
476
477 return it->second.get();
478}
479
480static std::unique_ptr<llvm::Module>
481load_module(llvm::StringRef Identifier)

Callers 1

llvm_build_inline_planFunction · 0.85

Calls 4

load_moduleFunction · 0.85
findMethod · 0.80
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected