[LLVMdev] Is it possible to cache a function using MCJIT?

Cheng Zhu chengzhu at gmail.com
Mon Nov 17 17:01:40 PST 2014


Hi, All

I'm not sure if this has been asked or not. Basically, I need to parse
a statement which is the combination of different functions and
execute the statement as a whole. I'd like to cache a compiled object
of a function instead of module so the same function from object cache
can be reused later in a different statement. But the ObjectCache only
provide getObject(Module m) interface. I probably can have one
function in one module and associate all the modules (functions) with
that statement, but each module requires one ExecutionEngine, I guess
it becomes heavier to execute the statement with all the EE/Modules.

Any suggestions? Is this a valid user case for MCJIT?

Thank you.
-- 
Best regards

Cheng



More information about the llvm-dev mailing list