similar to: [LLVMdev] JIT machine code deletion

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] JIT machine code deletion"

2006 May 14
2
[LLVMdev] JIT machine code deletion
On Fri, 12 May 2006, Ralph Corderoy wrote: >> If you don't *know* that all (e.g.) function pointers to this code are >> dead (which means that execution could come back to the function), you >> should use the ExecutionEngine::recompileAndRelinkFunction(F) method. > > recompileAndRelinkFunction() overwrites the old machine code with a > branch to the new. Is it
2006 May 12
0
[LLVMdev] JIT machine code deletion
Hi Chris, > If you don't *know* that all (e.g.) function pointers to this code are > dead (which means that execution could come back to the function), you > should use the ExecutionEngine::recompileAndRelinkFunction(F) method. recompileAndRelinkFunction() overwrites the old machine code with a branch to the new. Is it always guaranteed that there's space to write the new
2006 May 14
0
[LLVMdev] JIT machine code deletion
Hi Chris, > On Fri, 12 May 2006, Ralph Corderoy wrote: > > recompileAndRelinkFunction() overwrites the old machine code with a > > branch to the new. Is it always guaranteed that there's space to > > write the new branch instructions? > > Yes. OK. > > A quick look suggests the x86 takes five bytes, PowerPC 16, > > PPC should be 4 bytes in the normal
2010 Jan 31
2
[LLVMdev] Redefining function
Great! It just worked. I was a bit worried about using pointers to call functions because it's a little too overwhelming in a big project, I think. Just for the record, if the function code isn't freed with freeMachineCodeForFunction, I get a segmentation fault during recompileAndRelinkFunction with this stack dump: Running pass 'X86 Machine Code Emitter' on function
2010 Jan 31
2
[LLVMdev] Redefining function
Just updated the source and now I get the unreachable error again. The JIT doesn't know how to handle a RAUW on a value it has emitted. UNREACHABLE executed at /home/conrado/engines/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1542! I think that it's not helpful now, but I can post the program, if you want me to. On Sun, Jan 31, 2010 at 2:49 PM, Jeffrey Yasskin <jyasskin at
2013 Nov 21
1
[LLVMdev] Replacing C-style function
Hi, I am trying to replace a c-style function with another function with same signature. Consider the following code: std::stringstream main_c; main_c <<"#include <stdio.h>\n" <<"extern \"C\" { \n" <<"int print1()\n" <<"{\n" <<" printf(\"Inside
2010 Jan 31
0
[LLVMdev] Redefining function
On Sat, Jan 30, 2010 at 6:22 PM, Conrado Miranda <miranda.conrado at gmail.com> wrote: > Albert Graef wrote: >> >> The way I do this in Pure is to always call global functions in an >> indirect fashion, using an internal global variable which holds the >> current function pointer. When a function definition gets updated, the >> Pure interpreter just jits the
2014 Apr 26
2
[LLVMdev] Drop the machine code while executing
That's a good point.  But it's worth noting that recompileAndRelinkFunction() and freeMachineCodeForFunction() are both vestiges of the old JIT (i.e. the "JIT" as opposed to the "MCJIT").  The old JIT is no longer actively supported. -Phil On April 26, 2014 at 9:47:05 AM, Sri (emdcdeveloper at gmail.com) wrote: Hi Fillip                  Addition to my previous
2010 Feb 01
0
[LLVMdev] Redefining function
Hm, I wonder if the error message for llvm_unreachable should change. I think I remember a couple people focusing incorrectly on the UNREACHABLE instead of the actual error message above it (which means it's our fault, not theirs). Miranda, this is pointing at the same problem you had before. You have a function JIT-compiled, and you're trying to RAUW (ReplaceAllUsesWith) it. You'll
2010 Jan 31
0
[LLVMdev] Redefining function
On Sun, Jan 31, 2010 at 7:35 AM, Conrado Miranda <miranda.conrado at gmail.com> wrote: > Great! It just worked. I was a bit worried about using pointers to call > functions because it's a little too overwhelming in a big project, I think. > > Just for the record, if the function code isn't freed with > freeMachineCodeForFunction, I get a segmentation fault during >
2009 Jun 29
0
[LLVMdev] JIT question about resolving unknown function calls
On Jun 29, 2009, at 3:37 AM, Carter Cheng wrote: > > My understanding is that the JIT system allows during the running of > the system resolution of call instructions to undefined functions to > be trapped and then patched with the correct address (is this true?). Yes, see: http://llvm.org/docs/tutorial/LangImpl4.html#jit > The question I have is does the current system also
2008 Feb 13
3
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
Hola LLVMers, I'm debugging through some strangeness that I'm seeing on X64 on windows with LLVM2.2. I had to change the code so that it would engage the x64 target machine on windows builds, but I've otherwise left LLVM 2.2 alone. The basic idea is that I've got a function bar which is compiled by VStudio and I'm creating another function foo via LLVM JIT which is going
2009 Oct 27
0
[LLVMdev] Re-JITing a Function
On Oct 27, 2009, at 9:18 AM, John Criswell wrote: > Dear LLVMers, > > Can the LLVM JIT, at run-time, take a function for which it has > already > generated native code, re-optimize it at the LLVM level, and then > re-generate its native code, replacing calls of the old function with > calls to the new function? > > I seem to recall that it could, but I need to make
2008 Feb 15
0
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
On Feb 12, 2008, at 5:26 PM, Chuck Rose III wrote: > Hola LLVMers, > > I’m debugging through some strangeness that I’m seeing on X64 on > windows with LLVM2.2. I had to change the code so that it would > engage the x64 target machine on windows builds, but I’ve otherwise > left LLVM 2.2 alone. The basic idea is that I’ve got a function bar > which is compiled by
2009 Dec 22
0
[LLVMdev] [PATCH] Fix recompileAndRelinkFunction
Please add a test to http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?view=markup verifying that recompileAndRelinkFunction() keeps working. Then this fix will look fine to me. On Tue, Dec 22, 2009 at 12:23 AM, Gianluca Guida <glguida at gmail.com> wrote: > On Tue, Dec 22, 2009 at 6:14 AM, Chris Lattner <clattner at apple.com> wrote: >>
2013 Mar 09
0
[LLVMdev] MCJIT and Lazy Compilation
Hi Andy/Albert, Sorry for the slow reply, my day job caught up with me. Two bits of progress. (a) MCJIT is working nicely for non-trivial examples in Extempore on x86 and ARM, and (b) the page permissions are now RO again. For your amusement a *very* cheesy video of Extempore running on-the-fly with MCJIT on an ARM Pandaboard. Viewer discretion is advised! https://vimeo.com/60407237 Here is the
2014 Apr 26
2
[LLVMdev] Drop the machine code while executing
Hi Filip Thank you for your detailed explanation, I was actually looking to implement an adaptive approach which is basically when some function executed more frequently, I was trying to drop that function and compiled and linked with new optimized function. I just did the following - whenever some function executed more times , I called-back to program, so I that I
2013 Jan 14
3
[LLVMdev] Memory clean for applications using LLVM for JIT compilation
Hello all, I've already bothered people on IRC with this question and it was recommended to ask it here. First of all, some context. In Rubinius (http://rubini.us/, http://github.com/rubinius/rubinius) we use LLVM for our JIT. We create LLVM IR using the C++ API and turn that into machine code using ExecutionEngine::runJITOnFunction. The resulting native code is then installed as the
2013 Jan 14
0
[LLVMdev] Memory clean for applications using LLVM for JIT compilation
On Mon, Jan 14, 2013 at 4:56 AM, Dirkjan Bussink <d.bussink at gmail.com>wrote: > Hello all, > > I've already bothered people on IRC with this question and it was > recommended to ask it here. > > First of all, some context. In Rubinius (http://rubini.us/, > http://github.com/rubinius/rubinius) we use LLVM for our JIT. We create > LLVM IR using the C++ API and
2008 Feb 15
1
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
Hey Evan, At the point of the instructions you suggested I step through, X86ISelLowering has this state: - this 0x00000000005fe728 {VarArgsFrameIndex=-842150451 RegSaveFrameIndex=-842150451 VarArgsGPOffset=3452816845 ...} llvm::X86TargetLowering * const + llvm::TargetLowering {TM={...} TD=0x00000000008edac0