[LLVMdev] JIT functions' signature known only at runtime
Frank Winter
fwinter at jlab.org
Tue Oct 22 19:07:59 PDT 2013
Hi there! I am trying to figure out how I can call the function returned
by the JIT execution engine. The only circumstance that makes this case
a little problematic is that the function's signature is only available as
runtime state. More precisely the arguments to be passed are only
available as a vector of, e.g.,
union Types {
void *ptr;
float *ptr_float;
double *ptr_double;
float fl;
int in;
double db;
bool bl;
};
std::vector<std::pair<int,Types> > arguments;
where the first element of the pair would clearly identify of which type
the argument is.
I thought that I might not be the first having this problem and checked
the mailing list
without success.
Does LLVM has any glue code to call functions returned by the JIT
execution engine?
Or is the only solution in this case to pass the address of the whole
vector and let the
jitted function handle everything?
Frank
More information about the llvm-dev
mailing list