[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?

Gabi bugspynet at gmail.com
Thu Mar 18 01:21:54 PDT 2010


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  EE->runFunction(function,
args) with different args in each round.

My question - Does section 4 above makes the EE recompile the function
1000 times?  If no, why is the performance is so bad? what am I doing
wrong ? Maybe I should somehow cache the function's binary code?


llvm-version 2.7
OS: Linux 2.6.31 64 bits (intel dual core, 4GB memory)

-- 
Regards,
Gabi

http://bugspy.net



More information about the llvm-dev mailing list