Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Deleting order and acquiring generated function"
2008 May 21
0
[LLVMdev] Deleting order and acquiring generated function
When JITEmitter is teared down, it also deletes the JITMemoryManager
instance. That in turns release the memory of the generated functions.
Is this what you are referring to?
The DefaultJITMemoryManager is pretty simple. You can obviously write
your own memory manager class that maps the memory in a way that's
persistent. Then all you have to do is to pass a handle of it to
2008 May 22
1
[LLVMdev] Deleting order and acquiring generated function
Hi Evan,
Thanks a lot for the information!
It's a viable solution to write my own JITMemoryManager, however I noticed
that the JIT doesn't know the length of the binary function before it is
actually emitted. This is a bit inconvenient especially since I have to
generate new functions at irregular times. I'm not too keen on using the
non-standard _expand function to resize
2008 Feb 01
2
[LLVMdev] Exception handling in JIT
Dear all,
Here's a new patch with Evan's comments (thx Evan!) and some cleanups.
Now the (duplicated) exception handling code is in a new file:
lib/ExecutionEngine/JIT/JITDwarfEmitter.
This patch should work on linux/x86 and linux/ppc (tested).
Nicolas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jit-exceptions.patch
URL:
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
2004 Dec 13
6
[LLVMdev] misc. patches
Hi,
here are some minor patches that for various reasons I've not submitted
yet - I'm just trying to clear my list of differences before christmas...
First of all the clear.patch file contains a patch that enables the JIT
to drop all global mappings. I need this because when I have N threads I
compile N different versions of my functions using different memory
areas for global
2008 Feb 04
0
[LLVMdev] Exception handling in JIT
Looks sane. Thanks.
Evan
On Feb 1, 2008, at 1:24 AM, Nicolas Geoffray wrote:
> Dear all,
>
> Here's a new patch with Evan's comments (thx Evan!) and some cleanups.
> Now the (duplicated) exception handling code is in a new file:
> lib/ExecutionEngine/JIT/JITDwarfEmitter.
>
> This patch should work on linux/x86 and linux/ppc (tested).
>
> Nicolas
> Index:
2004 Dec 14
0
[LLVMdev] misc. patches
Morten,
The leaks.patch file introduced a static destructor ordering problem
which lead to garbled output. The comment above those lines of code
indicates why it needs to be the way it is. My bad for committing it in
the first place. Please be careful in the future.
Reid.
On Mon, 2004-12-13 at 05:30, Morten Ofstad wrote:
> Hi,
>
> here are some minor patches that for various reasons
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
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
2012 Oct 23
3
[LLVMdev] Lifetime of ExecutionEngine?
Given:
typedef MyClass* (*jit_fn_ptr_type)();
MyClass* set_fn( llvm::Function *fn ) {
// create an ExecutionEngine 'exec' ...
jit_fn_ptr_type fn_ptr = (jit_fn_ptr_type)exec->getPointerToFunction( fn );
return fn_ptr();
}
After I call getPointerToFunction() to obtain the pointer to the JIT'd function and fun the function (that will produce an instance of MyClass on the
2008 Jul 07
2
[LLVMdev] Eager JIT
Hi all,
Is there any way to generate the binary code for a whole module at once?
Currently I always get lazy compilation one function at a time.
The reason I would like to generate the whole module at once is because I
create some functions at run-time and then minimize the memory footprint by
deallocating all LLVM objects. I've written my own JITMemoryManager to
ensure that the binary
2009 Oct 06
4
[LLVMdev] 2.6/trunk Execution Engine question
> 6. When ExecutionEngine::create was called with parameter
> "GVsWithCode" set to its default value of true, I got a segfault when
> trying to get a pointer to one of my globals. JIT::getMemoryForGV was
> returning NULL in that case. Explicitly passing false for
> "GVsWithCode" cleared it up.
That's no good. Could you send me a stack trace and explain
2008 May 22
4
[LLVMdev] SSE intrinsic alignment bug?
Hi all,
I think I might have found a potential bug when using SSE intrinsic and
unaligned memory. Here's the code to reproduce it:
#include "llvm/Module.h"
#include "llvm/Intrinsics.h"
#include "llvm/Instructions.h"
#include "llvm/ModuleProvider.h"
#include "llvm/ExecutionEngine/JIT.h"
#include
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone,
Here's a patch that enables exception handling when jitting. I've
copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need
to factorize it, but the functionality is there and I'm very happy with
it :)
lli should now be able to execute the output from llvm-gcc when using
exceptions (the UnwindInst instruction is not involved in this patch).
Just add 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
2009 Jul 01
3
[LLVMdev] Question about memory allocation in JIT
Hello! Working with LLVM JIT-compiler I found a small bug and I'd like to correct it. Namely, on some tests LLVM fails with message "JIT: Ran out of space for generated machine code!"
This error emerges because the test creates big static array. Global variables are placed into memory block for function, that is first seen using given variable. Besides, during memory allocation
2012 Oct 26
0
[LLVMdev] Lifetime of ExecutionEngine?
Hi Paul,
I'm surprised to hear that you aren't seeing any adverse effects. As I understand it, the memory for the function pointer returned by getPointerToFunction is owned by the JITMemoryManager which was used in creating the ExecutionEngine. In the case of the legacy JIT engine, the JITMemoryManager is owned by the JITEmitter which in turn is owned by the JIT ExecutionEngine. In the
2004 Dec 06
2
[LLVMdev] FP Constants spilling to memory in x86 code generation
Hello,
I've tracked down a new memory leak which started happening when I
enabled constant propagation (I created my own passmanager which I run
before calling getPointerToGlobal to JIT the function I have generated -
is this OK?). The reason is that FP constants are being spilled to
memory as there is no immediate fp load available. In my case this is a
bit unnecessary since the
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
2004 Dec 13
2
[LLVMdev] FP Constants spilling to memory in x86 code generation
Chris Lattner wrote:
> On Mon, 6 Dec 2004, Morten Ofstad wrote:
>> I guess what I'd like to know is if the process of spilling constants
>> to memory could be a bit more controlled, maybe using the JIT memory
>> manager and putting it in with the function stubs?
>
> Yes, this can and should definitely be improved. If you look at
>