similar to: [LLVMdev] Having JIT resolve extern "C" functions declared in executible

Displaying 20 results from an estimated 6000 matches similar to: "[LLVMdev] Having JIT resolve extern "C" functions declared in executible"

2009 Jul 02
0
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
On Jul 2, 2009, at 1:05 AM, Carter Cheng wrote: > I am having some difficulties getting the LLVM JIT to resolve extern > "C" functions which I have defined in source file and invoking them > via EE::runFunction() after generating a Function prototype for it. > Is this possible or do I need to generate a .so for my functions are > link against it? If the JIT needs
2009 Jul 04
2
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
John McCall wrote: > On Jul 2, 2009, at 1:05 AM, Carter Cheng wrote: >> I am having some difficulties getting the LLVM JIT to resolve extern >> "C" functions which I have defined in source file and invoking them >> via EE::runFunction() after generating a Function prototype for it. >> Is this possible or do I need to generate a .so for my functions are
2009 Jun 15
4
[LLVMdev] runtime library for jitted code
Dear All, I am considering a possibility of using LLVM JIT for an algebraic modelling language. I have already done some prototyping following the Kaleidoscope tutorial and currently thinking of how to connect the jitted code to a runtime library (for this language) which I would like to code in C++. If it was *NIX I would use g++ possibly with '-rdynamic' option as suggested in the
2009 Jun 15
0
[LLVMdev] runtime library for jitted code
Victor Zverovich wrote: > I am considering a possibility of using LLVM JIT for an algebraic > modelling language. I have already done some prototyping following the > Kaleidoscope tutorial and currently thinking of how to connect the > jitted code to a runtime library (for this language) which I would like > to code in C++. If it was *NIX I would use g++ possibly with
2009 Jul 02
0
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
Hi, I am having some difficulties getting the LLVM JIT to resolve extern "C" functions which I have defined in source file and invoking them via EE::runFunction() after generating a Function prototype for it. Is this possible or do I need to generate a .so for my functions are link against it? Thanks in advanced, Carter. Sorry for the double post but apparently I mistakenly tagged
2009 Aug 22
0
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
I think you might have to provide an empty list if your function doesn't take parameters. Maybe using an irbuilder would help? -bw On Aug 22, 2009, at 2:13 PM, Renato Golin <rengolin at systemcall.org> wrote: > 2009/7/4 Albert Graef <Dr.Graef at t-online.de>: >> This is all I ever needed to interface to C functions using LLVM. >> It's >> really
2009 Jun 15
1
[LLVMdev] runtime library for jitted code
Albert and Anton, thanks for all the answers. I tried to load a DLL with DynamicLibrary::LoadLibraryPermanently and it works perfectly, so there is no need to use ExecutionEngine::addGlobalMapping. However Function objects still need to be constructed since they are required when creating a call, right? Victor 2009/6/15 Albert Graef <Dr.Graef at t-online.de> > Victor Zverovich wrote:
2009 Aug 23
1
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
2009/8/22 Bill Wendling <isanbard at gmail.com>: > I think you might have to provide an empty list if your function doesn't > take parameters. Maybe using an irbuilder would help? It does take one parameter. Here's the important bits: // My Function extern "C" void print(double X) { printf("%f\n", X); } // Args type std::vector<const Type*>
2009 Aug 22
1
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
2009/7/4 Albert Graef <Dr.Graef at t-online.de>: > This is all I ever needed to interface to C functions using LLVM. It's > really easy. Of course you still need a prototype of the external > function (function definition without body) in your IR, but that's it. Hi Albert, I'm having a similar problem and I found I can't declare the function and use it, most likely
2007 Jun 12
3
[LLVMdev] How to call native functions from bytecode run in JIT?
On Tue, 12 Jun 2007, Jan Rehders wrote: >> Jan, how are you doing this? Are you creating an external LLVM >> Function object named "get5", then using EE::addGlobalMapping? If >> 'get5' exists in the address space, why not just let the JIT resolve it >> (which will then create the stub)? > > Yes. I create a Function with matching signature,
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
2009 Jul 04
4
[LLVMdev] ModuleProvider materializeFunction
I have tracing the calls to materializeFunction in the LLVM code in hopes of determining how to properly utilize this function but from my explorations I gather it's just a hook which is called by the JIT system and I would mostly have to do the work myself. What is the preferred way to inject a llvm:Function which contains basic blocks into the Module + JIT? My understanding (perhaps
2007 Jun 13
5
[LLVMdev] How to call native functions from bytecode run in JIT?
Hi, I was able to try this on linux again. Unfortunately it doesn't work at all (neither using runFunction nor a CallInst). It simply says function called get5 not known. Calling printf the same way works, though. On linux the function is exported as "get5" from the executable while it is called "_get5" on OS X. I could not spot any other differences.. any
2007 Jul 15
2
[LLVMdev] JIT Leaks?
First, I'm not sure if deleting the ExecutionEngine is all I need to clean-up... so I started with a minimal test just to check int main( int argc, char **argv ){ while( true ){ Module *M = new Module("M"); Function *F = cast<Function>(M->getOrInsertFunction("F", Type::Int32Ty, (Type*)0)); BasicBlock *BB = new
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
Hi, I want to use a function defined in c(++)-code from code generated by llvm. For this I use ExecutionEngine.addGlobalMapping(). I started with the JIT execution engine and everything worked, then I switched to the interpreter engine and it stopped working, but only if compiled on a Linux system. More precisely it works if I use llvm 3.8.1 + gcc (Linux) + JIT llvm 3.8.0 + mingw-gcc
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
Valery, Attached are three files: "valery.cpp" which contains your original, "reid.cpp" which contains corrections to most of the FIXME items and "diffs" which shows the differences between them. The differences should be instructive on what to do. You were really, really close .. just a few details changing. The code in "reid.cpp" compiles but I
2007 Jun 12
0
[LLVMdev] How to call native functions from bytecode run in JIT?
Hi, > Okay. If the function exists in your application's address space > already, > just name the LLVM function the same name as the native function > and the > JIT should find it an do the right thing. This is how it finds > printf and > a variety of other things. You don't need to call addGlobalMapping at > all. Looking at the output of "nm
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()
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
Reid wrote: > I have to agree with Misha on this. None of us knows "everything" about > LLVM and as you can see, Misha responded three hours before I did :). > Asking questions here is encouraged, so please feel free to post them on > LLVMdev. We'll always help where we can. well, OK :) Please find the attachment with the first approach to such an example i've
2007 Jun 07
2
[LLVMdev] How to call native functions from bytecode run in JIT?
Hello, can anyone help me calling native functions from LLVM-Bytecode functions run in the JIT? I have a program which creates an LLVM execution engine and adds modules and functions to it on the fly. I need to call some native functions of my program from bytecode functions which causes some troubles as it appears not to be documented. My test scenario works like the following: I have