Hi Gabi,<br><br>I have no idea why your performances is not as expected with such low level of informations.<br><br>But, I know that the binary code is cached by the JIT. You can find the code in JIT.cpp to convince yourself :<br>
runFunction -> getPointerToFunction ->getPointerToGlobalIfAvailable which returns the native address of the jitted function.<br><br>You can even try to measure time needed by each runFunction to run to double-convince yourself. :)<br>
<br>Olivier.<br><br><br><div class="gmail_quote">On Thu, Mar 18, 2010 at 9:21 AM, Gabi <span dir="ltr"><<a href="mailto:bugspynet@gmail.com">bugspynet@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello<br>
I have the following scenario, and I am not sure why the performance<br>
is so bad (take 30 minutes to complete with very simple generated<br>
functions):<br>
<br>
1. Create module<br>
2. Do something like EE =<br>
EngineBuilder(theModule).setEngineKind(EngineKind::JIT).create();<br>
3. Create a function in the module: theModule->getOrInsertFunction(..)<br>
4. Execute 1000 times the function using  EE->runFunction(function,<br>
args) with different args in each round.<br>
<br>
My question - Does section 4 above makes the EE recompile the function<br>
1000 times?  If no, why is the performance is so bad? what am I doing<br>
wrong ? Maybe I should somehow cache the function's binary code?<br>
<br>
<br>
llvm-version 2.7<br>
OS: Linux 2.6.31 64 bits (intel dual core, 4GB memory)<br>
<br>
--<br>
Regards,<br>
Gabi<br>
<br>
<a href="http://bugspy.net" target="_blank">http://bugspy.net</a><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br>