similar to: [LLVMdev] Beginner's question concerning JIT

Displaying 20 results from an estimated 40000 matches similar to: "[LLVMdev] Beginner's question concerning JIT"

2008 Jul 31
3
[LLVMdev] LLVM JIT: How to install a callback for a function loaded in at runtime
Hello, This is probably a bit of a beginner's question but I am new to LLVM I have been examining the possibility of constructing something similar to the JnJVM for a language which supports dynamic class loading. The problem I am having is determining how the JIT system allows for dynamic loading of functions into the JIT. The paper indicates the JnJVM use some sort of callback when the JIT
2008 Aug 01
0
[LLVMdev] LLVM JIT: How to install a callback for a function loaded in at runtime
Hi Carter, Carter Cheng wrote: > Hello, > > This is probably a bit of a beginner's question but I am new to LLVM > I have been examining the possibility of constructing something similar to the JnJVM for a language which supports dynamic class loading. The problem I am having is determining how the JIT system allows for dynamic loading of functions into the JIT. The paper
2009 Jun 11
2
[LLVMdev] Access a specific address in the JIT compiler
Hi, I am using the JIT compiler to execute code that must interface with the running process. I would like to access some specific addresses. The solution I found is to create a global variable for each address I want to reference, and pass it as a mapping to the ExecutionEngine with addGlobalMapping. Is that how I should do this? Is there no way to just reference the addresses with constants?
2009 Jul 02
3
[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 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 Dec 07
4
[LLVMdev] 2.6 JIT using wrong address for external functions
I have an external function that was added with ExecutionEngine::addGlobalMapping... and the JIT is burning the wrong address into the emitted function. All of the addresses have 0xffffff8d00000000 added to them. Does this look familiar to anyone? I'm using 2.6 on Solaris10/x64 if it matters. This has been working for about two months and I can't readily figure out what I changed to break
2007 Jun 11
3
[LLVMdev] How to call native functions from bytecode run in JIT?
On Mon, 11 Jun 2007, Jonas Maebe wrote: > On 11 Jun 2007, at 22:35, Jan Rehders wrote: >> It's inside PPCJITInfo::relocate but unfortunately I could not figure >> out anything from the source. It looks like it's calculating new >> addresses for functions which does not make much sense for a native >> function, at all > > On the PPC, unconditional branches
2009 Aug 23
1
[LLVMdev] Basic question concerning phi nodes and SSA variable labelling.
I have a basic question concerning how LLVM assigns labels to the LHS of an SSA assignment. My impression from the interface is you can pick a string which becomes the label for the result. However if you multiple labels which share the same name in a function a number gets added to the end of the label (is this correct?). In cases where you need to know what these resulting labels are is it
2007 Jun 12
0
[LLVMdev] How to call native functions from bytecode run in JIT?
Hi, > 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, calling conventions and external linkage
2009 Jun 28
2
[LLVMdev] Several basic questions about Builder
I have been toying around with the LLVM tutorial code and I am trying to deduce what I can from it as a basis for a compiler frontend for a simple language of my own devising (once I understand what I am doing I will probably attempt mapping a more complex language target). I am having some difficulties however understanding how certain things work and I was hoping perhaps someone could help me
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
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,
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 =
2015 Sep 14
2
JIT: Mapping global variable in JIT'ted code to variable in running program
Hi, I think this is probably easiest to explain with code (I only provided the essentials for clarity): // begin file jit.cpp int myglobal; void printMyGlobal() { printf("myglobal: %d\n", myglobal); } int main(int argc, char *argv[]) { // This file, jit.cpp has been compiled to bitcode (clang -S -emit-llvm jit.cpp) // and is read into Module M here Module *M = ...
2009 Dec 07
0
[LLVMdev] 2.6 JIT using wrong address for external functions
I had that problem too: http://llvm.org/bugs/show_bug.cgi?id=5116. To work around the problem, you can: * Switch to the thread-unsafe lazy jit. * Allocate your JIT code within 2GB of your text segment. * Find a way to look up the external function with dlsym or maybe the ExecutionEngine's LazyFunctionCreator instead of addGlobalMapping. * Upgrade to the top of the svn tree. On Mon, Dec 7,
2011 Jul 01
3
[LLVMdev] Pointer Constant?
I'm writing a JIT for my toy language, and I'm confused by one thing. How do I, with IR Builder, Insert a pointer constant? For the first version of my jit, I really only need LLVM to pass around opaque types and then pass those variables to C functions that return other opaque types. So for instance, I have a Int object that wraps the GNU GMP routines. A want to be able to tell IRBuilder
2010 Aug 17
4
[LLVMdev] clang: call extern function using JIT
hi, im creating a music application(image below). At the moment im using tcc compiler but im moving across to clang because of the improved compiler warnings. Can anyone please explain and show code so I can use clang's JIT to call functions in my application? Thanks. http://old.nabble.com/file/p29449300/51709341.jpeg -- View this message in context:
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
2009 Jun 28
0
[LLVMdev] Several basic questions about Builder
On Sun, Jun 28, 2009 at 1:05 AM, Carter Cheng<carter_cheng at yahoo.com> wrote: > 1) Using the Builder interface how does one create the equivalent of stack frames and access variables in the current stack frame or perhaps in the static enclosing scope (assuming functions can be nested)? To create stack variables, you can use the alloca instruction; see
2009 Aug 18
1
[LLVMdev] ARMSchedule.td MipsSchedule.td etc.
Yes. But it is not really being used by most (any?) targets because post-RA scheduling is disabled by default. Also, the existing model is very limited in what types of micro-architectures can be described. I've been extending it to enable scheduling of multi-issue targets, targets with overlapping FU usage, and targets that use and define registers in multiple pipeline stages. See