similar to: JIT client - late cross references

Displaying 20 results from an estimated 9000 matches similar to: "JIT client - late cross references"

2018 Aug 29
2
JIT client - late cross references
Hello Lang, thank you for your response! So the use case would be some kind of wrapping or just taking control. Taking that Module 'A' has function a() and Module 'B' has function b() and c() - also a() calls b(). The normal resolving process would resolve the function call correct. But for some reason (like having a wrapper) I would prefer to resolve calls to b() with a call to
2018 Aug 29
2
JIT client - late cross references
Hello Alex, This is an interesting approach! Thank you for that! I understand the basic idea but sadly... My skills in handling the IR are not very high, so I can't imagine where and when to replace the calls to b() with the trampoline. The only thing I can handle would be creating that trampoline variable. Also will this approach be a problem for really time critical tasks? Since I replace
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
2017 Sep 28
0
Clang/LLVM JIT - When to use "registerEHFrames()"
> I tried loading the "msvcrt.lib" as a archive. That was... a bad idea! > I get a Exception while loading: > Assertion failed: ((int64_t)Result <= INT32_MAX) && "Relocation > overflow", file > \lib\executionengine\runtimedyld\Targets/RuntimeDyldCOFFX86_64.h, line 81 It's a limitation of the COFF/PE format and unrelated to exceptions. This patch
2017 Sep 28
2
Clang/LLVM JIT - When to use "registerEHFrames()"
Hello Stefan, I'm happy someone replied to my problem! Many thanks! To be honest... I didn't understood much of your mail. I'm a beginner with the JIT - so I will explain what I've done. To manage the memory and resolve symbols, I'm using my own Resolver-Class, which overloads the allocation and the findSymbol functions. I've noticed today, that the
2020 Aug 25
2
ORC JIT - Incorrect support for COFF files?
Hey Lang, That is really cool :D Is the creation of that table a Windows thingy or is this the way the LLVM handles it? Also… since it is COFF related – the never ending story of “finding my global constructors” first of all: Yes! I tried using the “initialize” function of LLVMJIT – however this only worked when I was loading a Module. When I added the object file (from the same source) the
2017 Sep 29
2
Clang/LLVM JIT - When to use "registerEHFrames()"
Hi Bjoern, I'm trying to make exceptions run. I have an Object file with a function, > throwing a 1 and a second function which should catch the 1. Normal JITTING > under Windows showed me, that I have an unresolved reference to the virtual > table of type_info. Some experiments later I was able to load "msvcrt.lib" > as an archive and could resolve the reference. Nice -
2018 Nov 12
2
JIT-Client for Shared Memory
Hi Bjoern, For single object files you can override the needsToReserveAllocationSpace method that is inherited from llvm::RuntimeDyld::MemoryManager (make it return true) and then implement the reserveAllocationSpace method to allocate memory for all sections up front. There is no easy way to do this for multiple object files. I think you would have to mimic the memory size calculations
2020 Aug 24
2
ORC JIT - Incorrect support for COFF files?
Hey Lang and Stefan, Using dllimport on my “planschiValue” actually worked! But I have no idea why, because the relocation is still a REL32 if I use dumpbin… So how is it possible for that to work? However… when I load an COFF object file, am I able to change the relocations to dllimport somehow? I honestly can’t imagine how this would work since the machine code is probably already adjusted to
2019 Jan 15
2
Function - replaceAllUsesWith
Hey Stefan, The function looks like this: “; Function Attrs: nounwind declare i32 @puts(i8* nocapture readonly) local_unnamed_addr #2” I wondered if I can do the external symbol resolution without using the JIT and RuntimeDyld (for now). For me it sounds like something that could be possible… Kind greetings Björn From: Stefan Gränitz <stefan.graenitz at gmail.com> Sent: Dienstag, 15.
2017 May 07
2
[cfe-dev] JIT doens't resolve address - Resolve obj-Addresses?
Hi Bjoern, CCing cfg-dev (since that's where the conversation started) and llvm-dev (since it's relevant there). Do you know if there is a way to obtain the fully resolved obj-code? I > wanted to load the functions into a shared memory, but how? The only thing > I receive is a function pointer, but I don't know how large the function > 'behind' is. Even a call to
2017 Oct 03
2
Clang/LLVM JIT - When to use "registerEHFrames()"
I'm catching up on this. Does this mean LLVM x64 JITTed code is not exception friendly or you can't catch exceptions inside LLVM JITTed code. The first one seems to indicate that the code is not ABI friendly or that not enough information is present to notify Windows of unwind tables. I'll ask the question another way: Does LLVM emit enough information so that RtlAddFunctionTable can
2018 Nov 02
4
JIT-Client for Shared Memory
Hello everyone, I want to use the LLVM to write a JIT client, that works with shared memory. Currently I proceed as following: I wrote an own class that inherits "RTDyldMemoryManager". The functions "allocateCodeSection" and "allocateDataSection" are allocating local non-shared memory. I store there addresses in a std::vector. When the function
2020 Aug 21
2
ORC JIT - Incorrect support for COFF files?
Hi Björn I made a workaround for this specific issue a long time ago for the Projucer C++ JIT Engine. It basically forwards the call to another stub that provides enough space to encode a full 64-bit address. The patch is based on LLVM 3.9, so I guess it won't work out-of-the-box on a recent release, but it may give you enough hints to figure it out on your own:
2017 Sep 25
2
Clang/LLVM JIT - When to use "registerEHFrames()"
Hello friendly LLVM-World, because I don't know if I had send my problem to the correct Mailing-List, I will send my problem to this address too. I'm not subscribed to this list, so please add my in CC if you response. Kind regards Björn From: Bjoern Gaier/HE/HORIBA To: Clang Dev <cfe-dev at lists.llvm.org>, "cfe-dev" <cfe-dev-bounces at lists.llvm.org>
2017 May 17
2
JIT - Resolve obj file without a main
Hi Lang, I'm using Windows. I was parsing an IR-File and added the Module to the ExectuionEngine. If I than searched for a function, I just got 0. But when the module had a main, I got an address. I solved the problem via a call to "generateCodeForModule". The JIT didn't even called my SymbolResolver in this special case. Could you please tell me, if there is a way to
2017 Oct 04
3
Clang/LLVM JIT - When to use "registerEHFrames()"
That's encouraging. Assuming that all access to the JITted code is going to be done through a function pointer, and all JIT code is ephemeral, why is the object container format important? In fact, why is it even needed? I found it somewhat odd that MCJIT generates an object file for even the JIT case. To answer my own question, could it be that advanced JIT's may need/want to use things
2017 May 29
1
JIT - Resolve obj file without a main
Hello Lang, so you are part of the "Jitter-Team"? I'm really interested in this whole jitting-process. I wanted to know, is there a way to load other obj-files, than the one created with clang? Could I load - for example - a obj-File from VisualStudio? Or will the namemangeling fail? Kind regards Björn From: Lang Hames <lhames at gmail.com> To: bjoern.gaier at
2020 Mar 18
4
[ORC JIT] -Resolving cross references in a multi-process scenario
Hi Bjoern, Thanks for your patience. The good news is that there is a neater way to do this: ExecutionSession's lookup methods take a orc::SymbolState parameter which describes the state that symbols must reach before a query can return (See https://github.com/llvm/llvm-project/blob/d1a7bfca74365c6523e647fcedd84f8fa1972dd3/llvm/include/llvm/ExecutionEngine/Orc/Core.h#L1273).In your case you
2020 Aug 18
2
Get all symbols stored(?)in llvm::orc::ExecutionSession
Hi Bjoern, I’m a bit worried about taking symbols from modules, because some of the > symbols might change later when the code was compiled with the JIT Symbol names shouldn't change from the moment they're added to the JIT (i.e. after being fully mangled). Consistency of symbol names is a requirement for ORC to work. You could try hooking into the orc::Platform API for this: