Displaying 20 results from an estimated 400 matches similar to: "[LLVMdev] How to cache MCJIT compiled object into memory?"
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 =
2014 Sep 11
2
[LLVMdev] Fail to load a pointer to a function inside MCJIT-ed code when it is reload from ObjectCache
Hi, All
I have a problem to reuse mcjit jitted code loaded from ObjectCache 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.
2014 Sep 11
2
[LLVMdev] Fail to load a pointer to a function inside MCJIT-ed code when it is reload from ObjectCache
Thank you Lang. I attached the ELF object file here for your reference.
Here is the IR dump of JittedOpExpr LLVM function. IrExprGetValue1 LLVM
function calls to external function expr->evalfunc(expr, econtext, isNull,
isDone); which should be pointed by 0x7fe4801fa1f8. However, only the first
time MCJIT generated object point to expr->evalfunc but second time when
program load from object
2012 May 08
3
[LLVMdev] [RFC] llvm/include/Support/OutputBuffer.h
On May 8, 2012, at 3:41 PM, Michael Spencer wrote:
> On Mon, May 7, 2012 at 12:56 PM, Nick Kledzik <kledzik at apple.com> wrote:
>> For the reasons listed in my 03-May-2012 email, I am proposing a new
>> llvm/Support class for using in writing binary files:
>>
>> /// OutputBuffer - This interface provides simple way to create an in-memory
>> /// buffer
2012 May 08
0
[LLVMdev] [RFC] llvm/include/Support/OutputBuffer.h
On Mon, May 7, 2012 at 12:56 PM, Nick Kledzik <kledzik at apple.com> wrote:
> For the reasons listed in my 03-May-2012 email, I am proposing a new
> llvm/Support class for using in writing binary files:
>
> /// OutputBuffer - This interface provides simple way to create an in-memory
> /// buffer which when done will be written to a file. During the lifetime
> of
>
2006 Jan 13
6
rails bug ? metadata lost between page invocation ?
Ok, so I posted this on the ''ruby on rails'' newsgroup
(http://groups.google.com/group/rubyonrails/browse_frm/thread/cfce770d3fbfbd1f/a51aad47e46e2adf#a51aad47e46e2adf)
but didn''t get very far.
Hopefully this community will be able to help or let me know whether
this is a genuine rails bug. This is a lengthy post, but please bear
with me.
So, I am trying to cache
2012 May 08
0
[LLVMdev] [RFC] llvm/include/Support/OutputBuffer.h
On May 8, 2012, at 4:08 PM, Nick Kledzik <kledzik at apple.com> wrote:
>
> On May 8, 2012, at 3:41 PM, Michael Spencer wrote:
>
>> On Mon, May 7, 2012 at 12:56 PM, Nick Kledzik <kledzik at apple.com> wrote:
>>> For the reasons listed in my 03-May-2012 email, I am proposing a new
>>> llvm/Support class for using in writing binary files:
>>>
2012 May 07
4
[LLVMdev] [RFC] llvm/include/Support/OutputBuffer.h
For the reasons listed in my 03-May-2012 email, I am proposing a new llvm/Support class for using in writing binary files:
/// OutputBuffer - This interface provides simple way to create an in-memory
/// buffer which when done will be written to a file. During the lifetime of
/// these objects, the content or existence of the specified file is undefined.
/// That is, creating an OutputBuffer
2013 Apr 23
3
[LLVMdev] LLVM JIT Questions
On Tue, Apr 23, 2013 at 10:39 AM, Kaylor, Andrew <andrew.kaylor at intel.com>wrote:
> Hi Dmitri,
>
> Regarding your first question, if you can use the MCJIT engine a caching
> mechanism will be available very soon. I'm preparing to commit a patch
> today to add this capability. I'm not sure what it would take to get
> something similar working with the older JIT
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
all of:
----
// cout << "lsr: " << lsr << "\n";
llvm::MemoryBuffer* mbjit =
llvm::MemoryBuffer::getMemBufferCopy (sr);
------
string lsr = sr.str();
// cout << "lsr: " << lsr << "\n";
2015 Aug 13
2
Rationale for the object cache design?
Hello,
I am a bit curious about the rationale for the current callback-based
object cache API. For Numba, it would be easier if there would be a
simple procedural API:
- one method to get a module's compiled object code
- one method to load/instantiate a module from a given piece of object code
I manage to get around the callback-based API to do what I want, but
it's a bit weird to work
2013 Apr 23
0
[LLVMdev] LLVM JIT Questions
Yes, exactly. My patch adds a new ObjectCache class which can be registered with MCJIT. MCJIT will then call this component before attempting to generate code to see if it has a cached object image for a given module. If the ObjectCache has a cached object, MCJIT will skip the code generation step and just perform linking and loading. If the ObjectCache does not have a cached version MCJIT
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
This segfault occuring only under valgrind,
in shell way, and in gdb way i have
Invalid bitcode signature
simple_scev_dynamic_array: /home/willy/apollo/llvm/include/llvm/Support/ErrorOr.h:258: storage_type *llvm::ErrorOr<llvm::Module *>::getStorage() [T = llvm::Module *]: Assertion `!HasError && "Cannot get value when an error exists!"' failed.
Command terminated by
2018 Nov 05
2
ORC JIT api, object files and stackmaps
Hi Christian
Your use case seems to have similar requirements as remote JITing in
ORC. So far I haven't used that part myself and I am sure Lang can tell
you much more about it. However, this comment on the
RemoteObjectClientLayer class sounds promising for your questions (1)
and (2):
/// Sending relocatable objects to the server (rather than fully relocated
/// bits) allows JIT'd code
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
I mad the change, and still have the problem.
I investigate more the source code of llvm.
First, I change isRawBitcode function to print the content of the
parameter like this:
original:
http://llvm.org/docs/doxygen/html/ReaderWriter_8h_source.html#l00081
inline bool isRawBitcode(const unsigned char *BufPtr,
const unsigned char *BufEnd) {
// These bytes sort
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
Hello Willy,
Here is the dump from one of my bitcode files:
0000000 42 43 c0 de 21 0c 00 00 25 05 00 00 0b 82 20 00
As expected, 0x42 (= B), 0x43 (= C), xc0 and 0xde are in correct order. In
your case, the first byte is read as 37 (= 0x25). I wonder why? When you
check the bytes yourself, you get expected results. When the same bytes are
read from Stream object, you get a different result (maybe
2013 Apr 23
1
[LLVMdev] LLVM JIT Questions
This sounds great, but will it work on Windows as well ?
I considered MCJIT for my work, but was not sure if there are any features
supported by old JIT but missing in MCJIT.
Thanks,
Dmitri
Am 23.04.2013 20:26 schrieb "Kaylor, Andrew" <andrew.kaylor at intel.com>:
> Yes, exactly. My patch adds a new ObjectCache class which can be
> registered with MCJIT. MCJIT will
2014 Jan 26
2
[LLVMdev] MCJIT versus getLazyBitcodeModule?
Hi Gael, I tried converting to your approach but I had some issues making
sure that all symbols accessed by the jit modules have entries in the
dynamic symbol table.
To be specific, my current approach is to use MCJIT (using an objectcache)
to JIT the runtime module and then let MCJIT handle linking any references
from the jit'd modules; I just experimented with what I think you're doing,
2007 Nov 10
2
Array of files and other questions...
Hi
I''m quite new to the art of writing puppet manifest, but the more I see,
the more I like it :-)
I''m trying to write a djbdns dnscache module.
dnscache configuration is spread in several files, for instance the ip
addresses allowed to query the cache each have a file in dnscache/root/ip/
whose filename is the address.
I''m trying to automate the creations of those
2013 Nov 18
2
[LLVMdev] (Very) small patch for the jit event listener
Hi Gaƫl,
I would guess that MCJIT is probably attempting to load and link the shared library you return from the ObjectCache in the way it would load and link generated code, which would be wrong for a shared library. I know it seems like it should be easier to handle a shared library than a raw relocatable object (and it probably is) but MCJIT doesn't handle that case at the moment. The