similar to: [LLVMdev] Wrong behavior modifying and executing llvm::Function with JIT Engine

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Wrong behavior modifying and executing llvm::Function with JIT Engine"

2014 Jun 29
2
[LLVMdev] Wrong behavior modifying and executing llvm::Function with JIT Engine
getFunction() -> getPointerToFunction() 2014-06-29 6:40 GMT+03:00 Yaron Keren <yaron.keren at gmail.com>: > Hi Adrian, > > freeMachineCodeForFunction is required but recompileAndLinkFunction is > not, > you can use getFunction() always. > > Try to M->dump() calling M->getFunction() where M is the Module *. > See if how the changes appear in the module
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
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
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
3
[LLVMdev] Redefining function
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 new function, changes the global variable > accordingly, and frees the old code. > > Compared to Duncan's
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
2012 Apr 21
3
[LLVMdev] Remove function from module
How correctly remove function from module? For example: int f1(int x) { ... a = f2(smth); ... } int f2 (int y) { ... b = f1(smth); ... } I need delete from module both f1 and f2. They haven't uses in other part of module, but I can't delete them with eraseFromParent, because they are use each other. Yours sincerely, Kadysev Mikhail -------------- next part
2012 Apr 21
0
[LLVMdev] Remove function from module
Михаил wrote: > How correctly remove function from module? > For example: > > int f1(int x) { > ... > a = f2(smth); > ... > } > int f2 (int y) { > ... > b = f1(smth); > ... > } > > I need delete from module both f1 and f2. They haven't uses in other > part of module, but I can't delete them with eraseFromParent, because > they are use each
2011 Dec 29
2
[LLVMdev] How to free memory of JIT'd function
Hi, I'm testing how to free memory of a JIT'd function. I thought ExecutionEngine::freeMachineCodeForFunction() and Function::eraseFromParent() would work and did a test with the following sample code. But I found that the memory usage of the process is constantly growing as the while loop goes. Could someone shed light on this please? Here is the code. int main(int argc, char **argv) {
2001 May 24
1
chroot sftp-server [PATCH]
I'm working on setting up a semi-trusted sftp service, and to get it working, I need chroot capability. I've taken the /./ wuftpd magic token code from contrib/chroot.diff and put it into the sftp server. The main problem is that privileges have been dropped by the time the subsystem is exec'ed, so my patch requires that sftp-server be setuid root. Not ideal, I know, but I drop all
2019 Jan 15
2
Function - replaceAllUsesWith
On Mon, Jan 14, 2019 at 3:21 AM Gaier, Bjoern via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Hello LLVM-World, currently I play around with a „llvm::Module” and an external function defined there “puts”. Normally this function gets resolved in the JIT-Process but I wonder about two things: 1. Can I resolve the function already in this step? I
2019 Jan 14
3
Function - replaceAllUsesWith
Hello LLVM-World, currently I play around with a "llvm::Module" and an external function defined there "puts". Normally this function gets resolved in the JIT-Process but I wonder about two things: 1. Can I resolve the function already in this step? I used "replaceAllUsesWith" and passed a "llvm::ConstantInt" to the function. But this didn't
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
2020 May 15
2
Issues with new Attributor (replaceAllUses fails with type mismatch)
[AMD Official Use Only - Internal Distribution Only] Hi , There seems to be some issue with attributor, exactly in File Attributor.cpp, Function Attributor::rewriteFunctionSignatures(), Line No: 1600 (approrimate). The llvm source code at above address is as follows: // Eliminate the instructions *after* we visited all of them. for (auto &CallSitePair : CallSitePairs) {
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
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
2019 Jan 15
2
Function - replaceAllUsesWith
Hey Tim, Sadly I have currently only a release build of LLVM7 with no assertions turned on... So I just know that the line of code I posted is crashing. No output, no anything....just...Crash... Kind greetings Björn -----Original Message----- From: Tim Northover <t.p.northover at gmail.com> Sent: Dienstag, 15. Januar 2019 13:28 To: Gaier, Bjoern <Bjoern.Gaier at horiba.com> Cc:
2020 May 15
2
Issues with new Attributor (replaceAllUses fails with type mismatch)
Hi Suresh, thanks for reporting this! I thought I fixed this with 8d94d3c3b44c3a27a69b153cef9be4b8e481150e. Did you run before or after that commit? Cheers, Johannes On 5/15/20 7:17 AM, Mani, Suresh via llvm-dev wrote: > [AMD Public Use] > > Hi , > > Please ignore the earlier header of Internal and Official use only. > > Thanks > M Suresh > > From: llvm-dev
2012 Jan 05
0
[LLVMdev] How to free memory of JIT'd function
Hi, I put the sample code and a brief analysis using Valgrind to GitHub in order to make my problem clear. https://github.com/naosuke/how-to-free-memory-of-JIT-function The Valgrind heap profiler indicates memory leaking but I don't get what is wrong with the way to free memory. If someone could please offer some advice/suggestion on this, I would really appreciate it. Best, Naosuke On
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