search for: notifyobjectcompil

Displaying 5 results from an estimated 5 matches for "notifyobjectcompil".

Did you mean: notifyobjectcompiled
2014 Sep 18
2
[LLVMdev] How to cache MCJIT compiled object into memory?
Hi, All I m not sure if this question has been asked or not. I'd like cache the MCJIT compiled object into memory buffer so it can be reused later. I followed the Andy Kaylor's example wrote an inherited class from ObjectCache and use raw_fd_ostream to save the cache and load the cache from a file. I checked raw_ostream and its subclass, maybe I am wrong but I don't see one is fit to
2014 Sep 11
2
[LLVMdev] Fail to load a pointer to a function inside MCJIT-ed code when it is reload from ObjectCache
...jectCache from a file. In the first run, I use MCJIT generate function JittedOpExpr object code as following and it runs OK. 0x7fe4801fa1f8 at instruction 0x00007fe4cc6c2014 points to 0x69382E which is the beginning of ExecEvalVar function. Then I save the object code into a file after implementing notifyObjectCompiled method. IrExprGetValue: 0x00007fe4cc6c2000: push %rbp 0x00007fe4cc6c2001: mov %rsp,%rbp 0x00007fe4cc6c2004: mov 0x10(%rdi),%rax 0x00007fe4cc6c2008: pop %rbp 0x00007fe4cc6c2009: jmpq *%rax 0x00007fe4cc6c200b: nopl 0x0(%rax,%rax,1) JittedOpExpr:...
2016 Jul 07
2
ObjectCache and getFunctionAddress issue
Hi all, I'm trying to add pre-compiled object cache to my run-time. I've implemented the object cache as follow: class EngineObjectCache : public llvm::ObjectCache { private: std::unordered_map<std::string, std::unique_ptr<llvm::MemoryBuffer>> CachedObjs; public: virtual void notifyObjectCompiled(const llvm::Module *M, llvm::MemoryBufferRef Obj) { auto id = M->getModuleIdentifier(); auto iter = CachedObjs.find(id); if (iter == CachedObjs.end()) { auto buf = llvm::MemoryBuffer::getMemBufferCopy(Obj.getBuffer(), Obj.getBufferIdentifier()); CachedObjs.insert(std::make_pair(id, std::move(b...
2014 Sep 11
2
[LLVMdev] Fail to load a pointer to a function inside MCJIT-ed code when it is reload from ObjectCache
...run, I use MCJIT generate function JittedOpExpr object >> code as following and it runs OK. 0x7fe4801fa1f8 at instruction >> 0x00007fe4cc6c2014 points to 0x69382E which is the beginning of ExecEvalVar >> function. Then I save the object code into a file after implementing >> notifyObjectCompiled method. >> >> >> IrExprGetValue: >> 0x00007fe4cc6c2000: push %rbp >> 0x00007fe4cc6c2001: mov %rsp,%rbp >> 0x00007fe4cc6c2004: mov 0x10(%rdi),%rax >> 0x00007fe4cc6c2008: pop %rbp >> 0x00007fe4cc6c2009: jmpq *%rax >&gt...
2015 Apr 12
2
[LLVMdev] Looking for advice on how to debug a problem with C++ style exception handling code that my compiler generates.
Logan, How would I dump the object file generated by the JIT compiler pipeline? Could you point me to an example of how something like that is done? I’m used to working with the JIT machinery in memory but not writing object files out to disk. I’m have code to generate object files for AOT compilation - is it done the same way? Best, .Chris. On Apr 12, 2015, at 2:27 PM, Logan Chien