similar to: [LLVMdev] [RFC] MCJIT usage models

Displaying 20 results from an estimated 100000 matches similar to: "[LLVMdev] [RFC] MCJIT usage models"

2013 Dec 09
0
[LLVMdev] [RFC] MCJIT usage models
On Dec 9, 2013, at 11:08 AM, Kaylor, Andrew <andrew.kaylor at intel.com> wrote: > Below is an outline of various usage models for MCJIT that I put together based on conversations at last month’s LLVM Developer Meeting. If you’re using or thinking about using MCJIT and your use case doesn’t seem to fit in one of the categories below then either I didn’t talk to you or I didn’t understand
2013 Dec 10
2
[LLVMdev] [RFC] MCJIT usage models
Hi Andy, My use case is quite similar to what Keno described. I am using clang + JIT to dynamically compile C++ functions generated in response to user interaction. Generated functions may be unloaded or modified. I would like to break down the old JIT code into three major parts. 1) The old JIT has its own code emitter, which duplicates code from lib/MC and does not generate debug info and
2013 Dec 09
3
[LLVMdev] [RFC] MCJIT usage models
Another usage case, slightly different than your #1: 6. Dynamic code generation (not interactive with respect to the source code) - app generates code IR which is compiled as needed for execution (important difference: no waiting for a typing human in the loop, so very different expectations about responsiveness and bottlenecks) - compilation speed IS critical (because many such
2013 Dec 10
0
[LLVMdev] [RFC] MCJIT usage models
With Julia, we're obviously very much in the first use case. As you know, we pretty much have a working version of Julia on top of MCJIT, but there's still a few kinks to work out, which I'll talk about in a separate email. One think which I remember you asking at the BOF is what MCJIT currently can't do well that the old JIT did, so I'd like to offer up an example. With the
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
2013 Nov 16
2
[LLVMdev] (Very) small patch for the jit event listener
Hi Andrew (hi all:)), I perfectly understand the problem of relocation and it's really not a problem in my case. I'm still trying to make MCJIT runs but I face a small problem. I have to insert callback to the runtime for functions provided by vmkit (for example, a gcmalloc function to allocate memory from the heap). With the old JIT, VMKit simply loads a large bc file that contains all
2012 Jul 18
2
[LLVMdev] rwx pages dangerous?
The main problem, as I see it, is that there's no way for the memory manager to know when it can safely change the protection state of sections apart from making assumptions about the implementation of MCJIT (namely that it will generate code on construction) and receiving some sort of notification outside the standard interface. I believe there's also no provision for handling read-only
2013 Nov 14
2
[LLVMdev] (Very) small patch for the jit event listener
Hi Andy, Thanks for the answer. I'm currently reading the internal code of MCJIT and it's really a great work (I was only using the ExecutionEngine interface for the moment). So, I agree, all what I need is already in the code (see below) :) 2013/11/14 Kaylor, Andrew <andrew.kaylor at intel.com>: > Hi Gaël, > > Thank you for the detailed explanation. It's very
2012 Jul 18
1
[LLVMdev] rwx pages dangerous?
When you talk about lazy compilation, it isn't clear to me if you mean the single compilation step that produces a loadable module being delayed until a function is requested or the full-blown, legacy-JIT style lazy compilation of individual functions within a module being JITed only when needed. If the latter, it isn't clear to me how that would be done within the MC model. That's a
2012 Jul 18
0
[LLVMdev] rwx pages dangerous?
Somewhat, yes. The MCJIT currently doesn't support lazy compilation in general, and things like notifications back (via the memory manager) when new sections have been produced and such needs to be part of that. Your'e right that, for now, the underlying assumption is that everything gets built up at once. The following is mostly stuff we've talked about before, but just to make sure
2013 Nov 14
2
[LLVMdev] (Very) small patch for the jit event listener
Hi Yaron, I think a lot of what I said in my reply to Gaël also applies to your situation. In particular, I think that it's probably best for your code to manager the function stubs and replacement. I talked last week with a developer who works on the Julia language (which shares a lot of features your situation) and it's my understanding that the Julia runtime handles function stubs
2013 Nov 19
1
[LLVMdev] (Very) small patch for the jit event listener
Hi Gaël, Multiple module support should be fully functional. However, there are some oddities in how MCJIT gets memory ready to execute, particularly if you are using the deprecated getPointerToFunction or runFunction methods. If you use these methods you'll need to call finalizeObject before you execute the code. I've heard reports that there's a bug doing that after adding
2013 Nov 19
0
[LLVMdev] (Very) small patch for the jit event listener
Hi Andrew, Thank you very much for all your help! So, I have tested without my shared library (with a relocatable object and without) and still, my code is not executable. I was testing my code with multiple modules and I don't now if using multiple modules is fully functional? Anyway, I'm now allocating a mcjit for each function to be sure. But now, I have a new problem that comes
2014 Jan 20
2
[LLVMdev] MCJIT versus getLazyBitcodeModule?
I'm having a problem with MCJIT (in LLVM 3.3 and 3.4), in which it's not resolving symbol mangling in a precompiled bitcode in the same way as old JIT. It's possible that it's just my misunderstanding. Maybe somebody can spot my problem, or identify it as an MCJIT bug. Here's my situation, in a nutshell: * I am assembling IR and JITing in my app. The IR may potentially make
2013 Nov 16
0
[LLVMdev] (Very) small patch for the jit event listener
Hump, I think that I have to solution, but I have a new problem (more serious). For the solution, it's stupid, I have simply loaded the shared library in ObjectCache::getObject directly in a MemoryBuffer :) As the linker understand a .o, it understands a .so. Now, I'm able to compile a module (I call finalizeObject()), I'm able to find my first generated function pointer, but I'm
2013 Nov 14
0
[LLVMdev] (Very) small patch for the jit event listener
Hi Gaël, I'm glad to hear that MCJIT looks promising to you. > I understand the point. Probably that providing a small example that describes how using > advanced features of MCJIT could help. If I can manage to make MCJIT works with VMKit, > I'll be happy to send you an example of lazy compilation that highlight some of the features > of MCJIT. I'd love to have a
2013 Nov 13
0
[LLVMdev] (Very) small patch for the jit event listener
Hi Andy, We had previous discussions about this, I'd like to state more exactly what features would make MCJIT a replacement for the JIT. After putting significant effort trying to move to MCJIT, I'm currently back with the JIT. This is in a REPL environment where functions are added and removed dynamically and response time is important. The issue is the legacy JIT provides great
2013 Feb 06
1
[LLVMdev] MCJIT and Lazy Compilation
Hi Andy and Andrew, I am very interested in this discussion as our co. have critical components that are dependent on the old JIT. We have implemented support for MCJIT mostly to get AVX support. The difference in module support is forcing us to duplicate a module when we want to JIT the same bitcode with different parameters. We also have code that depends on the JITEventListener API.
2013 Nov 15
0
[LLVMdev] (Very) small patch for the jit event listener
Hi Andy, I have been following Julia with interest, as it's a type-optional language designed to be as nice as dynamic languages but run at the speed of compiled C++ programs. They achieve this by deducing as many types at compile time and JITing code for the unknown types at runtime when they are known. That's a smart use of a JIT. In C++ terms it's analog to instantiating templates
2013 Nov 13
3
[LLVMdev] (Very) small patch for the jit event listener
Hi Gaël, I'm not familiar enough with the details of the old JIT engine and its event interface to comment on whether or not your changes are appropriate, but I'm not sure anyone is so the patch is probably OK as is. I don't see any obvious problems with it. However, your description of the changes raises a bigger issue in my mind. I'm not sure if you are aware of this, but