1#ifndef PROTEUS_FRONTEND_DISPATCHER_HOST_HPP
2#define PROTEUS_FRONTEND_DISPATCHER_HOST_HPP
18 std::unique_ptr<MemoryBuffer>
compile(std::unique_ptr<LLVMContext> Ctx,
19 std::unique_ptr<Module> Mod,
26 std::unique_ptr<MemoryBuffer> ObjectModule =
31 ObjectCache.
store(ModuleHash, ObjectModule->getMemBufferRef());
36 std::unique_ptr<CompiledLibrary>
38 return ObjectCache.
lookup(ModuleHash);
89 StorageCache ObjectCache{
"DispatcherHost"};
#define PROTEUS_FATAL_ERROR(x)
Definition Error.h:7
Definition DispatcherHost.hpp:11
DispatcherHost()
Definition DispatcherHost.hpp:77
DispatchResult launch(void *, LaunchDims, LaunchDims, ArrayRef< void * >, uint64_t, void *) override
Definition DispatcherHost.hpp:41
std::unique_ptr< MemoryBuffer > compile(std::unique_ptr< LLVMContext > Ctx, std::unique_ptr< Module > Mod, HashT ModuleHash, bool DisableIROpt=false) override
Definition DispatcherHost.hpp:18
void registerDynamicLibrary(HashT HashValue, const SmallString< 128 > &Path) override
Definition DispatcherHost.hpp:71
static DispatcherHost & instance()
Definition DispatcherHost.hpp:13
StringRef getDeviceArch() const override
Definition DispatcherHost.hpp:46
~DispatcherHost()
Definition DispatcherHost.hpp:81
std::unique_ptr< CompiledLibrary > lookupCompiledLibrary(HashT ModuleHash) override
Definition DispatcherHost.hpp:37
void * getFunctionAddress(StringRef FnName, HashT ModuleHash, CompiledLibrary &Library) override
Definition DispatcherHost.hpp:50
Definition Dispatcher.hpp:54
TargetModelType TargetModel
Definition Dispatcher.hpp:56
Definition Hashing.hpp:20
Definition JitEngineHost.hpp:30
std::unique_ptr< MemoryBuffer > compileOnly(Module &M, bool DisableIROpt=false)
Definition JitEngineHost.cpp:274
void loadCompiledLibrary(CompiledLibrary &Library)
Definition JitEngineHost.cpp:317
void * getFunctionAddress(StringRef FnName, CompiledLibrary &Library)
Definition JitEngineHost.cpp:353
Definition MemoryCache.hpp:27
void printStats()
Definition MemoryCache.hpp:61
void insert(HashT &HashValue, Function_t FunctionPtr, StringRef FnName)
Definition MemoryCache.hpp:45
Function_t lookup(HashT &HashValue)
Definition MemoryCache.hpp:31
std::unique_ptr< CompiledLibrary > lookup(HashT &HashValue)
Definition StorageCache.cpp:41
void store(HashT &HashValue, MemoryBufferRef ObjBufRef)
Definition StorageCache.cpp:66
void printStats()
Definition StorageCache.cpp:86
void storeDynamicLibrary(HashT &HashValue, const SmallString< 128 > &Path)
Definition StorageCache.cpp:76
Definition StorageCache.cpp:24
HashT hash(FirstT &&First, RestTs &&...Rest)
Definition Hashing.hpp:126
T getRuntimeConstantValue(void *Arg)
Definition CompilerInterfaceRuntimeConstantInfo.h:114
Definition Dispatcher.hpp:16
Definition CompiledLibrary.hpp:12
bool IsLoaded
Definition CompiledLibrary.hpp:18
Definition Dispatcher.hpp:32