Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] How to get a custom type from ExecutionEngine::runFunction"
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
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
2015 Sep 18
2
ExecutionEngine::runFunction and libffi
I noticed that runFunction (for MCJIT) is very limited. At the same time the interpreter already has a fairly generic way of calling functions from a pointer and a Function * (for description) using libffi. Would it make sense to pull that functionality out into a small support library and using it in MCJIT? As is runFunction isn't particularly usable.
--
Johannes S. Mueller-Roemer, MSc
Wiss.
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
2
[LLVMdev] Jump back to/return from runFunction
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.
I've considered setjmp/longjmp, but I'm not sure if this would properly
clean up the ExecutionEngine internals.
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"
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
Hi,
I'm using LLVM 2.4 (but llvm-gcc 2.2) on Ubuntu 8.10 (Intrepid Ibex) for
a small part-time project combining Witty (http://www.webtoolkit.eu) and
the ExecutionEngine in LLVM. (This is my second week with any of these
so I still lack a lot of basic knowledge.)
Sometimes I want to call a function returing a struct (in this case
std::string), thus hasStructRetAttr() is true for the Function
2010 Mar 19
0
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Probably because the integer version of the prototype is
special-cased. The problem is that the JIT has a C function pointer
of an arbitrary type that it only finds out about at runtime.
Normally, if you call a function pointer with a known type, your
compiler will generate the proper calling code and allocate the
arguments in registers or on the stack. However, doing that inside
the JIT would
2010 Mar 19
2
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Reid,
Thanks! You were right!
Changing the code to:
float (*theF)(float) = (float (*)(float)) EE -> getPointerToFunction(f);
float retVal = theF(arg1);
made the difference. Now it is dozens of times faster!
I don't really understand the cause though..
Why doesn't ExecutionEngine cope well with "define float
@someFunc(float %x)" and needs this trick ? (but copes well with
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
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 =
2008 Jul 16
0
[LLVMdev] GEP::getIndexValid() with other iterators
Hi all,
once more with the patch inline for easy review. I did not include the
argpromotion pass here, since it's not the main topic of this post.
Gr.
Matthijs
Index: lib/VMCore/Instructions.cpp
===================================================================
--- lib/VMCore/Instructions.cpp (revision 53672)
+++ lib/VMCore/Instructions.cpp (working copy)
@@ -1068,41 +1068,6 @@
2013 Jan 08
2
[LLVMdev] ExecutionEngine always comes back NULL
Sorry I forgot to add code that I use to run code:
/* Executes the AST by running the main function */
GenericValue CodeGenContext::runCode() {
std::cout << "Running code...\n";
ExecutionEngine *ee = EngineBuilder(module).create();
vector<GenericValue> noargs;
GenericValue v = ee->runFunction(mainFunction, noargs);
std::cout << "Code was run.\n";
return v;
2006 Sep 21
1
transforming factor back to numbers
Hi
I generate a new dataframe by doing:
npl.agg <- aggregate(npl$DensPlants, list(year=npl$year, sim=npl$sim),
mean, na.rm=TRUE )
Now I want to plot it by using
coplot(npl.agg$x ~ npl.agg$year | npl.agg$sim, type="l")
but, as npl.agg$year is seen as a factor, the order of the points on the
x-axis (time axis) does not follow the numerical sorting 1...100, but
rather the text
2010 Aug 19
1
[LLVMdev] how to runFunction? passing in an int
I wish to run a function passing in an int value of 5 as a single parameter.
can you please complete the code as all the examples I can find are old.
llvm::Function *EntryFn = Mod->getFunction("createModule");
if (!EntryFn) {
return 255;
}
else
{
EE->runFunction(EntryFn, ???????);
}
Thank you!
--
View this message in context:
2013 Jan 08
0
[LLVMdev] ExecutionEngine always comes back NULL
On Jan 8, 2013, at 8:09 , Manuele Conti <manuele.conti at sirius-es.it> wrote:
> Sorry I forgot to add code that I use to run code:
> /* Executes the AST by running the main function */
> GenericValue CodeGenContext::runCode() {
> std::cout << "Running code...\n";
> ExecutionEngine *ee = EngineBuilder(module).create();
> <
> div
2010 Mar 18
0
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Hi Gabi,
I have no idea why your performances is not as expected with such low level
of informations.
But, I know that the binary code is cached by the JIT. You can find the code
in JIT.cpp to convince yourself :
runFunction -> getPointerToFunction ->getPointerToGlobalIfAvailable which
returns the native address of the jitted function.
You can even try to measure time needed by each
2012 May 08
2
How to deal with a dataframe within a dataframe?
Hello all,
I am doing an aggregation where the aggregating function returns not a
single numeric value but a vector of two elements using return(c(val1,
val2)). I don't know how to access the individual columns of that
vector in the resulting dataframe though. How is this done correctly?
Thanks, robert
> agg <- aggregate(formula=df$value ~ df$quarter + df$tool,
+ FUN=cp.cpk,
2010 Mar 18
2
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Hello
I have the following scenario, and I am not sure why the performance
is so bad (take 30 minutes to complete with very simple generated
functions):
1. Create module
2. Do something like EE =
EngineBuilder(theModule).setEngineKind(EngineKind::JIT).create();
3. Create a function in the module: theModule->getOrInsertFunction(..)
4. Execute 1000 times the function using