Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] MCJIT and Lazy Function Creators"
2012 Nov 27
0
[LLVMdev] MCJIT and Lazy Function Creators
Óscar Fuentes <ofv at wanadoo.es> writes:
> Out of curiosity, I'm replacing the JIT with MCJIT on my compiler. As
> all "external" functions are provided by the language's FFI mechanism,
> it does
>
> MyExecutionEngine->DisableSymbolSearching();
> MyExecutionEngine->InstallLazyFunctionCreator(&MyLazyFunctionCreator);
>
> which works fine
2012 Nov 27
2
[LLVMdev] MCJIT and Lazy Function Creators
I guess we'll have to add that to the list of things that needs to be done to replace the old JIT.
In the projects I've worked on that use MCJIT, we've been using getPointerToFunction and then calling it from outside the MCJIT engine, but I suppose that the generic handling in runFunction would be useful in some cases.
-Andy
-----Original Message-----
From: llvmdev-bounces at
2009 Oct 16
3
[LLVMdev] MallocInst/CallInst bitcast,
On Oct 16, 2009, at 4:43 AM, Daniel Waterworth wrote:
> Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and
> DisableSymbolSearching to cause malloc and free calls to be handled
> by my logging functions. Sorry for the unnecessary list mail.
No problem, this is a better way to go. The MallocInst and FreeInst
instructions are about to be removed from LLVM IR.
2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
Never mind, I used ExecutionEngine's InstallLazyFunctionCreator and
DisableSymbolSearching to cause malloc and free calls to be handled by my
logging functions. Sorry for the unnecessary list mail.
Is it possible to find out the size and beginning pointer of the current
stack frame, from a function operating outside of the virtual machine, but
called by a function within it?
Thanks,
Daniel
2009 Oct 16
0
[LLVMdev] MallocInst/CallInst bitcast,
Thanks very much. I only have one more question, (hopefully), which is, is
there a better way of finding the direction of stack growth other than:
static bool StackCmp(void *ptr) {
volatile int a;
return (void *)&a > ptr;
}
bool FindStackDirection() {
volatile int a;
return StackCmp((void *)&a);
}
Preferably one which isn't destroyed by optimization.
Thanks again,
2009 Oct 16
2
[LLVMdev] MallocInst/CallInst bitcast,
Hello,
I'm writing a virtual machine that functions as a sandbox based on llvm. In
order to prevent programs from accessing memory that has not been allocated
to them, I want to replace calls to malloc and free with calls to a logged
functions that will record the memory that is being allocated to the
program. Is it possible to cast/convert a MallocInst or FreeInst to a
CallInst?
Thanks,
2013 Oct 01
2
[LLVMdev] JITMemoryManager
Mesa (http://www.mesa3d.org/) uses LLVM to compile shaders. These are
typically small bits of code (~10KB) and one application can use many
of them. Mesa creates an ExecutionEngine with a default JIT memory
manager for each shader it compiles, and keeps the engine around as
long as the shader code is needed. This results in memory waste of
~1MB for each shader. Half the overhead is in the
2013 Oct 02
3
[LLVMdev] JITMemoryManager
I'll try to find out, or get someone to explain, why Mesa selects
MCJIT with LLVM 3.1 only and JIT for other LLVM versions. I'm not
keen to code a fourth attempt (1: copy JIT code, 2: delegating manger,
3: derive from DefaultJITMemoryManager, 4: copy MCJIT code) but I'll
try copying code with MCJIT. Is that the usual route for people who
want to delete all LLVM engines, etc. while
2013 Oct 02
0
[LLVMdev] JITMemoryManager
Hi Frank,
The project really needs to be looking to move away from the old JIT and to MCJIT. LLVM is actively working to kill the old JIT. It’s already unmaintained. MCJIT is the way forward. Can you elaborate on what’s blocking its adoption for Mesa?
-Jim
On Oct 1, 2013, at 10:44 AM, Frank Henigman <fjhenigman at google.com> wrote:
> Mesa (http://www.mesa3d.org/) uses LLVM to compile
2013 Nov 14
3
[LLVMdev] Android JIT patch
Well, is the attached version better? I've extended the
RTDyldMemoryManager hooks instead to pick up the ARM math functions
statically, and left JITMemoryManager alone except for changing the
conditional so that it will build with non-glibc libraries.
I've also split the original patch up into two parts, to separate the
math function fixes from setLastModificationAndAccessTime. The
2013 Nov 11
2
[LLVMdev] Android JIT patch
On 11/11/13 17:42, Kaylor, Andrew wrote:
> I've got a number of problems with this patch.
>
> First, we have plans to pry apart the remaining strands connecting JIT with MCJIT, so I don't want to do anything that reconnects them. That is, I'm against moving things from RTDyldMemoryManager into ExecutionEngine.
The direction of LLVM is not something I'm in a position to
2013 Nov 15
3
[LLVMdev] Android JIT patch
Here's an updated version with more comments.
James
On 14/11/13 23:06, Kaylor, Andrew wrote:
> Oh, I see now. It turns out that even knowing what the end goal was I misunderstood part of what the macros were doing.
>
> If you could add some comments explaining what the macros are doing then I guess I can live with the patch in this form. I definitely agree that it's better not
2014 May 23
2
[LLVMdev] Selectively Jitting using MCJIT
Hello, I am a novice at using the llvm api to do much of anything.
I am trying to lazily apply certain optimisation passes on select
functions when jitting a large program. It is undesirable to me to
load the entire program as IR code and then generate code in memory
for it (time concerns). It seems that there is a function in MCJIT
"loadObjectFile" that would suit my purposes,
2013 Nov 11
0
[LLVMdev] Android JIT patch
The various ExecutionEngine pieces may be the only places within LLVM that are using the DynamicLibrary stuff, but there's no telling what various LLVM consumers may be using it for.
The "stat" symbols shouldn't be exposed the way they are in the old JIT memory manager location. It's not clear to me why that didn't happen inside getPointerToNamedFunction there.
Is
2013 Nov 14
2
[LLVMdev] Android JIT patch
Well, the reason I did it that way was that the list of functions is
fairly long and has to be written out twice; once to declare the
functions and once to do the if(Name==#fn) bit, and I thought nested
macros was simpler than having two copies of the list.
On 14/11/13 22:07, Kaylor, Andrew wrote:
> Thanks for splitting up the patch. I'm not the right person to comment on the
2013 Nov 14
0
[LLVMdev] Android JIT patch
Thanks for splitting up the patch. I'm not the right person to comment on the modification and access time changes (though it looks alright to me). You might want to re-submit that part on its own as it's likely to be ignored by people who aren't interested in JIT stuff otherwise.
Regarding the memory manager changes, functionally this looks good. I'm not a big fan of macros,
2010 Apr 17
0
[LLVMdev] Parsing (and compiling) on demand.
lost wrote:
> Hi!
>
> I'm trying to develop JIT compiler using LLVM as its backend. I know
> LLVM itself supports JIT-compiling, but I need to generate IR first.
> I don't want to generate IR before function is actually needed. How
> can I achieve this?
> If it matters, I have prototypes for all functions I'm going to use.
See
2010 Apr 17
2
[LLVMdev] Parsing (and compiling) on demand.
Ok than, but how to insert a call to an undefined function?
> See ExecutionEngine::InstallLazyFunctionCreator().
> http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#6a126d6cd1fa07a4331179597de0c46a
>
> Nick
>
2010 Apr 17
0
[LLVMdev] Parsing (and compiling) on demand.
So you mean that is not the way. But what is InstallLazyFunctionCreator for?
2010/4/17 Kenneth Uildriks <kennethuil at gmail.com>:
> On Sat, Apr 17, 2010 at 2:15 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
>> lost wrote:
>>> Ok than, but how to insert a call to an undefined function?
>>
>> You need to have the function declaration and insert a call to
2013 Nov 14
0
[LLVMdev] Android JIT patch
Oh, I see now. It turns out that even knowing what the end goal was I misunderstood part of what the macros were doing.
If you could add some comments explaining what the macros are doing then I guess I can live with the patch in this form. I definitely agree that it's better not to have two copies of the list.
Thanks,
Andy
-----Original Message-----
From: James Lyon [mailto:jameslyon0