similar to: [LLVMdev] Jump back to/return from runFunction

Displaying 20 results from an estimated 8000 matches similar to: "[LLVMdev] Jump back to/return from runFunction"

2013 Jan 30
0
[LLVMdev] Jump back to/return from runFunction
On Jan 29, 2013, at 21:41 , edA-qa mort-ora-y <eda-qa at disemia.com> wrote: > How can I properly exit from code being executed via > "ExecutionEngine::runFunction"? My JIT'd code is executing and it calls > a function in the host program. This host function then decides the > executing code should be stopped and wants to return from runFunction. If the executing
2013 Jan 30
1
[LLVMdev] Jump back to/return from runFunction
On 30/01/13 07:17, Rick Mann wrote: > If the executing code wants to return, it should just return. I take > it that doesn't work for you? You probably need to modify things so > that your JITed code can tolerate the host code returning, or it can > return some kind of error condition. The guest code in this case doesn't know that it will be returning. This "abort"
2013 Nov 08
2
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
That makes it more mysterious then since I am indeed only calling a main function. Perhaps I have to invoke it a different way. Here's my call I have now: auto main = linker->getModule()->getFunction( "main" ); std::vector<llvm::GenericValue> args(2); args[0].IntVal = llvm::APInt( platform::abi_int_size, 0 ); args[1].PointerVal = nullptr; llvm::GenericValue gv =
2013 Nov 08
1
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
It was the return type which was i64. I changed it also to my abi_int_size and it works now. I have to take care of a few other type translations, but it looks like MCJIT is working now. Thank you. On 08/11/13 18:12, Yaron Keren wrote: > Something must be wrong with the Function Type. Try to debug into > runFunction to see which if condition fails. > Just a guess, if this is on 64
2013 Nov 08
0
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
Something must be wrong with the Function Type. Try to debug into runFunction to see which if condition fails. Just a guess, if this is on 64 bit system the first argument type may be int64 but needs to be int32. Yaron 2013/11/8 edA-qa mort-ora-y <eda-qa at disemia.com> > That makes it more mysterious then since I am indeed only calling a main > function. Perhaps I have to invoke
2013 Nov 08
0
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
MCJIT::runFunction supports only main-style argument passing but not other cases like the JIT. These types of arguments will work: (int, char**, char**) (int, char**) (int) (void) The general case is not supported since it requires creating a small stub function, compiling and running it on the fly, supported by JIT but not MCJIT. However, with the supported calling sequences, you can probably
2013 Nov 08
2
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
I'm trying to get MCJIT working but I get the following errors: Full-featured argument passing not supported yet! UNREACHABLE executed at MCJIT.cpp:322! I'm sure the first one will be a problem, but the second one prevents me from testing anything. I don't know how to fix the problem. My code works when using the non-MC JIT, and I added to my EngineBuilder: .setUseMCJIT(true)
2012 Nov 11
1
[LLVMdev] wrong value with getPointerToGlobal
I'm having some trouble getting access to a global variable with getPointerToGlobal. The resulting value is not what I am expecting. My assembly looks something like this: @gresult = global i32 undef define i32 @eval_expr() { entry: ... store i32 %3, i32* @gresult ret i32 %3 } Where "gresult" is created with: auto global = new llvm::GlobalVariable( *module, int32Type,
2012 Nov 12
2
[LLVMdev] call/link to host program function
I would like to have my IR call a function which exists in the host program (the one which is creating the ExecutionEngine). I don't see from the docs on Linker, ExecutionEngine, or Module how I would go about doing this. That is, I have a function like this in my C++ code: void callback( int64_t object, int32_t value ); I would like to produce IR which links back to this function and thus
2013 Jan 30
3
[LLVMdev] Calling dispatch_async() within call to ExecutionEngine::runFunction()
My host app calls runFunction() on my JITed code. It, in turn, calls a C function ("decode()") in the host app that then calls dispatch_async(). The runFunction() call returns as expected, but the block passed to dispatch_async() never gets called. The async block is supposed to call a function pointer callback that was passed in to decode(). Everything is being called on the main
2018 May 05
4
Slow IR compilation/JIT, profiling points to LLVM?
I'm having issues of my compiler, and JIT execution, of LLVM IR being rather slow. It's accounting for the vast majority of my full compilation time.  I'm trying to figure out why this is happening, since it's becoming an impediment.  (Note: by slow I mean about 3s of time for only about 2K of my front-end code, 65K lines of LLVM-IR) Using valgrind I see some functions which seem
2018 May 05
0
Slow IR compilation/JIT, profiling points to LLVM?
Hi, Could you share how you compile IR and which version of JIT you use (Orc, MCJIT)? Could it be that you are using interpreter instead of actual JIT? Cheers, Alex. > On 5. May 2018, at 08:04, edA-qa mort-ora-y via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I'm having issues of my compiler, and JIT execution, of LLVM IR being > rather slow. It's accounting for
2013 Oct 06
1
[LLVMdev] how to runtime link to shared library symbols in the JIT?
I would like to load shared libraries at runtime for use in some JIT'd code. I can't find much about how the JIT resolves symbols, so can somebody answer a few questions for me? 1. Will the symbols from a dlopen'd library with RTLD_GLOBAL be available? In this case I can manually dlopen the libraries prior to the JIT run. 2. Can I derive from ExecutionEngine and override the
2013 Jan 30
0
[LLVMdev] Calling dispatch_async() within call to ExecutionEngine::runFunction()
I have used libdispatch (on FreeBSD) from JIT'd code without any issues, so I think your bug is elsewhere. David On 30 Jan 2013, at 07:43, Rick Mann wrote: > My host app calls runFunction() on my JITed code. It, in turn, calls a C function ("decode()") in the host app that then calls dispatch_async(). The runFunction() call returns as expected, but the block passed to
2012 Nov 11
4
[LLVMdev] IR sizeof?
Is there a way to get the size of a type in the IR assembly code? I know the size must be known since alloca and getelementptr both implicitly use it, but I don't see any way to get access to the size directly. I know my final compiler will have to get the size itself, but I'm just doing some simple tests directly in assembly now and am hoping there is an easy way to get the size of a
2018 Apr 18
3
Why does clang do a memcpy? Is the cast not enough? (ABI function args)
Yes, but why is it even copying the memory?  It already has a pointer which it can cast and load from -- and does so in other scenarios. I'm wondering whether this copying is somehow required and I'm missing something, or it's just an artifact of the clang emitter. That is, could it not omit the memcpy and cast the original variable? On 18/04/18 19:43, Krzysztof Parzyszek via
2018 Apr 18
4
A struct {i8,i64} has size == 12, clang says size 16
I'm creating a struct of `{i8,i64}` and `DataLayout::getTypeAllocSize` is returning `12`. `getStructLayout` also gives an `4` offset for the second element. The native ABI, and clang, for the same type are producing a size of 16, with an alignment of 8, for the second element. This is for the system triple "x86_64-linux-gnu" What could be causing this difference in alignment and
2018 Apr 18
2
A struct {i8, i64} has size == 12, clang says size 16
I think I see a potential issue. My ExecutionEngine setup may not be using the same target as my object code emitting, and in this test case I'm running in the ExecutionEngine.  I'll go over this code to ensure I'm creating the same triple and see if that helps -- I'm assuming it will, since I can't imagine the exact same triple with clang would produce a different layout. On
2018 Apr 18
0
A struct {i8, i64} has size == 12, clang says size 16
It sounds like your DataLayout may not match clang's for x86_64-linux. What does it say about the alignment of i64? On Wed, Apr 18, 2018 at 12:05 PM edA-qa mort-ora-y via llvm-dev < llvm-dev at lists.llvm.org> wrote: > I'm creating a struct of `{i8,i64}` and `DataLayout::getTypeAllocSize` > is returning `12`. `getStructLayout` also gives an `4` offset for the > second
2012 Nov 13
0
[LLVMdev] call/link to host program function
Hi, On 12/11/12 20:05, edA-qa mort-ora-y wrote: > I would like to have my IR call a function which exists in the host > program (the one which is creating the ExecutionEngine). I don't see > from the docs on Linker, ExecutionEngine, or Module how I would go about > doing this. > > That is, I have a function like this in my C++ code: > void callback( int64_t object,