similar to: [LLVMdev] Inter-module calls

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Inter-module calls"

2011 Jul 08
0
[LLVMdev] Inter-module calls
Is there a preferred approach for an LLVM-based JIT-compiler to make calls from run-time generated functions in module A to bitcode-loaded functions in module B? A naive CallInst across the boundary fails verification. Calling it as an external function fails to resolve, even if both ModuleA and ModuleB are in the same ExecutionEngine. I can think of two ways around this: 1. Create a
2018 Mar 22
1
How to extract functions from Module A and put them into Module B, and generate a new IR file?
Hi all, This is Michael and very happy to share my question here! My question is, is there a way to "extract" a function from Module A and write it into another Module B, and generate two new IR files? IRBuilder seems like a workable way but I have to create instructions one by one. I am new to LLVM so don't know whether it is doable, here is my experimental code:
2010 Jan 10
0
[LLVMdev] Using a function from another module
Michael Muller wrote: > > Hi all, > > I'm trying to use a function defined in one LLVM module from another module > (in the JIT) but for some reason it's not working out. My sequence of > activity is roughly like this: > > 1) Create moduleA > 2) Create moduleB with "func()" > 3) execEng = ExecutionEngine::create( > new
2010 Jan 10
2
[LLVMdev] Using a function from another module
On Sun, Jan 10, 2010 at 8:58 AM, Michael Muller <mmuller at enduden.com> wrote: > > Michael Muller wrote: >> >> Hi all, >> >> I'm trying to use a function defined in one LLVM module from another module >> (in the JIT) but for some reason it's not working out.  My sequence of >> activity is roughly like this: >> >>   1) Create
2010 Jan 10
0
[LLVMdev] Using a function from another module
Won't passing llvm::Function* around vs strings (function names), also work, at code generation time, without the need for a module A dec to module B impl. mapping? Garrison On Jan 10, 2010, at 10:31, Kenneth Uildriks wrote: > On Sun, Jan 10, 2010 at 8:58 AM, Michael Muller <mmuller at enduden.com> wrote: >> >> Michael Muller wrote: >>> >>> Hi all,
2010 Jan 09
4
[LLVMdev] Using a function from another module
Hi all, I'm trying to use a function defined in one LLVM module from another module (in the JIT) but for some reason it's not working out. My sequence of activity is roughly like this: 1) Create moduleA 2) Create moduleB with "func()" 3) execEng = ExecutionEngine::create( new ExistingModuleProvider(moduleB)); 4) execute "func()" (this works fine)
2010 Jan 11
0
[LLVMdev] Using a function from another module
The JIT tries to handle this in some cases (http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?annotate=92771#l942), but doesn't handle it for functions. There aren't any tests, so I'm not surprised it's broken. The JIT would be simpler if we just dropped multiple-module support and asked people to link their modules together before trying to
2016 Jun 04
2
LLVMLinkModules2() C-API question
Hey all, A quick question about the LLVM C-Api and using LinkModules. In a normal situation where I have 2 LLVM modules and 1 depends on the other using LLVMLinkModules2() works perfectly. LLVMLinkModules2() "Links the source module into the destination module. The source module is destroyed." according to the comment of the function. That is all fine when you only have 2 modules. But
2010 Feb 03
0
[LLVMdev] Interpreter with multiple modules.
Hi James, > This is interesting. I've just implemented dynamic loading of bitcode modules into lli for my project. I did this by hacking lli using the Linker class. Is ExecutionEngine::addGlobalMapping() preferred for this purpose? I'm not sure about the preferred way, but at least for the JIT, here is an email from Jeffrey concerning a previous thread. The issue in that thread was
2018 Apr 04
0
weird behaviour of llvm::linker::LinkInModule()
<div>Hello!</div><div>I created a new llvm module (<strong>A</strong>) - to create a 'glue' code.</div><div>I want to call some functions from another module (<strong>B</strong>);</div><div>I load module <strong>B</strong> withing the same LLVMContext, and create a function declaration in module A
2010 Jun 18
0
[LLVMdev] having troubles mixing ExecutionEngine::runStaticConstructorsDestructors() and Linker::LinkModules()
The use case is to create a module A, JIT from it, then extend the module with new code (create a new module B and use Linker::LinkModules() to merge into A, and be able to JIT the new symbols). This appears to work ok, except that static constructors are giving me a headache. Generally, I start like this: Create module A (e.g. via Clang, LLVM API etc.) EE->addModule(A);
2020 Sep 29
3
ORC JIT - different behaviour of ExecutionSession.lookup?
Hey Lang, Thank you for your help and your patience – also for your answers in the “ORC JIT - Can modules independently managed with one LLJIT instance? + problems with ExecutionSession.lookup” mail. Both problems have the same origin so I keep writing about it here, to avoid duplication. My big problem is still handling cross references between modules with “our” name scheme. Since our old
2010 Feb 03
3
[LLVMdev] Interpreter with multiple modules.
On 3 February 2010 14:13, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote: > I have not used the C api or the interpreter, but via JIT one can use > ExecutionEngine::addGlobalMapping(...) after the function decl in the > foreign module. See if there is an equivalent in the C API, which will > probably work for the interpreter given that this method is declared in >
2020 Sep 30
2
ORC JIT - different behaviour of ExecutionSession.lookup?
Hey Lang, > Do you mean that the object file is produced by another process and is being loaded into your JIT process for execution, or that you want your JIT to produce code for several different processes? These are different problems with different solutions. I'll wait until I understand your use case to answer further. In the current state we don’t have a JIT only an handcrafted object
2012 Dec 17
1
[LLVMdev] Execution Engine issue with composite module
Hi, I'm having an issue with the below modules. I build module X, then module Y (which has a dependency on X). I've added an external declaration on module Y of the functions defined in X. i also link the except-handling module, but i think it is peripheral to the issue i like all the modules together in a single module called executableModule. I link them with the method:
2010 Mar 01
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
Hi Jeffrey, I'm still in the process of learning the unittest technology. While I did get distracted with test-suite and test, and therefore the requisite installs of llvm-gcc, and DejaGNU, I think I'm back on track now. So that was a waste of time. By the way the reference I have to the unittests target was in an archive for this list. Is there no llvm level doc for this? Regardless the
2008 Jan 15
0
[LLVMdev] Calling between modules
Bill, That is great to hear. I must be doing something wrong. When I try to do this, I get ERROR: Program used external function 'myLinkedFunction' which could not be resolved! Because of its brevity, I use getOrInsertFunction when I am creating calls to the function in module A. I use new llvm::Function(type, llvm::Function::ExternalLinkage, "myLinkedFunction", moduleB)
2010 Jan 30
2
[LLVMdev] Redefining function
Hi Duncan, > I couldn't find the solution to my problem (if it has one) in the mailing >> list or the source code. The problem is: how can I redefine a function >> that's been called already by some other function? >> > > why do you want to do this? > To implement something that is common in Lisp. Suppose I have a program that is running and can't be
2010 Feb 27
2
[LLVMdev] 2nd attempt for a working patch for bug 2606
On Fri, Feb 26, 2010 at 1:26 PM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote: > Hi Jeffrey, > On Feb 26, 2010, at 16:02, Jeffrey Yasskin wrote: > > [sidenote: Please try to avoid extraneous whitespace and line wrapping > changes in your patches. It makes it harder to see what you're actually > changing] > > Sorry just saw some preexisting code was not in 80
2010 Feb 05
1
unique function works funny
I have 3 nested functions, the core function goes like this: listx<-function(x,tox) { xt=table(x) wa=sort(unique(x,fromLast=FALSE)) print(xt) print(wa) ...... return(kk) } listx get called in functionB, and functionB get called in functionC. When I test functionB, the listx function works just fine. When I call functionB from functionC, strange thing happened: My result for xt: 0.07 0.17