similar to: [LLVMdev] Calling between modules

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Calling between modules"

2008 Feb 28
1
[LLVMdev] Are multiple execution engines allowed?
I'm trying to set up some automated testing, and I'd like to have multiple instances of ExecutionEngines, so that the state from the first test doesn't alter the second state. Right now I'm doing something along the lines of: Module *emptyModule = new Module("emptyModule"); ExecutionEngine executionEngine = ExecutionEngine::create(emptyModule);
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 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 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
2008 Jan 16
0
[LLVMdev] Cross-module function calls (code included)
Hello, I'm not sure what I am trying to do is possible. I'm trying to create two modules, and call a function in one module from another module. First, a reassurance that I'm not trying to do something completely off the wall would be nice as I don't see any tutorials that do this. Second, any help getting this to work would be wonderful. Thanks, Aaron In my code, you'll
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 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
2008 Jan 15
1
[LLVMdev] Calling between modules
Hello, I am fairly new to LLVM development. Currently I am trying to treat LLVM modules almost like ".o" files in a "normal" development environment, and then calling functions in one module from another module. Is this possible? Basically, I want self contained chunks of code with dependencies on functions in other self contained chunks that get resolved at JIT time. I
2005 Apr 11
0
[LLVMdev] JIT and array pointers
On Mon, 11 Apr 2005, dummy1 at boxpl.com wrote: >> There are many possible ways to do this, can you be a bit more specific >> about what you're trying to do? > Here is a basic example: Ah, ok, I see what you're trying to do. Below is some *pseudo* code for the basic idea: > ============================================ > unsigned int buff[4096]; > > int main
2006 Nov 28
2
[LLVMdev] question about the LLVM JIT
<cc'ing llvmdev> On Tue, 28 Nov 2006, Eric van Riet Paap wrote: > I'm working on using the LLVM JIT in PyPy and I hop you can give me a few > hint. ok > I have some things working at and try to write C++ code for what I need > from Python. The unittest I am working on at the moment is looks like > this > > --- Python code... > llglobalmul4 =
2006 Nov 29
0
[LLVMdev] question about the LLVM JIT
>> <snip>. >> void add_global_mapping(const char* name, void* address) { >> GlobalVariable var(Type::IntTy, false, >> GlobalVariable::ExternalLinkage, 0, name, gp_module); >> gp_execution_engine->addGlobalMapping(&var, address); >> } > > This is creating a new global variable on the stack, instead of > finding the existing
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
Hi Kirill, Don't forget to add X86TargetMachine.obj (add to Additional Dependencies in Linker options, if you are using MSVS) otherwise LLVM will try and use Interpreter instead of JIT. Hope this helps, Rob. > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of kirill havok > Sent: Wednesday, August 20, 2008
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
kirill havok wrote: > Hi Gordon, > I wrote a small example, but while running I get an error("Tied to > execute an unknown external function"), where I am wrong? > I think the problem is that some_test_func() is a C++ function, so its name is being mangled during compilation. To fix it, I think you want to add a declaration telling the compiler to treat some_test_func()
2007 Apr 06
1
[LLVMdev] Integrating LLVM in an existing project
Hi Chris, > The static code generator works for many simple cases, but it is currently > disabled. To enable it, uncomment this line in > llvm-gcc/gcc/llvm-convert.cpp: > > //#define ITANIUM_STYLE_EXCEPTIONS > > > Based on that, you should be able to compile simple C++ codes that throw > and catch exceptions. The next step would be to make a .bc file, run it
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
Hello Everyone, I am trying to create two modules in LLVM, where first module contains the definition of a function, gcd in this example and another module contains a call to this function. My example is based on the following tutorial, with a few changes. http://llvm.org/releases/2.6/docs/tutorial/JITTutorial2.html When I execute the verifier pass on my modules, it complains that the
2006 Sep 16
0
[LLVMdev] failed assertion in PPCJITInfo.cpp when calling native function
Hi, I am trying to generate LLVM code that calls a "native" function in the parent program (the program hosting the JIT). I think that I have figured out how to do this, but I get the following assertion failure when the LLVM code is executed: ../llvm/lib/Target/PowerPC/PPCJITInfo.cpp:206: failed assertion `ResultPtr >= -(1 << 23) && ResultPtr < (1 << 23)
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 >
2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
Hi Gordon, I wrote a small example, but while running I get an error("Tied to execute an unknown external function"), where I am wrong? Thanks in advance. Kirill. int some_test_func( int ){ std::cout << "!!!!" << std::endl; return 8848; } int _tmain(int argc, _TCHAR* argv[]){ Module *M = new Module("test"); ExistingModuleProvider* MP = new
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: